Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[oweals/cde.git] / cde / lib / DtPrint / Print.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: Print.h /main/13 1996/10/31 02:09:08 cde-hp $ */
24 /*
25  * DtPrint/Print.h
26  */
27 /* (c) Copyright 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
28  *     ALL RIGHTS RESERVED
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.
37  */
38 #ifndef _DtPrint_h
39 #define _DtPrint_h
40
41 #include <Xm/Xm.h>
42 #if 0 && defined(PRINTING_SUPPORTED)
43 #include <X11/extensions/Print.h> 
44 #endif /* PRINTING_SUPPORTED */
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 /*
51  * Class record constants 
52  */
53 externalref WidgetClass dtPrintSetupBoxWidgetClass;
54
55 typedef struct _DtPrintSetupBoxClassRec * DtPrintSetupBoxWidgetClass;
56 typedef struct _DtPrintSetupBoxRec      * DtPrintSetupBoxWidget;
57
58
59 #ifndef DtIsPrintSetupBox
60 #define DtIsPrintSetupBox(w)  (XtIsSubclass (w, dtPrintSetupBoxWidgetClass))
61 #endif
62
63 /*
64  * Resource Names
65  */
66 #define DtNcancelCallback "cancelCallback"
67 #define DtNclosePrintDisplayCallback "closePrintDisplayCallback"
68 #define DtNcopies "copies"
69 #define DtNdescription "description"
70 #define DtNdestroyContextCallback "destroyContextCallback"
71 #define DtNfileName "fileName"
72 #ifndef DtNminimizeButtons
73 # define DtNminimizeButtons "minimizeButtons"
74 #endif
75 #define DtNoptionCount "optionCount"
76 #define DtNoptions "options"
77 #define DtNprintCallback "printCallback"
78 #define DtNprintDestination "printDestination"
79 #define DtNprinterInfoProc "printerInfoProc"
80 #define DtNprinterName "printerName"
81 #define DtNprintSetupMode "printSetupMode"
82 #define DtNselectFileProc "selectFileProc"
83 #define DtNselectPrinterProc "selectPrinterProc"
84 #define DtNsetupCallback "setupCallback"
85 #define DtNverifyPrinterProc "verifyPrinterProc"
86 #define DtNworkAreaLocation "workAreaLocation"
87
88 #define DtCCancelCallback "CancelCallback"
89 #define DtCClosePrintDisplayCallback "ClosePrintDisplayCallback"
90 #define DtCCopies "Copies"
91 #define DtCDescription "Description"
92 #define DtCDestroyContextCallback "DestroyContextCallback"
93 #define DtCFileName "FileName"
94 #ifndef DtCMinimizeButtons
95 # define DtCMinimizeButtons "MinimizeButtons"
96 #endif
97 #define DtCOptionCount "OptionCount"
98 #define DtCOptions "Options"
99 #define DtCPrintCallback "PrintCallback"
100 #define DtCPrintDestination "PrintDestination"
101 #define DtCPrinterInfoProc "PrinterInfoProc"
102 #define DtCPrinterName "PrinterName"
103 #define DtCPrintSetupMode "PrintSetupMode"
104 #define DtCSelectFileProc "SelectFileProc"
105 #define DtCSelectPrinterProc "SelectPrinterProc"
106 #define DtCSetupCallback "SetupCallback"
107 #define DtCVerifyPrinterProc "VerifyPrinterProc"
108 #define DtCWorkAreaLocation "WorkAreaLocation"
109
110 #define DtRPrintSetupProc "PrintSetupProc"
111
112 /*
113  * DtNsetupMode Resource Values
114  */
115 enum {
116     DtPRINT_SETUP_PLAIN,
117     DtPRINT_SETUP_XP
118 };
119
120 /*
121  * DtNworkAreaLocation Resource Values
122  */
123 enum {
124     DtWORK_AREA_NONE,
125     DtWORK_AREA_TOP,
126     DtWORK_AREA_TOP_AND_BOTTOM,
127     DtWORK_AREA_BOTTOM
128 };
129
130 /*
131  * DtNprintDestination Resource Values
132  */
133 enum { DtPRINT_NO_DESTINATION, DtPRINT_TO_PRINTER, DtPRINT_TO_FILE };
134
135 /*
136  * DtNprinterNameMode Resource Values
137  */
138 enum { DtSHORT_NAME, DtMEDIUM_NAME, DtLONG_NAME };
139
140 /*
141  * Mode values for DtPrintSetupBoxResetConnection()
142  */
143 typedef enum {
144     DtPRINT_CLOSE_CONNECTION,
145     DtPRINT_RELEASE_CONNECTION
146 } DtPrintResetConnectionMode;
147
148 /*
149  * Callback Reasons
150  */
151 enum {
152     DtPRINT_CR_NONE,
153     DtPRINT_CR_CANCEL,
154     DtPRINT_CR_CLOSE_PRINT_DISPLAY,
155     DtPRINT_CR_PRINT,
156     DtPRINT_CR_SETUP
157 };
158
159 /*
160  * DtPrint proecdure return values
161  */
162 enum {
163     DtPRINT_SUCCESS,
164     DtPRINT_BAD_PARM,
165     DtPRINT_FAILURE,
166     DtPRINT_INVALID_DISPLAY,
167     DtPRINT_NOT_XP_DISPLAY,
168     DtPRINT_NO_CONNECTION,
169     DtPRINT_NO_DEFAULT,
170     DtPRINT_NO_DEFAULT_DISPLAY,
171     DtPRINT_NO_PRINTER,
172     DtPRINT_PRINTER_MISSING
173 };
174
175 enum {
176     DtPRINT_HINT_MESSAGES_OK,
177     DtPRINT_HINT_NO_MESSAGES
178 };
179
180 /*
181  * PrintSetupBox Callback Structure Definition
182  */
183 typedef struct _DtPrintSetupData
184 {
185     String printer_name;
186     Display *print_display;
187 #ifdef PRINTING_SUPPORT
188     XPContext print_context;
189 #endif /* PRINTING_SUPPORTED */
190     XtEnum destination;
191     String dest_info;
192     XtEnum messages_hint;
193 } DtPrintSetupData;
194
195 typedef struct _DtPrintSetupCallbackStruct
196 {
197     int reason;
198     XEvent *event;
199     DtPrintSetupData *print_data;
200 } DtPrintSetupCallbackStruct;
201
202 /*
203  * PrintSetupBox Procedure Resource Type Definition
204  */
205 typedef XtEnum (*DtPrintSetupProc)(Widget, DtPrintSetupData*);
206
207 /*
208  * Public Function Declarations
209  */
210 extern Widget DtCreatePrintSetupBox(
211                                     Widget p,
212                                     String name,
213                                     ArgList args,
214                                     Cardinal n) ;
215 extern Widget DtCreatePrintSetupDialog(
216                                        Widget ds_p,
217                                        String name,
218                                        ArgList sb_args,
219                                        Cardinal sb_n) ;
220 extern DtPrintSetupData* DtPrintCopySetupData(
221                                               DtPrintSetupData* target,
222                                               const DtPrintSetupData* source);
223 extern XtEnum DtPrintFillSetupData(
224                                    Widget psub,
225                                    DtPrintSetupData* print_data);
226 extern void DtPrintFreeSetupData(
227                                  DtPrintSetupData* target);
228 extern XtEnum DtPrintResetConnection(
229                                      Widget psub,
230                                      DtPrintResetConnectionMode m);
231
232 #ifdef __cplusplus
233 }  /* Close scope of 'extern "C"' declaration which encloses file. */
234 #endif
235
236 #endif /* _DtPrint_h */
237 /* DON'T ADD ANYTHING AFTER THIS #endif */