shape.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /************************************************************
  2. Copyright 1989, 1998 The Open Group
  3. Permission to use, copy, modify, distribute, and sell this software and its
  4. documentation for any purpose is hereby granted without fee, provided that
  5. the above copyright notice appear in all copies and that both that
  6. copyright notice and this permission notice appear in supporting
  7. documentation.
  8. The above copyright notice and this permission notice shall be included in
  9. all copies or substantial portions of the Software.
  10. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  14. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  15. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  16. Except as contained in this notice, the name of The Open Group shall not be
  17. used in advertising or otherwise to promote the sale, use or other dealings
  18. in this Software without prior written authorization from The Open Group.
  19. ********************************************************/
  20. #ifndef _SHAPE_H_
  21. #define _SHAPE_H_
  22. #include <X11/Xfuncproto.h>
  23. #include <X11/extensions/shapeconst.h>
  24. #ifndef _SHAPE_SERVER_
  25. #include <X11/Xutil.h>
  26. typedef struct {
  27. int type; /* of event */
  28. unsigned long serial; /* # of last request processed by server */
  29. Bool send_event; /* true if this came frome a SendEvent request */
  30. Display *display; /* Display the event was read from */
  31. Window window; /* window of event */
  32. int kind; /* ShapeBounding or ShapeClip */
  33. int x, y; /* extents of new region */
  34. unsigned width, height;
  35. Time time; /* server timestamp when region changed */
  36. Bool shaped; /* true if the region exists */
  37. } XShapeEvent;
  38. _XFUNCPROTOBEGIN
  39. extern Bool XShapeQueryExtension (
  40. Display* /* display */,
  41. int* /* event_base */,
  42. int* /* error_base */
  43. );
  44. extern Status XShapeQueryVersion (
  45. Display* /* display */,
  46. int* /* major_version */,
  47. int* /* minor_version */
  48. );
  49. extern void XShapeCombineRegion (
  50. Display* /* display */,
  51. Window /* dest */,
  52. int /* dest_kind */,
  53. int /* x_off */,
  54. int /* y_off */,
  55. Region /* region */,
  56. int /* op */
  57. );
  58. extern void XShapeCombineRectangles (
  59. Display* /* display */,
  60. Window /* dest */,
  61. int /* dest_kind */,
  62. int /* x_off */,
  63. int /* y_off */,
  64. XRectangle* /* rectangles */,
  65. int /* n_rects */,
  66. int /* op */,
  67. int /* ordering */
  68. );
  69. extern void XShapeCombineMask (
  70. Display* /* display */,
  71. Window /* dest */,
  72. int /* dest_kind */,
  73. int /* x_off */,
  74. int /* y_off */,
  75. Pixmap /* src */,
  76. int /* op */
  77. );
  78. extern void XShapeCombineShape (
  79. Display* /* display */,
  80. Window /* dest */,
  81. int /* dest_kind */,
  82. int /* x_off */,
  83. int /* y_off */,
  84. Window /* src */,
  85. int /* src_kind */,
  86. int /* op */
  87. );
  88. extern void XShapeOffsetShape (
  89. Display* /* display */,
  90. Window /* dest */,
  91. int /* dest_kind */,
  92. int /* x_off */,
  93. int /* y_off */
  94. );
  95. extern Status XShapeQueryExtents (
  96. Display* /* display */,
  97. Window /* window */,
  98. Bool* /* bounding_shaped */,
  99. int* /* x_bounding */,
  100. int* /* y_bounding */,
  101. unsigned int* /* w_bounding */,
  102. unsigned int* /* h_bounding */,
  103. Bool* /* clip_shaped */,
  104. int* /* x_clip */,
  105. int* /* y_clip */,
  106. unsigned int* /* w_clip */,
  107. unsigned int* /* h_clip */
  108. );
  109. extern void XShapeSelectInput (
  110. Display* /* display */,
  111. Window /* window */,
  112. unsigned long /* mask */
  113. );
  114. extern unsigned long XShapeInputSelected (
  115. Display* /* display */,
  116. Window /* window */
  117. );
  118. extern XRectangle *XShapeGetRectangles (
  119. Display* /* display */,
  120. Window /* window */,
  121. int /* kind */,
  122. int* /* count */,
  123. int* /* ordering */
  124. );
  125. _XFUNCPROTOEND
  126. #endif /* !_SHAPE_SERVER_ */
  127. #endif /* _SHAPE_H_ */