You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Xregion.h 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /* $Xorg: Xutil.h,v 1.8 2001/02/09 02:03:39 xorgcvs Exp $ */
  2. /***********************************************************
  3. Copyright 1987, 1998 The Open Group
  4. Permission to use, copy, modify, distribute, and sell this software and its
  5. documentation for any purpose is hereby granted without fee, provided that
  6. the above copyright notice appear in all copies and that both that
  7. copyright notice and this permission notice appear in supporting
  8. documentation.
  9. The above copyright notice and this permission notice shall be included in
  10. all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  15. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  16. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  17. Except as contained in this notice, the name of The Open Group shall not be
  18. used in advertising or otherwise to promote the sale, use or other dealings
  19. in this Software without prior written authorization from The Open Group.
  20. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  21. All Rights Reserved
  22. Permission to use, copy, modify, and distribute this software and its
  23. documentation for any purpose and without fee is hereby granted,
  24. provided that the above copyright notice appear in all copies and that
  25. both that copyright notice and this permission notice appear in
  26. supporting documentation, and that the name of Digital not be
  27. used in advertising or publicity pertaining to distribution of the
  28. software without specific, written prior permission.
  29. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  30. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  31. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  32. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  33. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  34. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  35. SOFTWARE.
  36. ******************************************************************/
  37. /* $XFree86: xc/lib/X11/Xutil.h,v 3.4 2001/12/14 19:54:10 dawes Exp $ */
  38. #ifndef _XREGION_H_
  39. #define _XREGION_H_
  40. // - Faked defines to fool the X11 region code
  41. #include <stdlib.h>
  42. #include <string.h>
  43. #define Bool int
  44. #define Xmalloc malloc
  45. #define Xfree free
  46. #define Xrealloc realloc
  47. #define NeedFunctionPrototypes 1
  48. // - Cribbed from Xlib.h
  49. typedef struct {
  50. short x, y;
  51. } XPoint;
  52. typedef struct {
  53. short x, y;
  54. unsigned short width, height;
  55. } XRectangle;
  56. /*
  57. * opaque reference to Region data type
  58. */
  59. typedef struct _XRegion *Region;
  60. /* Return values from XRectInRegion() */
  61. #define RectangleOut 0
  62. #define RectangleIn 1
  63. #define RectanglePart 2
  64. #ifdef __cplusplus
  65. extern "C" {
  66. #endif
  67. extern int XClipBox(
  68. #if NeedFunctionPrototypes
  69. Region /* r */,
  70. XRectangle* /* rect_return */
  71. #endif
  72. );
  73. extern Region XCreateRegion(
  74. #if NeedFunctionPrototypes
  75. void
  76. #endif
  77. );
  78. extern const char *XDefaultString (void);
  79. extern int XDestroyRegion(
  80. #if NeedFunctionPrototypes
  81. Region /* r */
  82. #endif
  83. );
  84. extern int XEmptyRegion(
  85. #if NeedFunctionPrototypes
  86. Region /* r */
  87. #endif
  88. );
  89. extern int XEqualRegion(
  90. #if NeedFunctionPrototypes
  91. Region /* r1 */,
  92. Region /* r2 */
  93. #endif
  94. );
  95. extern int XIntersectRegion(
  96. #if NeedFunctionPrototypes
  97. Region /* sra */,
  98. Region /* srb */,
  99. Region /* dr_return */
  100. #endif
  101. );
  102. extern int XOffsetRegion(
  103. #if NeedFunctionPrototypes
  104. Region /* r */,
  105. int /* dx */,
  106. int /* dy */
  107. #endif
  108. );
  109. extern Bool XPointInRegion(
  110. #if NeedFunctionPrototypes
  111. Region /* r */,
  112. int /* x */,
  113. int /* y */
  114. #endif
  115. );
  116. extern Region XPolygonRegion(
  117. #if NeedFunctionPrototypes
  118. XPoint* /* points */,
  119. int /* n */,
  120. int /* fill_rule */
  121. #endif
  122. );
  123. extern int XRectInRegion(
  124. #if NeedFunctionPrototypes
  125. Region /* r */,
  126. int /* x */,
  127. int /* y */,
  128. unsigned int /* width */,
  129. unsigned int /* height */
  130. #endif
  131. );
  132. extern int XShrinkRegion(
  133. #if NeedFunctionPrototypes
  134. Region /* r */,
  135. int /* dx */,
  136. int /* dy */
  137. #endif
  138. );
  139. extern int XSubtractRegion(
  140. #if NeedFunctionPrototypes
  141. Region /* sra */,
  142. Region /* srb */,
  143. Region /* dr_return */
  144. #endif
  145. );
  146. extern int XUnionRectWithRegion(
  147. #if NeedFunctionPrototypes
  148. XRectangle* /* rectangle */,
  149. Region /* src_region */,
  150. Region /* dest_region_return */
  151. #endif
  152. );
  153. extern int XUnionRegion(
  154. #if NeedFunctionPrototypes
  155. Region /* sra */,
  156. Region /* srb */,
  157. Region /* dr_return */
  158. #endif
  159. );
  160. extern int XXorRegion(
  161. #if NeedFunctionPrototypes
  162. Region /* sra */,
  163. Region /* srb */,
  164. Region /* dr_return */
  165. #endif
  166. );
  167. #ifdef __cplusplus
  168. };
  169. #endif
  170. #endif /* _XUTIL_H_ */