2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: Print.h /main/13 1996/10/31 02:09:08 cde-hp $ */
27 /* (c) Copyright 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
29 * (c) Copyright 1989, 1996 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
30 * (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1995, 1996,
31 * HEWLETT-PACKARD COMPANY
32 * (c) Copyright 1996 International Business Machines Corp.
33 * (c) Copyright 1996 Sun Microsystems, Inc.
34 * (c) Copyright 1996 Novell, Inc.
35 * (c) Copyright 1996 FUJITSU LIMITED.
36 * (c) Copyright 1996 Hitachi.
42 #include <X11/extensions/Print.h>
49 * Class record constants
51 externalref WidgetClass dtPrintSetupBoxWidgetClass;
53 typedef struct _DtPrintSetupBoxClassRec * DtPrintSetupBoxWidgetClass;
54 typedef struct _DtPrintSetupBoxRec * DtPrintSetupBoxWidget;
57 #ifndef DtIsPrintSetupBox
58 #define DtIsPrintSetupBox(w) (XtIsSubclass (w, dtPrintSetupBoxWidgetClass))
64 #define DtNcancelCallback "cancelCallback"
65 #define DtNclosePrintDisplayCallback "closePrintDisplayCallback"
66 #define DtNcopies "copies"
67 #define DtNdescription "description"
68 #define DtNdestroyContextCallback "destroyContextCallback"
69 #define DtNfileName "fileName"
70 #ifndef DtNminimizeButtons
71 # define DtNminimizeButtons "minimizeButtons"
73 #define DtNoptionCount "optionCount"
74 #define DtNoptions "options"
75 #define DtNprintCallback "printCallback"
76 #define DtNprintDestination "printDestination"
77 #define DtNprinterInfoProc "printerInfoProc"
78 #define DtNprinterName "printerName"
79 #define DtNprintSetupMode "printSetupMode"
80 #define DtNselectFileProc "selectFileProc"
81 #define DtNselectPrinterProc "selectPrinterProc"
82 #define DtNsetupCallback "setupCallback"
83 #define DtNverifyPrinterProc "verifyPrinterProc"
84 #define DtNworkAreaLocation "workAreaLocation"
86 #define DtCCancelCallback "CancelCallback"
87 #define DtCClosePrintDisplayCallback "ClosePrintDisplayCallback"
88 #define DtCCopies "Copies"
89 #define DtCDescription "Description"
90 #define DtCDestroyContextCallback "DestroyContextCallback"
91 #define DtCFileName "FileName"
92 #ifndef DtCMinimizeButtons
93 # define DtCMinimizeButtons "MinimizeButtons"
95 #define DtCOptionCount "OptionCount"
96 #define DtCOptions "Options"
97 #define DtCPrintCallback "PrintCallback"
98 #define DtCPrintDestination "PrintDestination"
99 #define DtCPrinterInfoProc "PrinterInfoProc"
100 #define DtCPrinterName "PrinterName"
101 #define DtCPrintSetupMode "PrintSetupMode"
102 #define DtCSelectFileProc "SelectFileProc"
103 #define DtCSelectPrinterProc "SelectPrinterProc"
104 #define DtCSetupCallback "SetupCallback"
105 #define DtCVerifyPrinterProc "VerifyPrinterProc"
106 #define DtCWorkAreaLocation "WorkAreaLocation"
108 #define DtRPrintSetupProc "PrintSetupProc"
111 * DtNsetupMode Resource Values
119 * DtNworkAreaLocation Resource Values
124 DtWORK_AREA_TOP_AND_BOTTOM,
129 * DtNprintDestination Resource Values
131 enum { DtPRINT_NO_DESTINATION, DtPRINT_TO_PRINTER, DtPRINT_TO_FILE };
134 * DtNprinterNameMode Resource Values
136 enum { DtSHORT_NAME, DtMEDIUM_NAME, DtLONG_NAME };
139 * Mode values for DtPrintSetupBoxResetConnection()
142 DtPRINT_CLOSE_CONNECTION,
143 DtPRINT_RELEASE_CONNECTION
144 } DtPrintResetConnectionMode;
152 DtPRINT_CR_CLOSE_PRINT_DISPLAY,
158 * DtPrint proecdure return values
164 DtPRINT_INVALID_DISPLAY,
165 DtPRINT_NOT_XP_DISPLAY,
166 DtPRINT_NO_CONNECTION,
168 DtPRINT_NO_DEFAULT_DISPLAY,
170 DtPRINT_PRINTER_MISSING
174 DtPRINT_HINT_MESSAGES_OK,
175 DtPRINT_HINT_NO_MESSAGES
179 * PrintSetupBox Callback Structure Definition
181 typedef struct _DtPrintSetupData
184 Display *print_display;
185 XPContext print_context;
188 XtEnum messages_hint;
191 typedef struct _DtPrintSetupCallbackStruct
195 DtPrintSetupData *print_data;
196 } DtPrintSetupCallbackStruct;
199 * PrintSetupBox Procedure Resource Type Definition
201 typedef XtEnum (*DtPrintSetupProc)(Widget, DtPrintSetupData*);
204 * Public Function Declarations
206 extern Widget DtCreatePrintSetupBox(
211 extern Widget DtCreatePrintSetupDialog(
216 extern DtPrintSetupData* DtPrintCopySetupData(
217 DtPrintSetupData* target,
218 const DtPrintSetupData* source);
219 extern XtEnum DtPrintFillSetupData(
221 DtPrintSetupData* print_data);
222 extern void DtPrintFreeSetupData(
223 DtPrintSetupData* target);
224 extern XtEnum DtPrintResetConnection(
226 DtPrintResetConnectionMode m);
229 } /* Close scope of 'extern "C"' declaration which encloses file. */
232 #endif /* _DtPrint_h */
233 /* DON'T ADD ANYTHING AFTER THIS #endif */