/* 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. */ /***************************************************/ /* Dialogue definitions */ #define StartWhole 0x4101 #define StartVisible 0x4102 #define EndWhole 0x4104 #define EndVisible 0x4105 #define EndMany 0x4107 #define EndManyNum 0x4108 #define EndManyLabel 0x4109 #define ReformToFit 0x410c #define OriUpright 0x410a #define OriSideways 0x410b #define CopiesNum 0x410e #define OpenPrintStyle 0x410f #define EEnableReformat 0x4100 /* When activating radios that may enable or disable the */ /* Reformat option in the Print dialogue box. */ #define ECancelPrint 0x4101 /* If using non-standard buttons in the PrintSetup */ /* dialogue, the Cancel equivalent must send this event. */ #define EStartPrint 0x4102 /* Similarly, a Print equivalent must send this event. */ /* 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 8 /* Function prototypes */ 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);