jpayne@69
|
1
|
jpayne@69
|
2 /***********************************************************
|
jpayne@69
|
3
|
jpayne@69
|
4 Copyright 1987, 1998 The Open Group
|
jpayne@69
|
5
|
jpayne@69
|
6 Permission to use, copy, modify, distribute, and sell this software and its
|
jpayne@69
|
7 documentation for any purpose is hereby granted without fee, provided that
|
jpayne@69
|
8 the above copyright notice appear in all copies and that both that
|
jpayne@69
|
9 copyright notice and this permission notice appear in supporting
|
jpayne@69
|
10 documentation.
|
jpayne@69
|
11
|
jpayne@69
|
12 The above copyright notice and this permission notice shall be included in
|
jpayne@69
|
13 all copies or substantial portions of the Software.
|
jpayne@69
|
14
|
jpayne@69
|
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
jpayne@69
|
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
jpayne@69
|
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
jpayne@69
|
18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
jpayne@69
|
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
jpayne@69
|
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
jpayne@69
|
21
|
jpayne@69
|
22 Except as contained in this notice, the name of The Open Group shall not be
|
jpayne@69
|
23 used in advertising or otherwise to promote the sale, use or other dealings
|
jpayne@69
|
24 in this Software without prior written authorization from The Open Group.
|
jpayne@69
|
25
|
jpayne@69
|
26
|
jpayne@69
|
27 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
jpayne@69
|
28
|
jpayne@69
|
29 All Rights Reserved
|
jpayne@69
|
30
|
jpayne@69
|
31 Permission to use, copy, modify, and distribute this software and its
|
jpayne@69
|
32 documentation for any purpose and without fee is hereby granted,
|
jpayne@69
|
33 provided that the above copyright notice appear in all copies and that
|
jpayne@69
|
34 both that copyright notice and this permission notice appear in
|
jpayne@69
|
35 supporting documentation, and that the name of Digital not be
|
jpayne@69
|
36 used in advertising or publicity pertaining to distribution of the
|
jpayne@69
|
37 software without specific, written prior permission.
|
jpayne@69
|
38
|
jpayne@69
|
39 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
jpayne@69
|
40 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
jpayne@69
|
41 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
jpayne@69
|
42 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
jpayne@69
|
43 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
jpayne@69
|
44 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
jpayne@69
|
45 SOFTWARE.
|
jpayne@69
|
46
|
jpayne@69
|
47 ******************************************************************/
|
jpayne@69
|
48
|
jpayne@69
|
49 #ifndef _X11_XUTIL_H_
|
jpayne@69
|
50 #define _X11_XUTIL_H_
|
jpayne@69
|
51
|
jpayne@69
|
52 /* You must include <X11/Xlib.h> before including this file */
|
jpayne@69
|
53 #include <X11/Xlib.h>
|
jpayne@69
|
54 #include <X11/keysym.h>
|
jpayne@69
|
55
|
jpayne@69
|
56 /* The Xlib structs are full of implicit padding to properly align members.
|
jpayne@69
|
57 We can't clean that up without breaking ABI, so tell clang not to bother
|
jpayne@69
|
58 complaining about it. */
|
jpayne@69
|
59 #ifdef __clang__
|
jpayne@69
|
60 #pragma clang diagnostic push
|
jpayne@69
|
61 #pragma clang diagnostic ignored "-Wpadded"
|
jpayne@69
|
62 #endif
|
jpayne@69
|
63
|
jpayne@69
|
64 /*
|
jpayne@69
|
65 * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
|
jpayne@69
|
66 * value (x, y, width, height) was found in the parsed string.
|
jpayne@69
|
67 */
|
jpayne@69
|
68 #define NoValue 0x0000
|
jpayne@69
|
69 #define XValue 0x0001
|
jpayne@69
|
70 #define YValue 0x0002
|
jpayne@69
|
71 #define WidthValue 0x0004
|
jpayne@69
|
72 #define HeightValue 0x0008
|
jpayne@69
|
73 #define AllValues 0x000F
|
jpayne@69
|
74 #define XNegative 0x0010
|
jpayne@69
|
75 #define YNegative 0x0020
|
jpayne@69
|
76
|
jpayne@69
|
77 /*
|
jpayne@69
|
78 * new version containing base_width, base_height, and win_gravity fields;
|
jpayne@69
|
79 * used with WM_NORMAL_HINTS.
|
jpayne@69
|
80 */
|
jpayne@69
|
81 typedef struct {
|
jpayne@69
|
82 long flags; /* marks which fields in this structure are defined */
|
jpayne@69
|
83 int x, y; /* obsolete for new window mgrs, but clients */
|
jpayne@69
|
84 int width, height; /* should set so old wm's don't mess up */
|
jpayne@69
|
85 int min_width, min_height;
|
jpayne@69
|
86 int max_width, max_height;
|
jpayne@69
|
87 int width_inc, height_inc;
|
jpayne@69
|
88 struct {
|
jpayne@69
|
89 int x; /* numerator */
|
jpayne@69
|
90 int y; /* denominator */
|
jpayne@69
|
91 } min_aspect, max_aspect;
|
jpayne@69
|
92 int base_width, base_height; /* added by ICCCM version 1 */
|
jpayne@69
|
93 int win_gravity; /* added by ICCCM version 1 */
|
jpayne@69
|
94 } XSizeHints;
|
jpayne@69
|
95
|
jpayne@69
|
96 /*
|
jpayne@69
|
97 * The next block of definitions are for window manager properties that
|
jpayne@69
|
98 * clients and applications use for communication.
|
jpayne@69
|
99 */
|
jpayne@69
|
100
|
jpayne@69
|
101 /* flags argument in size hints */
|
jpayne@69
|
102 #define USPosition (1L << 0) /* user specified x, y */
|
jpayne@69
|
103 #define USSize (1L << 1) /* user specified width, height */
|
jpayne@69
|
104
|
jpayne@69
|
105 #define PPosition (1L << 2) /* program specified position */
|
jpayne@69
|
106 #define PSize (1L << 3) /* program specified size */
|
jpayne@69
|
107 #define PMinSize (1L << 4) /* program specified minimum size */
|
jpayne@69
|
108 #define PMaxSize (1L << 5) /* program specified maximum size */
|
jpayne@69
|
109 #define PResizeInc (1L << 6) /* program specified resize increments */
|
jpayne@69
|
110 #define PAspect (1L << 7) /* program specified min and max aspect ratios */
|
jpayne@69
|
111 #define PBaseSize (1L << 8) /* program specified base for incrementing */
|
jpayne@69
|
112 #define PWinGravity (1L << 9) /* program specified window gravity */
|
jpayne@69
|
113
|
jpayne@69
|
114 /* obsolete */
|
jpayne@69
|
115 #define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
|
jpayne@69
|
116
|
jpayne@69
|
117
|
jpayne@69
|
118
|
jpayne@69
|
119 typedef struct {
|
jpayne@69
|
120 long flags; /* marks which fields in this structure are defined */
|
jpayne@69
|
121 Bool input; /* does this application rely on the window manager to
|
jpayne@69
|
122 get keyboard input? */
|
jpayne@69
|
123 int initial_state; /* see below */
|
jpayne@69
|
124 Pixmap icon_pixmap; /* pixmap to be used as icon */
|
jpayne@69
|
125 Window icon_window; /* window to be used as icon */
|
jpayne@69
|
126 int icon_x, icon_y; /* initial position of icon */
|
jpayne@69
|
127 Pixmap icon_mask; /* icon mask bitmap */
|
jpayne@69
|
128 XID window_group; /* id of related window group */
|
jpayne@69
|
129 /* this structure may be extended in the future */
|
jpayne@69
|
130 } XWMHints;
|
jpayne@69
|
131
|
jpayne@69
|
132 /* definition for flags of XWMHints */
|
jpayne@69
|
133
|
jpayne@69
|
134 #define InputHint (1L << 0)
|
jpayne@69
|
135 #define StateHint (1L << 1)
|
jpayne@69
|
136 #define IconPixmapHint (1L << 2)
|
jpayne@69
|
137 #define IconWindowHint (1L << 3)
|
jpayne@69
|
138 #define IconPositionHint (1L << 4)
|
jpayne@69
|
139 #define IconMaskHint (1L << 5)
|
jpayne@69
|
140 #define WindowGroupHint (1L << 6)
|
jpayne@69
|
141 #define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
|
jpayne@69
|
142 IconPositionHint|IconMaskHint|WindowGroupHint)
|
jpayne@69
|
143 #define XUrgencyHint (1L << 8)
|
jpayne@69
|
144
|
jpayne@69
|
145 /* definitions for initial window state */
|
jpayne@69
|
146 #define WithdrawnState 0 /* for windows that are not mapped */
|
jpayne@69
|
147 #define NormalState 1 /* most applications want to start this way */
|
jpayne@69
|
148 #define IconicState 3 /* application wants to start as an icon */
|
jpayne@69
|
149
|
jpayne@69
|
150 /*
|
jpayne@69
|
151 * Obsolete states no longer defined by ICCCM
|
jpayne@69
|
152 */
|
jpayne@69
|
153 #define DontCareState 0 /* don't know or care */
|
jpayne@69
|
154 #define ZoomState 2 /* application wants to start zoomed */
|
jpayne@69
|
155 #define InactiveState 4 /* application believes it is seldom used; */
|
jpayne@69
|
156 /* some wm's may put it on inactive menu */
|
jpayne@69
|
157
|
jpayne@69
|
158
|
jpayne@69
|
159 /*
|
jpayne@69
|
160 * new structure for manipulating TEXT properties; used with WM_NAME,
|
jpayne@69
|
161 * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
|
jpayne@69
|
162 */
|
jpayne@69
|
163 typedef struct {
|
jpayne@69
|
164 unsigned char *value; /* same as Property routines */
|
jpayne@69
|
165 Atom encoding; /* prop type */
|
jpayne@69
|
166 int format; /* prop data format: 8, 16, or 32 */
|
jpayne@69
|
167 unsigned long nitems; /* number of data items in value */
|
jpayne@69
|
168 } XTextProperty;
|
jpayne@69
|
169
|
jpayne@69
|
170 #define XNoMemory -1
|
jpayne@69
|
171 #define XLocaleNotSupported -2
|
jpayne@69
|
172 #define XConverterNotFound -3
|
jpayne@69
|
173
|
jpayne@69
|
174 typedef enum {
|
jpayne@69
|
175 XStringStyle, /* STRING */
|
jpayne@69
|
176 XCompoundTextStyle, /* COMPOUND_TEXT */
|
jpayne@69
|
177 XTextStyle, /* text in owner's encoding (current locale)*/
|
jpayne@69
|
178 XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
|
jpayne@69
|
179 /* The following is an XFree86 extension, introduced in November 2000 */
|
jpayne@69
|
180 XUTF8StringStyle /* UTF8_STRING */
|
jpayne@69
|
181 } XICCEncodingStyle;
|
jpayne@69
|
182
|
jpayne@69
|
183 typedef struct {
|
jpayne@69
|
184 int min_width, min_height;
|
jpayne@69
|
185 int max_width, max_height;
|
jpayne@69
|
186 int width_inc, height_inc;
|
jpayne@69
|
187 } XIconSize;
|
jpayne@69
|
188
|
jpayne@69
|
189 typedef struct {
|
jpayne@69
|
190 char *res_name;
|
jpayne@69
|
191 char *res_class;
|
jpayne@69
|
192 } XClassHint;
|
jpayne@69
|
193
|
jpayne@69
|
194 #ifdef XUTIL_DEFINE_FUNCTIONS
|
jpayne@69
|
195 extern int XDestroyImage(
|
jpayne@69
|
196 XImage *ximage);
|
jpayne@69
|
197 extern unsigned long XGetPixel(
|
jpayne@69
|
198 XImage *ximage,
|
jpayne@69
|
199 int x, int y);
|
jpayne@69
|
200 extern int XPutPixel(
|
jpayne@69
|
201 XImage *ximage,
|
jpayne@69
|
202 int x, int y,
|
jpayne@69
|
203 unsigned long pixel);
|
jpayne@69
|
204 extern XImage *XSubImage(
|
jpayne@69
|
205 XImage *ximage,
|
jpayne@69
|
206 int x, int y,
|
jpayne@69
|
207 unsigned int width, unsigned int height);
|
jpayne@69
|
208 extern int XAddPixel(
|
jpayne@69
|
209 XImage *ximage,
|
jpayne@69
|
210 long value);
|
jpayne@69
|
211 #else
|
jpayne@69
|
212 /*
|
jpayne@69
|
213 * These macros are used to give some sugar to the image routines so that
|
jpayne@69
|
214 * naive people are more comfortable with them.
|
jpayne@69
|
215 */
|
jpayne@69
|
216 #define XDestroyImage(ximage) \
|
jpayne@69
|
217 ((*((ximage)->f.destroy_image))((ximage)))
|
jpayne@69
|
218 #define XGetPixel(ximage, x, y) \
|
jpayne@69
|
219 ((*((ximage)->f.get_pixel))((ximage), (x), (y)))
|
jpayne@69
|
220 #define XPutPixel(ximage, x, y, pixel) \
|
jpayne@69
|
221 ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
|
jpayne@69
|
222 #define XSubImage(ximage, x, y, width, height) \
|
jpayne@69
|
223 ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
|
jpayne@69
|
224 #define XAddPixel(ximage, value) \
|
jpayne@69
|
225 ((*((ximage)->f.add_pixel))((ximage), (value)))
|
jpayne@69
|
226 #endif
|
jpayne@69
|
227
|
jpayne@69
|
228 /*
|
jpayne@69
|
229 * Compose sequence status structure, used in calling XLookupString.
|
jpayne@69
|
230 */
|
jpayne@69
|
231 typedef struct _XComposeStatus {
|
jpayne@69
|
232 XPointer compose_ptr; /* state table pointer */
|
jpayne@69
|
233 int chars_matched; /* match state */
|
jpayne@69
|
234 } XComposeStatus;
|
jpayne@69
|
235
|
jpayne@69
|
236 /*
|
jpayne@69
|
237 * Keysym macros, used on Keysyms to test for classes of symbols
|
jpayne@69
|
238 */
|
jpayne@69
|
239 #define IsKeypadKey(keysym) \
|
jpayne@69
|
240 (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
|
jpayne@69
|
241
|
jpayne@69
|
242 #define IsPrivateKeypadKey(keysym) \
|
jpayne@69
|
243 (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
|
jpayne@69
|
244
|
jpayne@69
|
245 #define IsCursorKey(keysym) \
|
jpayne@69
|
246 (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
|
jpayne@69
|
247
|
jpayne@69
|
248 #define IsPFKey(keysym) \
|
jpayne@69
|
249 (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
|
jpayne@69
|
250
|
jpayne@69
|
251 #define IsFunctionKey(keysym) \
|
jpayne@69
|
252 (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
|
jpayne@69
|
253
|
jpayne@69
|
254 #define IsMiscFunctionKey(keysym) \
|
jpayne@69
|
255 (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
|
jpayne@69
|
256
|
jpayne@69
|
257 #ifdef XK_XKB_KEYS
|
jpayne@69
|
258 #define IsModifierKey(keysym) \
|
jpayne@69
|
259 ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
|
jpayne@69
|
260 || (((KeySym)(keysym) >= XK_ISO_Lock) && \
|
jpayne@69
|
261 ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \
|
jpayne@69
|
262 || ((KeySym)(keysym) == XK_Mode_switch) \
|
jpayne@69
|
263 || ((KeySym)(keysym) == XK_Num_Lock))
|
jpayne@69
|
264 #else
|
jpayne@69
|
265 #define IsModifierKey(keysym) \
|
jpayne@69
|
266 ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
|
jpayne@69
|
267 || ((KeySym)(keysym) == XK_Mode_switch) \
|
jpayne@69
|
268 || ((KeySym)(keysym) == XK_Num_Lock))
|
jpayne@69
|
269 #endif
|
jpayne@69
|
270 /*
|
jpayne@69
|
271 * opaque reference to Region data type
|
jpayne@69
|
272 */
|
jpayne@69
|
273 typedef struct _XRegion *Region;
|
jpayne@69
|
274
|
jpayne@69
|
275 /* Return values from XRectInRegion() */
|
jpayne@69
|
276
|
jpayne@69
|
277 #define RectangleOut 0
|
jpayne@69
|
278 #define RectangleIn 1
|
jpayne@69
|
279 #define RectanglePart 2
|
jpayne@69
|
280
|
jpayne@69
|
281
|
jpayne@69
|
282 /*
|
jpayne@69
|
283 * Information used by the visual utility routines to find desired visual
|
jpayne@69
|
284 * type from the many visuals a display may support.
|
jpayne@69
|
285 */
|
jpayne@69
|
286
|
jpayne@69
|
287 typedef struct {
|
jpayne@69
|
288 Visual *visual;
|
jpayne@69
|
289 VisualID visualid;
|
jpayne@69
|
290 int screen;
|
jpayne@69
|
291 int depth;
|
jpayne@69
|
292 #if defined(__cplusplus) || defined(c_plusplus)
|
jpayne@69
|
293 int c_class; /* C++ */
|
jpayne@69
|
294 #else
|
jpayne@69
|
295 int class;
|
jpayne@69
|
296 #endif
|
jpayne@69
|
297 unsigned long red_mask;
|
jpayne@69
|
298 unsigned long green_mask;
|
jpayne@69
|
299 unsigned long blue_mask;
|
jpayne@69
|
300 int colormap_size;
|
jpayne@69
|
301 int bits_per_rgb;
|
jpayne@69
|
302 } XVisualInfo;
|
jpayne@69
|
303
|
jpayne@69
|
304 #define VisualNoMask 0x0
|
jpayne@69
|
305 #define VisualIDMask 0x1
|
jpayne@69
|
306 #define VisualScreenMask 0x2
|
jpayne@69
|
307 #define VisualDepthMask 0x4
|
jpayne@69
|
308 #define VisualClassMask 0x8
|
jpayne@69
|
309 #define VisualRedMaskMask 0x10
|
jpayne@69
|
310 #define VisualGreenMaskMask 0x20
|
jpayne@69
|
311 #define VisualBlueMaskMask 0x40
|
jpayne@69
|
312 #define VisualColormapSizeMask 0x80
|
jpayne@69
|
313 #define VisualBitsPerRGBMask 0x100
|
jpayne@69
|
314 #define VisualAllMask 0x1FF
|
jpayne@69
|
315
|
jpayne@69
|
316 /*
|
jpayne@69
|
317 * This defines a window manager property that clients may use to
|
jpayne@69
|
318 * share standard color maps of type RGB_COLOR_MAP:
|
jpayne@69
|
319 */
|
jpayne@69
|
320 typedef struct {
|
jpayne@69
|
321 Colormap colormap;
|
jpayne@69
|
322 unsigned long red_max;
|
jpayne@69
|
323 unsigned long red_mult;
|
jpayne@69
|
324 unsigned long green_max;
|
jpayne@69
|
325 unsigned long green_mult;
|
jpayne@69
|
326 unsigned long blue_max;
|
jpayne@69
|
327 unsigned long blue_mult;
|
jpayne@69
|
328 unsigned long base_pixel;
|
jpayne@69
|
329 VisualID visualid; /* added by ICCCM version 1 */
|
jpayne@69
|
330 XID killid; /* added by ICCCM version 1 */
|
jpayne@69
|
331 } XStandardColormap;
|
jpayne@69
|
332
|
jpayne@69
|
333 #define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */
|
jpayne@69
|
334
|
jpayne@69
|
335
|
jpayne@69
|
336 /*
|
jpayne@69
|
337 * return codes for XReadBitmapFile and XWriteBitmapFile
|
jpayne@69
|
338 */
|
jpayne@69
|
339 #define BitmapSuccess 0
|
jpayne@69
|
340 #define BitmapOpenFailed 1
|
jpayne@69
|
341 #define BitmapFileInvalid 2
|
jpayne@69
|
342 #define BitmapNoMemory 3
|
jpayne@69
|
343
|
jpayne@69
|
344 /****************************************************************
|
jpayne@69
|
345 *
|
jpayne@69
|
346 * Context Management
|
jpayne@69
|
347 *
|
jpayne@69
|
348 ****************************************************************/
|
jpayne@69
|
349
|
jpayne@69
|
350
|
jpayne@69
|
351 /* Associative lookup table return codes */
|
jpayne@69
|
352
|
jpayne@69
|
353 #define XCSUCCESS 0 /* No error. */
|
jpayne@69
|
354 #define XCNOMEM 1 /* Out of memory */
|
jpayne@69
|
355 #define XCNOENT 2 /* No entry in table */
|
jpayne@69
|
356
|
jpayne@69
|
357 typedef int XContext;
|
jpayne@69
|
358
|
jpayne@69
|
359 #define XUniqueContext() ((XContext) XrmUniqueQuark())
|
jpayne@69
|
360 #define XStringToContext(string) ((XContext) XrmStringToQuark(string))
|
jpayne@69
|
361
|
jpayne@69
|
362 _XFUNCPROTOBEGIN
|
jpayne@69
|
363
|
jpayne@69
|
364 /* The following declarations are alphabetized. */
|
jpayne@69
|
365
|
jpayne@69
|
366 extern XClassHint *XAllocClassHint (
|
jpayne@69
|
367 void
|
jpayne@69
|
368 );
|
jpayne@69
|
369
|
jpayne@69
|
370 extern XIconSize *XAllocIconSize (
|
jpayne@69
|
371 void
|
jpayne@69
|
372 );
|
jpayne@69
|
373
|
jpayne@69
|
374 extern XSizeHints *XAllocSizeHints (
|
jpayne@69
|
375 void
|
jpayne@69
|
376 );
|
jpayne@69
|
377
|
jpayne@69
|
378 extern XStandardColormap *XAllocStandardColormap (
|
jpayne@69
|
379 void
|
jpayne@69
|
380 );
|
jpayne@69
|
381
|
jpayne@69
|
382 extern XWMHints *XAllocWMHints (
|
jpayne@69
|
383 void
|
jpayne@69
|
384 );
|
jpayne@69
|
385
|
jpayne@69
|
386 extern int XClipBox(
|
jpayne@69
|
387 Region /* r */,
|
jpayne@69
|
388 XRectangle* /* rect_return */
|
jpayne@69
|
389 );
|
jpayne@69
|
390
|
jpayne@69
|
391 extern Region XCreateRegion(
|
jpayne@69
|
392 void
|
jpayne@69
|
393 );
|
jpayne@69
|
394
|
jpayne@69
|
395 extern const char *XDefaultString (void);
|
jpayne@69
|
396
|
jpayne@69
|
397 extern int XDeleteContext(
|
jpayne@69
|
398 Display* /* display */,
|
jpayne@69
|
399 XID /* rid */,
|
jpayne@69
|
400 XContext /* context */
|
jpayne@69
|
401 );
|
jpayne@69
|
402
|
jpayne@69
|
403 extern int XDestroyRegion(
|
jpayne@69
|
404 Region /* r */
|
jpayne@69
|
405 );
|
jpayne@69
|
406
|
jpayne@69
|
407 extern Bool XEmptyRegion(
|
jpayne@69
|
408 Region /* r */
|
jpayne@69
|
409 );
|
jpayne@69
|
410
|
jpayne@69
|
411 extern Bool XEqualRegion(
|
jpayne@69
|
412 Region /* r1 */,
|
jpayne@69
|
413 Region /* r2 */
|
jpayne@69
|
414 );
|
jpayne@69
|
415
|
jpayne@69
|
416 extern int XFindContext(
|
jpayne@69
|
417 Display* /* display */,
|
jpayne@69
|
418 XID /* rid */,
|
jpayne@69
|
419 XContext /* context */,
|
jpayne@69
|
420 XPointer* /* data_return */
|
jpayne@69
|
421 );
|
jpayne@69
|
422
|
jpayne@69
|
423 extern Status XGetClassHint(
|
jpayne@69
|
424 Display* /* display */,
|
jpayne@69
|
425 Window /* w */,
|
jpayne@69
|
426 XClassHint* /* class_hints_return */
|
jpayne@69
|
427 );
|
jpayne@69
|
428
|
jpayne@69
|
429 extern Status XGetIconSizes(
|
jpayne@69
|
430 Display* /* display */,
|
jpayne@69
|
431 Window /* w */,
|
jpayne@69
|
432 XIconSize** /* size_list_return */,
|
jpayne@69
|
433 int* /* count_return */
|
jpayne@69
|
434 );
|
jpayne@69
|
435
|
jpayne@69
|
436 extern Status XGetNormalHints(
|
jpayne@69
|
437 Display* /* display */,
|
jpayne@69
|
438 Window /* w */,
|
jpayne@69
|
439 XSizeHints* /* hints_return */
|
jpayne@69
|
440 );
|
jpayne@69
|
441
|
jpayne@69
|
442 extern Status XGetRGBColormaps(
|
jpayne@69
|
443 Display* /* display */,
|
jpayne@69
|
444 Window /* w */,
|
jpayne@69
|
445 XStandardColormap** /* stdcmap_return */,
|
jpayne@69
|
446 int* /* count_return */,
|
jpayne@69
|
447 Atom /* property */
|
jpayne@69
|
448 );
|
jpayne@69
|
449
|
jpayne@69
|
450 extern Status XGetSizeHints(
|
jpayne@69
|
451 Display* /* display */,
|
jpayne@69
|
452 Window /* w */,
|
jpayne@69
|
453 XSizeHints* /* hints_return */,
|
jpayne@69
|
454 Atom /* property */
|
jpayne@69
|
455 );
|
jpayne@69
|
456
|
jpayne@69
|
457 extern Status XGetStandardColormap(
|
jpayne@69
|
458 Display* /* display */,
|
jpayne@69
|
459 Window /* w */,
|
jpayne@69
|
460 XStandardColormap* /* colormap_return */,
|
jpayne@69
|
461 Atom /* property */
|
jpayne@69
|
462 );
|
jpayne@69
|
463
|
jpayne@69
|
464 extern Status XGetTextProperty(
|
jpayne@69
|
465 Display* /* display */,
|
jpayne@69
|
466 Window /* window */,
|
jpayne@69
|
467 XTextProperty* /* text_prop_return */,
|
jpayne@69
|
468 Atom /* property */
|
jpayne@69
|
469 );
|
jpayne@69
|
470
|
jpayne@69
|
471 extern XVisualInfo *XGetVisualInfo(
|
jpayne@69
|
472 Display* /* display */,
|
jpayne@69
|
473 long /* vinfo_mask */,
|
jpayne@69
|
474 XVisualInfo* /* vinfo_template */,
|
jpayne@69
|
475 int* /* nitems_return */
|
jpayne@69
|
476 );
|
jpayne@69
|
477
|
jpayne@69
|
478 extern Status XGetWMClientMachine(
|
jpayne@69
|
479 Display* /* display */,
|
jpayne@69
|
480 Window /* w */,
|
jpayne@69
|
481 XTextProperty* /* text_prop_return */
|
jpayne@69
|
482 );
|
jpayne@69
|
483
|
jpayne@69
|
484 extern XWMHints *XGetWMHints(
|
jpayne@69
|
485 Display* /* display */,
|
jpayne@69
|
486 Window /* w */
|
jpayne@69
|
487 );
|
jpayne@69
|
488
|
jpayne@69
|
489 extern Status XGetWMIconName(
|
jpayne@69
|
490 Display* /* display */,
|
jpayne@69
|
491 Window /* w */,
|
jpayne@69
|
492 XTextProperty* /* text_prop_return */
|
jpayne@69
|
493 );
|
jpayne@69
|
494
|
jpayne@69
|
495 extern Status XGetWMName(
|
jpayne@69
|
496 Display* /* display */,
|
jpayne@69
|
497 Window /* w */,
|
jpayne@69
|
498 XTextProperty* /* text_prop_return */
|
jpayne@69
|
499 );
|
jpayne@69
|
500
|
jpayne@69
|
501 extern Status XGetWMNormalHints(
|
jpayne@69
|
502 Display* /* display */,
|
jpayne@69
|
503 Window /* w */,
|
jpayne@69
|
504 XSizeHints* /* hints_return */,
|
jpayne@69
|
505 long* /* supplied_return */
|
jpayne@69
|
506 );
|
jpayne@69
|
507
|
jpayne@69
|
508 extern Status XGetWMSizeHints(
|
jpayne@69
|
509 Display* /* display */,
|
jpayne@69
|
510 Window /* w */,
|
jpayne@69
|
511 XSizeHints* /* hints_return */,
|
jpayne@69
|
512 long* /* supplied_return */,
|
jpayne@69
|
513 Atom /* property */
|
jpayne@69
|
514 );
|
jpayne@69
|
515
|
jpayne@69
|
516 extern Status XGetZoomHints(
|
jpayne@69
|
517 Display* /* display */,
|
jpayne@69
|
518 Window /* w */,
|
jpayne@69
|
519 XSizeHints* /* zhints_return */
|
jpayne@69
|
520 );
|
jpayne@69
|
521
|
jpayne@69
|
522 extern int XIntersectRegion(
|
jpayne@69
|
523 Region /* sra */,
|
jpayne@69
|
524 Region /* srb */,
|
jpayne@69
|
525 Region /* dr_return */
|
jpayne@69
|
526 );
|
jpayne@69
|
527
|
jpayne@69
|
528 extern void XConvertCase(
|
jpayne@69
|
529 KeySym /* sym */,
|
jpayne@69
|
530 KeySym* /* lower */,
|
jpayne@69
|
531 KeySym* /* upper */
|
jpayne@69
|
532 );
|
jpayne@69
|
533
|
jpayne@69
|
534 extern int XLookupString(
|
jpayne@69
|
535 XKeyEvent* /* event_struct */,
|
jpayne@69
|
536 char* /* buffer_return */,
|
jpayne@69
|
537 int /* bytes_buffer */,
|
jpayne@69
|
538 KeySym* /* keysym_return */,
|
jpayne@69
|
539 XComposeStatus* /* status_in_out */
|
jpayne@69
|
540 );
|
jpayne@69
|
541
|
jpayne@69
|
542 extern Status XMatchVisualInfo(
|
jpayne@69
|
543 Display* /* display */,
|
jpayne@69
|
544 int /* screen */,
|
jpayne@69
|
545 int /* depth */,
|
jpayne@69
|
546 int /* class */,
|
jpayne@69
|
547 XVisualInfo* /* vinfo_return */
|
jpayne@69
|
548 );
|
jpayne@69
|
549
|
jpayne@69
|
550 extern int XOffsetRegion(
|
jpayne@69
|
551 Region /* r */,
|
jpayne@69
|
552 int /* dx */,
|
jpayne@69
|
553 int /* dy */
|
jpayne@69
|
554 );
|
jpayne@69
|
555
|
jpayne@69
|
556 extern Bool XPointInRegion(
|
jpayne@69
|
557 Region /* r */,
|
jpayne@69
|
558 int /* x */,
|
jpayne@69
|
559 int /* y */
|
jpayne@69
|
560 );
|
jpayne@69
|
561
|
jpayne@69
|
562 extern Region XPolygonRegion(
|
jpayne@69
|
563 XPoint* /* points */,
|
jpayne@69
|
564 int /* n */,
|
jpayne@69
|
565 int /* fill_rule */
|
jpayne@69
|
566 );
|
jpayne@69
|
567
|
jpayne@69
|
568 extern int XRectInRegion(
|
jpayne@69
|
569 Region /* r */,
|
jpayne@69
|
570 int /* x */,
|
jpayne@69
|
571 int /* y */,
|
jpayne@69
|
572 unsigned int /* width */,
|
jpayne@69
|
573 unsigned int /* height */
|
jpayne@69
|
574 );
|
jpayne@69
|
575
|
jpayne@69
|
576 extern int XSaveContext(
|
jpayne@69
|
577 Display* /* display */,
|
jpayne@69
|
578 XID /* rid */,
|
jpayne@69
|
579 XContext /* context */,
|
jpayne@69
|
580 _Xconst char* /* data */
|
jpayne@69
|
581 );
|
jpayne@69
|
582
|
jpayne@69
|
583 extern int XSetClassHint(
|
jpayne@69
|
584 Display* /* display */,
|
jpayne@69
|
585 Window /* w */,
|
jpayne@69
|
586 XClassHint* /* class_hints */
|
jpayne@69
|
587 );
|
jpayne@69
|
588
|
jpayne@69
|
589 extern int XSetIconSizes(
|
jpayne@69
|
590 Display* /* display */,
|
jpayne@69
|
591 Window /* w */,
|
jpayne@69
|
592 XIconSize* /* size_list */,
|
jpayne@69
|
593 int /* count */
|
jpayne@69
|
594 );
|
jpayne@69
|
595
|
jpayne@69
|
596 extern int XSetNormalHints(
|
jpayne@69
|
597 Display* /* display */,
|
jpayne@69
|
598 Window /* w */,
|
jpayne@69
|
599 XSizeHints* /* hints */
|
jpayne@69
|
600 );
|
jpayne@69
|
601
|
jpayne@69
|
602 extern void XSetRGBColormaps(
|
jpayne@69
|
603 Display* /* display */,
|
jpayne@69
|
604 Window /* w */,
|
jpayne@69
|
605 XStandardColormap* /* stdcmaps */,
|
jpayne@69
|
606 int /* count */,
|
jpayne@69
|
607 Atom /* property */
|
jpayne@69
|
608 );
|
jpayne@69
|
609
|
jpayne@69
|
610 extern int XSetSizeHints(
|
jpayne@69
|
611 Display* /* display */,
|
jpayne@69
|
612 Window /* w */,
|
jpayne@69
|
613 XSizeHints* /* hints */,
|
jpayne@69
|
614 Atom /* property */
|
jpayne@69
|
615 );
|
jpayne@69
|
616
|
jpayne@69
|
617 extern int XSetStandardProperties(
|
jpayne@69
|
618 Display* /* display */,
|
jpayne@69
|
619 Window /* w */,
|
jpayne@69
|
620 _Xconst char* /* window_name */,
|
jpayne@69
|
621 _Xconst char* /* icon_name */,
|
jpayne@69
|
622 Pixmap /* icon_pixmap */,
|
jpayne@69
|
623 char** /* argv */,
|
jpayne@69
|
624 int /* argc */,
|
jpayne@69
|
625 XSizeHints* /* hints */
|
jpayne@69
|
626 );
|
jpayne@69
|
627
|
jpayne@69
|
628 extern void XSetTextProperty(
|
jpayne@69
|
629 Display* /* display */,
|
jpayne@69
|
630 Window /* w */,
|
jpayne@69
|
631 XTextProperty* /* text_prop */,
|
jpayne@69
|
632 Atom /* property */
|
jpayne@69
|
633 );
|
jpayne@69
|
634
|
jpayne@69
|
635 extern void XSetWMClientMachine(
|
jpayne@69
|
636 Display* /* display */,
|
jpayne@69
|
637 Window /* w */,
|
jpayne@69
|
638 XTextProperty* /* text_prop */
|
jpayne@69
|
639 );
|
jpayne@69
|
640
|
jpayne@69
|
641 extern int XSetWMHints(
|
jpayne@69
|
642 Display* /* display */,
|
jpayne@69
|
643 Window /* w */,
|
jpayne@69
|
644 XWMHints* /* wm_hints */
|
jpayne@69
|
645 );
|
jpayne@69
|
646
|
jpayne@69
|
647 extern void XSetWMIconName(
|
jpayne@69
|
648 Display* /* display */,
|
jpayne@69
|
649 Window /* w */,
|
jpayne@69
|
650 XTextProperty* /* text_prop */
|
jpayne@69
|
651 );
|
jpayne@69
|
652
|
jpayne@69
|
653 extern void XSetWMName(
|
jpayne@69
|
654 Display* /* display */,
|
jpayne@69
|
655 Window /* w */,
|
jpayne@69
|
656 XTextProperty* /* text_prop */
|
jpayne@69
|
657 );
|
jpayne@69
|
658
|
jpayne@69
|
659 extern void XSetWMNormalHints(
|
jpayne@69
|
660 Display* /* display */,
|
jpayne@69
|
661 Window /* w */,
|
jpayne@69
|
662 XSizeHints* /* hints */
|
jpayne@69
|
663 );
|
jpayne@69
|
664
|
jpayne@69
|
665 extern void XSetWMProperties(
|
jpayne@69
|
666 Display* /* display */,
|
jpayne@69
|
667 Window /* w */,
|
jpayne@69
|
668 XTextProperty* /* window_name */,
|
jpayne@69
|
669 XTextProperty* /* icon_name */,
|
jpayne@69
|
670 char** /* argv */,
|
jpayne@69
|
671 int /* argc */,
|
jpayne@69
|
672 XSizeHints* /* normal_hints */,
|
jpayne@69
|
673 XWMHints* /* wm_hints */,
|
jpayne@69
|
674 XClassHint* /* class_hints */
|
jpayne@69
|
675 );
|
jpayne@69
|
676
|
jpayne@69
|
677 extern void XmbSetWMProperties(
|
jpayne@69
|
678 Display* /* display */,
|
jpayne@69
|
679 Window /* w */,
|
jpayne@69
|
680 _Xconst char* /* window_name */,
|
jpayne@69
|
681 _Xconst char* /* icon_name */,
|
jpayne@69
|
682 char** /* argv */,
|
jpayne@69
|
683 int /* argc */,
|
jpayne@69
|
684 XSizeHints* /* normal_hints */,
|
jpayne@69
|
685 XWMHints* /* wm_hints */,
|
jpayne@69
|
686 XClassHint* /* class_hints */
|
jpayne@69
|
687 );
|
jpayne@69
|
688
|
jpayne@69
|
689 extern void Xutf8SetWMProperties(
|
jpayne@69
|
690 Display* /* display */,
|
jpayne@69
|
691 Window /* w */,
|
jpayne@69
|
692 _Xconst char* /* window_name */,
|
jpayne@69
|
693 _Xconst char* /* icon_name */,
|
jpayne@69
|
694 char** /* argv */,
|
jpayne@69
|
695 int /* argc */,
|
jpayne@69
|
696 XSizeHints* /* normal_hints */,
|
jpayne@69
|
697 XWMHints* /* wm_hints */,
|
jpayne@69
|
698 XClassHint* /* class_hints */
|
jpayne@69
|
699 );
|
jpayne@69
|
700
|
jpayne@69
|
701 extern void XSetWMSizeHints(
|
jpayne@69
|
702 Display* /* display */,
|
jpayne@69
|
703 Window /* w */,
|
jpayne@69
|
704 XSizeHints* /* hints */,
|
jpayne@69
|
705 Atom /* property */
|
jpayne@69
|
706 );
|
jpayne@69
|
707
|
jpayne@69
|
708 extern int XSetRegion(
|
jpayne@69
|
709 Display* /* display */,
|
jpayne@69
|
710 GC /* gc */,
|
jpayne@69
|
711 Region /* r */
|
jpayne@69
|
712 );
|
jpayne@69
|
713
|
jpayne@69
|
714 extern void XSetStandardColormap(
|
jpayne@69
|
715 Display* /* display */,
|
jpayne@69
|
716 Window /* w */,
|
jpayne@69
|
717 XStandardColormap* /* colormap */,
|
jpayne@69
|
718 Atom /* property */
|
jpayne@69
|
719 );
|
jpayne@69
|
720
|
jpayne@69
|
721 extern int XSetZoomHints(
|
jpayne@69
|
722 Display* /* display */,
|
jpayne@69
|
723 Window /* w */,
|
jpayne@69
|
724 XSizeHints* /* zhints */
|
jpayne@69
|
725 );
|
jpayne@69
|
726
|
jpayne@69
|
727 extern int XShrinkRegion(
|
jpayne@69
|
728 Region /* r */,
|
jpayne@69
|
729 int /* dx */,
|
jpayne@69
|
730 int /* dy */
|
jpayne@69
|
731 );
|
jpayne@69
|
732
|
jpayne@69
|
733 extern Status XStringListToTextProperty(
|
jpayne@69
|
734 char** /* list */,
|
jpayne@69
|
735 int /* count */,
|
jpayne@69
|
736 XTextProperty* /* text_prop_return */
|
jpayne@69
|
737 );
|
jpayne@69
|
738
|
jpayne@69
|
739 extern int XSubtractRegion(
|
jpayne@69
|
740 Region /* sra */,
|
jpayne@69
|
741 Region /* srb */,
|
jpayne@69
|
742 Region /* dr_return */
|
jpayne@69
|
743 );
|
jpayne@69
|
744
|
jpayne@69
|
745 extern int XmbTextListToTextProperty(
|
jpayne@69
|
746 Display* display,
|
jpayne@69
|
747 char** list,
|
jpayne@69
|
748 int count,
|
jpayne@69
|
749 XICCEncodingStyle style,
|
jpayne@69
|
750 XTextProperty* text_prop_return
|
jpayne@69
|
751 );
|
jpayne@69
|
752
|
jpayne@69
|
753 extern int XwcTextListToTextProperty(
|
jpayne@69
|
754 Display* display,
|
jpayne@69
|
755 wchar_t** list,
|
jpayne@69
|
756 int count,
|
jpayne@69
|
757 XICCEncodingStyle style,
|
jpayne@69
|
758 XTextProperty* text_prop_return
|
jpayne@69
|
759 );
|
jpayne@69
|
760
|
jpayne@69
|
761 extern int Xutf8TextListToTextProperty(
|
jpayne@69
|
762 Display* display,
|
jpayne@69
|
763 char** list,
|
jpayne@69
|
764 int count,
|
jpayne@69
|
765 XICCEncodingStyle style,
|
jpayne@69
|
766 XTextProperty* text_prop_return
|
jpayne@69
|
767 );
|
jpayne@69
|
768
|
jpayne@69
|
769 extern void XwcFreeStringList(
|
jpayne@69
|
770 wchar_t** list
|
jpayne@69
|
771 );
|
jpayne@69
|
772
|
jpayne@69
|
773 extern Status XTextPropertyToStringList(
|
jpayne@69
|
774 XTextProperty* /* text_prop */,
|
jpayne@69
|
775 char*** /* list_return */,
|
jpayne@69
|
776 int* /* count_return */
|
jpayne@69
|
777 );
|
jpayne@69
|
778
|
jpayne@69
|
779 extern int XmbTextPropertyToTextList(
|
jpayne@69
|
780 Display* display,
|
jpayne@69
|
781 const XTextProperty* text_prop,
|
jpayne@69
|
782 char*** list_return,
|
jpayne@69
|
783 int* count_return
|
jpayne@69
|
784 );
|
jpayne@69
|
785
|
jpayne@69
|
786 extern int XwcTextPropertyToTextList(
|
jpayne@69
|
787 Display* display,
|
jpayne@69
|
788 const XTextProperty* text_prop,
|
jpayne@69
|
789 wchar_t*** list_return,
|
jpayne@69
|
790 int* count_return
|
jpayne@69
|
791 );
|
jpayne@69
|
792
|
jpayne@69
|
793 extern int Xutf8TextPropertyToTextList(
|
jpayne@69
|
794 Display* display,
|
jpayne@69
|
795 const XTextProperty* text_prop,
|
jpayne@69
|
796 char*** list_return,
|
jpayne@69
|
797 int* count_return
|
jpayne@69
|
798 );
|
jpayne@69
|
799
|
jpayne@69
|
800 extern int XUnionRectWithRegion(
|
jpayne@69
|
801 XRectangle* /* rectangle */,
|
jpayne@69
|
802 Region /* src_region */,
|
jpayne@69
|
803 Region /* dest_region_return */
|
jpayne@69
|
804 );
|
jpayne@69
|
805
|
jpayne@69
|
806 extern int XUnionRegion(
|
jpayne@69
|
807 Region /* sra */,
|
jpayne@69
|
808 Region /* srb */,
|
jpayne@69
|
809 Region /* dr_return */
|
jpayne@69
|
810 );
|
jpayne@69
|
811
|
jpayne@69
|
812 extern int XWMGeometry(
|
jpayne@69
|
813 Display* /* display */,
|
jpayne@69
|
814 int /* screen_number */,
|
jpayne@69
|
815 _Xconst char* /* user_geometry */,
|
jpayne@69
|
816 _Xconst char* /* default_geometry */,
|
jpayne@69
|
817 unsigned int /* border_width */,
|
jpayne@69
|
818 XSizeHints* /* hints */,
|
jpayne@69
|
819 int* /* x_return */,
|
jpayne@69
|
820 int* /* y_return */,
|
jpayne@69
|
821 int* /* width_return */,
|
jpayne@69
|
822 int* /* height_return */,
|
jpayne@69
|
823 int* /* gravity_return */
|
jpayne@69
|
824 );
|
jpayne@69
|
825
|
jpayne@69
|
826 extern int XXorRegion(
|
jpayne@69
|
827 Region /* sra */,
|
jpayne@69
|
828 Region /* srb */,
|
jpayne@69
|
829 Region /* dr_return */
|
jpayne@69
|
830 );
|
jpayne@69
|
831
|
jpayne@69
|
832 #ifdef __clang__
|
jpayne@69
|
833 #pragma clang diagnostic pop
|
jpayne@69
|
834 #endif
|
jpayne@69
|
835
|
jpayne@69
|
836 _XFUNCPROTOEND
|
jpayne@69
|
837
|
jpayne@69
|
838 #endif /* _X11_XUTIL_H_ */
|