/* Copyright 1997 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /***************************************************/ /* File : Printing.h */ /* */ /* Purpose: Printing functions for the browser. */ /* */ /* This source is fairly closely tied to */ /* PrintStyle.h, as the Print dialogue */ /* can open and close the Print Style */ /* dialogue. */ /* */ /* Author : A.D.Hodgkinson */ /* */ /* History: 27-Jan-97: Created. */ /* 25-Aug-97: Definitions imported from */ /* TBEvents.h. */ /***************************************************/ /* Print dialogue component IDs */ #define PStartWhole 0x02001 #define PStartVisible 0x02002 #define PEndWhole 0x02003 #define PEndVisible 0x02004 #define PEndMany 0x02005 #define PEndManyNum 0x02006 #define PEndManyLabel 0x02007 #define PReformatToFit 0x02008 #define POriUpright 0x02009 #define POriSideways 0x0200a #define PCopiesNum 0x0200b #define PCopiesLabel 0x0200c #define POpenPrintStyle 0x0200d #define PGroupFrameOne 0x0200e #define PGroupFrameTwo 0x0200f /* Print dialogue event codes */ #define EPEnableReformat 0x021ff /* When activating radios that may enable or disable the */ /* Reformat option in the Print dialogue box. */ #define EPCancelPrint 0x021fe #define EPStartPrint 0x021fd /* Message definitions */ #define Browser_Message_PrintFile 0x80140 #define Browser_Message_WillPrint 0x80141 #define Browser_Message_PrintSave 0x80142 #define Browser_Message_PrintError 0x80144 #define Browser_Message_PrintTypeOdd 0x80145 #define Browser_Message_PrintTypeKnown 0x80146 /* Printer driver features */ #define Browser_Printer_Colour 1 << 0 #define Browser_Printer_LimitedColours 1 << 1 #define Browser_Printer_DiscreteColours 1 << 2 #define Browser_Printer_OutlinesOnly 1 << 8 #define Browser_Printer_ThinLinesOnly 1 << 9 #define Browser_Printer_NoOverwriting 1 << 10 #define Browser_Printer_TransformsSprites 1 << 11 #define Browser_Printer_TransformsFonts 1 << 12 #define Browser_Printer_PreScansRectangles 1 << 13 #define Browser_Printer_ScreenDumps 1 << 24 #define Browser_Printer_TransformsPages 1 << 25 #define Browser_Printer_InsertIllustration 1 << 26 #define Browser_Printer_MiscOp 1 << 27 #define Browser_Printer_SetDriver 1 << 28 #define Browser_Printer_DeclareFont 1 << 29 /* Miscellaneous definitions */ /* If a line is more than a (1/PrintSplitFraction)th */ /* of the page height, it will always be forced to */ /* split over the page boundary. */ #define PrintSplitFraction 4 /* Function prototypes */ _kernel_oserror * print_open_for (browser_data * b, ObjectId parent); int print_set_defaults (void); int print_to_be_shown (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); _kernel_oserror * print_close (ObjectId ancestor, int do_not_close); void print_print (const char * path); void print_abort_print (void); void print_return_dialogue_info (ObjectId * self, ObjectId * window, ObjectId * ancestor, browser_data ** ancestor_b);