1 /* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ 2 /************************************************************ 3 4 Copyright 1989, 1998 The Open Group 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. 11 12 The above copyright notice and this permission notice shall be included in 13 all copies or substantial portions of the Software. 14 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 22 Except as contained in this notice, the name of The Open Group shall not be 23 used in advertising or otherwise to promote the sale, use or other dealings 24 in this Software without prior written authorization from The Open Group. 25 26 ********************************************************/ 27 28 /* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ 29 30 #ifndef _SHAPE_H_ 31 #define _SHAPE_H_ 32 33 #include <X11/Xfuncproto.h> 34 35 #define X_ShapeQueryVersion 0 36 #define X_ShapeRectangles 1 37 #define X_ShapeMask 2 38 #define X_ShapeCombine 3 39 #define X_ShapeOffset 4 40 #define X_ShapeQueryExtents 5 41 #define X_ShapeSelectInput 6 42 #define X_ShapeInputSelected 7 43 #define X_ShapeGetRectangles 8 44 45 #define ShapeSet 0 46 #define ShapeUnion 1 47 #define ShapeIntersect 2 48 #define ShapeSubtract 3 49 #define ShapeInvert 4 50 51 #define ShapeBounding 0 52 #define ShapeClip 1 53 #define ShapeInput 2 54 55 #define ShapeNotifyMask (1L << 0) 56 #define ShapeNotify 0 57 58 #define ShapeNumberEvents (ShapeNotify + 1) 59 60 #ifndef _SHAPE_SERVER_ 61 62 #include <X11/Xutil.h> 63 64 typedef struct { 65 int type; /* of event */ 66 unsigned long serial; /* # of last request processed by server */ 67 Bool send_event; /* true if this came frome a SendEvent request */ 68 Display *display; /* Display the event was read from */ 69 Window window; /* window of event */ 70 int kind; /* ShapeBounding or ShapeClip */ 71 int x, y; /* extents of new region */ 72 unsigned width, height; 73 Time time; /* server timestamp when region changed */ 74 Bool shaped; /* true if the region exists */ 75 } XShapeEvent; 76 77 _XFUNCPROTOBEGIN 78 79 extern Bool XShapeQueryExtension ( 80 Display* /* display */, 81 int* /* event_base */, 82 int* /* error_base */ 83 ); 84 85 extern Status XShapeQueryVersion ( 86 Display* /* display */, 87 int* /* major_version */, 88 int* /* minor_version */ 89 ); 90 91 extern void XShapeCombineRegion ( 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 ); 100 101 extern void XShapeCombineRectangles ( 102 Display* /* display */, 103 Window /* dest */, 104 int /* dest_kind */, 105 int /* x_off */, 106 int /* y_off */, 107 XRectangle* /* rectangles */, 108 int /* n_rects */, 109 int /* op */, 110 int /* ordering */ 111 ); 112 113 extern void XShapeCombineMask ( 114 Display* /* display */, 115 Window /* dest */, 116 int /* dest_kind */, 117 int /* x_off */, 118 int /* y_off */, 119 Pixmap /* src */, 120 int /* op */ 121 ); 122 123 extern void XShapeCombineShape ( 124 Display* /* display */, 125 Window /* dest */, 126 int /* dest_kind */, 127 int /* x_off */, 128 int /* y_off */, 129 Window /* src */, 130 int /* src_kind */, 131 int /* op */ 132 ); 133 134 extern void XShapeOffsetShape ( 135 Display* /* display */, 136 Window /* dest */, 137 int /* dest_kind */, 138 int /* x_off */, 139 int /* y_off */ 140 ); 141 142 extern Status XShapeQueryExtents ( 143 Display* /* display */, 144 Window /* window */, 145 Bool* /* bounding_shaped */, 146 int* /* x_bounding */, 147 int* /* y_bounding */, 148 unsigned int* /* w_bounding */, 149 unsigned int* /* h_bounding */, 150 Bool* /* clip_shaped */, 151 int* /* x_clip */, 152 int* /* y_clip */, 153 unsigned int* /* w_clip */, 154 unsigned int* /* h_clip */ 155 ); 156 157 extern void XShapeSelectInput ( 158 Display* /* display */, 159 Window /* window */, 160 unsigned long /* mask */ 161 ); 162 163 extern unsigned long XShapeInputSelected ( 164 Display* /* display */, 165 Window /* window */ 166 ); 167 168 extern XRectangle *XShapeGetRectangles ( 169 Display* /* display */, 170 Window /* window */, 171 int /* kind */, 172 int* /* count */, 173 int* /* ordering */ 174 ); 175 176 _XFUNCPROTOEND 177 178 #endif /* _SHAPE_SERVER_ */ 179 180 #endif /* _SHAPE_H_ */ 181