home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1999 March / PCShareware-3-99.iso / IMPLE / DJGPP.RAR / DJGPP2 / XLIB-SR0.ZIP / SRC / EXTENSIO / SHAPE.H < prev    next >
C/C++ Source or Header  |  1991-02-17  |  5KB  |  198 lines

  1. /************************************************************
  2. Copyright 1989 by The Massachusetts Institute of Technology
  3.  
  4. Permission to use, copy, modify, and distribute this
  5. software and its documentation for any purpose and without
  6. fee is hereby granted, provided that the above copyright
  7. no- tice appear in all copies and that both that copyright
  8. no- tice and this permission notice appear in supporting
  9. docu- mentation, and that the name of MIT not be used in
  10. advertising or publicity pertaining to distribution of the
  11. software without specific prior written permission.
  12. M.I.T. makes no representation about the suitability of
  13. this software for any purpose. It is provided "as is"
  14. without any express or implied warranty.
  15.  
  16. MIT DISCLAIMS ALL WARRANTIES WITH REGARD TO  THIS  SOFTWARE,
  17. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
  18. NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE  LI-
  19. ABLE  FOR  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  20. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,  DATA  OR
  21. PROFITS,  WHETHER  IN  AN  ACTION OF CONTRACT, NEGLIGENCE OR
  22. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
  23. THE USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  
  25. ********************************************************/
  26.  
  27. /* $XConsortium: shape.h,v 1.15 91/02/17 13:09:32 rws Exp $ */
  28.  
  29. #ifndef _SHAPE_H_
  30. #define _SHAPE_H_
  31.  
  32. #include <X11/Xfuncproto.h>
  33.  
  34. #define X_ShapeQueryVersion        0
  35. #define X_ShapeRectangles        1
  36. #define X_ShapeMask            2
  37. #define X_ShapeCombine            3
  38. #define X_ShapeOffset            4
  39. #define X_ShapeQueryExtents        5
  40. #define X_ShapeSelectInput        6
  41. #define X_ShapeInputSelected        7
  42. #define X_ShapeGetRectangles        8
  43.  
  44. #define ShapeSet            0
  45. #define ShapeUnion            1
  46. #define ShapeIntersect            2
  47. #define ShapeSubtract            3
  48. #define ShapeInvert            4
  49.  
  50. #define ShapeBounding            0
  51. #define ShapeClip            1
  52.  
  53. #define ShapeNotifyMask            (1L << 0)
  54. #define ShapeNotify            0
  55.  
  56. #define ShapeNumberEvents        (ShapeNotify + 1)
  57.  
  58. #ifndef _SHAPE_SERVER_
  59. typedef struct {
  60.     int    type;            /* of event */
  61.     unsigned long serial;   /* # of last request processed by server */
  62.     Bool send_event;        /* true if this came frome a SendEvent request */
  63.     Display *display;        /* Display the event was read from */
  64.     Window window;        /* window of event */
  65.     int kind;            /* ShapeBounding or ShapeClip */
  66.     int x, y;            /* extents of new region */
  67.     unsigned width, height;
  68.     Time time;            /* server timestamp when region changed */
  69.     Bool shaped;        /* true if the region exists */
  70. } XShapeEvent;
  71.  
  72. _XFUNCPROTOBEGIN
  73.  
  74. extern Bool XShapeQueryExtension (
  75. #if NeedFunctionPrototypes
  76.     Display*    /* display */,
  77.     int*    /* event_base */,
  78.     int*    /* error_base */
  79. #endif
  80. );
  81.  
  82. extern Status XShapeQueryVersion (
  83. #if NeedFunctionPrototypes
  84.     Display*    /* display */,
  85.     int*    /* major_version */,
  86.     int*    /* minor_version */
  87. #endif
  88. );
  89.  
  90. extern void XShapeCombineRegion (
  91. #if NeedFunctionPrototypes
  92.     Display*    /* display */,
  93.     Window    /* dest */,
  94.     int        /* dest_kind */,
  95.     int        /* x_off */,
  96.     int        /* y_off */,
  97.     Region    /* region */,
  98.     int        /* op */
  99. #endif
  100. );
  101.  
  102. extern void XShapeCombineRectangles (
  103. #if NeedFunctionPrototypes
  104.     Display*    /* display */,
  105.     Window    /* dest */,
  106.     int        /* dest_kind */,
  107.     int        /* x_off */,
  108.     int        /* y_off */,
  109.     XRectangle*    /* rectangles */,
  110.     int        /* n_rects */,
  111.     int        /* op */,
  112.     int        /* ordering */
  113. #endif
  114. );
  115.  
  116. extern void XShapeCombineMask (
  117. #if NeedFunctionPrototypes
  118.     Display*    /* display */,
  119.     Window    /* dest */,
  120.     int        /* dest_kind */,
  121.     int        /* x_off */,
  122.     int        /* y_off */,
  123.     Pixmap    /* src */,
  124.     int        /* op */
  125. #endif
  126. );
  127.  
  128. extern void XShapeCombineShape (
  129. #if NeedFunctionPrototypes
  130.     Display*    /* display */,
  131.     Window    /* dest */,
  132.     int        /* dest_kind */,
  133.     int        /* x_off */,
  134.     int        /* y_off */,
  135.     Window    /* src */,
  136.     int        /* src_kind */,
  137.     int        /* op */
  138. #endif
  139. );
  140.  
  141. extern void XShapeOffsetShape (
  142. #if NeedFunctionPrototypes
  143.     Display*    /* display */,
  144.     Window    /* dest */,
  145.     int        /* dest_kind */,
  146.     int        /* x_off */,
  147.     int        /* y_off */
  148. #endif
  149. );
  150.  
  151. extern Status XShapeQueryExtents (
  152. #if NeedFunctionPrototypes
  153.     Display*        /* display */,
  154.     Window        /* window */,
  155.     Bool*        /* bounding_shaped */,
  156.     int*        /* x_bounding */,
  157.     int*        /* y_bounding */,
  158.     unsigned int*    /* w_bounding */,
  159.     unsigned int*    /* h_bounding */,
  160.     Bool*        /* clip_shaped */,
  161.     int*        /* x_clip */,
  162.     int*        /* y_clip */,
  163.     unsigned int*    /* w_clip */,
  164.     unsigned int*    /* h_clip */
  165. #endif
  166. );
  167.  
  168. extern void XShapeSelectInput (
  169. #if NeedFunctionPrototypes
  170.     Display*        /* display */,
  171.     Window        /* window */,
  172.     unsigned long    /* mask */
  173. #endif
  174. );
  175.  
  176. extern unsigned long XShapeInputSelected (
  177. #if NeedFunctionPrototypes
  178.     Display*    /* display */,
  179.     Window    /* window */
  180. #endif
  181. );
  182.  
  183. extern XRectangle *XShapeGetRectangles (
  184. #if NeedFunctionPrototypes
  185.     Display*    /* display */,
  186.     Window    /* window */,
  187.     int        /* kind */,
  188.     int*    /* count */,
  189.     int*    /* ordering */
  190. #endif
  191. );
  192.  
  193. _XFUNCPROTOEND
  194.  
  195. #endif /* _SHAPE_SERVER_ */
  196.  
  197. #endif /* _SHAPE_H_ */
  198.