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 #include <X11/extensions/shapeconst.h> 35 36 #ifndef _SHAPE_SERVER_ 37 #include <X11/Xutil.h> 38 39 typedef struct { 40 int type; /* of event */ 41 unsigned long serial; /* # of last request processed by server */ 42 Bool send_event; /* true if this came frome a SendEvent request */ 43 Display *display; /* Display the event was read from */ 44 Window window; /* window of event */ 45 int kind; /* ShapeBounding or ShapeClip */ 46 int x, y; /* extents of new region */ 47 unsigned width, height; 48 Time time; /* server timestamp when region changed */ 49 Bool shaped; /* true if the region exists */ 50 } XShapeEvent; 51 52 _XFUNCPROTOBEGIN 53 54 extern Bool XShapeQueryExtension ( 55 Display* /* display */, 56 int* /* event_base */, 57 int* /* error_base */ 58 ); 59 60 extern Status XShapeQueryVersion ( 61 Display* /* display */, 62 int* /* major_version */, 63 int* /* minor_version */ 64 ); 65 66 extern void XShapeCombineRegion ( 67 Display* /* display */, 68 Window /* dest */, 69 int /* dest_kind */, 70 int /* x_off */, 71 int /* y_off */, 72 Region /* region */, 73 int /* op */ 74 ); 75 76 extern void XShapeCombineRectangles ( 77 Display* /* display */, 78 Window /* dest */, 79 int /* dest_kind */, 80 int /* x_off */, 81 int /* y_off */, 82 XRectangle* /* rectangles */, 83 int /* n_rects */, 84 int /* op */, 85 int /* ordering */ 86 ); 87 88 extern void XShapeCombineMask ( 89 Display* /* display */, 90 Window /* dest */, 91 int /* dest_kind */, 92 int /* x_off */, 93 int /* y_off */, 94 Pixmap /* src */, 95 int /* op */ 96 ); 97 98 extern void XShapeCombineShape ( 99 Display* /* display */, 100 Window /* dest */, 101 int /* dest_kind */, 102 int /* x_off */, 103 int /* y_off */, 104 Window /* src */, 105 int /* src_kind */, 106 int /* op */ 107 ); 108 109 extern void XShapeOffsetShape ( 110 Display* /* display */, 111 Window /* dest */, 112 int /* dest_kind */, 113 int /* x_off */, 114 int /* y_off */ 115 ); 116 117 extern Status XShapeQueryExtents ( 118 Display* /* display */, 119 Window /* window */, 120 Bool* /* bounding_shaped */, 121 int* /* x_bounding */, 122 int* /* y_bounding */, 123 unsigned int* /* w_bounding */, 124 unsigned int* /* h_bounding */, 125 Bool* /* clip_shaped */, 126 int* /* x_clip */, 127 int* /* y_clip */, 128 unsigned int* /* w_clip */, 129 unsigned int* /* h_clip */ 130 ); 131 132 extern void XShapeSelectInput ( 133 Display* /* display */, 134 Window /* window */, 135 unsigned long /* mask */ 136 ); 137 138 extern unsigned long XShapeInputSelected ( 139 Display* /* display */, 140 Window /* window */ 141 ); 142 143 extern XRectangle *XShapeGetRectangles ( 144 Display* /* display */, 145 Window /* window */, 146 int /* kind */, 147 int* /* count */, 148 int* /* ordering */ 149 ); 150 151 _XFUNCPROTOEND 152 153 #endif /* !_SHAPE_SERVER_ */ 154 155 #endif /* _SHAPE_H_ */ 156