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