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