1 | /*
|
---|
2 | * $XFree86: xc/lib/Xfixes/Xfixes.h,v 1.1 2002/11/30 06:21:45 keithp Exp $
|
---|
3 | *
|
---|
4 | * Copyright © 2006 Sun Microsystems
|
---|
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, and that the name of Sun Microsystems not be used in
|
---|
11 | * advertising or publicity pertaining to distribution of the software without
|
---|
12 | * specific, written prior permission. Sun Microsystems makes no
|
---|
13 | * representations about the suitability of this software for any purpose. It
|
---|
14 | * is provided "as is" without express or implied warranty.
|
---|
15 | *
|
---|
16 | * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
---|
17 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
---|
18 | * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
---|
19 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
---|
20 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
---|
21 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
---|
22 | * PERFORMANCE OF THIS SOFTWARE.
|
---|
23 | *
|
---|
24 | * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
---|
25 | *
|
---|
26 | * Permission to use, copy, modify, distribute, and sell this software and its
|
---|
27 | * documentation for any purpose is hereby granted without fee, provided that
|
---|
28 | * the above copyright notice appear in all copies and that both that
|
---|
29 | * copyright notice and this permission notice appear in supporting
|
---|
30 | * documentation, and that the name of Keith Packard not be used in
|
---|
31 | * advertising or publicity pertaining to distribution of the software without
|
---|
32 | * specific, written prior permission. Keith Packard makes no
|
---|
33 | * representations about the suitability of this software for any purpose. It
|
---|
34 | * is provided "as is" without express or implied warranty.
|
---|
35 | *
|
---|
36 | * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
---|
37 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
---|
38 | * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
---|
39 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
---|
40 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
---|
41 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
---|
42 | * PERFORMANCE OF THIS SOFTWARE.
|
---|
43 | */
|
---|
44 |
|
---|
45 | #ifndef _XFIXES_H_
|
---|
46 | #define _XFIXES_H_
|
---|
47 |
|
---|
48 | #include <X11/extensions/xfixeswire.h>
|
---|
49 |
|
---|
50 | #include <X11/Xfuncproto.h>
|
---|
51 | #include <X11/Xlib.h>
|
---|
52 |
|
---|
53 | /*
|
---|
54 | * This revision number also appears in configure.ac, they have
|
---|
55 | * to be manually synchronized
|
---|
56 | */
|
---|
57 | #define XFIXES_REVISION 1
|
---|
58 | #define XFIXES_VERSION ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION))
|
---|
59 |
|
---|
60 | typedef struct {
|
---|
61 | int type; /* event base */
|
---|
62 | unsigned long serial;
|
---|
63 | Bool send_event;
|
---|
64 | Display *display;
|
---|
65 | Window window;
|
---|
66 | int subtype;
|
---|
67 | Window owner;
|
---|
68 | Atom selection;
|
---|
69 | Time timestamp;
|
---|
70 | Time selection_timestamp;
|
---|
71 | } XFixesSelectionNotifyEvent;
|
---|
72 |
|
---|
73 | typedef struct {
|
---|
74 | int type; /* event base */
|
---|
75 | unsigned long serial;
|
---|
76 | Bool send_event;
|
---|
77 | Display *display;
|
---|
78 | Window window;
|
---|
79 | int subtype;
|
---|
80 | unsigned long cursor_serial;
|
---|
81 | Time timestamp;
|
---|
82 | Atom cursor_name;
|
---|
83 | } XFixesCursorNotifyEvent;
|
---|
84 |
|
---|
85 | typedef struct {
|
---|
86 | short x, y;
|
---|
87 | unsigned short width, height;
|
---|
88 | unsigned short xhot, yhot;
|
---|
89 | unsigned long cursor_serial;
|
---|
90 | unsigned long *pixels;
|
---|
91 | #if XFIXES_MAJOR >= 2
|
---|
92 | Atom atom; /* Version >= 2 only */
|
---|
93 | const char *name; /* Version >= 2 only */
|
---|
94 | #endif
|
---|
95 | } XFixesCursorImage;
|
---|
96 |
|
---|
97 | #if XFIXES_MAJOR >= 2
|
---|
98 | /* Version 2 types */
|
---|
99 |
|
---|
100 | typedef XID XserverRegion;
|
---|
101 |
|
---|
102 | typedef struct {
|
---|
103 | short x, y;
|
---|
104 | unsigned short width, height;
|
---|
105 | unsigned short xhot, yhot;
|
---|
106 | unsigned long cursor_serial;
|
---|
107 | unsigned long *pixels;
|
---|
108 | Atom atom;
|
---|
109 | const char *name;
|
---|
110 | } XFixesCursorImageAndName;
|
---|
111 |
|
---|
112 | #endif
|
---|
113 |
|
---|
114 | _XFUNCPROTOBEGIN
|
---|
115 |
|
---|
116 | Bool XFixesQueryExtension (Display *dpy, int *event_basep, int *error_basep);
|
---|
117 | Status XFixesQueryVersion (Display *dpy,
|
---|
118 | int *major_versionp,
|
---|
119 | int *minor_versionp);
|
---|
120 |
|
---|
121 | int XFixesVersion (void);
|
---|
122 |
|
---|
123 | void
|
---|
124 | XFixesChangeSaveSet (Display *dpy,
|
---|
125 | Window win,
|
---|
126 | int mode,
|
---|
127 | int target,
|
---|
128 | int map);
|
---|
129 |
|
---|
130 | void
|
---|
131 | XFixesSelectSelectionInput (Display *dpy,
|
---|
132 | Window win,
|
---|
133 | Atom selection,
|
---|
134 | unsigned long eventMask);
|
---|
135 |
|
---|
136 | void
|
---|
137 | XFixesSelectCursorInput (Display *dpy,
|
---|
138 | Window win,
|
---|
139 | unsigned long eventMask);
|
---|
140 |
|
---|
141 | XFixesCursorImage *
|
---|
142 | XFixesGetCursorImage (Display *dpy);
|
---|
143 |
|
---|
144 | #if XFIXES_MAJOR >= 2
|
---|
145 | /* Version 2 functions */
|
---|
146 |
|
---|
147 | XserverRegion
|
---|
148 | XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles);
|
---|
149 |
|
---|
150 | XserverRegion
|
---|
151 | XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap);
|
---|
152 |
|
---|
153 | XserverRegion
|
---|
154 | XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind);
|
---|
155 |
|
---|
156 | XserverRegion
|
---|
157 | XFixesCreateRegionFromGC (Display *dpy, GC gc);
|
---|
158 |
|
---|
159 | XserverRegion
|
---|
160 | XFixesCreateRegionFromPicture (Display *dpy, XID picture);
|
---|
161 |
|
---|
162 | void
|
---|
163 | XFixesDestroyRegion (Display *dpy, XserverRegion region);
|
---|
164 |
|
---|
165 | void
|
---|
166 | XFixesSetRegion (Display *dpy, XserverRegion region,
|
---|
167 | XRectangle *rectangles, int nrectangles);
|
---|
168 |
|
---|
169 | void
|
---|
170 | XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src);
|
---|
171 |
|
---|
172 | void
|
---|
173 | XFixesUnionRegion (Display *dpy, XserverRegion dst,
|
---|
174 | XserverRegion src1, XserverRegion src2);
|
---|
175 |
|
---|
176 | void
|
---|
177 | XFixesIntersectRegion (Display *dpy, XserverRegion dst,
|
---|
178 | XserverRegion src1, XserverRegion src2);
|
---|
179 |
|
---|
180 | void
|
---|
181 | XFixesSubtractRegion (Display *dpy, XserverRegion dst,
|
---|
182 | XserverRegion src1, XserverRegion src2);
|
---|
183 |
|
---|
184 | void
|
---|
185 | XFixesInvertRegion (Display *dpy, XserverRegion dst,
|
---|
186 | XRectangle *rect, XserverRegion src);
|
---|
187 |
|
---|
188 | void
|
---|
189 | XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy);
|
---|
190 |
|
---|
191 | void
|
---|
192 | XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src);
|
---|
193 |
|
---|
194 | XRectangle *
|
---|
195 | XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet);
|
---|
196 |
|
---|
197 | XRectangle *
|
---|
198 | XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region,
|
---|
199 | int *nrectanglesRet,
|
---|
200 | XRectangle *bounds);
|
---|
201 |
|
---|
202 | void
|
---|
203 | XFixesSetGCClipRegion (Display *dpy, GC gc,
|
---|
204 | int clip_x_origin, int clip_y_origin,
|
---|
205 | XserverRegion region);
|
---|
206 |
|
---|
207 | void
|
---|
208 | XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind,
|
---|
209 | int x_off, int y_off, XserverRegion region);
|
---|
210 |
|
---|
211 | void
|
---|
212 | XFixesSetPictureClipRegion (Display *dpy, XID picture,
|
---|
213 | int clip_x_origin, int clip_y_origin,
|
---|
214 | XserverRegion region);
|
---|
215 |
|
---|
216 | void
|
---|
217 | XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name);
|
---|
218 |
|
---|
219 | const char *
|
---|
220 | XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom);
|
---|
221 |
|
---|
222 | void
|
---|
223 | XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination);
|
---|
224 |
|
---|
225 | void
|
---|
226 | XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name);
|
---|
227 |
|
---|
228 | #endif /* XFIXES_MAJOR >= 2 */
|
---|
229 |
|
---|
230 | #if XFIXES_MAJOR >= 3
|
---|
231 |
|
---|
232 | void
|
---|
233 | XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src,
|
---|
234 | unsigned left, unsigned right,
|
---|
235 | unsigned top, unsigned bottom);
|
---|
236 |
|
---|
237 | #endif /* XFIXES_MAJOR >= 3 */
|
---|
238 |
|
---|
239 | #if XFIXES_MAJOR >= 4
|
---|
240 | /* Version 4.0 externs */
|
---|
241 |
|
---|
242 | void
|
---|
243 | XFixesHideCursor (Display *dpy, Window win);
|
---|
244 |
|
---|
245 | void
|
---|
246 | XFixesShowCursor (Display *dpy, Window win);
|
---|
247 |
|
---|
248 | #endif /* XFIXES_MAJOR >= 4 */
|
---|
249 |
|
---|
250 | _XFUNCPROTOEND
|
---|
251 |
|
---|
252 | #endif /* _XFIXES_H_ */
|
---|