2 |
- |
1 |
/* Copyright (C) 1989, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved.
|
|
|
2 |
|
|
|
3 |
This software is provided AS-IS with no warranty, either express or
|
|
|
4 |
implied.
|
|
|
5 |
|
|
|
6 |
This software is distributed under license and may not be copied,
|
|
|
7 |
modified or distributed except as expressly authorized under the terms
|
|
|
8 |
of the license contained in the file LICENSE in this distribution.
|
|
|
9 |
|
|
|
10 |
For more information about licensing, please refer to
|
|
|
11 |
http://www.ghostscript.com/licensing/. For information on
|
|
|
12 |
commercial licensing, go to http://www.artifex.com/licensing/ or
|
|
|
13 |
contact Artifex Software, Inc., 101 Lucas Valley Road #110,
|
|
|
14 |
San Rafael, CA 94903, U.S.A., +1(415)492-9861.
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
/* $Id: x_.h,v 1.5 2002/02/21 22:24:54 giles Exp $ */
|
|
|
18 |
/* Header for including X library calls in Ghostscript X11 driver */
|
|
|
19 |
|
|
|
20 |
#ifndef x__INCLUDED
|
|
|
21 |
# define x__INCLUDED
|
|
|
22 |
|
|
|
23 |
/* Some versions of the X library use `private' as a member name, so: */
|
|
|
24 |
#undef private
|
|
|
25 |
|
|
|
26 |
/* Most X implementations have _Xdebug, but VMS DECWindows doesn't. */
|
|
|
27 |
#ifndef VMS
|
|
|
28 |
# define have_Xdebug
|
|
|
29 |
#endif
|
|
|
30 |
|
|
|
31 |
#ifdef VMS
|
|
|
32 |
|
|
|
33 |
# ifdef __GNUC__
|
|
|
34 |
|
|
|
35 |
/* Names of external functions which contain upper case letters are
|
|
|
36 |
* modified by the VMS GNU C compiler to prevent confusion between
|
|
|
37 |
* names such as XOpen and xopen. GNU C does this by translating a
|
|
|
38 |
* name like XOpen into xopen_aaaaaaaax with "aaaaaaaa" a hexadecimal
|
|
|
39 |
* string. However, this causes problems when we link against the
|
|
|
40 |
* X library which doesn't contain a routine named xopen_aaaaaaaax.
|
|
|
41 |
* So, we use #define's to map all X routine names to lower case.
|
|
|
42 |
* (Note that routines like BlackPixelOfScreen, which are [for VMS]
|
|
|
43 |
* preprocessor macros, do not appear here.)
|
|
|
44 |
*/
|
|
|
45 |
|
|
|
46 |
/*
|
|
|
47 |
* The names redefined here are those which the current Ghostscript X11
|
|
|
48 |
* driver happens to use: this list may grow in the future.
|
|
|
49 |
*/
|
|
|
50 |
|
|
|
51 |
# define XAllocColor xalloccolor
|
|
|
52 |
# define XAllocNamedColor xallocnamedcolor
|
|
|
53 |
# define XCloseDisplay xclosedisplay
|
|
|
54 |
# define XCopyArea xcopyarea
|
|
|
55 |
# define XCreateGC xcreategc
|
|
|
56 |
# define XCreatePixmap xcreatepixmap
|
|
|
57 |
# define XCreateWindow xcreatewindow
|
|
|
58 |
# define XDestroyImage xdestroyimage
|
|
|
59 |
# define XDisplayString xdisplaystring
|
|
|
60 |
# define XDrawLine xdrawline
|
|
|
61 |
# define XDrawPoint xdrawpoint
|
|
|
62 |
# define XDrawString xdrawstring
|
|
|
63 |
# define XFillPolygon xfillpolygon
|
|
|
64 |
# define XFillRectangle xfillrectangle
|
|
|
65 |
# define XFillRectangles xfillrectangles
|
|
|
66 |
# define XFlush xflush
|
|
|
67 |
# define XFree xfree
|
|
|
68 |
# define XFreeColors xfreecolors
|
|
|
69 |
# define XFreeFont xfreefont
|
|
|
70 |
# define XFreeFontNames xfreefontnames
|
|
|
71 |
# define XFreeGC xfreegc
|
|
|
72 |
# define XFreePixmap xfreepixmap
|
|
|
73 |
# define XGetDefault xgetdefault
|
|
|
74 |
# define XGetGCValues xgetgcvalues
|
|
|
75 |
# define XGetGeometry xgetgeometry
|
|
|
76 |
# define XGetImage xgetimage
|
|
|
77 |
# define XGetRGBColormaps xgetrgbcolormaps
|
|
|
78 |
# define XGetVisualInfo xgetvisualinfo
|
|
|
79 |
# define XGetWindowAttributes xgetwindowattributes
|
|
|
80 |
# define XGetWindowProperty xgetwindowproperty
|
|
|
81 |
# define XInitImage xinitimage
|
|
|
82 |
# define XInternAtom xinternatom
|
|
|
83 |
# define XListFonts xlistfonts
|
|
|
84 |
# define XLoadQueryFont xloadqueryfont
|
|
|
85 |
# define XMapWindow xmapwindow
|
|
|
86 |
# define XNextEvent xnextevent
|
|
|
87 |
# define XOpenDisplay xopendisplay
|
|
|
88 |
# define XPutImage xputimage
|
|
|
89 |
# define XQueryColor xquerycolor
|
|
|
90 |
# define XResizeWindow xresizewindow
|
|
|
91 |
# define XSendEvent xsendevent
|
|
|
92 |
# define XSetBackground xsetbackground
|
|
|
93 |
# define XSetClipMask xsetclipmask
|
|
|
94 |
# define XSetClipOrigin xsetcliporigin
|
|
|
95 |
# define XSetErrorHandler xseterrorhandler
|
|
|
96 |
# define XSetFillStyle xsetfillstyle
|
|
|
97 |
# define XSetFont xsetfont
|
|
|
98 |
# define XSetForeground xsetforeground
|
|
|
99 |
# define XSetFunction xsetfunction
|
|
|
100 |
# define XSetLineAttributes xsetlineattributes
|
|
|
101 |
# define XSetTile xsettile
|
|
|
102 |
# define XSetWindowBackgroundPixmap xsetwindowbackgroundpixmap
|
|
|
103 |
# define XSetWMHints xsetwmhints
|
|
|
104 |
# define XSetWMNormalHints xsetwmnormalhints
|
|
|
105 |
# define XStoreName xstorename
|
|
|
106 |
# define XSync xsync
|
|
|
107 |
# define XVisualIDFromVisual xvisualidfromvisual
|
|
|
108 |
# define XWMGeometry xwmgeometry
|
|
|
109 |
# define XtAppCreateShell xtappcreateshell
|
|
|
110 |
# define XtCloseDisplay xtclosedisplay
|
|
|
111 |
# define XtCreateApplicationContext xtcreateapplicationcontext
|
|
|
112 |
# define XtDestroyApplicationContext xtdestroyapplicationcontext
|
|
|
113 |
# define XtDestroyWidget xtdestroywidget
|
|
|
114 |
# define XtAppSetFallbackResources xtappsetfallbackresources
|
|
|
115 |
# define XtGetApplicationResources xtgetapplicationresources
|
|
|
116 |
# define XtOpenDisplay xtopendisplay
|
|
|
117 |
# define XtToolkitInitialize xttoolkitinitialize
|
|
|
118 |
|
|
|
119 |
# define CADDR_T /* Without this DEFINE, VAX GNUC */
|
|
|
120 |
/* gets trashed reading Intrinsic.h */
|
|
|
121 |
#else
|
|
|
122 |
#include <vms_x_fix.h>
|
|
|
123 |
# endif /* ifdef __GNUC__ */
|
|
|
124 |
|
|
|
125 |
# include <decw$include/Xlib.h>
|
|
|
126 |
# include <decw$include/Xproto.h>
|
|
|
127 |
# include <decw$include/Xatom.h>
|
|
|
128 |
# include <decw$include/Xutil.h>
|
|
|
129 |
# include <decw$include/Intrinsic.h>
|
|
|
130 |
# include <decw$include/StringDefs.h>
|
|
|
131 |
# include <decw$include/Shell.h>
|
|
|
132 |
|
|
|
133 |
#else /* !ifdef VMS */
|
|
|
134 |
|
|
|
135 |
# include <X11/Xlib.h>
|
|
|
136 |
# include <X11/Xproto.h>
|
|
|
137 |
# include <X11/Xatom.h>
|
|
|
138 |
# include <X11/Xutil.h>
|
|
|
139 |
# include <X11/Intrinsic.h>
|
|
|
140 |
# include <X11/StringDefs.h>
|
|
|
141 |
# include <X11/Shell.h>
|
|
|
142 |
|
|
|
143 |
#endif /* VMS */
|
|
|
144 |
|
|
|
145 |
/* X11R3 doesn't have XtOffsetOf, but it has XtOffset. */
|
|
|
146 |
#ifndef XtOffsetOf
|
|
|
147 |
# ifdef offsetof
|
|
|
148 |
# define XtOffsetOf(s_type,field) offsetof(s_type,field)
|
|
|
149 |
# else
|
|
|
150 |
# define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
|
|
|
151 |
# endif
|
|
|
152 |
#endif
|
|
|
153 |
|
|
|
154 |
/* Include standard colormap stuff only for X11R4 and later. */
|
|
|
155 |
# if defined(XtSpecificationRelease) && (XtSpecificationRelease >= 4)
|
|
|
156 |
# define HaveStdCMap 1
|
|
|
157 |
# else
|
|
|
158 |
# define HaveStdCMap 0
|
|
|
159 |
/* This function is not defined in R3. */
|
|
|
160 |
# undef XVisualIDFromVisual
|
|
|
161 |
# define XVisualIDFromVisual(vis) ((vis)->visualid)
|
|
|
162 |
# endif
|
|
|
163 |
|
|
|
164 |
/* No-op XInitImage before X11R6. */
|
|
|
165 |
# if !(defined(XtSpecificationRelease) && (XtSpecificationRelease >= 6))
|
|
|
166 |
# undef XInitImage
|
|
|
167 |
# define XInitImage(im) 1 /* non-zero = success */
|
|
|
168 |
# endif
|
|
|
169 |
|
|
|
170 |
/* Restore the definition of `private'. */
|
|
|
171 |
#define private private_
|
|
|
172 |
|
|
|
173 |
#endif /* x__INCLUDED */
|