Xdefs.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /***********************************************************
  2. Copyright (c) 1999 The XFree86 Project Inc.
  3. All Rights Reserved.
  4. The above copyright notice and this permission notice shall be included in
  5. all copies or substantial portions of the Software.
  6. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  7. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  8. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  9. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  10. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  11. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  12. Except as contained in this notice, the name of The XFree86 Project
  13. Inc. shall not be used in advertising or otherwise to promote the
  14. sale, use or other dealings in this Software without prior written
  15. authorization from The XFree86 Project Inc..
  16. */
  17. /**
  18. ** Types definitions shared between server and clients
  19. **/
  20. #ifndef _XDEFS_H
  21. #define _XDEFS_H
  22. #ifdef _XSERVER64
  23. #include <X11/Xmd.h>
  24. #endif
  25. #ifndef _XTYPEDEF_ATOM
  26. # define _XTYPEDEF_ATOM
  27. # ifndef _XSERVER64
  28. typedef unsigned long Atom;
  29. # else
  30. typedef CARD32 Atom;
  31. # endif
  32. #endif
  33. #ifndef Bool
  34. # ifndef _XTYPEDEF_BOOL
  35. # define _XTYPEDEF_BOOL
  36. typedef int Bool;
  37. # endif
  38. #endif
  39. #ifndef _XTYPEDEF_POINTER
  40. # define _XTYPEDEF_POINTER
  41. typedef void *pointer;
  42. #endif
  43. #ifndef _XTYPEDEF_CLIENTPTR
  44. typedef struct _Client *ClientPtr;
  45. # define _XTYPEDEF_CLIENTPTR
  46. #endif
  47. #ifndef _XTYPEDEF_XID
  48. # define _XTYPEDEF_XID
  49. # ifndef _XSERVER64
  50. typedef unsigned long XID;
  51. # else
  52. typedef CARD32 XID;
  53. # endif
  54. #endif
  55. #ifndef _XTYPEDEF_MASK
  56. # define _XTYPEDEF_MASK
  57. # ifndef _XSERVER64
  58. typedef unsigned long Mask;
  59. # else
  60. typedef CARD32 Mask;
  61. # endif
  62. #endif
  63. #ifndef _XTYPEDEF_FONTPTR
  64. # define _XTYPEDEF_FONTPTR
  65. typedef struct _Font *FontPtr; /* also in fonts/include/font.h */
  66. #endif
  67. #ifndef _XTYPEDEF_FONT
  68. # define _XTYPEDEF_FONT
  69. typedef XID Font;
  70. #endif
  71. #ifndef _XTYPEDEF_FSID
  72. # ifndef _XSERVER64
  73. typedef unsigned long FSID;
  74. # else
  75. typedef CARD32 FSID;
  76. # endif
  77. #endif
  78. typedef FSID AccContext;
  79. /* OS independent time value
  80. XXX Should probably go in Xos.h */
  81. typedef struct timeval **OSTimePtr;
  82. typedef void (* BlockHandlerProcPtr)(void * /* blockData */,
  83. OSTimePtr /* pTimeout */,
  84. void * /* pReadmask */);
  85. #endif