spacepaste

  1.  
  2. /*
  3. * Copyright © 2003 Keith Packard
  4. * Copyright © 2007 Eric Anholt
  5. *
  6. * Permission to use, copy, modify, distribute, and sell this software and its
  7. * documentation for any purpose is hereby granted without fee, provided that
  8. * the above copyright notice appear in all copies and that both that
  9. * copyright notice and this permission notice appear in supporting
  10. * documentation, and that the name of Keith Packard not be used in
  11. * advertising or publicity pertaining to distribution of the software without
  12. * specific, written prior permission. Keith Packard makes no
  13. * representations about the suitability of this software for any purpose. It
  14. * is provided "as is" without express or implied warranty.
  15. *
  16. * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  17. * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  18. * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  19. * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  20. * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  21. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  22. * PERFORMANCE OF THIS SOFTWARE.
  23. */
  24. #ifndef _DAMAGEPROTO_H_
  25. #define _DAMAGEPROTO_H_
  26. #include <X11/Xmd.h>
  27. #include <X11/extensions/xfixesproto.h>
  28. #include <X11/extensions/damagewire.h>
  29. #define Window CARD32
  30. #define Drawable CARD32
  31. #define Font CARD32
  32. #define Pixmap CARD32
  33. #define Cursor CARD32
  34. #define Colormap CARD32
  35. #define GContext CARD32
  36. #define Atom CARD32
  37. #define VisualID CARD32
  38. #define Time CARD32
  39. #define KeyCode CARD8
  40. #define KeySym CARD32
  41. #define Picture CARD32
  42. #define Region CARD32
  43. #define Damage CARD32
  44. /************** Version 0 ******************/
  45. typedef struct {
  46. CARD8 reqType;
  47. CARD8 damageReqType;
  48. CARD16 length B16;
  49. } xDamageReq;
  50. /*
  51. * requests and replies
  52. */
  53. typedef struct {
  54. CARD8 reqType;
  55. CARD8 damageReqType;
  56. CARD16 length B16;
  57. CARD32 majorVersion B32;
  58. CARD32 minorVersion B32;
  59. } xDamageQueryVersionReq;
  60. #define sz_xDamageQueryVersionReq 12
  61. typedef struct {
  62. BYTE type; /* X_Reply */
  63. BYTE pad1;
  64. CARD16 sequenceNumber B16;
  65. CARD32 length B32;
  66. CARD32 majorVersion B32;
  67. CARD32 minorVersion B32;
  68. CARD32 pad2 B32;
  69. CARD32 pad3 B32;
  70. CARD32 pad4 B32;
  71. CARD32 pad5 B32;
  72. } xDamageQueryVersionReply;
  73. #define sz_xDamageQueryVersionReply 32
  74. typedef struct {
  75. CARD8 reqType;
  76. CARD8 damageReqType;
  77. CARD16 length B16;
  78. Damage damage B32;
  79. Drawable drawable B32;
  80. CARD8 level;
  81. CARD8 pad1;
  82. CARD16 pad2 B16;
  83. } xDamageCreateReq;
  84. #define sz_xDamageCreateReq 16
  85. typedef struct {
  86. CARD8 reqType;
  87. CARD8 damageReqType;
  88. CARD16 length B16;
  89. Damage damage B32;
  90. } xDamageDestroyReq;
  91. #define sz_xDamageDestroyReq 8
  92. typedef struct {
  93. CARD8 reqType;
  94. CARD8 damageReqType;
  95. CARD16 length B16;
  96. Damage damage B32;
  97. Region repair B32;
  98. Region parts B32;
  99. } xDamageSubtractReq;
  100. #define sz_xDamageSubtractReq 16
  101. typedef struct {
  102. CARD8 reqType;
  103. CARD8 damageReqType;
  104. CARD16 length B16;
  105. Drawable drawable B32;
  106. Region region B32;
  107. } xDamageAddReq;
  108. #define sz_xDamageAddReq 12
  109. /* Events */
  110. #define DamageNotifyMore 0x80
  111. typedef struct {
  112. CARD8 type;
  113. CARD8 level;
  114. CARD16 sequenceNumber B16;
  115. Drawable drawable B32;
  116. Damage damage B32;
  117. Time timestamp B32;
  118. xRectangle area;
  119. xRectangle geometry;
  120. } xDamageNotifyEvent;
  121. #undef Damage
  122. #undef Region
  123. #undef Picture
  124. #undef Window
  125. #undef Drawable
  126. #undef Font
  127. #undef Pixmap
  128. #undef Cursor
  129. #undef Colormap
  130. #undef GContext
  131. #undef Atom
  132. #undef VisualID
  133. #undef Time
  134. #undef KeyCode
  135. #undef KeySym
  136. #endif /* _DAMAGEPROTO_H_ */
  137.