123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- /* Copyright (C) 1989, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved.
-
- This file is part of AFPL Ghostscript.
-
- AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
- distributor accepts any responsibility for the consequences of using it, or
- for whether it serves any particular purpose or works at all, unless he or
- she says so in writing. Refer to the Aladdin Free Public License (the
- "License") for full details.
-
- Every copy of AFPL Ghostscript must include a copy of the License, normally
- in a plain ASCII text file named PUBLIC. The License grants you the right
- to copy, modify and redistribute AFPL Ghostscript, but only under certain
- conditions described in the License. Among other things, the License
- requires that the copyright notice and this notice be preserved on all
- copies.
- */
- /*$Id: x_.h,v 1.3 2001/04/20 09:56:22 joukj Exp $ */
- /* Header for including X library calls in Ghostscript X11 driver */
- #ifndef x__INCLUDED
- # define x__INCLUDED
- /* Some versions of the X library use `private' as a member name, so: */
- #undef private
- /* Most X implementations have _Xdebug, but VMS DECWindows doesn't. */
- #ifndef VMS
- # define have_Xdebug
- #endif
- #ifdef VMS
- # ifdef __GNUC__
- /* Names of external functions which contain upper case letters are
- * modified by the VMS GNU C compiler to prevent confusion between
- * names such as XOpen and xopen. GNU C does this by translating a
- * name like XOpen into xopen_aaaaaaaax with "aaaaaaaa" a hexadecimal
- * string. However, this causes problems when we link against the
- * X library which doesn't contain a routine named xopen_aaaaaaaax.
- * So, we use #define's to map all X routine names to lower case.
- * (Note that routines like BlackPixelOfScreen, which are [for VMS]
- * preprocessor macros, do not appear here.)
- */
- /*
- * The names redefined here are those which the current Ghostscript X11
- * driver happens to use: this list may grow in the future.
- */
- # define XAllocColor xalloccolor
- # define XAllocNamedColor xallocnamedcolor
- # define XCloseDisplay xclosedisplay
- # define XCopyArea xcopyarea
- # define XCreateGC xcreategc
- # define XCreatePixmap xcreatepixmap
- # define XCreateWindow xcreatewindow
- # define XDestroyImage xdestroyimage
- # define XDisplayString xdisplaystring
- # define XDrawLine xdrawline
- # define XDrawPoint xdrawpoint
- # define XDrawString xdrawstring
- # define XFillPolygon xfillpolygon
- # define XFillRectangle xfillrectangle
- # define XFillRectangles xfillrectangles
- # define XFlush xflush
- # define XFree xfree
- # define XFreeColors xfreecolors
- # define XFreeFont xfreefont
- # define XFreeFontNames xfreefontnames
- # define XFreeGC xfreegc
- # define XFreePixmap xfreepixmap
- # define XGetDefault xgetdefault
- # define XGetGCValues xgetgcvalues
- # define XGetGeometry xgetgeometry
- # define XGetImage xgetimage
- # define XGetRGBColormaps xgetrgbcolormaps
- # define XGetVisualInfo xgetvisualinfo
- # define XGetWindowAttributes xgetwindowattributes
- # define XGetWindowProperty xgetwindowproperty
- # define XInitImage xinitimage
- # define XInternAtom xinternatom
- # define XListFonts xlistfonts
- # define XLoadQueryFont xloadqueryfont
- # define XMapWindow xmapwindow
- # define XNextEvent xnextevent
- # define XOpenDisplay xopendisplay
- # define XPutImage xputimage
- # define XQueryColor xquerycolor
- # define XResizeWindow xresizewindow
- # define XSendEvent xsendevent
- # define XSetBackground xsetbackground
- # define XSetClipMask xsetclipmask
- # define XSetClipOrigin xsetcliporigin
- # define XSetErrorHandler xseterrorhandler
- # define XSetFillStyle xsetfillstyle
- # define XSetFont xsetfont
- # define XSetForeground xsetforeground
- # define XSetFunction xsetfunction
- # define XSetLineAttributes xsetlineattributes
- # define XSetTile xsettile
- # define XSetWindowBackgroundPixmap xsetwindowbackgroundpixmap
- # define XSetWMHints xsetwmhints
- # define XSetWMNormalHints xsetwmnormalhints
- # define XStoreName xstorename
- # define XSync xsync
- # define XVisualIDFromVisual xvisualidfromvisual
- # define XWMGeometry xwmgeometry
- # define XtAppCreateShell xtappcreateshell
- # define XtCloseDisplay xtclosedisplay
- # define XtCreateApplicationContext xtcreateapplicationcontext
- # define XtDestroyApplicationContext xtdestroyapplicationcontext
- # define XtDestroyWidget xtdestroywidget
- # define XtAppSetFallbackResources xtappsetfallbackresources
- # define XtGetApplicationResources xtgetapplicationresources
- # define XtOpenDisplay xtopendisplay
- # define XtToolkitInitialize xttoolkitinitialize
- # define CADDR_T /* Without this DEFINE, VAX GNUC */
- /* gets trashed reading Intrinsic.h */
- #else
- #include <vms_x_fix.h>
- # endif /* ifdef __GNUC__ */
- # include <decw$include/Xlib.h>
- # include <decw$include/Xproto.h>
- # include <decw$include/Xatom.h>
- # include <decw$include/Xutil.h>
- # include <decw$include/Intrinsic.h>
- # include <decw$include/StringDefs.h>
- # include <decw$include/Shell.h>
- #else /* !ifdef VMS */
- # include <X11/Xlib.h>
- # include <X11/Xproto.h>
- # include <X11/Xatom.h>
- # include <X11/Xutil.h>
- # include <X11/Intrinsic.h>
- # include <X11/StringDefs.h>
- # include <X11/Shell.h>
- #endif /* VMS */
- /* X11R3 doesn't have XtOffsetOf, but it has XtOffset. */
- #ifndef XtOffsetOf
- # ifdef offsetof
- # define XtOffsetOf(s_type,field) offsetof(s_type,field)
- # else
- # define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
- # endif
- #endif
- /* Include standard colormap stuff only for X11R4 and later. */
- # if defined(XtSpecificationRelease) && (XtSpecificationRelease >= 4)
- # define HaveStdCMap 1
- # else
- # define HaveStdCMap 0
- /* This function is not defined in R3. */
- # undef XVisualIDFromVisual
- # define XVisualIDFromVisual(vis) ((vis)->visualid)
- # endif
- /* No-op XInitImage before X11R6. */
- # if !(defined(XtSpecificationRelease) && (XtSpecificationRelease >= 6))
- # undef XInitImage
- # define XInitImage(im) 1 /* non-zero = success */
- # endif
- /* Restore the definition of `private'. */
- #define private private_
- #endif /* x__INCLUDED */
|