home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / X_.H < prev    next >
C/C++ Source or Header  |  1994-07-27  |  6KB  |  156 lines

  1. /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* x_.h */
  20. /* Header for including X library calls in Ghostscript X11 driver */
  21.  
  22. /* Some versions of the X library use `private' as a member name, so: */
  23. #undef private
  24.  
  25. #ifdef VMS
  26.  
  27. #  ifdef __GNUC__
  28.  
  29. /*   Names of external functions which contain upper case letters are
  30.  *   modified by the VMS GNU C compiler to prevent confusion between
  31.  *   names such as XOpen and xopen.  GNU C does this by translating a
  32.  *   name like XOpen into xopen_aaaaaaaax with "aaaaaaaa" a hexadecimal
  33.  *   string.  However, this causes problems when we link against the
  34.  *   X library which doesn't contain a routine named xopen_aaaaaaaax.
  35.  *   So, we use #define's to map all X routine names to lower case.
  36.  *   (Note that routines like BlackPixelOfScreen, which are [for VMS]
  37.  *   preprocessor macros, do not appear here.)
  38.  */
  39.  
  40. /*
  41.  * The names redefined here are those which the current Ghostscript X11
  42.  * driver happens to use: this list may grow in the future.
  43.  */
  44.  
  45. #    define XAllocColor            xalloccolor
  46. #    define XAllocNamedColor        xallocnamedcolor
  47. #    define XCloseDisplay        xclosedisplay
  48. #    define XCopyArea            xcopyarea
  49. #    define XCreateGC            xcreategc
  50. #    define XCreatePixmap        xcreatepixmap
  51. #    define XCreateWindow        xcreatewindow
  52. #    define XDisplayString        xdisplaystring
  53. #    define XDrawLine            xdrawline
  54. #    define XDrawPoint            xdrawpoint
  55. #    define XDrawString            xdrawstring
  56. #    define XFillPolygon        xfillpolygon
  57. #    define XFillRectangle        xfillrectangle
  58. #    define XFillRectangles        xfillrectangles
  59. #    define XFlush            xflush
  60. #    define XFree            xfree
  61. #    define XFreeColors            xfreecolors
  62. #    define XFreeFont            xfreefont
  63. #    define XFreeFontNames        xfreefontnames
  64. #    define XFreeGC            xfreegc
  65. #    define XFreePixmap            xfreepixmap
  66. #    define XGetDefault            xgetdefault
  67. #    define XGetGCValues        xgetgcvalues
  68. #    define XGetGeometry        xgetgeometry
  69. #    define XGetImage            xgetimage
  70. #    define XGetRGBColormaps        xgetrgbcolormaps
  71. #    define XGetVisualInfo        xgetvisualinfo
  72. #    define XGetWindowAttributes    xgetwindowattributes
  73. #    define XGetWindowProperty        xgetwindowproperty
  74. #    define XInternAtom            xinternatom
  75. #    define XListFonts            xlistfonts
  76. #    define XLoadQueryFont        xloadqueryfont
  77. #    define XMapWindow            xmapwindow
  78. #    define XNextEvent            xnextevent
  79. #    define XOpenDisplay        xopendisplay
  80. #    define XPutImage            xputimage
  81. #    define XQueryColor            xquerycolor
  82. #    define XResizeWindow        xresizewindow
  83. #    define XSendEvent            xsendevent
  84. #    define XSetBackground        xsetbackground
  85. #    define XSetClipMask        xsetclipmask
  86. #    define XSetClipOrigin        xsetcliporigin
  87. #    define XSetErrorHandler        xseterrorhandler
  88. #    define XSetFillStyle        xsetfillstyle
  89. #    define XSetFont            xsetfont
  90. #    define XSetForeground        xsetforeground
  91. #    define XSetFunction        xsetfunction
  92. #    define XSetLineAttributes        xsetlineattributes
  93. #    define XSetTile            xsettile
  94. #    define XSetWindowBackgroundPixmap    xsetwindowbackgroundpixmap
  95. #    define XSetWMHints            xsetwmhints
  96. #    define XSetWMNormalHints        xsetwmnormalhints
  97. #    define XStoreName            xstorename
  98. #    define XSync            xsync
  99. #    define XVisualIDFromVisual        xvisualidfromvisual
  100. #    define XWMGeometry            xwmgeometry
  101. #    define XtAppCreateShell        xtappcreateshell
  102. #    define XtCloseDisplay        xtclosedisplay
  103. #    define XtCreateApplicationContext    xtcreateapplicationcontext
  104. #    define XtDestroyApplicationContext    xtdestroyapplicationcontext
  105. #    define XtDestroyWidget        xtdestroywidget
  106. #    define XtAppSetFallbackResources    xtappsetfallbackresources
  107. #    define XtGetApplicationResources    xtgetapplicationresources
  108. #    define XtOpenDisplay        xtopendisplay
  109. #    define XtToolkitInitialize        xttoolkitinitialize
  110.  
  111. #    define CADDR_T            /* Without this DEFINE, VAX GNUC    */
  112.                     /* gets trashed reading Intrinsic.h */
  113. #  endif                /* ifdef __GNUC__ */
  114.  
  115. #  include <decw$include/Xlib.h>
  116. #  include <decw$include/Xproto.h>
  117. #  include <decw$include/Xatom.h>
  118. #  include <decw$include/Xutil.h>
  119. #  include <decw$include/Intrinsic.h>
  120. #  include <decw$include/StringDefs.h>
  121. #  include <decw$include/Shell.h>
  122.  
  123. #else                    /* !ifdef VMS */
  124.  
  125. #  include <X11/Xlib.h>
  126. #  include <X11/Xproto.h>
  127. #  include <X11/Xatom.h>
  128. #  include <X11/Xutil.h>
  129. #  include <X11/Intrinsic.h>
  130. #  include <X11/StringDefs.h>
  131. #  include <X11/Shell.h>
  132.  
  133. #endif                    /* VMS */
  134.  
  135. /* X11R3 doesn't have XtOffsetOf, but it has XtOffset. */
  136. #ifndef XtOffsetOf
  137. #  ifdef offsetof
  138. #    define XtOffsetOf(s_type,field) offsetof(s_type,field)
  139. #  else
  140. #    define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
  141. #  endif
  142. #endif
  143.  
  144. /* Include standard colormap stuff only for X11R4 and later. */
  145. #  if defined(XtSpecificationRelease) && (XtSpecificationRelease >= 4)
  146. #    define HaveStdCMap 1
  147. #  else
  148. #    define HaveStdCMap 0
  149. /* This function is not defined in R3. */
  150. #    undef XVisualIDFromVisual
  151. #    define XVisualIDFromVisual(vis) ((vis)->visualid)
  152. #  endif
  153.  
  154. /* Restore the definition of `private'. */
  155. #define private private_
  156.