upload tizen1.0 source
[framework/uifw/xorg/lib/libxaw.git] / include / X11 / Xaw / Print.h
1 /* $Xorg: Print.h,v 1.1 2003/07/11 19:46:06 gisburn Exp $ */
2 /******************************************************************************
3  ******************************************************************************
4  **
5  ** (c) Copyright 2003 Danny Backx <danny.backx@skynet.be>
6  ** (c) Copyright 2003-2004 Roland Mainz <roland.mainz@nrubsig.org>
7  ** 
8  ** Permission is hereby granted, free of charge, to any person obtaining a copy
9  ** of this software and associated documentation files (the "Software"), to deal
10  ** in the Software without restriction, including without limitation the rights
11  ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12  ** copies of the Software, and to permit persons to whom the Software is
13  ** furnished to do so, subject to the following conditions:
14  **
15  ** The above copyright notice and this permission notice shall be included in
16  ** all copies or substantial portions of the Software.
17  **
18  ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
21  ** COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22  ** IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23  ** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  **
25  ** Except as contained in this notice, the names of the copyright holders shall
26  ** not be used in advertising or otherwise to promote the sale, use or other
27  ** dealings in this Software without prior written authorization from said
28  ** copyright holders.
29  **
30  ******************************************************************************
31  *****************************************************************************/
32  
33
34 #ifndef _XAW_PRINT_H
35 #define _XAW_PRINT_H 1
36
37 #include <X11/extensions/Print.h>
38
39 /* Resources:
40    NOT WRITTEN YET
41 */
42
43 /* XawPrintConfigureLayoutMode - define how the shell resizes/moves itself
44  * to match the paper size
45  * Values:
46  * - XawPrintLAYOUTMODE_NONE
47  *   do nothing
48  * - XawPrintLAYOUTMODE_PAGESIZE
49  *   set width/height to page size
50  *   (this is the default (mainly for compatibilty to XmPrintShell))
51  * - XawPrintLAYOUTMODE_DRAWABLEAREA
52  *   set x/y/width/height to drawable area of pag
53  */
54 typedef
55 enum
56 {
57   XawPrintLAYOUTMODE_NONE,
58   XawPrintLAYOUTMODE_PAGESIZE,
59   XawPrintLAYOUTMODE_DRAWABLEAREA
60 } XawPrintConfigureLayoutMode;
61
62
63 #define XawNstartJobCallback             "startJobCallback"
64 #define XawNendJobCallback               "endJobCallback"
65 #define XawNdocSetupCallback             "docSetupCallback"
66 #define XawNpageSetupCallback            "pageSetupCallback"
67 #define XawNlayoutMode                   "layoutMode"
68 #define XawCLayoutMode                   "LayoutMode"
69 #define XawNminX                         "minX"
70 #define XawCMinX                         "MinX"
71 #define XawNminY                         "minY"
72 #define XawCMinY                         "MinY"
73 #define XawNmaxX                         "maxX"
74 #define XawCMaxX                         "MaxX"
75 #define XawNmaxY                         "maxY"
76 #define XawCMaxY                         "MaxY"
77 #define XawNcurrDocNumInJob              "currDocNumInJob"
78 #define XawCCurrDocNumInJob              "CurrDocNumInJob"
79 #define XawNcurrPageNumInDoc             "currPageNumInDoc"
80 #define XawCCurrPageNumInDoc             "CurrPageNumInDoc"
81 #define XawNcurrPageNumInJob             "currPageNumInJob"
82 #define XawCCurrPageNumInJob             "CurrPageNumInJob"
83 #define XawNdefaultPixmapResolution      "defaultPixmapResolution"
84 #define XawCDefaultPixmapResolution      "DefaultPixmapResolution"
85
86 #define XawCR_START_JOB         70
87 #define XawCR_END_JOB           71
88 #define XawCR_DOC_SETUP         72
89 #define XawCR_PAGE_SETUP        73
90
91 typedef struct
92 {
93     int            reason;
94     XEvent        *event;
95     XPContext      context;
96     Boolean        last_page_in_doc;
97     Boolean        last_page_in_job;
98     XtPointer      detail;
99 } XawPrintShellCallbackStruct;
100
101 extern WidgetClass xawPrintShellWidgetClass;
102 typedef struct XawPrintShellRec *XawPrintShellWidget;
103
104 /************************************************************
105  *
106  * Public Functions.
107  *
108  ************************************************************/
109
110 _XFUNCPROTOBEGIN
111
112 /* Returns whether the widget passed in is a print shell or "print shell"-like
113  * widget (e.g. print preview).
114  * Note that this will return |True| for more classes than |XawPrintShell| in
115  * the future (like for |XmPrintShell| etc.)
116  */
117 extern Boolean XawIsPrintShell(
118 #if NeedFunctionPrototypes
119     Widget w
120 #endif
121 );
122
123 extern void   XawPrintRedisplayWidget(
124 #if NeedFunctionPrototypes
125     Widget w /* Widget */
126 #endif
127 );
128           
129 _XFUNCPROTOEND
130
131 #endif /* !_XAW_PRINT_H */
132