home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xyzext.zip / xyz / include / nonXYZ / Xlibint.h < prev   
C/C++ Source or Header  |  1992-07-18  |  20KB  |  732 lines

  1. /* $XConsortium: Xlibint.h,v 11.91 91/07/22 15:43:08 rws Exp $ */
  2. /* Copyright 1984, 1985, 1987, 1989  Massachusetts Institute of Technology */
  3.  
  4. /*
  5. Permission to use, copy, modify, distribute, and sell this software and its
  6. documentation for any purpose is hereby granted without fee, provided that
  7. the above copyright notice appear in all copies and that both that
  8. copyright notice and this permission notice appear in supporting
  9. documentation, and that the name of M.I.T. not be used in advertising or
  10. publicity pertaining to distribution of the software without specific,
  11. written prior permission.  M.I.T. makes no representations about the
  12. suitability of this software for any purpose.  It is provided "as is"
  13. without express or implied warranty.
  14. */
  15.  
  16. /*
  17.  *    XlibInternal.h - Header definition and support file for the internal
  18.  *    support routines (XlibInternal) used by the C subroutine interface
  19.  *    library (Xlib) to the X Window System.
  20.  *
  21.  *    Warning, there be dragons here....
  22.  */
  23.  
  24. #ifndef NEED_EVENTS
  25. #define _XEVENT_
  26. #endif
  27.  
  28. #include <X11/Xlib.h>
  29.  
  30. /*
  31.  * define the following if you want the Data macro to be a procedure instead
  32.  */
  33. #ifdef CRAY
  34. #define DataRoutineIsProcedure
  35. #endif /* CRAY */
  36.  
  37. #ifndef _XEVENT_
  38. /*
  39.  * _QEvent datatype for use in input queueing.
  40.  */
  41. typedef struct _XSQEvent {
  42.     struct _XSQEvent *next;
  43.     XEvent event;
  44. } _XQEvent;
  45. #endif
  46.  
  47. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  48. #define NEED_EVENTS
  49. #endif
  50. #include <X11/Xproto.h>
  51. #include <errno.h>
  52. #define _XBCOPYFUNC _Xbcopy
  53. #include <X11/Xfuncs.h>
  54. #include <X11/Xosdefs.h>
  55.  
  56. /* Utek leaves kernel macros around in include files (bleah) */
  57. #ifdef dirty
  58. #undef dirty
  59. #endif
  60.  
  61. #ifdef CRAY
  62. #define WORD64
  63. #endif
  64.  
  65. #ifndef X_NOT_STDC_ENV
  66. #include <stdlib.h>
  67. #include <string.h>
  68. #else
  69. char *malloc(), *realloc(), *calloc();
  70. void exit();
  71. #ifdef SYSV
  72. #include <string.h>
  73. #else
  74. #include <strings.h>
  75. #endif
  76. #endif
  77. #if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
  78. char *malloc(), *realloc(), *calloc();
  79. #endif /* macII */
  80.  
  81. /*
  82.  * The following definitions can be used for locking requests in multi-threaded
  83.  * address spaces.
  84.  */
  85. #define LockDisplay(dis)
  86. #define LockMutex(mutex)
  87. #define UnlockMutex(mutex)
  88. #define UnlockDisplay(dis)
  89. #define Xfree(ptr) free((ptr))
  90.  
  91. /*
  92.  * Note that some machines do not return a valid pointer for malloc(0), in
  93.  * which case we provide an alternate under the control of the
  94.  * define MALLOC_0_RETURNS_NULL.  This is necessary because some
  95.  * Xlib code expects malloc(0) to return a valid pointer to storage.
  96.  */
  97. #ifdef MALLOC_0_RETURNS_NULL
  98.  
  99. # define Xmalloc(size) malloc(((size) > 0 ? (size) : 1))
  100. # define Xrealloc(ptr, size) realloc((ptr), ((size) > 0 ? (size) : 1))
  101. # define Xcalloc(nelem, elsize) calloc(((nelem) > 0 ? (nelem) : 1), (elsize))
  102.  
  103. #else
  104.  
  105. # define Xmalloc(size) malloc((size))
  106. # define Xrealloc(ptr, size) realloc((ptr), (size))
  107. # define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
  108.  
  109. #endif
  110.  
  111. #ifndef NULL
  112. #define NULL 0
  113. #endif
  114. #define LOCKED 1
  115. #define UNLOCKED 0
  116.  
  117. extern int errno;            /* Internal system error number. */
  118.  
  119. #ifndef BUFSIZE
  120. #define BUFSIZE 2048            /* X output buffer size. */
  121. #endif
  122. #ifndef PTSPERBATCH
  123. #define PTSPERBATCH 1024        /* point batching */
  124. #endif
  125. #ifndef WLNSPERBATCH
  126. #define WLNSPERBATCH 50            /* wide line batching */
  127. #endif
  128. #ifndef ZLNSPERBATCH
  129. #define ZLNSPERBATCH 1024        /* thin line batching */
  130. #endif
  131. #ifndef WRCTSPERBATCH
  132. #define WRCTSPERBATCH 10        /* wide line rectangle batching */
  133. #endif
  134. #ifndef ZRCTSPERBATCH
  135. #define ZRCTSPERBATCH 256        /* thin line rectangle batching */
  136. #endif
  137. #ifndef FRCTSPERBATCH
  138. #define FRCTSPERBATCH 256        /* filled rectangle batching */
  139. #endif
  140. #ifndef FARCSPERBATCH
  141. #define FARCSPERBATCH 256        /* filled arc batching */
  142. #endif
  143. #ifndef CURSORFONT
  144. #define CURSORFONT "cursor"        /* standard cursor fonts */
  145. #endif
  146.  
  147. /*
  148.  * display flags
  149.  */
  150. #define XlibDisplayIOError    (1L << 0)
  151. #define XlibDisplayClosing    (1L << 1)
  152.  
  153. /*
  154.  * X Protocol packetizing macros.
  155.  */
  156.  
  157. /*   Need to start requests on 64 bit word boundries
  158.  *   on a CRAY computer so add a NoOp (127) if needed.
  159.  *   A character pointer on a CRAY computer will be non-zero
  160.  *   after shifting right 61 bits of it is not pointing to
  161.  *   a word boundary.
  162.  */
  163. #ifdef WORD64
  164. #define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\
  165.            dpy->last_req = dpy->bufptr;\
  166.            *(dpy->bufptr)   = X_NoOperation;\
  167.            *(dpy->bufptr+1) =  0;\
  168.            *(dpy->bufptr+2) =  0;\
  169.            *(dpy->bufptr+3) =  1;\
  170.              dpy->request += 1;\
  171.              dpy->bufptr += 4;\
  172.          }
  173. #else /* else does not require alignment on 64-bit boundaries */
  174. #define WORD64ALIGN
  175. #endif /* WORD64 */
  176.  
  177.  
  178. /*
  179.  * GetReq - Get the next avilable X request packet in the buffer and
  180.  * return it. 
  181.  *
  182.  * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc.
  183.  * "req" is the name of the request pointer.
  184.  *
  185.  */
  186.  
  187. #if __STDC__ && !defined(UNIXCPP)
  188. #define GetReq(name, req) \
  189.         WORD64ALIGN\
  190.     if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
  191.         _XFlush(dpy);\
  192.     req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
  193.     req->reqType = X_##name;\
  194.     req->length = (SIZEOF(x##name##Req))>>2;\
  195.     dpy->bufptr += SIZEOF(x##name##Req);\
  196.     dpy->request++
  197.  
  198. #else  /* non-ANSI C uses empty comment instead of "##" for token concatenation */
  199. #define GetReq(name, req) \
  200.         WORD64ALIGN\
  201.     if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
  202.         _XFlush(dpy);\
  203.     req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
  204.     req->reqType = X_/**/name;\
  205.     req->length = (SIZEOF(x/**/name/**/Req))>>2;\
  206.     dpy->bufptr += SIZEOF(x/**/name/**/Req);\
  207.     dpy->request++
  208. #endif
  209.  
  210. /* GetReqExtra is the same as GetReq, but allocates "n" additional
  211.    bytes after the request. "n" must be a multiple of 4!  */
  212.  
  213. #if __STDC__ && !defined(UNIXCPP)
  214. #define GetReqExtra(name, n, req) \
  215.         WORD64ALIGN\
  216.     if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
  217.         _XFlush(dpy);\
  218.     req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
  219.     req->reqType = X_##name;\
  220.     req->length = (SIZEOF(x##name##Req) + n)>>2;\
  221.     dpy->bufptr += SIZEOF(x##name##Req) + n;\
  222.     dpy->request++
  223. #else
  224. #define GetReqExtra(name, n, req) \
  225.         WORD64ALIGN\
  226.     if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\
  227.         _XFlush(dpy);\
  228.     req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
  229.     req->reqType = X_/**/name;\
  230.     req->length = (SIZEOF(x/**/name/**/Req) + n)>>2;\
  231.     dpy->bufptr += SIZEOF(x/**/name/**/Req) + n;\
  232.     dpy->request++
  233. #endif
  234.  
  235.  
  236. /*
  237.  * GetResReq is for those requests that have a resource ID 
  238.  * (Window, Pixmap, GContext, etc.) as their single argument.
  239.  * "rid" is the name of the resource. 
  240.  */
  241.  
  242. #if __STDC__ && !defined(UNIXCPP)
  243. #define GetResReq(name, rid, req) \
  244.         WORD64ALIGN\
  245.     if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
  246.         _XFlush(dpy);\
  247.     req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
  248.     req->reqType = X_##name;\
  249.     req->length = 2;\
  250.     req->id = (rid);\
  251.     dpy->bufptr += SIZEOF(xResourceReq);\
  252.     dpy->request++
  253. #else
  254. #define GetResReq(name, rid, req) \
  255.         WORD64ALIGN\
  256.     if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
  257.         _XFlush(dpy);\
  258.     req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
  259.     req->reqType = X_/**/name;\
  260.     req->length = 2;\
  261.     req->id = (rid);\
  262.     dpy->bufptr += SIZEOF(xResourceReq);\
  263.     dpy->request++
  264. #endif
  265.  
  266. /*
  267.  * GetEmptyReq is for those requests that have no arguments
  268.  * at all. 
  269.  */
  270. #if __STDC__ && !defined(UNIXCPP)
  271. #define GetEmptyReq(name, req) \
  272.         WORD64ALIGN\
  273.     if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
  274.         _XFlush(dpy);\
  275.     req = (xReq *) (dpy->last_req = dpy->bufptr);\
  276.     req->reqType = X_##name;\
  277.     req->length = 1;\
  278.     dpy->bufptr += SIZEOF(xReq);\
  279.     dpy->request++
  280. #else
  281. #define GetEmptyReq(name, req) \
  282.         WORD64ALIGN\
  283.     if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
  284.         _XFlush(dpy);\
  285.     req = (xReq *) (dpy->last_req = dpy->bufptr);\
  286.     req->reqType = X_/**/name;\
  287.     req->length = 1;\
  288.     dpy->bufptr += SIZEOF(xReq);\
  289.     dpy->request++
  290. #endif
  291.  
  292.  
  293. #define SyncHandle() \
  294.     if (dpy->synchandler) (*dpy->synchandler)(dpy)
  295.  
  296. #define FlushGC(dpy, gc) \
  297.     if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
  298. /*
  299.  * Data - Place data in the buffer and pad the end to provide
  300.  * 32 bit word alignment.  Transmit if the buffer fills.
  301.  *
  302.  * "dpy" is a pointer to a Display.
  303.  * "data" is a pinter to a data buffer.
  304.  * "len" is the length of the data buffer.
  305.  * we can presume buffer less than 2^16 bytes, so bcopy can be used safely.
  306.  */
  307. #ifndef DataRoutineIsProcedure
  308. #define Data(dpy, data, len) \
  309.     if (dpy->bufptr + (len) <= dpy->bufmax) {\
  310.         bcopy(data, dpy->bufptr, (int)len);\
  311.         dpy->bufptr += ((len) + 3) & ~3;\
  312.     } else\
  313.         _XSend(dpy, data, len)
  314. #endif /* DataRoutineIsProcedure */
  315.  
  316.  
  317. /* Allocate bytes from the buffer.  No padding is done, so if
  318.  * the length is not a multiple of 4, the caller must be
  319.  * careful to leave the buffer aligned after sending the
  320.  * current request.
  321.  *
  322.  * "type" is the type of the pointer being assigned to.
  323.  * "ptr" is the pointer being assigned to.
  324.  * "n" is the number of bytes to allocate.
  325.  *
  326.  * Example: 
  327.  *    xTextElt *elt;
  328.  *    BufAlloc (xTextElt *, elt, nbytes)
  329.  */
  330.  
  331. #define BufAlloc(type, ptr, n) \
  332.     if (dpy->bufptr + (n) > dpy->bufmax) \
  333.         _XFlush (dpy); \
  334.     ptr = (type) dpy->bufptr; \
  335.     dpy->bufptr += (n);
  336.  
  337. /*
  338.  * provide emulation routines for smaller architectures
  339.  */
  340. #ifndef WORD64
  341. #define Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
  342. #define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
  343. #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
  344. #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
  345. #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
  346. #endif /* not WORD64 */
  347.  
  348. #define PackData16(dpy,data,len) Data16 (dpy, data, len)
  349. #define PackData32(dpy,data,len) Data32 (dpy, data, len)
  350.  
  351. /* Xlib manual is bogus */
  352. #define PackData(dpy,data,len) PackData16 (dpy, data, len)
  353.  
  354. #define min(a,b) (((a) < (b)) ? (a) : (b))
  355. #define max(a,b) (((a) > (b)) ? (a) : (b))
  356.  
  357. #define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
  358.                  (((cs)->rbearing|(cs)->lbearing| \
  359.                    (cs)->ascent|(cs)->descent) == 0))
  360.  
  361. /* 
  362.  * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
  363.  * character.  If the character is in the column and exists, then return the
  364.  * appropriate metrics (note that fonts with common per-character metrics will
  365.  * return min_bounds).  If none of these hold true, try again with the default
  366.  * char.
  367.  */
  368. #define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \
  369. { \
  370.     cs = def; \
  371.     if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
  372.     if (fs->per_char == NULL) { \
  373.         cs = &fs->min_bounds; \
  374.     } else { \
  375.         cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
  376.         if (CI_NONEXISTCHAR(cs)) cs = def; \
  377.     } \
  378.     } \
  379. }
  380.  
  381. #define CI_GET_DEFAULT_INFO_1D(fs,cs) \
  382.   CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
  383.  
  384.  
  385.  
  386. /*
  387.  * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and 
  388.  * column.  This is used for fonts that have more than row zero.
  389.  */
  390. #define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \
  391. { \
  392.     cs = def; \
  393.     if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
  394.     col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
  395.     if (fs->per_char == NULL) { \
  396.         cs = &fs->min_bounds; \
  397.     } else { \
  398.         cs = &fs->per_char[((row - fs->min_byte1) * \
  399.                     (fs->max_char_or_byte2 - \
  400.                  fs->min_char_or_byte2 + 1)) + \
  401.                    (col - fs->min_char_or_byte2)]; \
  402.         if (CI_NONEXISTCHAR(cs)) cs = def; \
  403.         } \
  404.     } \
  405. }
  406.  
  407. #define CI_GET_DEFAULT_INFO_2D(fs,cs) \
  408. { \
  409.     unsigned int r = (fs->default_char >> 8); \
  410.     unsigned int c = (fs->default_char & 0xff); \
  411.     CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \
  412. }
  413.  
  414.  
  415.  
  416.  
  417.  
  418. #ifdef MUSTCOPY
  419.  
  420. /* a little bit of magic */
  421. #define OneDataCard32(dpy,dstaddr,srcvar) \
  422.   { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); }
  423.  
  424. #define STARTITERATE(tpvar,type,start,endcond,decr) \
  425.   { register char *cpvar; \
  426.   for (cpvar = (char *) start; endcond; cpvar = NEXTPTR(cpvar,type), decr) { \
  427.     type dummy; bcopy (cpvar, (char *) &dummy, SIZEOF(type)); \
  428.     tpvar = (type *) cpvar;
  429. #define ENDITERATE }}
  430.  
  431. #else
  432.  
  433. /* srcvar must be a variable for large architecture version */
  434. #define OneDataCard32(dpy,dstaddr,srcvar) \
  435.   { *(unsigned long *)(dstaddr) = (srcvar); }
  436.  
  437. #define STARTITERATE(tpvar,type,start,endcond,decr) \
  438.   for (tpvar = (type *) start; endcond; tpvar++, decr) {
  439. #define ENDITERATE }
  440.  
  441. #endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
  442.  
  443. /*
  444.  * This structure is private to the library.
  445.  */
  446. typedef struct _XFreeFuncs {
  447.     void (*atoms)();        /* _XFreeAtomTable */
  448.     int (*modifiermap)();    /* XFreeModifierMap */
  449.     void (*key_bindings)();    /* _XFreeKeyBindings */
  450.     void (*context_db)();    /* _XFreeContextDB */
  451.     void (*defaultCCCs)();    /* _XcmsFreeDefaultCCCs */
  452.     void (*clientCmaps)();    /* _XcmsFreeClientCmaps */
  453.     void (*intensityMaps)();    /* _XcmsFreeIntensityMaps */
  454.     void (*im_filters)();    /* _XFreeIMFilters */
  455. } _XFreeFuncRec;
  456.  
  457. /*
  458.  * This structure is private to the library.
  459.  */
  460. typedef struct _XExten {    /* private to extension mechanism */
  461.     struct _XExten *next;    /* next in list */
  462.     XExtCodes codes;    /* public information, all extension told */
  463.     int (*create_GC)();    /* routine to call when GC created */
  464.     int (*copy_GC)();    /* routine to call when GC copied */
  465.     int (*flush_GC)();    /* routine to call when GC flushed */
  466.     int (*free_GC)();    /* routine to call when GC freed */
  467.     int (*create_Font)();    /* routine to call when Font created */
  468.     int (*free_Font)();    /* routine to call when Font freed */
  469.     int (*close_display)();    /* routine to call when connection closed */
  470.     int (*error)();        /* who to call when an error occurs */
  471.         char *(*error_string)();  /* routine to supply error string */
  472.     char *name;        /* name of this extension */
  473.     void (*error_values)(); /* routine to supply error values */
  474. } _XExtension;
  475.  
  476.  
  477. /* extension hooks */
  478.  
  479. _XFUNCPROTOBEGIN
  480.  
  481. #ifdef DataRoutineIsProcedure
  482. extern void Data();
  483. #endif
  484. extern int _XError();            /* prepare to upcall user handler */
  485. extern int _XIOError();            /* prepare to upcall user handler */
  486. extern int (*_XIOErrorFunction)();    /* X system error reporting routine. */
  487. extern int (*_XErrorFunction)();    /* X_Error event reporting routine. */
  488. extern void _XEatData();        /* swallow data from server */
  489. extern char *_XAllocScratch();        /* fast memory allocator */
  490. extern Visual *_XVIDtoVisual();        /* given visual id, find structure */
  491. extern unsigned long _XSetLastRequestRead();    /* update dpy->last_request_read */
  492. extern int _XGetHostname();        /* get name of this machine */
  493. extern Screen *_XScreenOfWindow ();    /* get Screen pointer for window */
  494.  
  495. extern int (*XESetCreateGC(
  496. #if NeedFunctionPrototypes
  497.     Display*        /* display */,
  498.     int            /* extension */,
  499.     int (*) (
  500. #if NeedNestedPrototypes
  501.           Display*            /* display */,
  502.           GC            /* gc */,
  503.           XExtCodes*        /* codes */
  504. #endif
  505.         )        /* proc */
  506. #endif
  507. ))(
  508. #if NeedNestedPrototypes
  509.     Display*, GC, XExtCodes*
  510. #endif
  511. );
  512.  
  513. extern int (*XESetCopyGC(
  514. #if NeedFunctionPrototypes
  515.     Display*        /* display */,
  516.     int            /* extension */,
  517.     int (*) (
  518. #if NeedNestedPrototypes
  519.           Display*            /* display */,
  520.               GC            /* gc */,
  521.               XExtCodes*        /* codes */
  522. #endif
  523.             )        /* proc */          
  524. #endif
  525. ))(
  526. #if NeedNestedPrototypes
  527.     Display*, GC, XExtCodes*
  528. #endif
  529. );
  530.  
  531. extern int (*XESetFlushGC(
  532. #if NeedFunctionPrototypes
  533.     Display*        /* display */,
  534.     int            /* extenstion */,
  535.     int (*) (
  536. #if NeedNestedPrototypes
  537.           Display*            /* display */,
  538.               GC            /* gc */,
  539.               XExtCodes*        /* codes */
  540. #endif
  541.             )        /* proc */         
  542. #endif
  543. ))(
  544. #if NeedNestedPrototypes
  545.     Display*, GC, XExtCodes*
  546. #endif
  547. );
  548.  
  549. extern int (*XESetFreeGC(
  550. #if NeedFunctionPrototypes
  551.     Display*        /* display */,
  552.     int            /* extension */,
  553.     int (*) (
  554. #if NeedNestedPrototypes
  555.           Display*            /* display */,
  556.               GC            /* gc */,
  557.               XExtCodes*        /* codes */
  558. #endif
  559.             )        /* proc */         
  560. #endif
  561. ))(
  562. #if NeedNestedPrototypes
  563.     Display*, GC, XExtCodes*
  564. #endif
  565. );
  566.  
  567. extern int (*XESetCreateFont(
  568. #if NeedFunctionPrototypes
  569.     Display*        /* display */,
  570.     int            /* extension */,
  571.     int (*) (
  572. #if NeedNestedPrototypes
  573.           Display*            /* display */,
  574.               XFontStruct*        /* fs */,
  575.               XExtCodes*        /* codes */
  576. #endif
  577.             )        /* proc */    
  578. #endif
  579. ))(
  580. #if NeedNestedPrototypes
  581.     Display*, XFontStruct*, XExtCodes*
  582. #endif
  583. );
  584.  
  585. extern int (*XESetFreeFont(
  586. #if NeedFunctionPrototypes
  587.     Display*        /* display */,
  588.     int            /* extension */,
  589.     int (*) (
  590. #if NeedNestedPrototypes
  591.           Display*            /* display */,
  592.               XFontStruct*        /* fs */,
  593.               XExtCodes*        /* codes */
  594. #endif
  595.             )        /* proc */    
  596. #endif
  597. ))(
  598. #if NeedNestedPrototypes
  599.     Display*, XFontStruct*, XExtCodes*
  600. #endif
  601. ); 
  602.  
  603. extern int (*XESetCloseDisplay(
  604. #if NeedFunctionPrototypes
  605.     Display*        /* display */,
  606.     int            /* extension */,
  607.     int (*) (
  608. #if NeedNestedPrototypes
  609.           Display*            /* display */,
  610.               XExtCodes*        /* codes */
  611. #endif
  612.             )        /* proc */    
  613. #endif
  614. ))(
  615. #if NeedNestedPrototypes
  616.     Display*, XExtCodes*
  617. #endif
  618. );
  619.  
  620. extern int (*XESetError(
  621. #if NeedFunctionPrototypes
  622.     Display*        /* display */,
  623.     int            /* extension */,
  624.     int (*) (
  625. #if NeedNestedPrototypes
  626.           Display*            /* display */,
  627.               xError*            /* err */,
  628.               XExtCodes*        /* codes */,
  629.               int*            /* ret_code */
  630. #endif
  631.             )        /* proc */    
  632. #endif
  633. ))(
  634. #if NeedNestedPrototypes
  635.     Display*, xError*, XExtCodes*, int*
  636. #endif
  637. );
  638.  
  639. extern char* (*XESetErrorString(
  640. #if NeedFunctionPrototypes
  641.     Display*        /* display */,
  642.     int            /* extension */,
  643.     char* (*) (
  644. #if NeedNestedPrototypes
  645.             Display*        /* display */,
  646.                 int            /* code */,
  647.                 XExtCodes*        /* codes */,
  648.                 char*            /* buffer */,
  649.                 int            /* nbytes */
  650. #endif
  651.               )        /* proc */           
  652. #endif
  653. ))(
  654. #if NeedNestedPrototypes
  655.     Display*, int, XExtCodes*, char*, int
  656. #endif
  657. );
  658.  
  659. extern void (*XESetPrintErrorValues (
  660. #if NeedFunctionPrototypes
  661.     Display*        /* display */,
  662.     int            /* extension */,
  663.     void (*)(
  664. #if NeedNestedPrototypes
  665.           Display*            /* display */,
  666.           XErrorEvent*        /* ev */,
  667.           void*            /* fp */
  668. #endif
  669.          )        /* proc */
  670. #endif
  671. ))(
  672. #if NeedNestedPrototypes
  673.     Display*, XErrorEvent*, void*
  674. #endif
  675. );
  676.  
  677. extern int (*XESetWireToEvent(
  678. #if NeedFunctionPrototypes
  679.     Display*        /* display */,
  680.     int            /* event_number */,
  681.     Bool (*) (
  682. #if NeedNestedPrototypes
  683.            Display*            /* display */,
  684.                XEvent*            /* re */,
  685.                xEvent*            /* event */
  686. #endif
  687.              )        /* proc */    
  688. #endif
  689. ))(
  690. #if NeedNestedPrototypes
  691.     Display*, XEvent*, xEvent*
  692. #endif
  693. );
  694.  
  695. extern Status (*XESetEventToWire(
  696. #if NeedFunctionPrototypes
  697.     Display*        /* display */,
  698.     int            /* event_number */,
  699.     int (*) (
  700. #if NeedNestedPrototypes
  701.           Display*            /* display */,
  702.               XEvent*            /* re */,
  703.               xEvent*            /* event */
  704. #endif
  705.             )        /* proc */   
  706. #endif
  707. ))(
  708. #if NeedNestedPrototypes
  709.     Display*, XEvent*, xEvent*
  710. #endif
  711. );
  712.  
  713. extern Status (*XESetWireToError(
  714. #if NeedFunctionPrototypes
  715.     Display*        /* display */,
  716.     int            /* error_number */,
  717.     Bool (*) (
  718. #if NeedNestedPrototypes
  719.            Display*            /* display */,
  720.            XErrorEvent*        /* he */,
  721.            xError*            /* we */
  722. #endif
  723.             )        /* proc */   
  724. #endif
  725. ))(
  726. #if NeedNestedPrototypes
  727.     Display*, XErrorEvent*, xError*
  728. #endif
  729. );
  730.  
  731. _XFUNCPROTOEND
  732.