~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to system/include/X11/Xlib.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 
 
3
Copyright 1985, 1986, 1987, 1991, 1998  The Open Group
 
4
 
 
5
Permission to use, copy, modify, distribute, and sell this software and its
 
6
documentation for any purpose is hereby granted without fee, provided that
 
7
the above copyright notice appear in all copies and that both that
 
8
copyright notice and this permission notice appear in supporting
 
9
documentation.
 
10
 
 
11
The above copyright notice and this permission notice shall be included in
 
12
all copies or substantial portions of the Software.
 
13
 
 
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
15
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
16
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
 
17
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 
18
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
19
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
20
 
 
21
Except as contained in this notice, the name of The Open Group shall not be
 
22
used in advertising or otherwise to promote the sale, use or other dealings
 
23
in this Software without prior written authorization from The Open Group.
 
24
 
 
25
*/
 
26
 
 
27
 
 
28
/*
 
29
 *      Xlib.h - Header definition and support file for the C subroutine
 
30
 *      interface library (Xlib) to the X Window System Protocol (V11).
 
31
 *      Structures and symbols starting with "_" are private to the library.
 
32
 */
 
33
#ifndef _XLIB_H_
 
34
#define _XLIB_H_
 
35
 
 
36
#define XlibSpecificationRelease 6
 
37
 
 
38
#include <sys/types.h>
 
39
 
 
40
#if defined(__SCO__) || defined(__UNIXWARE__)
 
41
#include <stdint.h>
 
42
#endif
 
43
 
 
44
#include <X11/X.h>
 
45
 
 
46
/* applications should not depend on these two headers being included! */
 
47
#include <X11/Xfuncproto.h>
 
48
#include <X11/Xosdefs.h>
 
49
 
 
50
#ifndef X_WCHAR
 
51
#include <stddef.h>
 
52
#else
 
53
#ifdef __UNIXOS2__
 
54
#include <stdlib.h>
 
55
#else
 
56
/* replace this with #include or typedef appropriate for your system */
 
57
typedef unsigned long wchar_t;
 
58
#endif
 
59
#endif
 
60
 
 
61
#if defined(ISC) && defined(USE_XMBTOWC)
 
62
#define wctomb(a,b)     _Xwctomb(a,b)
 
63
#define mblen(a,b)      _Xmblen(a,b)
 
64
#ifndef USE_XWCHAR_STRING
 
65
#define mbtowc(a,b,c)   _Xmbtowc(a,b,c)
 
66
#endif
 
67
#endif
 
68
 
 
69
extern int
 
70
_Xmblen(
 
71
#ifdef ISC
 
72
    char const *str,
 
73
    size_t len
 
74
#else
 
75
    char *str,
 
76
    int len
 
77
#endif
 
78
    );
 
79
 
 
80
/* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
 
81
   November 2000. Its presence is indicated through the following macro. */
 
82
#define X_HAVE_UTF8_STRING 1
 
83
 
 
84
typedef char *XPointer;
 
85
 
 
86
#define Bool int
 
87
#define Status int
 
88
#define True 1
 
89
#define False 0
 
90
 
 
91
#define QueuedAlready 0
 
92
#define QueuedAfterReading 1
 
93
#define QueuedAfterFlush 2
 
94
 
 
95
#define ConnectionNumber(dpy)   (((_XPrivDisplay)dpy)->fd)
 
96
#define RootWindow(dpy, scr)    (ScreenOfDisplay(dpy,scr)->root)
 
97
#define DefaultScreen(dpy)      (((_XPrivDisplay)dpy)->default_screen)
 
98
#define DefaultRootWindow(dpy)  (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
 
99
#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
 
100
#define DefaultGC(dpy, scr)     (ScreenOfDisplay(dpy,scr)->default_gc)
 
101
#define BlackPixel(dpy, scr)    (ScreenOfDisplay(dpy,scr)->black_pixel)
 
102
#define WhitePixel(dpy, scr)    (ScreenOfDisplay(dpy,scr)->white_pixel)
 
103
#define AllPlanes               ((unsigned long)~0L)
 
104
#define QLength(dpy)            (((_XPrivDisplay)dpy)->qlen)
 
105
#define DisplayWidth(dpy, scr)  (ScreenOfDisplay(dpy,scr)->width)
 
106
#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
 
107
#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
 
108
#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
 
109
#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
 
110
#define DisplayCells(dpy, scr)  (DefaultVisual(dpy,scr)->map_entries)
 
111
#define ScreenCount(dpy)        (((_XPrivDisplay)dpy)->nscreens)
 
112
#define ServerVendor(dpy)       (((_XPrivDisplay)dpy)->vendor)
 
113
#define ProtocolVersion(dpy)    (((_XPrivDisplay)dpy)->proto_major_version)
 
114
#define ProtocolRevision(dpy)   (((_XPrivDisplay)dpy)->proto_minor_version)
 
115
#define VendorRelease(dpy)      (((_XPrivDisplay)dpy)->release)
 
116
#define DisplayString(dpy)      (((_XPrivDisplay)dpy)->display_name)
 
117
#define DefaultDepth(dpy, scr)  (ScreenOfDisplay(dpy,scr)->root_depth)
 
118
#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
 
119
#define BitmapUnit(dpy)         (((_XPrivDisplay)dpy)->bitmap_unit)
 
120
#define BitmapBitOrder(dpy)     (((_XPrivDisplay)dpy)->bitmap_bit_order)
 
121
#define BitmapPad(dpy)          (((_XPrivDisplay)dpy)->bitmap_pad)
 
122
#define ImageByteOrder(dpy)     (((_XPrivDisplay)dpy)->byte_order)
 
123
#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
 
124
#define NextRequest(dpy)        XNextRequest(dpy)
 
125
#else
 
126
#define NextRequest(dpy)        (((_XPrivDisplay)dpy)->request + 1)
 
127
#endif
 
128
#define LastKnownRequestProcessed(dpy)  (((_XPrivDisplay)dpy)->last_request_read)
 
129
 
 
130
/* macros for screen oriented applications (toolkit) */
 
131
#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
 
132
#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
 
133
#define DisplayOfScreen(s)      ((s)->display)
 
134
#define RootWindowOfScreen(s)   ((s)->root)
 
135
#define BlackPixelOfScreen(s)   ((s)->black_pixel)
 
136
#define WhitePixelOfScreen(s)   ((s)->white_pixel)
 
137
#define DefaultColormapOfScreen(s)((s)->cmap)
 
138
#define DefaultDepthOfScreen(s) ((s)->root_depth)
 
139
#define DefaultGCOfScreen(s)    ((s)->default_gc)
 
140
#define DefaultVisualOfScreen(s)((s)->root_visual)
 
141
#define WidthOfScreen(s)        ((s)->width)
 
142
#define HeightOfScreen(s)       ((s)->height)
 
143
#define WidthMMOfScreen(s)      ((s)->mwidth)
 
144
#define HeightMMOfScreen(s)     ((s)->mheight)
 
145
#define PlanesOfScreen(s)       ((s)->root_depth)
 
146
#define CellsOfScreen(s)        (DefaultVisualOfScreen((s))->map_entries)
 
147
#define MinCmapsOfScreen(s)     ((s)->min_maps)
 
148
#define MaxCmapsOfScreen(s)     ((s)->max_maps)
 
149
#define DoesSaveUnders(s)       ((s)->save_unders)
 
150
#define DoesBackingStore(s)     ((s)->backing_store)
 
151
#define EventMaskOfScreen(s)    ((s)->root_input_mask)
 
152
 
 
153
/*
 
154
 * Extensions need a way to hang private data on some structures.
 
155
 */
 
156
typedef struct _XExtData {
 
157
        int number;             /* number returned by XRegisterExtension */
 
158
        struct _XExtData *next; /* next item on list of data for structure */
 
159
        int (*free_private)(    /* called to free private storage */
 
160
        struct _XExtData *extension
 
161
        );
 
162
        XPointer private_data;  /* data private to this extension. */
 
163
} XExtData;
 
164
 
 
165
/*
 
166
 * This file contains structures used by the extension mechanism.
 
167
 */
 
168
typedef struct {                /* public to extension, cannot be changed */
 
169
        int extension;          /* extension number */
 
170
        int major_opcode;       /* major op-code assigned by server */
 
171
        int first_event;        /* first event number for the extension */
 
172
        int first_error;        /* first error number for the extension */
 
173
} XExtCodes;
 
174
 
 
175
/*
 
176
 * Data structure for retrieving info about pixmap formats.
 
177
 */
 
178
 
 
179
typedef struct {
 
180
    int depth;
 
181
    int bits_per_pixel;
 
182
    int scanline_pad;
 
183
} XPixmapFormatValues;
 
184
 
 
185
 
 
186
/*
 
187
 * Data structure for setting graphics context.
 
188
 */
 
189
typedef struct {
 
190
        int function;           /* logical operation */
 
191
        unsigned long plane_mask;/* plane mask */
 
192
        unsigned long foreground;/* foreground pixel */
 
193
        unsigned long background;/* background pixel */
 
194
        int line_width;         /* line width */
 
195
        int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
 
196
        int cap_style;          /* CapNotLast, CapButt,
 
197
                                   CapRound, CapProjecting */
 
198
        int join_style;         /* JoinMiter, JoinRound, JoinBevel */
 
199
        int fill_style;         /* FillSolid, FillTiled,
 
200
                                   FillStippled, FillOpaeueStippled */
 
201
        int fill_rule;          /* EvenOddRule, WindingRule */
 
202
        int arc_mode;           /* ArcChord, ArcPieSlice */
 
203
        Pixmap tile;            /* tile pixmap for tiling operations */
 
204
        Pixmap stipple;         /* stipple 1 plane pixmap for stipping */
 
205
        int ts_x_origin;        /* offset for tile or stipple operations */
 
206
        int ts_y_origin;
 
207
        Font font;              /* default text font for text operations */
 
208
        int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
 
209
        Bool graphics_exposures;/* boolean, should exposures be generated */
 
210
        int clip_x_origin;      /* origin for clipping */
 
211
        int clip_y_origin;
 
212
        Pixmap clip_mask;       /* bitmap clipping; other calls for rects */
 
213
        int dash_offset;        /* patterned/dashed line information */
 
214
        char dashes;
 
215
} XGCValues;
 
216
 
 
217
/*
 
218
 * Graphics context.  The contents of this structure are implementation
 
219
 * dependent.  A GC should be treated as opaque by application code.
 
220
 */
 
221
 
 
222
typedef struct _XGC
 
223
#ifdef XLIB_ILLEGAL_ACCESS
 
224
{
 
225
    XExtData *ext_data; /* hook for extension to hang data */
 
226
    GContext gid;       /* protocol ID for graphics context */
 
227
    /* there is more to this structure, but it is private to Xlib */
 
228
}
 
229
#endif
 
230
*GC;
 
231
 
 
232
/*
 
233
 * Visual structure; contains information about colormapping possible.
 
234
 */
 
235
typedef struct {
 
236
        XExtData *ext_data;     /* hook for extension to hang data */
 
237
        VisualID visualid;      /* visual id of this visual */
 
238
#if defined(__cplusplus) || defined(c_plusplus)
 
239
        int c_class;            /* C++ class of screen (monochrome, etc.) */
 
240
#else
 
241
        int class;              /* class of screen (monochrome, etc.) */
 
242
#endif
 
243
        unsigned long red_mask, green_mask, blue_mask;  /* mask values */
 
244
        int bits_per_rgb;       /* log base 2 of distinct color values */
 
245
        int map_entries;        /* color map entries */
 
246
} Visual;
 
247
 
 
248
/*
 
249
 * Depth structure; contains information for each possible depth.
 
250
 */
 
251
typedef struct {
 
252
        int depth;              /* this depth (Z) of the depth */
 
253
        int nvisuals;           /* number of Visual types at this depth */
 
254
        Visual *visuals;        /* list of visuals possible at this depth */
 
255
} Depth;
 
256
 
 
257
/*
 
258
 * Information about the screen.  The contents of this structure are
 
259
 * implementation dependent.  A Screen should be treated as opaque
 
260
 * by application code.
 
261
 */
 
262
 
 
263
struct _XDisplay;               /* Forward declare before use for C++ */
 
264
 
 
265
typedef struct {
 
266
        XExtData *ext_data;     /* hook for extension to hang data */
 
267
        struct _XDisplay *display;/* back pointer to display structure */
 
268
        Window root;            /* Root window id. */
 
269
        int width, height;      /* width and height of screen */
 
270
        int mwidth, mheight;    /* width and height of  in millimeters */
 
271
        int ndepths;            /* number of depths possible */
 
272
        Depth *depths;          /* list of allowable depths on the screen */
 
273
        int root_depth;         /* bits per pixel */
 
274
        Visual *root_visual;    /* root visual */
 
275
        GC default_gc;          /* GC for the root root visual */
 
276
        Colormap cmap;          /* default color map */
 
277
        unsigned long white_pixel;
 
278
        unsigned long black_pixel;      /* White and Black pixel values */
 
279
        int max_maps, min_maps; /* max and min color maps */
 
280
        int backing_store;      /* Never, WhenMapped, Always */
 
281
        Bool save_unders;
 
282
        long root_input_mask;   /* initial root input mask */
 
283
} Screen;
 
284
 
 
285
/*
 
286
 * Format structure; describes ZFormat data the screen will understand.
 
287
 */
 
288
typedef struct {
 
289
        XExtData *ext_data;     /* hook for extension to hang data */
 
290
        int depth;              /* depth of this image format */
 
291
        int bits_per_pixel;     /* bits/pixel at this depth */
 
292
        int scanline_pad;       /* scanline must padded to this multiple */
 
293
} ScreenFormat;
 
294
 
 
295
/*
 
296
 * Data structure for setting window attributes.
 
297
 */
 
298
typedef struct {
 
299
    Pixmap background_pixmap;   /* background or None or ParentRelative */
 
300
    unsigned long background_pixel;     /* background pixel */
 
301
    Pixmap border_pixmap;       /* border of the window */
 
302
    unsigned long border_pixel; /* border pixel value */
 
303
    int bit_gravity;            /* one of bit gravity values */
 
304
    int win_gravity;            /* one of the window gravity values */
 
305
    int backing_store;          /* NotUseful, WhenMapped, Always */
 
306
    unsigned long backing_planes;/* planes to be preseved if possible */
 
307
    unsigned long backing_pixel;/* value to use in restoring planes */
 
308
    Bool save_under;            /* should bits under be saved? (popups) */
 
309
    long event_mask;            /* set of events that should be saved */
 
310
    long do_not_propagate_mask; /* set of events that should not propagate */
 
311
    Bool override_redirect;     /* boolean value for override-redirect */
 
312
    Colormap colormap;          /* color map to be associated with window */
 
313
    Cursor cursor;              /* cursor to be displayed (or None) */
 
314
} XSetWindowAttributes;
 
315
 
 
316
typedef struct {
 
317
    int x, y;                   /* location of window */
 
318
    int width, height;          /* width and height of window */
 
319
    int border_width;           /* border width of window */
 
320
    int depth;                  /* depth of window */
 
321
    Visual *visual;             /* the associated visual structure */
 
322
    Window root;                /* root of screen containing window */
 
323
#if defined(__cplusplus) || defined(c_plusplus)
 
324
    int c_class;                /* C++ InputOutput, InputOnly*/
 
325
#else
 
326
    int class;                  /* InputOutput, InputOnly*/
 
327
#endif
 
328
    int bit_gravity;            /* one of bit gravity values */
 
329
    int win_gravity;            /* one of the window gravity values */
 
330
    int backing_store;          /* NotUseful, WhenMapped, Always */
 
331
    unsigned long backing_planes;/* planes to be preserved if possible */
 
332
    unsigned long backing_pixel;/* value to be used when restoring planes */
 
333
    Bool save_under;            /* boolean, should bits under be saved? */
 
334
    Colormap colormap;          /* color map to be associated with window */
 
335
    Bool map_installed;         /* boolean, is color map currently installed*/
 
336
    int map_state;              /* IsUnmapped, IsUnviewable, IsViewable */
 
337
    long all_event_masks;       /* set of events all people have interest in*/
 
338
    long your_event_mask;       /* my event mask */
 
339
    long do_not_propagate_mask; /* set of events that should not propagate */
 
340
    Bool override_redirect;     /* boolean value for override-redirect */
 
341
    Screen *screen;             /* back pointer to correct screen */
 
342
} XWindowAttributes;
 
343
 
 
344
/*
 
345
 * Data structure for host setting; getting routines.
 
346
 *
 
347
 */
 
348
 
 
349
typedef struct {
 
350
        int family;             /* for example FamilyInternet */
 
351
        int length;             /* length of address, in bytes */
 
352
        char *address;          /* pointer to where to find the bytes */
 
353
} XHostAddress;
 
354
 
 
355
/*
 
356
 * Data structure for ServerFamilyInterpreted addresses in host routines
 
357
 */
 
358
typedef struct {
 
359
        int typelength;         /* length of type string, in bytes */
 
360
        int valuelength;        /* length of value string, in bytes */
 
361
        char *type;             /* pointer to where to find the type string */
 
362
        char *value;            /* pointer to where to find the address */
 
363
} XServerInterpretedAddress;
 
364
 
 
365
/*
 
366
 * Data structure for "image" data, used by image manipulation routines.
 
367
 */
 
368
typedef struct _XImage {
 
369
    int width, height;          /* size of image */
 
370
    int xoffset;                /* number of pixels offset in X direction */
 
371
    int format;                 /* XYBitmap, XYPixmap, ZPixmap */
 
372
    char *data;                 /* pointer to image data */
 
373
    int byte_order;             /* data byte order, LSBFirst, MSBFirst */
 
374
    int bitmap_unit;            /* quant. of scanline 8, 16, 32 */
 
375
    int bitmap_bit_order;       /* LSBFirst, MSBFirst */
 
376
    int bitmap_pad;             /* 8, 16, 32 either XY or ZPixmap */
 
377
    int depth;                  /* depth of image */
 
378
    int bytes_per_line;         /* accelarator to next line */
 
379
    int bits_per_pixel;         /* bits per pixel (ZPixmap) */
 
380
    unsigned long red_mask;     /* bits in z arrangment */
 
381
    unsigned long green_mask;
 
382
    unsigned long blue_mask;
 
383
    XPointer obdata;            /* hook for the object routines to hang on */
 
384
    struct funcs {              /* image manipulation routines */
 
385
        struct _XImage *(*create_image)(
 
386
                struct _XDisplay* /* display */,
 
387
                Visual*         /* visual */,
 
388
                unsigned int    /* depth */,
 
389
                int             /* format */,
 
390
                int             /* offset */,
 
391
                char*           /* data */,
 
392
                unsigned int    /* width */,
 
393
                unsigned int    /* height */,
 
394
                int             /* bitmap_pad */,
 
395
                int             /* bytes_per_line */);
 
396
        int (*destroy_image)        (struct _XImage *);
 
397
        unsigned long (*get_pixel)  (struct _XImage *, int, int);
 
398
        int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
 
399
        struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
 
400
        int (*add_pixel)            (struct _XImage *, long);
 
401
        } f;
 
402
} XImage;
 
403
 
 
404
/*
 
405
 * Data structure for XReconfigureWindow
 
406
 */
 
407
typedef struct {
 
408
    int x, y;
 
409
    int width, height;
 
410
    int border_width;
 
411
    Window sibling;
 
412
    int stack_mode;
 
413
} XWindowChanges;
 
414
 
 
415
/*
 
416
 * Data structure used by color operations
 
417
 */
 
418
typedef struct {
 
419
        unsigned long pixel;
 
420
        unsigned short red, green, blue;
 
421
        char flags;  /* do_red, do_green, do_blue */
 
422
        char pad;
 
423
} XColor;
 
424
 
 
425
/*
 
426
 * Data structures for graphics operations.  On most machines, these are
 
427
 * congruent with the wire protocol structures, so reformatting the data
 
428
 * can be avoided on these architectures.
 
429
 */
 
430
typedef struct {
 
431
    short x1, y1, x2, y2;
 
432
} XSegment;
 
433
 
 
434
typedef struct {
 
435
    short x, y;
 
436
} XPoint;
 
437
 
 
438
typedef struct {
 
439
    short x, y;
 
440
    unsigned short width, height;
 
441
} XRectangle;
 
442
 
 
443
typedef struct {
 
444
    short x, y;
 
445
    unsigned short width, height;
 
446
    short angle1, angle2;
 
447
} XArc;
 
448
 
 
449
 
 
450
/* Data structure for XChangeKeyboardControl */
 
451
 
 
452
typedef struct {
 
453
        int key_click_percent;
 
454
        int bell_percent;
 
455
        int bell_pitch;
 
456
        int bell_duration;
 
457
        int led;
 
458
        int led_mode;
 
459
        int key;
 
460
        int auto_repeat_mode;   /* On, Off, Default */
 
461
} XKeyboardControl;
 
462
 
 
463
/* Data structure for XGetKeyboardControl */
 
464
 
 
465
typedef struct {
 
466
        int key_click_percent;
 
467
        int bell_percent;
 
468
        unsigned int bell_pitch, bell_duration;
 
469
        unsigned long led_mask;
 
470
        int global_auto_repeat;
 
471
        char auto_repeats[32];
 
472
} XKeyboardState;
 
473
 
 
474
/* Data structure for XGetMotionEvents.  */
 
475
 
 
476
typedef struct {
 
477
        Time time;
 
478
        short x, y;
 
479
} XTimeCoord;
 
480
 
 
481
/* Data structure for X{Set,Get}ModifierMapping */
 
482
 
 
483
typedef struct {
 
484
        int max_keypermod;      /* The server's max # of keys per modifier */
 
485
        KeyCode *modifiermap;   /* An 8 by max_keypermod array of modifiers */
 
486
} XModifierKeymap;
 
487
 
 
488
 
 
489
/*
 
490
 * Display datatype maintaining display specific data.
 
491
 * The contents of this structure are implementation dependent.
 
492
 * A Display should be treated as opaque by application code.
 
493
 */
 
494
#ifndef XLIB_ILLEGAL_ACCESS
 
495
typedef struct _XDisplay Display;
 
496
#endif
 
497
 
 
498
struct _XPrivate;               /* Forward declare before use for C++ */
 
499
struct _XrmHashBucketRec;
 
500
 
 
501
typedef struct
 
502
#ifdef XLIB_ILLEGAL_ACCESS
 
503
_XDisplay
 
504
#endif
 
505
{
 
506
        XExtData *ext_data;     /* hook for extension to hang data */
 
507
        struct _XPrivate *private1;
 
508
        int fd;                 /* Network socket. */
 
509
        int private2;
 
510
        int proto_major_version;/* major version of server's X protocol */
 
511
        int proto_minor_version;/* minor version of servers X protocol */
 
512
        char *vendor;           /* vendor of the server hardware */
 
513
        XID private3;
 
514
        XID private4;
 
515
        XID private5;
 
516
        int private6;
 
517
        XID (*resource_alloc)(  /* allocator function */
 
518
                struct _XDisplay*
 
519
        );
 
520
        int byte_order;         /* screen byte order, LSBFirst, MSBFirst */
 
521
        int bitmap_unit;        /* padding and data requirements */
 
522
        int bitmap_pad;         /* padding requirements on bitmaps */
 
523
        int bitmap_bit_order;   /* LeastSignificant or MostSignificant */
 
524
        int nformats;           /* number of pixmap formats in list */
 
525
        ScreenFormat *pixmap_format;    /* pixmap format list */
 
526
        int private8;
 
527
        int release;            /* release of the server */
 
528
        struct _XPrivate *private9, *private10;
 
529
        int qlen;               /* Length of input event queue */
 
530
        unsigned long last_request_read; /* seq number of last event read */
 
531
        unsigned long request;  /* sequence number of last request. */
 
532
        XPointer private11;
 
533
        XPointer private12;
 
534
        XPointer private13;
 
535
        XPointer private14;
 
536
        unsigned max_request_size; /* maximum number 32 bit words in request*/
 
537
        struct _XrmHashBucketRec *db;
 
538
        int (*private15)(
 
539
                struct _XDisplay*
 
540
                );
 
541
        char *display_name;     /* "host:display" string used on this connect*/
 
542
        int default_screen;     /* default screen for operations */
 
543
        int nscreens;           /* number of screens on this server*/
 
544
        Screen *screens;        /* pointer to list of screens */
 
545
        unsigned long motion_buffer;    /* size of motion buffer */
 
546
        unsigned long private16;
 
547
        int min_keycode;        /* minimum defined keycode */
 
548
        int max_keycode;        /* maximum defined keycode */
 
549
        XPointer private17;
 
550
        XPointer private18;
 
551
        int private19;
 
552
        char *xdefaults;        /* contents of defaults from server */
 
553
        /* there is more to this structure, but it is private to Xlib */
 
554
}
 
555
#ifdef XLIB_ILLEGAL_ACCESS
 
556
Display,
 
557
#endif
 
558
*_XPrivDisplay;
 
559
 
 
560
#undef _XEVENT_
 
561
#ifndef _XEVENT_
 
562
/*
 
563
 * Definitions of specific events.
 
564
 */
 
565
typedef struct {
 
566
        int type;               /* of event */
 
567
        unsigned long serial;   /* # of last request processed by server */
 
568
        Bool send_event;        /* true if this came from a SendEvent request */
 
569
        Display *display;       /* Display the event was read from */
 
570
        Window window;          /* "event" window it is reported relative to */
 
571
        Window root;            /* root window that the event occurred on */
 
572
        Window subwindow;       /* child window */
 
573
        Time time;              /* milliseconds */
 
574
        int x, y;               /* pointer x, y coordinates in event window */
 
575
        int x_root, y_root;     /* coordinates relative to root */
 
576
        unsigned int state;     /* key or button mask */
 
577
        unsigned int keycode;   /* detail */
 
578
        Bool same_screen;       /* same screen flag */
 
579
} XKeyEvent;
 
580
typedef XKeyEvent XKeyPressedEvent;
 
581
typedef XKeyEvent XKeyReleasedEvent;
 
582
 
 
583
typedef struct {
 
584
        int type;               /* of event */
 
585
        unsigned long serial;   /* # of last request processed by server */
 
586
        Bool send_event;        /* true if this came from a SendEvent request */
 
587
        Display *display;       /* Display the event was read from */
 
588
        Window window;          /* "event" window it is reported relative to */
 
589
        Window root;            /* root window that the event occurred on */
 
590
        Window subwindow;       /* child window */
 
591
        Time time;              /* milliseconds */
 
592
        int x, y;               /* pointer x, y coordinates in event window */
 
593
        int x_root, y_root;     /* coordinates relative to root */
 
594
        unsigned int state;     /* key or button mask */
 
595
        unsigned int button;    /* detail */
 
596
        Bool same_screen;       /* same screen flag */
 
597
} XButtonEvent;
 
598
typedef XButtonEvent XButtonPressedEvent;
 
599
typedef XButtonEvent XButtonReleasedEvent;
 
600
 
 
601
typedef struct {
 
602
        int type;               /* of event */
 
603
        unsigned long serial;   /* # of last request processed by server */
 
604
        Bool send_event;        /* true if this came from a SendEvent request */
 
605
        Display *display;       /* Display the event was read from */
 
606
        Window window;          /* "event" window reported relative to */
 
607
        Window root;            /* root window that the event occurred on */
 
608
        Window subwindow;       /* child window */
 
609
        Time time;              /* milliseconds */
 
610
        int x, y;               /* pointer x, y coordinates in event window */
 
611
        int x_root, y_root;     /* coordinates relative to root */
 
612
        unsigned int state;     /* key or button mask */
 
613
        char is_hint;           /* detail */
 
614
        Bool same_screen;       /* same screen flag */
 
615
} XMotionEvent;
 
616
typedef XMotionEvent XPointerMovedEvent;
 
617
 
 
618
typedef struct {
 
619
        int type;               /* of event */
 
620
        unsigned long serial;   /* # of last request processed by server */
 
621
        Bool send_event;        /* true if this came from a SendEvent request */
 
622
        Display *display;       /* Display the event was read from */
 
623
        Window window;          /* "event" window reported relative to */
 
624
        Window root;            /* root window that the event occurred on */
 
625
        Window subwindow;       /* child window */
 
626
        Time time;              /* milliseconds */
 
627
        int x, y;               /* pointer x, y coordinates in event window */
 
628
        int x_root, y_root;     /* coordinates relative to root */
 
629
        int mode;               /* NotifyNormal, NotifyGrab, NotifyUngrab */
 
630
        int detail;
 
631
        /*
 
632
         * NotifyAncestor, NotifyVirtual, NotifyInferior,
 
633
         * NotifyNonlinear,NotifyNonlinearVirtual
 
634
         */
 
635
        Bool same_screen;       /* same screen flag */
 
636
        Bool focus;             /* boolean focus */
 
637
        unsigned int state;     /* key or button mask */
 
638
} XCrossingEvent;
 
639
typedef XCrossingEvent XEnterWindowEvent;
 
640
typedef XCrossingEvent XLeaveWindowEvent;
 
641
 
 
642
typedef struct {
 
643
        int type;               /* FocusIn or FocusOut */
 
644
        unsigned long serial;   /* # of last request processed by server */
 
645
        Bool send_event;        /* true if this came from a SendEvent request */
 
646
        Display *display;       /* Display the event was read from */
 
647
        Window window;          /* window of event */
 
648
        int mode;               /* NotifyNormal, NotifyWhileGrabbed,
 
649
                                   NotifyGrab, NotifyUngrab */
 
650
        int detail;
 
651
        /*
 
652
         * NotifyAncestor, NotifyVirtual, NotifyInferior,
 
653
         * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
 
654
         * NotifyPointerRoot, NotifyDetailNone
 
655
         */
 
656
} XFocusChangeEvent;
 
657
typedef XFocusChangeEvent XFocusInEvent;
 
658
typedef XFocusChangeEvent XFocusOutEvent;
 
659
 
 
660
/* generated on EnterWindow and FocusIn  when KeyMapState selected */
 
661
typedef struct {
 
662
        int type;
 
663
        unsigned long serial;   /* # of last request processed by server */
 
664
        Bool send_event;        /* true if this came from a SendEvent request */
 
665
        Display *display;       /* Display the event was read from */
 
666
        Window window;
 
667
        char key_vector[32];
 
668
} XKeymapEvent;
 
669
 
 
670
typedef struct {
 
671
        int type;
 
672
        unsigned long serial;   /* # of last request processed by server */
 
673
        Bool send_event;        /* true if this came from a SendEvent request */
 
674
        Display *display;       /* Display the event was read from */
 
675
        Window window;
 
676
        int x, y;
 
677
        int width, height;
 
678
        int count;              /* if non-zero, at least this many more */
 
679
} XExposeEvent;
 
680
 
 
681
typedef struct {
 
682
        int type;
 
683
        unsigned long serial;   /* # of last request processed by server */
 
684
        Bool send_event;        /* true if this came from a SendEvent request */
 
685
        Display *display;       /* Display the event was read from */
 
686
        Drawable drawable;
 
687
        int x, y;
 
688
        int width, height;
 
689
        int count;              /* if non-zero, at least this many more */
 
690
        int major_code;         /* core is CopyArea or CopyPlane */
 
691
        int minor_code;         /* not defined in the core */
 
692
} XGraphicsExposeEvent;
 
693
 
 
694
typedef struct {
 
695
        int type;
 
696
        unsigned long serial;   /* # of last request processed by server */
 
697
        Bool send_event;        /* true if this came from a SendEvent request */
 
698
        Display *display;       /* Display the event was read from */
 
699
        Drawable drawable;
 
700
        int major_code;         /* core is CopyArea or CopyPlane */
 
701
        int minor_code;         /* not defined in the core */
 
702
} XNoExposeEvent;
 
703
 
 
704
typedef struct {
 
705
        int type;
 
706
        unsigned long serial;   /* # of last request processed by server */
 
707
        Bool send_event;        /* true if this came from a SendEvent request */
 
708
        Display *display;       /* Display the event was read from */
 
709
        Window window;
 
710
        int state;              /* Visibility state */
 
711
} XVisibilityEvent;
 
712
 
 
713
typedef struct {
 
714
        int type;
 
715
        unsigned long serial;   /* # of last request processed by server */
 
716
        Bool send_event;        /* true if this came from a SendEvent request */
 
717
        Display *display;       /* Display the event was read from */
 
718
        Window parent;          /* parent of the window */
 
719
        Window window;          /* window id of window created */
 
720
        int x, y;               /* window location */
 
721
        int width, height;      /* size of window */
 
722
        int border_width;       /* border width */
 
723
        Bool override_redirect; /* creation should be overridden */
 
724
} XCreateWindowEvent;
 
725
 
 
726
typedef struct {
 
727
        int type;
 
728
        unsigned long serial;   /* # of last request processed by server */
 
729
        Bool send_event;        /* true if this came from a SendEvent request */
 
730
        Display *display;       /* Display the event was read from */
 
731
        Window event;
 
732
        Window window;
 
733
} XDestroyWindowEvent;
 
734
 
 
735
typedef struct {
 
736
        int type;
 
737
        unsigned long serial;   /* # of last request processed by server */
 
738
        Bool send_event;        /* true if this came from a SendEvent request */
 
739
        Display *display;       /* Display the event was read from */
 
740
        Window event;
 
741
        Window window;
 
742
        Bool from_configure;
 
743
} XUnmapEvent;
 
744
 
 
745
typedef struct {
 
746
        int type;
 
747
        unsigned long serial;   /* # of last request processed by server */
 
748
        Bool send_event;        /* true if this came from a SendEvent request */
 
749
        Display *display;       /* Display the event was read from */
 
750
        Window event;
 
751
        Window window;
 
752
        Bool override_redirect; /* boolean, is override set... */
 
753
} XMapEvent;
 
754
 
 
755
typedef struct {
 
756
        int type;
 
757
        unsigned long serial;   /* # of last request processed by server */
 
758
        Bool send_event;        /* true if this came from a SendEvent request */
 
759
        Display *display;       /* Display the event was read from */
 
760
        Window parent;
 
761
        Window window;
 
762
} XMapRequestEvent;
 
763
 
 
764
typedef struct {
 
765
        int type;
 
766
        unsigned long serial;   /* # of last request processed by server */
 
767
        Bool send_event;        /* true if this came from a SendEvent request */
 
768
        Display *display;       /* Display the event was read from */
 
769
        Window event;
 
770
        Window window;
 
771
        Window parent;
 
772
        int x, y;
 
773
        Bool override_redirect;
 
774
} XReparentEvent;
 
775
 
 
776
typedef struct {
 
777
        int type;
 
778
        unsigned long serial;   /* # of last request processed by server */
 
779
        Bool send_event;        /* true if this came from a SendEvent request */
 
780
        Display *display;       /* Display the event was read from */
 
781
        Window event;
 
782
        Window window;
 
783
        int x, y;
 
784
        int width, height;
 
785
        int border_width;
 
786
        Window above;
 
787
        Bool override_redirect;
 
788
} XConfigureEvent;
 
789
 
 
790
typedef struct {
 
791
        int type;
 
792
        unsigned long serial;   /* # of last request processed by server */
 
793
        Bool send_event;        /* true if this came from a SendEvent request */
 
794
        Display *display;       /* Display the event was read from */
 
795
        Window event;
 
796
        Window window;
 
797
        int x, y;
 
798
} XGravityEvent;
 
799
 
 
800
typedef struct {
 
801
        int type;
 
802
        unsigned long serial;   /* # of last request processed by server */
 
803
        Bool send_event;        /* true if this came from a SendEvent request */
 
804
        Display *display;       /* Display the event was read from */
 
805
        Window window;
 
806
        int width, height;
 
807
} XResizeRequestEvent;
 
808
 
 
809
typedef struct {
 
810
        int type;
 
811
        unsigned long serial;   /* # of last request processed by server */
 
812
        Bool send_event;        /* true if this came from a SendEvent request */
 
813
        Display *display;       /* Display the event was read from */
 
814
        Window parent;
 
815
        Window window;
 
816
        int x, y;
 
817
        int width, height;
 
818
        int border_width;
 
819
        Window above;
 
820
        int detail;             /* Above, Below, TopIf, BottomIf, Opposite */
 
821
        unsigned long value_mask;
 
822
} XConfigureRequestEvent;
 
823
 
 
824
typedef struct {
 
825
        int type;
 
826
        unsigned long serial;   /* # of last request processed by server */
 
827
        Bool send_event;        /* true if this came from a SendEvent request */
 
828
        Display *display;       /* Display the event was read from */
 
829
        Window event;
 
830
        Window window;
 
831
        int place;              /* PlaceOnTop, PlaceOnBottom */
 
832
} XCirculateEvent;
 
833
 
 
834
typedef struct {
 
835
        int type;
 
836
        unsigned long serial;   /* # of last request processed by server */
 
837
        Bool send_event;        /* true if this came from a SendEvent request */
 
838
        Display *display;       /* Display the event was read from */
 
839
        Window parent;
 
840
        Window window;
 
841
        int place;              /* PlaceOnTop, PlaceOnBottom */
 
842
} XCirculateRequestEvent;
 
843
 
 
844
typedef struct {
 
845
        int type;
 
846
        unsigned long serial;   /* # of last request processed by server */
 
847
        Bool send_event;        /* true if this came from a SendEvent request */
 
848
        Display *display;       /* Display the event was read from */
 
849
        Window window;
 
850
        Atom atom;
 
851
        Time time;
 
852
        int state;              /* NewValue, Deleted */
 
853
} XPropertyEvent;
 
854
 
 
855
typedef struct {
 
856
        int type;
 
857
        unsigned long serial;   /* # of last request processed by server */
 
858
        Bool send_event;        /* true if this came from a SendEvent request */
 
859
        Display *display;       /* Display the event was read from */
 
860
        Window window;
 
861
        Atom selection;
 
862
        Time time;
 
863
} XSelectionClearEvent;
 
864
 
 
865
typedef struct {
 
866
        int type;
 
867
        unsigned long serial;   /* # of last request processed by server */
 
868
        Bool send_event;        /* true if this came from a SendEvent request */
 
869
        Display *display;       /* Display the event was read from */
 
870
        Window owner;
 
871
        Window requestor;
 
872
        Atom selection;
 
873
        Atom target;
 
874
        Atom property;
 
875
        Time time;
 
876
} XSelectionRequestEvent;
 
877
 
 
878
typedef struct {
 
879
        int type;
 
880
        unsigned long serial;   /* # of last request processed by server */
 
881
        Bool send_event;        /* true if this came from a SendEvent request */
 
882
        Display *display;       /* Display the event was read from */
 
883
        Window requestor;
 
884
        Atom selection;
 
885
        Atom target;
 
886
        Atom property;          /* ATOM or None */
 
887
        Time time;
 
888
} XSelectionEvent;
 
889
 
 
890
typedef struct {
 
891
        int type;
 
892
        unsigned long serial;   /* # of last request processed by server */
 
893
        Bool send_event;        /* true if this came from a SendEvent request */
 
894
        Display *display;       /* Display the event was read from */
 
895
        Window window;
 
896
        Colormap colormap;      /* COLORMAP or None */
 
897
#if defined(__cplusplus) || defined(c_plusplus)
 
898
        Bool c_new;             /* C++ */
 
899
#else
 
900
        Bool new;
 
901
#endif
 
902
        int state;              /* ColormapInstalled, ColormapUninstalled */
 
903
} XColormapEvent;
 
904
 
 
905
typedef struct {
 
906
        int type;
 
907
        unsigned long serial;   /* # of last request processed by server */
 
908
        Bool send_event;        /* true if this came from a SendEvent request */
 
909
        Display *display;       /* Display the event was read from */
 
910
        Window window;
 
911
        Atom message_type;
 
912
        int format;
 
913
        union {
 
914
                char b[20];
 
915
                short s[10];
 
916
                long l[5];
 
917
                } data;
 
918
} XClientMessageEvent;
 
919
 
 
920
typedef struct {
 
921
        int type;
 
922
        unsigned long serial;   /* # of last request processed by server */
 
923
        Bool send_event;        /* true if this came from a SendEvent request */
 
924
        Display *display;       /* Display the event was read from */
 
925
        Window window;          /* unused */
 
926
        int request;            /* one of MappingModifier, MappingKeyboard,
 
927
                                   MappingPointer */
 
928
        int first_keycode;      /* first keycode */
 
929
        int count;              /* defines range of change w. first_keycode*/
 
930
} XMappingEvent;
 
931
 
 
932
typedef struct {
 
933
        int type;
 
934
        Display *display;       /* Display the event was read from */
 
935
        XID resourceid;         /* resource id */
 
936
        unsigned long serial;   /* serial number of failed request */
 
937
        unsigned char error_code;       /* error code of failed request */
 
938
        unsigned char request_code;     /* Major op-code of failed request */
 
939
        unsigned char minor_code;       /* Minor op-code of failed request */
 
940
} XErrorEvent;
 
941
 
 
942
typedef struct {
 
943
        int type;
 
944
        unsigned long serial;   /* # of last request processed by server */
 
945
        Bool send_event;        /* true if this came from a SendEvent request */
 
946
        Display *display;/* Display the event was read from */
 
947
        Window window;  /* window on which event was requested in event mask */
 
948
} XAnyEvent;
 
949
 
 
950
 
 
951
/***************************************************************
 
952
 *
 
953
 * GenericEvent.  This event is the standard event for all newer extensions.
 
954
 */
 
955
 
 
956
typedef struct
 
957
    {
 
958
    int            type;         /* of event. Always GenericEvent */
 
959
    unsigned long  serial;       /* # of last request processed */
 
960
    Bool           send_event;   /* true if from SendEvent request */
 
961
    Display        *display;     /* Display the event was read from */
 
962
    int            extension;    /* major opcode of extension that caused the event */
 
963
    int            evtype;       /* actual event type. */
 
964
    } XGenericEvent;
 
965
 
 
966
typedef struct {
 
967
    int            type;         /* of event. Always GenericEvent */
 
968
    unsigned long  serial;       /* # of last request processed */
 
969
    Bool           send_event;   /* true if from SendEvent request */
 
970
    Display        *display;     /* Display the event was read from */
 
971
    int            extension;    /* major opcode of extension that caused the event */
 
972
    int            evtype;       /* actual event type. */
 
973
    unsigned int   cookie;
 
974
    void           *data;
 
975
} XGenericEventCookie;
 
976
 
 
977
/*
 
978
 * this union is defined so Xlib can always use the same sized
 
979
 * event structure internally, to avoid memory fragmentation.
 
980
 */
 
981
typedef union _XEvent {
 
982
        int type;               /* must not be changed; first element */
 
983
        XAnyEvent xany;
 
984
        XKeyEvent xkey;
 
985
        XButtonEvent xbutton;
 
986
        XMotionEvent xmotion;
 
987
        XCrossingEvent xcrossing;
 
988
        XFocusChangeEvent xfocus;
 
989
        XExposeEvent xexpose;
 
990
        XGraphicsExposeEvent xgraphicsexpose;
 
991
        XNoExposeEvent xnoexpose;
 
992
        XVisibilityEvent xvisibility;
 
993
        XCreateWindowEvent xcreatewindow;
 
994
        XDestroyWindowEvent xdestroywindow;
 
995
        XUnmapEvent xunmap;
 
996
        XMapEvent xmap;
 
997
        XMapRequestEvent xmaprequest;
 
998
        XReparentEvent xreparent;
 
999
        XConfigureEvent xconfigure;
 
1000
        XGravityEvent xgravity;
 
1001
        XResizeRequestEvent xresizerequest;
 
1002
        XConfigureRequestEvent xconfigurerequest;
 
1003
        XCirculateEvent xcirculate;
 
1004
        XCirculateRequestEvent xcirculaterequest;
 
1005
        XPropertyEvent xproperty;
 
1006
        XSelectionClearEvent xselectionclear;
 
1007
        XSelectionRequestEvent xselectionrequest;
 
1008
        XSelectionEvent xselection;
 
1009
        XColormapEvent xcolormap;
 
1010
        XClientMessageEvent xclient;
 
1011
        XMappingEvent xmapping;
 
1012
        XErrorEvent xerror;
 
1013
        XKeymapEvent xkeymap;
 
1014
        XGenericEvent xgeneric;
 
1015
        XGenericEventCookie xcookie;
 
1016
        long pad[24];
 
1017
} XEvent;
 
1018
#endif
 
1019
 
 
1020
#define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
 
1021
 
 
1022
/*
 
1023
 * per character font metric information.
 
1024
 */
 
1025
typedef struct {
 
1026
    short       lbearing;       /* origin to left edge of raster */
 
1027
    short       rbearing;       /* origin to right edge of raster */
 
1028
    short       width;          /* advance to next char's origin */
 
1029
    short       ascent;         /* baseline to top edge of raster */
 
1030
    short       descent;        /* baseline to bottom edge of raster */
 
1031
    unsigned short attributes;  /* per char flags (not predefined) */
 
1032
} XCharStruct;
 
1033
 
 
1034
/*
 
1035
 * To allow arbitrary information with fonts, there are additional properties
 
1036
 * returned.
 
1037
 */
 
1038
typedef struct {
 
1039
    Atom name;
 
1040
    unsigned long card32;
 
1041
} XFontProp;
 
1042
 
 
1043
typedef struct {
 
1044
    XExtData    *ext_data;      /* hook for extension to hang data */
 
1045
    Font        fid;            /* Font id for this font */
 
1046
    unsigned    direction;      /* hint about direction the font is painted */
 
1047
    unsigned    min_char_or_byte2;/* first character */
 
1048
    unsigned    max_char_or_byte2;/* last character */
 
1049
    unsigned    min_byte1;      /* first row that exists */
 
1050
    unsigned    max_byte1;      /* last row that exists */
 
1051
    Bool        all_chars_exist;/* flag if all characters have non-zero size*/
 
1052
    unsigned    default_char;   /* char to print for undefined character */
 
1053
    int         n_properties;   /* how many properties there are */
 
1054
    XFontProp   *properties;    /* pointer to array of additional properties*/
 
1055
    XCharStruct min_bounds;     /* minimum bounds over all existing char*/
 
1056
    XCharStruct max_bounds;     /* maximum bounds over all existing char*/
 
1057
    XCharStruct *per_char;      /* first_char to last_char information */
 
1058
    int         ascent;         /* log. extent above baseline for spacing */
 
1059
    int         descent;        /* log. descent below baseline for spacing */
 
1060
} XFontStruct;
 
1061
 
 
1062
/*
 
1063
 * PolyText routines take these as arguments.
 
1064
 */
 
1065
typedef struct {
 
1066
    char *chars;                /* pointer to string */
 
1067
    int nchars;                 /* number of characters */
 
1068
    int delta;                  /* delta between strings */
 
1069
    Font font;                  /* font to print it in, None don't change */
 
1070
} XTextItem;
 
1071
 
 
1072
typedef struct {                /* normal 16 bit characters are two bytes */
 
1073
    unsigned char byte1;
 
1074
    unsigned char byte2;
 
1075
} XChar2b;
 
1076
 
 
1077
typedef struct {
 
1078
    XChar2b *chars;             /* two byte characters */
 
1079
    int nchars;                 /* number of characters */
 
1080
    int delta;                  /* delta between strings */
 
1081
    Font font;                  /* font to print it in, None don't change */
 
1082
} XTextItem16;
 
1083
 
 
1084
 
 
1085
typedef union { Display *display;
 
1086
                GC gc;
 
1087
                Visual *visual;
 
1088
                Screen *screen;
 
1089
                ScreenFormat *pixmap_format;
 
1090
                XFontStruct *font; } XEDataObject;
 
1091
 
 
1092
typedef struct {
 
1093
    XRectangle      max_ink_extent;
 
1094
    XRectangle      max_logical_extent;
 
1095
} XFontSetExtents;
 
1096
 
 
1097
/* unused:
 
1098
typedef void (*XOMProc)();
 
1099
 */
 
1100
 
 
1101
typedef struct _XOM *XOM;
 
1102
typedef struct _XOC *XOC, *XFontSet;
 
1103
 
 
1104
typedef struct {
 
1105
    char           *chars;
 
1106
    int             nchars;
 
1107
    int             delta;
 
1108
    XFontSet        font_set;
 
1109
} XmbTextItem;
 
1110
 
 
1111
typedef struct {
 
1112
    wchar_t        *chars;
 
1113
    int             nchars;
 
1114
    int             delta;
 
1115
    XFontSet        font_set;
 
1116
} XwcTextItem;
 
1117
 
 
1118
#define XNRequiredCharSet "requiredCharSet"
 
1119
#define XNQueryOrientation "queryOrientation"
 
1120
#define XNBaseFontName "baseFontName"
 
1121
#define XNOMAutomatic "omAutomatic"
 
1122
#define XNMissingCharSet "missingCharSet"
 
1123
#define XNDefaultString "defaultString"
 
1124
#define XNOrientation "orientation"
 
1125
#define XNDirectionalDependentDrawing "directionalDependentDrawing"
 
1126
#define XNContextualDrawing "contextualDrawing"
 
1127
#define XNFontInfo "fontInfo"
 
1128
 
 
1129
typedef struct {
 
1130
    int charset_count;
 
1131
    char **charset_list;
 
1132
} XOMCharSetList;
 
1133
 
 
1134
typedef enum {
 
1135
    XOMOrientation_LTR_TTB,
 
1136
    XOMOrientation_RTL_TTB,
 
1137
    XOMOrientation_TTB_LTR,
 
1138
    XOMOrientation_TTB_RTL,
 
1139
    XOMOrientation_Context
 
1140
} XOrientation;
 
1141
 
 
1142
typedef struct {
 
1143
    int num_orientation;
 
1144
    XOrientation *orientation;  /* Input Text description */
 
1145
} XOMOrientation;
 
1146
 
 
1147
typedef struct {
 
1148
    int num_font;
 
1149
    XFontStruct **font_struct_list;
 
1150
    char **font_name_list;
 
1151
} XOMFontInfo;
 
1152
 
 
1153
typedef struct _XIM *XIM;
 
1154
typedef struct _XIC *XIC;
 
1155
 
 
1156
typedef void (*XIMProc)(
 
1157
    XIM,
 
1158
    XPointer,
 
1159
    XPointer
 
1160
);
 
1161
 
 
1162
typedef Bool (*XICProc)(
 
1163
    XIC,
 
1164
    XPointer,
 
1165
    XPointer
 
1166
);
 
1167
 
 
1168
typedef void (*XIDProc)(
 
1169
    Display*,
 
1170
    XPointer,
 
1171
    XPointer
 
1172
);
 
1173
 
 
1174
typedef unsigned long XIMStyle;
 
1175
 
 
1176
typedef struct {
 
1177
    unsigned short count_styles;
 
1178
    XIMStyle *supported_styles;
 
1179
} XIMStyles;
 
1180
 
 
1181
#define XIMPreeditArea          0x0001L
 
1182
#define XIMPreeditCallbacks     0x0002L
 
1183
#define XIMPreeditPosition      0x0004L
 
1184
#define XIMPreeditNothing       0x0008L
 
1185
#define XIMPreeditNone          0x0010L
 
1186
#define XIMStatusArea           0x0100L
 
1187
#define XIMStatusCallbacks      0x0200L
 
1188
#define XIMStatusNothing        0x0400L
 
1189
#define XIMStatusNone           0x0800L
 
1190
 
 
1191
#define XNVaNestedList "XNVaNestedList"
 
1192
#define XNQueryInputStyle "queryInputStyle"
 
1193
#define XNClientWindow "clientWindow"
 
1194
#define XNInputStyle "inputStyle"
 
1195
#define XNFocusWindow "focusWindow"
 
1196
#define XNResourceName "resourceName"
 
1197
#define XNResourceClass "resourceClass"
 
1198
#define XNGeometryCallback "geometryCallback"
 
1199
#define XNDestroyCallback "destroyCallback"
 
1200
#define XNFilterEvents "filterEvents"
 
1201
#define XNPreeditStartCallback "preeditStartCallback"
 
1202
#define XNPreeditDoneCallback "preeditDoneCallback"
 
1203
#define XNPreeditDrawCallback "preeditDrawCallback"
 
1204
#define XNPreeditCaretCallback "preeditCaretCallback"
 
1205
#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
 
1206
#define XNPreeditAttributes "preeditAttributes"
 
1207
#define XNStatusStartCallback "statusStartCallback"
 
1208
#define XNStatusDoneCallback "statusDoneCallback"
 
1209
#define XNStatusDrawCallback "statusDrawCallback"
 
1210
#define XNStatusAttributes "statusAttributes"
 
1211
#define XNArea "area"
 
1212
#define XNAreaNeeded "areaNeeded"
 
1213
#define XNSpotLocation "spotLocation"
 
1214
#define XNColormap "colorMap"
 
1215
#define XNStdColormap "stdColorMap"
 
1216
#define XNForeground "foreground"
 
1217
#define XNBackground "background"
 
1218
#define XNBackgroundPixmap "backgroundPixmap"
 
1219
#define XNFontSet "fontSet"
 
1220
#define XNLineSpace "lineSpace"
 
1221
#define XNCursor "cursor"
 
1222
 
 
1223
#define XNQueryIMValuesList "queryIMValuesList"
 
1224
#define XNQueryICValuesList "queryICValuesList"
 
1225
#define XNVisiblePosition "visiblePosition"
 
1226
#define XNR6PreeditCallback "r6PreeditCallback"
 
1227
#define XNStringConversionCallback "stringConversionCallback"
 
1228
#define XNStringConversion "stringConversion"
 
1229
#define XNResetState "resetState"
 
1230
#define XNHotKey "hotKey"
 
1231
#define XNHotKeyState "hotKeyState"
 
1232
#define XNPreeditState "preeditState"
 
1233
#define XNSeparatorofNestedList "separatorofNestedList"
 
1234
 
 
1235
#define XBufferOverflow         -1
 
1236
#define XLookupNone             1
 
1237
#define XLookupChars            2
 
1238
#define XLookupKeySym           3
 
1239
#define XLookupBoth             4
 
1240
 
 
1241
typedef void *XVaNestedList;
 
1242
 
 
1243
typedef struct {
 
1244
    XPointer client_data;
 
1245
    XIMProc callback;
 
1246
} XIMCallback;
 
1247
 
 
1248
typedef struct {
 
1249
    XPointer client_data;
 
1250
    XICProc callback;
 
1251
} XICCallback;
 
1252
 
 
1253
typedef unsigned long XIMFeedback;
 
1254
 
 
1255
#define XIMReverse              1L
 
1256
#define XIMUnderline            (1L<<1)
 
1257
#define XIMHighlight            (1L<<2)
 
1258
#define XIMPrimary              (1L<<5)
 
1259
#define XIMSecondary            (1L<<6)
 
1260
#define XIMTertiary             (1L<<7)
 
1261
#define XIMVisibleToForward     (1L<<8)
 
1262
#define XIMVisibleToBackword    (1L<<9)
 
1263
#define XIMVisibleToCenter      (1L<<10)
 
1264
 
 
1265
typedef struct _XIMText {
 
1266
    unsigned short length;
 
1267
    XIMFeedback *feedback;
 
1268
    Bool encoding_is_wchar;
 
1269
    union {
 
1270
        char *multi_byte;
 
1271
        wchar_t *wide_char;
 
1272
    } string;
 
1273
} XIMText;
 
1274
 
 
1275
typedef unsigned long    XIMPreeditState;
 
1276
 
 
1277
#define XIMPreeditUnKnown       0L
 
1278
#define XIMPreeditEnable        1L
 
1279
#define XIMPreeditDisable       (1L<<1)
 
1280
 
 
1281
typedef struct  _XIMPreeditStateNotifyCallbackStruct {
 
1282
    XIMPreeditState state;
 
1283
} XIMPreeditStateNotifyCallbackStruct;
 
1284
 
 
1285
typedef unsigned long    XIMResetState;
 
1286
 
 
1287
#define XIMInitialState         1L
 
1288
#define XIMPreserveState        (1L<<1)
 
1289
 
 
1290
typedef unsigned long XIMStringConversionFeedback;
 
1291
 
 
1292
#define XIMStringConversionLeftEdge     (0x00000001)
 
1293
#define XIMStringConversionRightEdge    (0x00000002)
 
1294
#define XIMStringConversionTopEdge      (0x00000004)
 
1295
#define XIMStringConversionBottomEdge   (0x00000008)
 
1296
#define XIMStringConversionConcealed    (0x00000010)
 
1297
#define XIMStringConversionWrapped      (0x00000020)
 
1298
 
 
1299
typedef struct _XIMStringConversionText {
 
1300
    unsigned short length;
 
1301
    XIMStringConversionFeedback *feedback;
 
1302
    Bool encoding_is_wchar;
 
1303
    union {
 
1304
        char *mbs;
 
1305
        wchar_t *wcs;
 
1306
    } string;
 
1307
} XIMStringConversionText;
 
1308
 
 
1309
typedef unsigned short  XIMStringConversionPosition;
 
1310
 
 
1311
typedef unsigned short  XIMStringConversionType;
 
1312
 
 
1313
#define XIMStringConversionBuffer       (0x0001)
 
1314
#define XIMStringConversionLine         (0x0002)
 
1315
#define XIMStringConversionWord         (0x0003)
 
1316
#define XIMStringConversionChar         (0x0004)
 
1317
 
 
1318
typedef unsigned short  XIMStringConversionOperation;
 
1319
 
 
1320
#define XIMStringConversionSubstitution (0x0001)
 
1321
#define XIMStringConversionRetrieval    (0x0002)
 
1322
 
 
1323
typedef enum {
 
1324
    XIMForwardChar, XIMBackwardChar,
 
1325
    XIMForwardWord, XIMBackwardWord,
 
1326
    XIMCaretUp, XIMCaretDown,
 
1327
    XIMNextLine, XIMPreviousLine,
 
1328
    XIMLineStart, XIMLineEnd,
 
1329
    XIMAbsolutePosition,
 
1330
    XIMDontChange
 
1331
} XIMCaretDirection;
 
1332
 
 
1333
typedef struct _XIMStringConversionCallbackStruct {
 
1334
    XIMStringConversionPosition position;
 
1335
    XIMCaretDirection direction;
 
1336
    XIMStringConversionOperation operation;
 
1337
    unsigned short factor;
 
1338
    XIMStringConversionText *text;
 
1339
} XIMStringConversionCallbackStruct;
 
1340
 
 
1341
typedef struct _XIMPreeditDrawCallbackStruct {
 
1342
    int caret;          /* Cursor offset within pre-edit string */
 
1343
    int chg_first;      /* Starting change position */
 
1344
    int chg_length;     /* Length of the change in character count */
 
1345
    XIMText *text;
 
1346
} XIMPreeditDrawCallbackStruct;
 
1347
 
 
1348
typedef enum {
 
1349
    XIMIsInvisible,     /* Disable caret feedback */
 
1350
    XIMIsPrimary,       /* UI defined caret feedback */
 
1351
    XIMIsSecondary      /* UI defined caret feedback */
 
1352
} XIMCaretStyle;
 
1353
 
 
1354
typedef struct _XIMPreeditCaretCallbackStruct {
 
1355
    int position;                /* Caret offset within pre-edit string */
 
1356
    XIMCaretDirection direction; /* Caret moves direction */
 
1357
    XIMCaretStyle style;         /* Feedback of the caret */
 
1358
} XIMPreeditCaretCallbackStruct;
 
1359
 
 
1360
typedef enum {
 
1361
    XIMTextType,
 
1362
    XIMBitmapType
 
1363
} XIMStatusDataType;
 
1364
 
 
1365
typedef struct _XIMStatusDrawCallbackStruct {
 
1366
    XIMStatusDataType type;
 
1367
    union {
 
1368
        XIMText *text;
 
1369
        Pixmap  bitmap;
 
1370
    } data;
 
1371
} XIMStatusDrawCallbackStruct;
 
1372
 
 
1373
typedef struct _XIMHotKeyTrigger {
 
1374
    KeySym       keysym;
 
1375
    int          modifier;
 
1376
    int          modifier_mask;
 
1377
} XIMHotKeyTrigger;
 
1378
 
 
1379
typedef struct _XIMHotKeyTriggers {
 
1380
    int                  num_hot_key;
 
1381
    XIMHotKeyTrigger    *key;
 
1382
} XIMHotKeyTriggers;
 
1383
 
 
1384
typedef unsigned long    XIMHotKeyState;
 
1385
 
 
1386
#define XIMHotKeyStateON        (0x0001L)
 
1387
#define XIMHotKeyStateOFF       (0x0002L)
 
1388
 
 
1389
typedef struct {
 
1390
    unsigned short count_values;
 
1391
    char **supported_values;
 
1392
} XIMValuesList;
 
1393
 
 
1394
_XFUNCPROTOBEGIN
 
1395
 
 
1396
#if defined(WIN32) && !defined(_XLIBINT_)
 
1397
#define _Xdebug (*_Xdebug_p)
 
1398
#endif
 
1399
 
 
1400
extern int _Xdebug;
 
1401
 
 
1402
extern XFontStruct *XLoadQueryFont(
 
1403
    Display*            /* display */,
 
1404
    _Xconst char*       /* name */
 
1405
);
 
1406
 
 
1407
extern XFontStruct *XQueryFont(
 
1408
    Display*            /* display */,
 
1409
    XID                 /* font_ID */
 
1410
);
 
1411
 
 
1412
 
 
1413
extern XTimeCoord *XGetMotionEvents(
 
1414
    Display*            /* display */,
 
1415
    Window              /* w */,
 
1416
    Time                /* start */,
 
1417
    Time                /* stop */,
 
1418
    int*                /* nevents_return */
 
1419
);
 
1420
 
 
1421
extern XModifierKeymap *XDeleteModifiermapEntry(
 
1422
    XModifierKeymap*    /* modmap */,
 
1423
#if NeedWidePrototypes
 
1424
    unsigned int        /* keycode_entry */,
 
1425
#else
 
1426
    KeyCode             /* keycode_entry */,
 
1427
#endif
 
1428
    int                 /* modifier */
 
1429
);
 
1430
 
 
1431
extern XModifierKeymap  *XGetModifierMapping(
 
1432
    Display*            /* display */
 
1433
);
 
1434
 
 
1435
extern XModifierKeymap  *XInsertModifiermapEntry(
 
1436
    XModifierKeymap*    /* modmap */,
 
1437
#if NeedWidePrototypes
 
1438
    unsigned int        /* keycode_entry */,
 
1439
#else
 
1440
    KeyCode             /* keycode_entry */,
 
1441
#endif
 
1442
    int                 /* modifier */
 
1443
);
 
1444
 
 
1445
extern XModifierKeymap *XNewModifiermap(
 
1446
    int                 /* max_keys_per_mod */
 
1447
);
 
1448
 
 
1449
extern XImage *XCreateImage(
 
1450
    Display*            /* display */,
 
1451
    Visual*             /* visual */,
 
1452
    unsigned int        /* depth */,
 
1453
    int                 /* format */,
 
1454
    int                 /* offset */,
 
1455
    char*               /* data */,
 
1456
    unsigned int        /* width */,
 
1457
    unsigned int        /* height */,
 
1458
    int                 /* bitmap_pad */,
 
1459
    int                 /* bytes_per_line */
 
1460
);
 
1461
extern Status XInitImage(
 
1462
    XImage*             /* image */
 
1463
);
 
1464
extern XImage *XGetImage(
 
1465
    Display*            /* display */,
 
1466
    Drawable            /* d */,
 
1467
    int                 /* x */,
 
1468
    int                 /* y */,
 
1469
    unsigned int        /* width */,
 
1470
    unsigned int        /* height */,
 
1471
    unsigned long       /* plane_mask */,
 
1472
    int                 /* format */
 
1473
);
 
1474
extern XImage *XGetSubImage(
 
1475
    Display*            /* display */,
 
1476
    Drawable            /* d */,
 
1477
    int                 /* x */,
 
1478
    int                 /* y */,
 
1479
    unsigned int        /* width */,
 
1480
    unsigned int        /* height */,
 
1481
    unsigned long       /* plane_mask */,
 
1482
    int                 /* format */,
 
1483
    XImage*             /* dest_image */,
 
1484
    int                 /* dest_x */,
 
1485
    int                 /* dest_y */
 
1486
);
 
1487
 
 
1488
/*
 
1489
 * X function declarations.
 
1490
 */
 
1491
extern Display *XOpenDisplay(
 
1492
    _Xconst char*       /* display_name */
 
1493
);
 
1494
 
 
1495
extern void XrmInitialize(
 
1496
    void
 
1497
);
 
1498
 
 
1499
extern char *XFetchBytes(
 
1500
    Display*            /* display */,
 
1501
    int*                /* nbytes_return */
 
1502
);
 
1503
extern char *XFetchBuffer(
 
1504
    Display*            /* display */,
 
1505
    int*                /* nbytes_return */,
 
1506
    int                 /* buffer */
 
1507
);
 
1508
extern char *XGetAtomName(
 
1509
    Display*            /* display */,
 
1510
    Atom                /* atom */
 
1511
);
 
1512
extern Status XGetAtomNames(
 
1513
    Display*            /* dpy */,
 
1514
    Atom*               /* atoms */,
 
1515
    int                 /* count */,
 
1516
    char**              /* names_return */
 
1517
);
 
1518
extern char *XGetDefault(
 
1519
    Display*            /* display */,
 
1520
    _Xconst char*       /* program */,
 
1521
    _Xconst char*       /* option */
 
1522
);
 
1523
extern char *XDisplayName(
 
1524
    _Xconst char*       /* string */
 
1525
);
 
1526
extern char *XKeysymToString(
 
1527
    KeySym              /* keysym */
 
1528
);
 
1529
 
 
1530
extern int (*XSynchronize(
 
1531
    Display*            /* display */,
 
1532
    Bool                /* onoff */
 
1533
))(
 
1534
    Display*            /* display */
 
1535
);
 
1536
extern int (*XSetAfterFunction(
 
1537
    Display*            /* display */,
 
1538
    int (*) (
 
1539
             Display*   /* display */
 
1540
            )           /* procedure */
 
1541
))(
 
1542
    Display*            /* display */
 
1543
);
 
1544
extern Atom XInternAtom(
 
1545
    Display*            /* display */,
 
1546
    _Xconst char*       /* atom_name */,
 
1547
    Bool                /* only_if_exists */
 
1548
);
 
1549
extern Status XInternAtoms(
 
1550
    Display*            /* dpy */,
 
1551
    char**              /* names */,
 
1552
    int                 /* count */,
 
1553
    Bool                /* onlyIfExists */,
 
1554
    Atom*               /* atoms_return */
 
1555
);
 
1556
extern Colormap XCopyColormapAndFree(
 
1557
    Display*            /* display */,
 
1558
    Colormap            /* colormap */
 
1559
);
 
1560
extern Colormap XCreateColormap(
 
1561
    Display*            /* display */,
 
1562
    Window              /* w */,
 
1563
    Visual*             /* visual */,
 
1564
    int                 /* alloc */
 
1565
);
 
1566
extern Cursor XCreatePixmapCursor(
 
1567
    Display*            /* display */,
 
1568
    Pixmap              /* source */,
 
1569
    Pixmap              /* mask */,
 
1570
    XColor*             /* foreground_color */,
 
1571
    XColor*             /* background_color */,
 
1572
    unsigned int        /* x */,
 
1573
    unsigned int        /* y */
 
1574
);
 
1575
extern Cursor XCreateGlyphCursor(
 
1576
    Display*            /* display */,
 
1577
    Font                /* source_font */,
 
1578
    Font                /* mask_font */,
 
1579
    unsigned int        /* source_char */,
 
1580
    unsigned int        /* mask_char */,
 
1581
    XColor _Xconst *    /* foreground_color */,
 
1582
    XColor _Xconst *    /* background_color */
 
1583
);
 
1584
extern Cursor XCreateFontCursor(
 
1585
    Display*            /* display */,
 
1586
    unsigned int        /* shape */
 
1587
);
 
1588
extern Font XLoadFont(
 
1589
    Display*            /* display */,
 
1590
    _Xconst char*       /* name */
 
1591
);
 
1592
extern GC XCreateGC(
 
1593
    Display*            /* display */,
 
1594
    Drawable            /* d */,
 
1595
    unsigned long       /* valuemask */,
 
1596
    XGCValues*          /* values */
 
1597
);
 
1598
extern GContext XGContextFromGC(
 
1599
    GC                  /* gc */
 
1600
);
 
1601
extern void XFlushGC(
 
1602
    Display*            /* display */,
 
1603
    GC                  /* gc */
 
1604
);
 
1605
extern Pixmap XCreatePixmap(
 
1606
    Display*            /* display */,
 
1607
    Drawable            /* d */,
 
1608
    unsigned int        /* width */,
 
1609
    unsigned int        /* height */,
 
1610
    unsigned int        /* depth */
 
1611
);
 
1612
extern Pixmap XCreateBitmapFromData(
 
1613
    Display*            /* display */,
 
1614
    Drawable            /* d */,
 
1615
    _Xconst char*       /* data */,
 
1616
    unsigned int        /* width */,
 
1617
    unsigned int        /* height */
 
1618
);
 
1619
extern Pixmap XCreatePixmapFromBitmapData(
 
1620
    Display*            /* display */,
 
1621
    Drawable            /* d */,
 
1622
    char*               /* data */,
 
1623
    unsigned int        /* width */,
 
1624
    unsigned int        /* height */,
 
1625
    unsigned long       /* fg */,
 
1626
    unsigned long       /* bg */,
 
1627
    unsigned int        /* depth */
 
1628
);
 
1629
extern Window XCreateSimpleWindow(
 
1630
    Display*            /* display */,
 
1631
    Window              /* parent */,
 
1632
    int                 /* x */,
 
1633
    int                 /* y */,
 
1634
    unsigned int        /* width */,
 
1635
    unsigned int        /* height */,
 
1636
    unsigned int        /* border_width */,
 
1637
    unsigned long       /* border */,
 
1638
    unsigned long       /* background */
 
1639
);
 
1640
extern Window XGetSelectionOwner(
 
1641
    Display*            /* display */,
 
1642
    Atom                /* selection */
 
1643
);
 
1644
extern Window XCreateWindow(
 
1645
    Display*            /* display */,
 
1646
    Window              /* parent */,
 
1647
    int                 /* x */,
 
1648
    int                 /* y */,
 
1649
    unsigned int        /* width */,
 
1650
    unsigned int        /* height */,
 
1651
    unsigned int        /* border_width */,
 
1652
    int                 /* depth */,
 
1653
    unsigned int        /* class */,
 
1654
    Visual*             /* visual */,
 
1655
    unsigned long       /* valuemask */,
 
1656
    XSetWindowAttributes*       /* attributes */
 
1657
);
 
1658
extern Colormap *XListInstalledColormaps(
 
1659
    Display*            /* display */,
 
1660
    Window              /* w */,
 
1661
    int*                /* num_return */
 
1662
);
 
1663
extern char **XListFonts(
 
1664
    Display*            /* display */,
 
1665
    _Xconst char*       /* pattern */,
 
1666
    int                 /* maxnames */,
 
1667
    int*                /* actual_count_return */
 
1668
);
 
1669
extern char **XListFontsWithInfo(
 
1670
    Display*            /* display */,
 
1671
    _Xconst char*       /* pattern */,
 
1672
    int                 /* maxnames */,
 
1673
    int*                /* count_return */,
 
1674
    XFontStruct**       /* info_return */
 
1675
);
 
1676
extern char **XGetFontPath(
 
1677
    Display*            /* display */,
 
1678
    int*                /* npaths_return */
 
1679
);
 
1680
extern char **XListExtensions(
 
1681
    Display*            /* display */,
 
1682
    int*                /* nextensions_return */
 
1683
);
 
1684
extern Atom *XListProperties(
 
1685
    Display*            /* display */,
 
1686
    Window              /* w */,
 
1687
    int*                /* num_prop_return */
 
1688
);
 
1689
extern XHostAddress *XListHosts(
 
1690
    Display*            /* display */,
 
1691
    int*                /* nhosts_return */,
 
1692
    Bool*               /* state_return */
 
1693
);
 
1694
extern KeySym XKeycodeToKeysym(
 
1695
    Display*            /* display */,
 
1696
#if NeedWidePrototypes
 
1697
    unsigned int        /* keycode */,
 
1698
#else
 
1699
    KeyCode             /* keycode */,
 
1700
#endif
 
1701
    int                 /* index */
 
1702
);
 
1703
extern KeySym XLookupKeysym(
 
1704
    XKeyEvent*          /* key_event */,
 
1705
    int                 /* index */
 
1706
);
 
1707
extern KeySym *XGetKeyboardMapping(
 
1708
    Display*            /* display */,
 
1709
#if NeedWidePrototypes
 
1710
    unsigned int        /* first_keycode */,
 
1711
#else
 
1712
    KeyCode             /* first_keycode */,
 
1713
#endif
 
1714
    int                 /* keycode_count */,
 
1715
    int*                /* keysyms_per_keycode_return */
 
1716
);
 
1717
extern KeySym XStringToKeysym(
 
1718
    _Xconst char*       /* string */
 
1719
);
 
1720
extern long XMaxRequestSize(
 
1721
    Display*            /* display */
 
1722
);
 
1723
extern long XExtendedMaxRequestSize(
 
1724
    Display*            /* display */
 
1725
);
 
1726
extern char *XResourceManagerString(
 
1727
    Display*            /* display */
 
1728
);
 
1729
extern char *XScreenResourceString(
 
1730
        Screen*         /* screen */
 
1731
);
 
1732
extern unsigned long XDisplayMotionBufferSize(
 
1733
    Display*            /* display */
 
1734
);
 
1735
extern VisualID XVisualIDFromVisual(
 
1736
    Visual*             /* visual */
 
1737
);
 
1738
 
 
1739
/* multithread routines */
 
1740
 
 
1741
extern Status XInitThreads(
 
1742
    void
 
1743
);
 
1744
 
 
1745
extern void XLockDisplay(
 
1746
    Display*            /* display */
 
1747
);
 
1748
 
 
1749
extern void XUnlockDisplay(
 
1750
    Display*            /* display */
 
1751
);
 
1752
 
 
1753
/* routines for dealing with extensions */
 
1754
 
 
1755
extern XExtCodes *XInitExtension(
 
1756
    Display*            /* display */,
 
1757
    _Xconst char*       /* name */
 
1758
);
 
1759
 
 
1760
extern XExtCodes *XAddExtension(
 
1761
    Display*            /* display */
 
1762
);
 
1763
extern XExtData *XFindOnExtensionList(
 
1764
    XExtData**          /* structure */,
 
1765
    int                 /* number */
 
1766
);
 
1767
extern XExtData **XEHeadOfExtensionList(
 
1768
    XEDataObject        /* object */
 
1769
);
 
1770
 
 
1771
/* these are routines for which there are also macros */
 
1772
extern Window XRootWindow(
 
1773
    Display*            /* display */,
 
1774
    int                 /* screen_number */
 
1775
);
 
1776
extern Window XDefaultRootWindow(
 
1777
    Display*            /* display */
 
1778
);
 
1779
extern Window XRootWindowOfScreen(
 
1780
    Screen*             /* screen */
 
1781
);
 
1782
extern Visual *XDefaultVisual(
 
1783
    Display*            /* display */,
 
1784
    int                 /* screen_number */
 
1785
);
 
1786
extern Visual *XDefaultVisualOfScreen(
 
1787
    Screen*             /* screen */
 
1788
);
 
1789
extern GC XDefaultGC(
 
1790
    Display*            /* display */,
 
1791
    int                 /* screen_number */
 
1792
);
 
1793
extern GC XDefaultGCOfScreen(
 
1794
    Screen*             /* screen */
 
1795
);
 
1796
extern unsigned long XBlackPixel(
 
1797
    Display*            /* display */,
 
1798
    int                 /* screen_number */
 
1799
);
 
1800
extern unsigned long XWhitePixel(
 
1801
    Display*            /* display */,
 
1802
    int                 /* screen_number */
 
1803
);
 
1804
extern unsigned long XAllPlanes(
 
1805
    void
 
1806
);
 
1807
extern unsigned long XBlackPixelOfScreen(
 
1808
    Screen*             /* screen */
 
1809
);
 
1810
extern unsigned long XWhitePixelOfScreen(
 
1811
    Screen*             /* screen */
 
1812
);
 
1813
extern unsigned long XNextRequest(
 
1814
    Display*            /* display */
 
1815
);
 
1816
extern unsigned long XLastKnownRequestProcessed(
 
1817
    Display*            /* display */
 
1818
);
 
1819
extern char *XServerVendor(
 
1820
    Display*            /* display */
 
1821
);
 
1822
extern char *XDisplayString(
 
1823
    Display*            /* display */
 
1824
);
 
1825
extern Colormap XDefaultColormap(
 
1826
    Display*            /* display */,
 
1827
    int                 /* screen_number */
 
1828
);
 
1829
extern Colormap XDefaultColormapOfScreen(
 
1830
    Screen*             /* screen */
 
1831
);
 
1832
extern Display *XDisplayOfScreen(
 
1833
    Screen*             /* screen */
 
1834
);
 
1835
extern Screen *XScreenOfDisplay(
 
1836
    Display*            /* display */,
 
1837
    int                 /* screen_number */
 
1838
);
 
1839
extern Screen *XDefaultScreenOfDisplay(
 
1840
    Display*            /* display */
 
1841
);
 
1842
extern long XEventMaskOfScreen(
 
1843
    Screen*             /* screen */
 
1844
);
 
1845
 
 
1846
extern int XScreenNumberOfScreen(
 
1847
    Screen*             /* screen */
 
1848
);
 
1849
 
 
1850
typedef int (*XErrorHandler) (      /* WARNING, this type not in Xlib spec */
 
1851
    Display*            /* display */,
 
1852
    XErrorEvent*        /* error_event */
 
1853
);
 
1854
 
 
1855
extern XErrorHandler XSetErrorHandler (
 
1856
    XErrorHandler       /* handler */
 
1857
);
 
1858
 
 
1859
 
 
1860
typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
 
1861
    Display*            /* display */
 
1862
);
 
1863
 
 
1864
extern XIOErrorHandler XSetIOErrorHandler (
 
1865
    XIOErrorHandler     /* handler */
 
1866
);
 
1867
 
 
1868
 
 
1869
extern XPixmapFormatValues *XListPixmapFormats(
 
1870
    Display*            /* display */,
 
1871
    int*                /* count_return */
 
1872
);
 
1873
extern int *XListDepths(
 
1874
    Display*            /* display */,
 
1875
    int                 /* screen_number */,
 
1876
    int*                /* count_return */
 
1877
);
 
1878
 
 
1879
/* ICCCM routines for things that don't require special include files; */
 
1880
/* other declarations are given in Xutil.h                             */
 
1881
extern Status XReconfigureWMWindow(
 
1882
    Display*            /* display */,
 
1883
    Window              /* w */,
 
1884
    int                 /* screen_number */,
 
1885
    unsigned int        /* mask */,
 
1886
    XWindowChanges*     /* changes */
 
1887
);
 
1888
 
 
1889
extern Status XGetWMProtocols(
 
1890
    Display*            /* display */,
 
1891
    Window              /* w */,
 
1892
    Atom**              /* protocols_return */,
 
1893
    int*                /* count_return */
 
1894
);
 
1895
extern Status XSetWMProtocols(
 
1896
    Display*            /* display */,
 
1897
    Window              /* w */,
 
1898
    Atom*               /* protocols */,
 
1899
    int                 /* count */
 
1900
);
 
1901
extern Status XIconifyWindow(
 
1902
    Display*            /* display */,
 
1903
    Window              /* w */,
 
1904
    int                 /* screen_number */
 
1905
);
 
1906
extern Status XWithdrawWindow(
 
1907
    Display*            /* display */,
 
1908
    Window              /* w */,
 
1909
    int                 /* screen_number */
 
1910
);
 
1911
extern Status XGetCommand(
 
1912
    Display*            /* display */,
 
1913
    Window              /* w */,
 
1914
    char***             /* argv_return */,
 
1915
    int*                /* argc_return */
 
1916
);
 
1917
extern Status XGetWMColormapWindows(
 
1918
    Display*            /* display */,
 
1919
    Window              /* w */,
 
1920
    Window**            /* windows_return */,
 
1921
    int*                /* count_return */
 
1922
);
 
1923
extern Status XSetWMColormapWindows(
 
1924
    Display*            /* display */,
 
1925
    Window              /* w */,
 
1926
    Window*             /* colormap_windows */,
 
1927
    int                 /* count */
 
1928
);
 
1929
extern void XFreeStringList(
 
1930
    char**              /* list */
 
1931
);
 
1932
extern int XSetTransientForHint(
 
1933
    Display*            /* display */,
 
1934
    Window              /* w */,
 
1935
    Window              /* prop_window */
 
1936
);
 
1937
 
 
1938
/* The following are given in alphabetical order */
 
1939
 
 
1940
extern int XActivateScreenSaver(
 
1941
    Display*            /* display */
 
1942
);
 
1943
 
 
1944
extern int XAddHost(
 
1945
    Display*            /* display */,
 
1946
    XHostAddress*       /* host */
 
1947
);
 
1948
 
 
1949
extern int XAddHosts(
 
1950
    Display*            /* display */,
 
1951
    XHostAddress*       /* hosts */,
 
1952
    int                 /* num_hosts */
 
1953
);
 
1954
 
 
1955
extern int XAddToExtensionList(
 
1956
    struct _XExtData**  /* structure */,
 
1957
    XExtData*           /* ext_data */
 
1958
);
 
1959
 
 
1960
extern int XAddToSaveSet(
 
1961
    Display*            /* display */,
 
1962
    Window              /* w */
 
1963
);
 
1964
 
 
1965
extern Status XAllocColor(
 
1966
    Display*            /* display */,
 
1967
    Colormap            /* colormap */,
 
1968
    XColor*             /* screen_in_out */
 
1969
);
 
1970
 
 
1971
extern Status XAllocColorCells(
 
1972
    Display*            /* display */,
 
1973
    Colormap            /* colormap */,
 
1974
    Bool                /* contig */,
 
1975
    unsigned long*      /* plane_masks_return */,
 
1976
    unsigned int        /* nplanes */,
 
1977
    unsigned long*      /* pixels_return */,
 
1978
    unsigned int        /* npixels */
 
1979
);
 
1980
 
 
1981
extern Status XAllocColorPlanes(
 
1982
    Display*            /* display */,
 
1983
    Colormap            /* colormap */,
 
1984
    Bool                /* contig */,
 
1985
    unsigned long*      /* pixels_return */,
 
1986
    int                 /* ncolors */,
 
1987
    int                 /* nreds */,
 
1988
    int                 /* ngreens */,
 
1989
    int                 /* nblues */,
 
1990
    unsigned long*      /* rmask_return */,
 
1991
    unsigned long*      /* gmask_return */,
 
1992
    unsigned long*      /* bmask_return */
 
1993
);
 
1994
 
 
1995
extern Status XAllocNamedColor(
 
1996
    Display*            /* display */,
 
1997
    Colormap            /* colormap */,
 
1998
    _Xconst char*       /* color_name */,
 
1999
    XColor*             /* screen_def_return */,
 
2000
    XColor*             /* exact_def_return */
 
2001
);
 
2002
 
 
2003
extern int XAllowEvents(
 
2004
    Display*            /* display */,
 
2005
    int                 /* event_mode */,
 
2006
    Time                /* time */
 
2007
);
 
2008
 
 
2009
extern int XAutoRepeatOff(
 
2010
    Display*            /* display */
 
2011
);
 
2012
 
 
2013
extern int XAutoRepeatOn(
 
2014
    Display*            /* display */
 
2015
);
 
2016
 
 
2017
extern int XBell(
 
2018
    Display*            /* display */,
 
2019
    int                 /* percent */
 
2020
);
 
2021
 
 
2022
extern int XBitmapBitOrder(
 
2023
    Display*            /* display */
 
2024
);
 
2025
 
 
2026
extern int XBitmapPad(
 
2027
    Display*            /* display */
 
2028
);
 
2029
 
 
2030
extern int XBitmapUnit(
 
2031
    Display*            /* display */
 
2032
);
 
2033
 
 
2034
extern int XCellsOfScreen(
 
2035
    Screen*             /* screen */
 
2036
);
 
2037
 
 
2038
extern int XChangeActivePointerGrab(
 
2039
    Display*            /* display */,
 
2040
    unsigned int        /* event_mask */,
 
2041
    Cursor              /* cursor */,
 
2042
    Time                /* time */
 
2043
);
 
2044
 
 
2045
extern int XChangeGC(
 
2046
    Display*            /* display */,
 
2047
    GC                  /* gc */,
 
2048
    unsigned long       /* valuemask */,
 
2049
    XGCValues*          /* values */
 
2050
);
 
2051
 
 
2052
extern int XChangeKeyboardControl(
 
2053
    Display*            /* display */,
 
2054
    unsigned long       /* value_mask */,
 
2055
    XKeyboardControl*   /* values */
 
2056
);
 
2057
 
 
2058
extern int XChangeKeyboardMapping(
 
2059
    Display*            /* display */,
 
2060
    int                 /* first_keycode */,
 
2061
    int                 /* keysyms_per_keycode */,
 
2062
    KeySym*             /* keysyms */,
 
2063
    int                 /* num_codes */
 
2064
);
 
2065
 
 
2066
extern int XChangePointerControl(
 
2067
    Display*            /* display */,
 
2068
    Bool                /* do_accel */,
 
2069
    Bool                /* do_threshold */,
 
2070
    int                 /* accel_numerator */,
 
2071
    int                 /* accel_denominator */,
 
2072
    int                 /* threshold */
 
2073
);
 
2074
 
 
2075
extern int XChangeProperty(
 
2076
    Display*            /* display */,
 
2077
    Window              /* w */,
 
2078
    Atom                /* property */,
 
2079
    Atom                /* type */,
 
2080
    int                 /* format */,
 
2081
    int                 /* mode */,
 
2082
    _Xconst unsigned char*      /* data */,
 
2083
    int                 /* nelements */
 
2084
);
 
2085
 
 
2086
extern int XChangeSaveSet(
 
2087
    Display*            /* display */,
 
2088
    Window              /* w */,
 
2089
    int                 /* change_mode */
 
2090
);
 
2091
 
 
2092
extern int XChangeWindowAttributes(
 
2093
    Display*            /* display */,
 
2094
    Window              /* w */,
 
2095
    unsigned long       /* valuemask */,
 
2096
    XSetWindowAttributes* /* attributes */
 
2097
);
 
2098
 
 
2099
extern Bool XCheckIfEvent(
 
2100
    Display*            /* display */,
 
2101
    XEvent*             /* event_return */,
 
2102
    Bool (*) (
 
2103
               Display*                 /* display */,
 
2104
               XEvent*                  /* event */,
 
2105
               XPointer                 /* arg */
 
2106
             )          /* predicate */,
 
2107
    XPointer            /* arg */
 
2108
);
 
2109
 
 
2110
extern Bool XCheckMaskEvent(
 
2111
    Display*            /* display */,
 
2112
    long                /* event_mask */,
 
2113
    XEvent*             /* event_return */
 
2114
);
 
2115
 
 
2116
extern Bool XCheckTypedEvent(
 
2117
    Display*            /* display */,
 
2118
    int                 /* event_type */,
 
2119
    XEvent*             /* event_return */
 
2120
);
 
2121
 
 
2122
extern Bool XCheckTypedWindowEvent(
 
2123
    Display*            /* display */,
 
2124
    Window              /* w */,
 
2125
    int                 /* event_type */,
 
2126
    XEvent*             /* event_return */
 
2127
);
 
2128
 
 
2129
extern Bool XCheckWindowEvent(
 
2130
    Display*            /* display */,
 
2131
    Window              /* w */,
 
2132
    long                /* event_mask */,
 
2133
    XEvent*             /* event_return */
 
2134
);
 
2135
 
 
2136
extern int XCirculateSubwindows(
 
2137
    Display*            /* display */,
 
2138
    Window              /* w */,
 
2139
    int                 /* direction */
 
2140
);
 
2141
 
 
2142
extern int XCirculateSubwindowsDown(
 
2143
    Display*            /* display */,
 
2144
    Window              /* w */
 
2145
);
 
2146
 
 
2147
extern int XCirculateSubwindowsUp(
 
2148
    Display*            /* display */,
 
2149
    Window              /* w */
 
2150
);
 
2151
 
 
2152
extern int XClearArea(
 
2153
    Display*            /* display */,
 
2154
    Window              /* w */,
 
2155
    int                 /* x */,
 
2156
    int                 /* y */,
 
2157
    unsigned int        /* width */,
 
2158
    unsigned int        /* height */,
 
2159
    Bool                /* exposures */
 
2160
);
 
2161
 
 
2162
extern int XClearWindow(
 
2163
    Display*            /* display */,
 
2164
    Window              /* w */
 
2165
);
 
2166
 
 
2167
extern int XCloseDisplay(
 
2168
    Display*            /* display */
 
2169
);
 
2170
 
 
2171
extern int XConfigureWindow(
 
2172
    Display*            /* display */,
 
2173
    Window              /* w */,
 
2174
    unsigned int        /* value_mask */,
 
2175
    XWindowChanges*     /* values */
 
2176
);
 
2177
 
 
2178
extern int XConnectionNumber(
 
2179
    Display*            /* display */
 
2180
);
 
2181
 
 
2182
extern int XConvertSelection(
 
2183
    Display*            /* display */,
 
2184
    Atom                /* selection */,
 
2185
    Atom                /* target */,
 
2186
    Atom                /* property */,
 
2187
    Window              /* requestor */,
 
2188
    Time                /* time */
 
2189
);
 
2190
 
 
2191
extern int XCopyArea(
 
2192
    Display*            /* display */,
 
2193
    Drawable            /* src */,
 
2194
    Drawable            /* dest */,
 
2195
    GC                  /* gc */,
 
2196
    int                 /* src_x */,
 
2197
    int                 /* src_y */,
 
2198
    unsigned int        /* width */,
 
2199
    unsigned int        /* height */,
 
2200
    int                 /* dest_x */,
 
2201
    int                 /* dest_y */
 
2202
);
 
2203
 
 
2204
extern int XCopyGC(
 
2205
    Display*            /* display */,
 
2206
    GC                  /* src */,
 
2207
    unsigned long       /* valuemask */,
 
2208
    GC                  /* dest */
 
2209
);
 
2210
 
 
2211
extern int XCopyPlane(
 
2212
    Display*            /* display */,
 
2213
    Drawable            /* src */,
 
2214
    Drawable            /* dest */,
 
2215
    GC                  /* gc */,
 
2216
    int                 /* src_x */,
 
2217
    int                 /* src_y */,
 
2218
    unsigned int        /* width */,
 
2219
    unsigned int        /* height */,
 
2220
    int                 /* dest_x */,
 
2221
    int                 /* dest_y */,
 
2222
    unsigned long       /* plane */
 
2223
);
 
2224
 
 
2225
extern int XDefaultDepth(
 
2226
    Display*            /* display */,
 
2227
    int                 /* screen_number */
 
2228
);
 
2229
 
 
2230
extern int XDefaultDepthOfScreen(
 
2231
    Screen*             /* screen */
 
2232
);
 
2233
 
 
2234
extern int XDefaultScreen(
 
2235
    Display*            /* display */
 
2236
);
 
2237
 
 
2238
extern int XDefineCursor(
 
2239
    Display*            /* display */,
 
2240
    Window              /* w */,
 
2241
    Cursor              /* cursor */
 
2242
);
 
2243
 
 
2244
extern int XDeleteProperty(
 
2245
    Display*            /* display */,
 
2246
    Window              /* w */,
 
2247
    Atom                /* property */
 
2248
);
 
2249
 
 
2250
extern int XDestroyWindow(
 
2251
    Display*            /* display */,
 
2252
    Window              /* w */
 
2253
);
 
2254
 
 
2255
extern int XDestroySubwindows(
 
2256
    Display*            /* display */,
 
2257
    Window              /* w */
 
2258
);
 
2259
 
 
2260
extern int XDoesBackingStore(
 
2261
    Screen*             /* screen */
 
2262
);
 
2263
 
 
2264
extern Bool XDoesSaveUnders(
 
2265
    Screen*             /* screen */
 
2266
);
 
2267
 
 
2268
extern int XDisableAccessControl(
 
2269
    Display*            /* display */
 
2270
);
 
2271
 
 
2272
 
 
2273
extern int XDisplayCells(
 
2274
    Display*            /* display */,
 
2275
    int                 /* screen_number */
 
2276
);
 
2277
 
 
2278
extern int XDisplayHeight(
 
2279
    Display*            /* display */,
 
2280
    int                 /* screen_number */
 
2281
);
 
2282
 
 
2283
extern int XDisplayHeightMM(
 
2284
    Display*            /* display */,
 
2285
    int                 /* screen_number */
 
2286
);
 
2287
 
 
2288
extern int XDisplayKeycodes(
 
2289
    Display*            /* display */,
 
2290
    int*                /* min_keycodes_return */,
 
2291
    int*                /* max_keycodes_return */
 
2292
);
 
2293
 
 
2294
extern int XDisplayPlanes(
 
2295
    Display*            /* display */,
 
2296
    int                 /* screen_number */
 
2297
);
 
2298
 
 
2299
extern int XDisplayWidth(
 
2300
    Display*            /* display */,
 
2301
    int                 /* screen_number */
 
2302
);
 
2303
 
 
2304
extern int XDisplayWidthMM(
 
2305
    Display*            /* display */,
 
2306
    int                 /* screen_number */
 
2307
);
 
2308
 
 
2309
extern int XDrawArc(
 
2310
    Display*            /* display */,
 
2311
    Drawable            /* d */,
 
2312
    GC                  /* gc */,
 
2313
    int                 /* x */,
 
2314
    int                 /* y */,
 
2315
    unsigned int        /* width */,
 
2316
    unsigned int        /* height */,
 
2317
    int                 /* angle1 */,
 
2318
    int                 /* angle2 */
 
2319
);
 
2320
 
 
2321
extern int XDrawArcs(
 
2322
    Display*            /* display */,
 
2323
    Drawable            /* d */,
 
2324
    GC                  /* gc */,
 
2325
    XArc*               /* arcs */,
 
2326
    int                 /* narcs */
 
2327
);
 
2328
 
 
2329
extern int XDrawImageString(
 
2330
    Display*            /* display */,
 
2331
    Drawable            /* d */,
 
2332
    GC                  /* gc */,
 
2333
    int                 /* x */,
 
2334
    int                 /* y */,
 
2335
    _Xconst char*       /* string */,
 
2336
    int                 /* length */
 
2337
);
 
2338
 
 
2339
extern int XDrawImageString16(
 
2340
    Display*            /* display */,
 
2341
    Drawable            /* d */,
 
2342
    GC                  /* gc */,
 
2343
    int                 /* x */,
 
2344
    int                 /* y */,
 
2345
    _Xconst XChar2b*    /* string */,
 
2346
    int                 /* length */
 
2347
);
 
2348
 
 
2349
extern int XDrawLine(
 
2350
    Display*            /* display */,
 
2351
    Drawable            /* d */,
 
2352
    GC                  /* gc */,
 
2353
    int                 /* x1 */,
 
2354
    int                 /* y1 */,
 
2355
    int                 /* x2 */,
 
2356
    int                 /* y2 */
 
2357
);
 
2358
 
 
2359
extern int XDrawLines(
 
2360
    Display*            /* display */,
 
2361
    Drawable            /* d */,
 
2362
    GC                  /* gc */,
 
2363
    XPoint*             /* points */,
 
2364
    int                 /* npoints */,
 
2365
    int                 /* mode */
 
2366
);
 
2367
 
 
2368
extern int XDrawPoint(
 
2369
    Display*            /* display */,
 
2370
    Drawable            /* d */,
 
2371
    GC                  /* gc */,
 
2372
    int                 /* x */,
 
2373
    int                 /* y */
 
2374
);
 
2375
 
 
2376
extern int XDrawPoints(
 
2377
    Display*            /* display */,
 
2378
    Drawable            /* d */,
 
2379
    GC                  /* gc */,
 
2380
    XPoint*             /* points */,
 
2381
    int                 /* npoints */,
 
2382
    int                 /* mode */
 
2383
);
 
2384
 
 
2385
extern int XDrawRectangle(
 
2386
    Display*            /* display */,
 
2387
    Drawable            /* d */,
 
2388
    GC                  /* gc */,
 
2389
    int                 /* x */,
 
2390
    int                 /* y */,
 
2391
    unsigned int        /* width */,
 
2392
    unsigned int        /* height */
 
2393
);
 
2394
 
 
2395
extern int XDrawRectangles(
 
2396
    Display*            /* display */,
 
2397
    Drawable            /* d */,
 
2398
    GC                  /* gc */,
 
2399
    XRectangle*         /* rectangles */,
 
2400
    int                 /* nrectangles */
 
2401
);
 
2402
 
 
2403
extern int XDrawSegments(
 
2404
    Display*            /* display */,
 
2405
    Drawable            /* d */,
 
2406
    GC                  /* gc */,
 
2407
    XSegment*           /* segments */,
 
2408
    int                 /* nsegments */
 
2409
);
 
2410
 
 
2411
extern int XDrawString(
 
2412
    Display*            /* display */,
 
2413
    Drawable            /* d */,
 
2414
    GC                  /* gc */,
 
2415
    int                 /* x */,
 
2416
    int                 /* y */,
 
2417
    _Xconst char*       /* string */,
 
2418
    int                 /* length */
 
2419
);
 
2420
 
 
2421
extern int XDrawString16(
 
2422
    Display*            /* display */,
 
2423
    Drawable            /* d */,
 
2424
    GC                  /* gc */,
 
2425
    int                 /* x */,
 
2426
    int                 /* y */,
 
2427
    _Xconst XChar2b*    /* string */,
 
2428
    int                 /* length */
 
2429
);
 
2430
 
 
2431
extern int XDrawText(
 
2432
    Display*            /* display */,
 
2433
    Drawable            /* d */,
 
2434
    GC                  /* gc */,
 
2435
    int                 /* x */,
 
2436
    int                 /* y */,
 
2437
    XTextItem*          /* items */,
 
2438
    int                 /* nitems */
 
2439
);
 
2440
 
 
2441
extern int XDrawText16(
 
2442
    Display*            /* display */,
 
2443
    Drawable            /* d */,
 
2444
    GC                  /* gc */,
 
2445
    int                 /* x */,
 
2446
    int                 /* y */,
 
2447
    XTextItem16*        /* items */,
 
2448
    int                 /* nitems */
 
2449
);
 
2450
 
 
2451
extern int XEnableAccessControl(
 
2452
    Display*            /* display */
 
2453
);
 
2454
 
 
2455
extern int XEventsQueued(
 
2456
    Display*            /* display */,
 
2457
    int                 /* mode */
 
2458
);
 
2459
 
 
2460
extern Status XFetchName(
 
2461
    Display*            /* display */,
 
2462
    Window              /* w */,
 
2463
    char**              /* window_name_return */
 
2464
);
 
2465
 
 
2466
extern int XFillArc(
 
2467
    Display*            /* display */,
 
2468
    Drawable            /* d */,
 
2469
    GC                  /* gc */,
 
2470
    int                 /* x */,
 
2471
    int                 /* y */,
 
2472
    unsigned int        /* width */,
 
2473
    unsigned int        /* height */,
 
2474
    int                 /* angle1 */,
 
2475
    int                 /* angle2 */
 
2476
);
 
2477
 
 
2478
extern int XFillArcs(
 
2479
    Display*            /* display */,
 
2480
    Drawable            /* d */,
 
2481
    GC                  /* gc */,
 
2482
    XArc*               /* arcs */,
 
2483
    int                 /* narcs */
 
2484
);
 
2485
 
 
2486
extern int XFillPolygon(
 
2487
    Display*            /* display */,
 
2488
    Drawable            /* d */,
 
2489
    GC                  /* gc */,
 
2490
    XPoint*             /* points */,
 
2491
    int                 /* npoints */,
 
2492
    int                 /* shape */,
 
2493
    int                 /* mode */
 
2494
);
 
2495
 
 
2496
extern int XFillRectangle(
 
2497
    Display*            /* display */,
 
2498
    Drawable            /* d */,
 
2499
    GC                  /* gc */,
 
2500
    int                 /* x */,
 
2501
    int                 /* y */,
 
2502
    unsigned int        /* width */,
 
2503
    unsigned int        /* height */
 
2504
);
 
2505
 
 
2506
extern int XFillRectangles(
 
2507
    Display*            /* display */,
 
2508
    Drawable            /* d */,
 
2509
    GC                  /* gc */,
 
2510
    XRectangle*         /* rectangles */,
 
2511
    int                 /* nrectangles */
 
2512
);
 
2513
 
 
2514
extern int XFlush(
 
2515
    Display*            /* display */
 
2516
);
 
2517
 
 
2518
extern int XForceScreenSaver(
 
2519
    Display*            /* display */,
 
2520
    int                 /* mode */
 
2521
);
 
2522
 
 
2523
extern int XFree(
 
2524
    void*               /* data */
 
2525
);
 
2526
 
 
2527
extern int XFreeColormap(
 
2528
    Display*            /* display */,
 
2529
    Colormap            /* colormap */
 
2530
);
 
2531
 
 
2532
extern int XFreeColors(
 
2533
    Display*            /* display */,
 
2534
    Colormap            /* colormap */,
 
2535
    unsigned long*      /* pixels */,
 
2536
    int                 /* npixels */,
 
2537
    unsigned long       /* planes */
 
2538
);
 
2539
 
 
2540
extern int XFreeCursor(
 
2541
    Display*            /* display */,
 
2542
    Cursor              /* cursor */
 
2543
);
 
2544
 
 
2545
extern int XFreeExtensionList(
 
2546
    char**              /* list */
 
2547
);
 
2548
 
 
2549
extern int XFreeFont(
 
2550
    Display*            /* display */,
 
2551
    XFontStruct*        /* font_struct */
 
2552
);
 
2553
 
 
2554
extern int XFreeFontInfo(
 
2555
    char**              /* names */,
 
2556
    XFontStruct*        /* free_info */,
 
2557
    int                 /* actual_count */
 
2558
);
 
2559
 
 
2560
extern int XFreeFontNames(
 
2561
    char**              /* list */
 
2562
);
 
2563
 
 
2564
extern int XFreeFontPath(
 
2565
    char**              /* list */
 
2566
);
 
2567
 
 
2568
extern int XFreeGC(
 
2569
    Display*            /* display */,
 
2570
    GC                  /* gc */
 
2571
);
 
2572
 
 
2573
extern int XFreeModifiermap(
 
2574
    XModifierKeymap*    /* modmap */
 
2575
);
 
2576
 
 
2577
extern int XFreePixmap(
 
2578
    Display*            /* display */,
 
2579
    Pixmap              /* pixmap */
 
2580
);
 
2581
 
 
2582
extern int XGeometry(
 
2583
    Display*            /* display */,
 
2584
    int                 /* screen */,
 
2585
    _Xconst char*       /* position */,
 
2586
    _Xconst char*       /* default_position */,
 
2587
    unsigned int        /* bwidth */,
 
2588
    unsigned int        /* fwidth */,
 
2589
    unsigned int        /* fheight */,
 
2590
    int                 /* xadder */,
 
2591
    int                 /* yadder */,
 
2592
    int*                /* x_return */,
 
2593
    int*                /* y_return */,
 
2594
    int*                /* width_return */,
 
2595
    int*                /* height_return */
 
2596
);
 
2597
 
 
2598
extern int XGetErrorDatabaseText(
 
2599
    Display*            /* display */,
 
2600
    _Xconst char*       /* name */,
 
2601
    _Xconst char*       /* message */,
 
2602
    _Xconst char*       /* default_string */,
 
2603
    char*               /* buffer_return */,
 
2604
    int                 /* length */
 
2605
);
 
2606
 
 
2607
extern int XGetErrorText(
 
2608
    Display*            /* display */,
 
2609
    int                 /* code */,
 
2610
    char*               /* buffer_return */,
 
2611
    int                 /* length */
 
2612
);
 
2613
 
 
2614
extern Bool XGetFontProperty(
 
2615
    XFontStruct*        /* font_struct */,
 
2616
    Atom                /* atom */,
 
2617
    unsigned long*      /* value_return */
 
2618
);
 
2619
 
 
2620
extern Status XGetGCValues(
 
2621
    Display*            /* display */,
 
2622
    GC                  /* gc */,
 
2623
    unsigned long       /* valuemask */,
 
2624
    XGCValues*          /* values_return */
 
2625
);
 
2626
 
 
2627
extern Status XGetGeometry(
 
2628
    Display*            /* display */,
 
2629
    Drawable            /* d */,
 
2630
    Window*             /* root_return */,
 
2631
    int*                /* x_return */,
 
2632
    int*                /* y_return */,
 
2633
    unsigned int*       /* width_return */,
 
2634
    unsigned int*       /* height_return */,
 
2635
    unsigned int*       /* border_width_return */,
 
2636
    unsigned int*       /* depth_return */
 
2637
);
 
2638
 
 
2639
extern Status XGetIconName(
 
2640
    Display*            /* display */,
 
2641
    Window              /* w */,
 
2642
    char**              /* icon_name_return */
 
2643
);
 
2644
 
 
2645
extern int XGetInputFocus(
 
2646
    Display*            /* display */,
 
2647
    Window*             /* focus_return */,
 
2648
    int*                /* revert_to_return */
 
2649
);
 
2650
 
 
2651
extern int XGetKeyboardControl(
 
2652
    Display*            /* display */,
 
2653
    XKeyboardState*     /* values_return */
 
2654
);
 
2655
 
 
2656
extern int XGetPointerControl(
 
2657
    Display*            /* display */,
 
2658
    int*                /* accel_numerator_return */,
 
2659
    int*                /* accel_denominator_return */,
 
2660
    int*                /* threshold_return */
 
2661
);
 
2662
 
 
2663
extern int XGetPointerMapping(
 
2664
    Display*            /* display */,
 
2665
    unsigned char*      /* map_return */,
 
2666
    int                 /* nmap */
 
2667
);
 
2668
 
 
2669
extern int XGetScreenSaver(
 
2670
    Display*            /* display */,
 
2671
    int*                /* timeout_return */,
 
2672
    int*                /* interval_return */,
 
2673
    int*                /* prefer_blanking_return */,
 
2674
    int*                /* allow_exposures_return */
 
2675
);
 
2676
 
 
2677
extern Status XGetTransientForHint(
 
2678
    Display*            /* display */,
 
2679
    Window              /* w */,
 
2680
    Window*             /* prop_window_return */
 
2681
);
 
2682
 
 
2683
extern int XGetWindowProperty(
 
2684
    Display*            /* display */,
 
2685
    Window              /* w */,
 
2686
    Atom                /* property */,
 
2687
    long                /* long_offset */,
 
2688
    long                /* long_length */,
 
2689
    Bool                /* delete */,
 
2690
    Atom                /* req_type */,
 
2691
    Atom*               /* actual_type_return */,
 
2692
    int*                /* actual_format_return */,
 
2693
    unsigned long*      /* nitems_return */,
 
2694
    unsigned long*      /* bytes_after_return */,
 
2695
    unsigned char**     /* prop_return */
 
2696
);
 
2697
 
 
2698
extern Status XGetWindowAttributes(
 
2699
    Display*            /* display */,
 
2700
    Window              /* w */,
 
2701
    XWindowAttributes*  /* window_attributes_return */
 
2702
);
 
2703
 
 
2704
extern int XGrabButton(
 
2705
    Display*            /* display */,
 
2706
    unsigned int        /* button */,
 
2707
    unsigned int        /* modifiers */,
 
2708
    Window              /* grab_window */,
 
2709
    Bool                /* owner_events */,
 
2710
    unsigned int        /* event_mask */,
 
2711
    int                 /* pointer_mode */,
 
2712
    int                 /* keyboard_mode */,
 
2713
    Window              /* confine_to */,
 
2714
    Cursor              /* cursor */
 
2715
);
 
2716
 
 
2717
extern int XGrabKey(
 
2718
    Display*            /* display */,
 
2719
    int                 /* keycode */,
 
2720
    unsigned int        /* modifiers */,
 
2721
    Window              /* grab_window */,
 
2722
    Bool                /* owner_events */,
 
2723
    int                 /* pointer_mode */,
 
2724
    int                 /* keyboard_mode */
 
2725
);
 
2726
 
 
2727
extern int XGrabKeyboard(
 
2728
    Display*            /* display */,
 
2729
    Window              /* grab_window */,
 
2730
    Bool                /* owner_events */,
 
2731
    int                 /* pointer_mode */,
 
2732
    int                 /* keyboard_mode */,
 
2733
    Time                /* time */
 
2734
);
 
2735
 
 
2736
extern int XGrabPointer(
 
2737
    Display*            /* display */,
 
2738
    Window              /* grab_window */,
 
2739
    Bool                /* owner_events */,
 
2740
    unsigned int        /* event_mask */,
 
2741
    int                 /* pointer_mode */,
 
2742
    int                 /* keyboard_mode */,
 
2743
    Window              /* confine_to */,
 
2744
    Cursor              /* cursor */,
 
2745
    Time                /* time */
 
2746
);
 
2747
 
 
2748
extern int XGrabServer(
 
2749
    Display*            /* display */
 
2750
);
 
2751
 
 
2752
extern int XHeightMMOfScreen(
 
2753
    Screen*             /* screen */
 
2754
);
 
2755
 
 
2756
extern int XHeightOfScreen(
 
2757
    Screen*             /* screen */
 
2758
);
 
2759
 
 
2760
extern int XIfEvent(
 
2761
    Display*            /* display */,
 
2762
    XEvent*             /* event_return */,
 
2763
    Bool (*) (
 
2764
               Display*                 /* display */,
 
2765
               XEvent*                  /* event */,
 
2766
               XPointer                 /* arg */
 
2767
             )          /* predicate */,
 
2768
    XPointer            /* arg */
 
2769
);
 
2770
 
 
2771
extern int XImageByteOrder(
 
2772
    Display*            /* display */
 
2773
);
 
2774
 
 
2775
extern int XInstallColormap(
 
2776
    Display*            /* display */,
 
2777
    Colormap            /* colormap */
 
2778
);
 
2779
 
 
2780
extern KeyCode XKeysymToKeycode(
 
2781
    Display*            /* display */,
 
2782
    KeySym              /* keysym */
 
2783
);
 
2784
 
 
2785
extern int XKillClient(
 
2786
    Display*            /* display */,
 
2787
    XID                 /* resource */
 
2788
);
 
2789
 
 
2790
extern Status XLookupColor(
 
2791
    Display*            /* display */,
 
2792
    Colormap            /* colormap */,
 
2793
    _Xconst char*       /* color_name */,
 
2794
    XColor*             /* exact_def_return */,
 
2795
    XColor*             /* screen_def_return */
 
2796
);
 
2797
 
 
2798
extern int XLowerWindow(
 
2799
    Display*            /* display */,
 
2800
    Window              /* w */
 
2801
);
 
2802
 
 
2803
extern int XMapRaised(
 
2804
    Display*            /* display */,
 
2805
    Window              /* w */
 
2806
);
 
2807
 
 
2808
extern int XMapSubwindows(
 
2809
    Display*            /* display */,
 
2810
    Window              /* w */
 
2811
);
 
2812
 
 
2813
extern int XMapWindow(
 
2814
    Display*            /* display */,
 
2815
    Window              /* w */
 
2816
);
 
2817
 
 
2818
extern int XMaskEvent(
 
2819
    Display*            /* display */,
 
2820
    long                /* event_mask */,
 
2821
    XEvent*             /* event_return */
 
2822
);
 
2823
 
 
2824
extern int XMaxCmapsOfScreen(
 
2825
    Screen*             /* screen */
 
2826
);
 
2827
 
 
2828
extern int XMinCmapsOfScreen(
 
2829
    Screen*             /* screen */
 
2830
);
 
2831
 
 
2832
extern int XMoveResizeWindow(
 
2833
    Display*            /* display */,
 
2834
    Window              /* w */,
 
2835
    int                 /* x */,
 
2836
    int                 /* y */,
 
2837
    unsigned int        /* width */,
 
2838
    unsigned int        /* height */
 
2839
);
 
2840
 
 
2841
extern int XMoveWindow(
 
2842
    Display*            /* display */,
 
2843
    Window              /* w */,
 
2844
    int                 /* x */,
 
2845
    int                 /* y */
 
2846
);
 
2847
 
 
2848
extern int XNextEvent(
 
2849
    Display*            /* display */,
 
2850
    XEvent*             /* event_return */
 
2851
);
 
2852
 
 
2853
extern int XNoOp(
 
2854
    Display*            /* display */
 
2855
);
 
2856
 
 
2857
extern Status XParseColor(
 
2858
    Display*            /* display */,
 
2859
    Colormap            /* colormap */,
 
2860
    _Xconst char*       /* spec */,
 
2861
    XColor*             /* exact_def_return */
 
2862
);
 
2863
 
 
2864
extern int XParseGeometry(
 
2865
    _Xconst char*       /* parsestring */,
 
2866
    int*                /* x_return */,
 
2867
    int*                /* y_return */,
 
2868
    unsigned int*       /* width_return */,
 
2869
    unsigned int*       /* height_return */
 
2870
);
 
2871
 
 
2872
extern int XPeekEvent(
 
2873
    Display*            /* display */,
 
2874
    XEvent*             /* event_return */
 
2875
);
 
2876
 
 
2877
extern int XPeekIfEvent(
 
2878
    Display*            /* display */,
 
2879
    XEvent*             /* event_return */,
 
2880
    Bool (*) (
 
2881
               Display*         /* display */,
 
2882
               XEvent*          /* event */,
 
2883
               XPointer         /* arg */
 
2884
             )          /* predicate */,
 
2885
    XPointer            /* arg */
 
2886
);
 
2887
 
 
2888
extern int XPending(
 
2889
    Display*            /* display */
 
2890
);
 
2891
 
 
2892
extern int XPlanesOfScreen(
 
2893
    Screen*             /* screen */
 
2894
);
 
2895
 
 
2896
extern int XProtocolRevision(
 
2897
    Display*            /* display */
 
2898
);
 
2899
 
 
2900
extern int XProtocolVersion(
 
2901
    Display*            /* display */
 
2902
);
 
2903
 
 
2904
 
 
2905
extern int XPutBackEvent(
 
2906
    Display*            /* display */,
 
2907
    XEvent*             /* event */
 
2908
);
 
2909
 
 
2910
extern int XPutImage(
 
2911
    Display*            /* display */,
 
2912
    Drawable            /* d */,
 
2913
    GC                  /* gc */,
 
2914
    XImage*             /* image */,
 
2915
    int                 /* src_x */,
 
2916
    int                 /* src_y */,
 
2917
    int                 /* dest_x */,
 
2918
    int                 /* dest_y */,
 
2919
    unsigned int        /* width */,
 
2920
    unsigned int        /* height */
 
2921
);
 
2922
 
 
2923
extern int XQLength(
 
2924
    Display*            /* display */
 
2925
);
 
2926
 
 
2927
extern Status XQueryBestCursor(
 
2928
    Display*            /* display */,
 
2929
    Drawable            /* d */,
 
2930
    unsigned int        /* width */,
 
2931
    unsigned int        /* height */,
 
2932
    unsigned int*       /* width_return */,
 
2933
    unsigned int*       /* height_return */
 
2934
);
 
2935
 
 
2936
extern Status XQueryBestSize(
 
2937
    Display*            /* display */,
 
2938
    int                 /* class */,
 
2939
    Drawable            /* which_screen */,
 
2940
    unsigned int        /* width */,
 
2941
    unsigned int        /* height */,
 
2942
    unsigned int*       /* width_return */,
 
2943
    unsigned int*       /* height_return */
 
2944
);
 
2945
 
 
2946
extern Status XQueryBestStipple(
 
2947
    Display*            /* display */,
 
2948
    Drawable            /* which_screen */,
 
2949
    unsigned int        /* width */,
 
2950
    unsigned int        /* height */,
 
2951
    unsigned int*       /* width_return */,
 
2952
    unsigned int*       /* height_return */
 
2953
);
 
2954
 
 
2955
extern Status XQueryBestTile(
 
2956
    Display*            /* display */,
 
2957
    Drawable            /* which_screen */,
 
2958
    unsigned int        /* width */,
 
2959
    unsigned int        /* height */,
 
2960
    unsigned int*       /* width_return */,
 
2961
    unsigned int*       /* height_return */
 
2962
);
 
2963
 
 
2964
extern int XQueryColor(
 
2965
    Display*            /* display */,
 
2966
    Colormap            /* colormap */,
 
2967
    XColor*             /* def_in_out */
 
2968
);
 
2969
 
 
2970
extern int XQueryColors(
 
2971
    Display*            /* display */,
 
2972
    Colormap            /* colormap */,
 
2973
    XColor*             /* defs_in_out */,
 
2974
    int                 /* ncolors */
 
2975
);
 
2976
 
 
2977
extern Bool XQueryExtension(
 
2978
    Display*            /* display */,
 
2979
    _Xconst char*       /* name */,
 
2980
    int*                /* major_opcode_return */,
 
2981
    int*                /* first_event_return */,
 
2982
    int*                /* first_error_return */
 
2983
);
 
2984
 
 
2985
extern int XQueryKeymap(
 
2986
    Display*            /* display */,
 
2987
    char [32]           /* keys_return */
 
2988
);
 
2989
 
 
2990
extern Bool XQueryPointer(
 
2991
    Display*            /* display */,
 
2992
    Window              /* w */,
 
2993
    Window*             /* root_return */,
 
2994
    Window*             /* child_return */,
 
2995
    int*                /* root_x_return */,
 
2996
    int*                /* root_y_return */,
 
2997
    int*                /* win_x_return */,
 
2998
    int*                /* win_y_return */,
 
2999
    unsigned int*       /* mask_return */
 
3000
);
 
3001
 
 
3002
extern int XQueryTextExtents(
 
3003
    Display*            /* display */,
 
3004
    XID                 /* font_ID */,
 
3005
    _Xconst char*       /* string */,
 
3006
    int                 /* nchars */,
 
3007
    int*                /* direction_return */,
 
3008
    int*                /* font_ascent_return */,
 
3009
    int*                /* font_descent_return */,
 
3010
    XCharStruct*        /* overall_return */
 
3011
);
 
3012
 
 
3013
extern int XQueryTextExtents16(
 
3014
    Display*            /* display */,
 
3015
    XID                 /* font_ID */,
 
3016
    _Xconst XChar2b*    /* string */,
 
3017
    int                 /* nchars */,
 
3018
    int*                /* direction_return */,
 
3019
    int*                /* font_ascent_return */,
 
3020
    int*                /* font_descent_return */,
 
3021
    XCharStruct*        /* overall_return */
 
3022
);
 
3023
 
 
3024
extern Status XQueryTree(
 
3025
    Display*            /* display */,
 
3026
    Window              /* w */,
 
3027
    Window*             /* root_return */,
 
3028
    Window*             /* parent_return */,
 
3029
    Window**            /* children_return */,
 
3030
    unsigned int*       /* nchildren_return */
 
3031
);
 
3032
 
 
3033
extern int XRaiseWindow(
 
3034
    Display*            /* display */,
 
3035
    Window              /* w */
 
3036
);
 
3037
 
 
3038
extern int XReadBitmapFile(
 
3039
    Display*            /* display */,
 
3040
    Drawable            /* d */,
 
3041
    _Xconst char*       /* filename */,
 
3042
    unsigned int*       /* width_return */,
 
3043
    unsigned int*       /* height_return */,
 
3044
    Pixmap*             /* bitmap_return */,
 
3045
    int*                /* x_hot_return */,
 
3046
    int*                /* y_hot_return */
 
3047
);
 
3048
 
 
3049
extern int XReadBitmapFileData(
 
3050
    _Xconst char*       /* filename */,
 
3051
    unsigned int*       /* width_return */,
 
3052
    unsigned int*       /* height_return */,
 
3053
    unsigned char**     /* data_return */,
 
3054
    int*                /* x_hot_return */,
 
3055
    int*                /* y_hot_return */
 
3056
);
 
3057
 
 
3058
extern int XRebindKeysym(
 
3059
    Display*            /* display */,
 
3060
    KeySym              /* keysym */,
 
3061
    KeySym*             /* list */,
 
3062
    int                 /* mod_count */,
 
3063
    _Xconst unsigned char*      /* string */,
 
3064
    int                 /* bytes_string */
 
3065
);
 
3066
 
 
3067
extern int XRecolorCursor(
 
3068
    Display*            /* display */,
 
3069
    Cursor              /* cursor */,
 
3070
    XColor*             /* foreground_color */,
 
3071
    XColor*             /* background_color */
 
3072
);
 
3073
 
 
3074
extern int XRefreshKeyboardMapping(
 
3075
    XMappingEvent*      /* event_map */
 
3076
);
 
3077
 
 
3078
extern int XRemoveFromSaveSet(
 
3079
    Display*            /* display */,
 
3080
    Window              /* w */
 
3081
);
 
3082
 
 
3083
extern int XRemoveHost(
 
3084
    Display*            /* display */,
 
3085
    XHostAddress*       /* host */
 
3086
);
 
3087
 
 
3088
extern int XRemoveHosts(
 
3089
    Display*            /* display */,
 
3090
    XHostAddress*       /* hosts */,
 
3091
    int                 /* num_hosts */
 
3092
);
 
3093
 
 
3094
extern int XReparentWindow(
 
3095
    Display*            /* display */,
 
3096
    Window              /* w */,
 
3097
    Window              /* parent */,
 
3098
    int                 /* x */,
 
3099
    int                 /* y */
 
3100
);
 
3101
 
 
3102
extern int XResetScreenSaver(
 
3103
    Display*            /* display */
 
3104
);
 
3105
 
 
3106
extern int XResizeWindow(
 
3107
    Display*            /* display */,
 
3108
    Window              /* w */,
 
3109
    unsigned int        /* width */,
 
3110
    unsigned int        /* height */
 
3111
);
 
3112
 
 
3113
extern int XRestackWindows(
 
3114
    Display*            /* display */,
 
3115
    Window*             /* windows */,
 
3116
    int                 /* nwindows */
 
3117
);
 
3118
 
 
3119
extern int XRotateBuffers(
 
3120
    Display*            /* display */,
 
3121
    int                 /* rotate */
 
3122
);
 
3123
 
 
3124
extern int XRotateWindowProperties(
 
3125
    Display*            /* display */,
 
3126
    Window              /* w */,
 
3127
    Atom*               /* properties */,
 
3128
    int                 /* num_prop */,
 
3129
    int                 /* npositions */
 
3130
);
 
3131
 
 
3132
extern int XScreenCount(
 
3133
    Display*            /* display */
 
3134
);
 
3135
 
 
3136
extern int XSelectInput(
 
3137
    Display*            /* display */,
 
3138
    Window              /* w */,
 
3139
    long                /* event_mask */
 
3140
);
 
3141
 
 
3142
extern Status XSendEvent(
 
3143
    Display*            /* display */,
 
3144
    Window              /* w */,
 
3145
    Bool                /* propagate */,
 
3146
    long                /* event_mask */,
 
3147
    XEvent*             /* event_send */
 
3148
);
 
3149
 
 
3150
extern int XSetAccessControl(
 
3151
    Display*            /* display */,
 
3152
    int                 /* mode */
 
3153
);
 
3154
 
 
3155
extern int XSetArcMode(
 
3156
    Display*            /* display */,
 
3157
    GC                  /* gc */,
 
3158
    int                 /* arc_mode */
 
3159
);
 
3160
 
 
3161
extern int XSetBackground(
 
3162
    Display*            /* display */,
 
3163
    GC                  /* gc */,
 
3164
    unsigned long       /* background */
 
3165
);
 
3166
 
 
3167
extern int XSetClipMask(
 
3168
    Display*            /* display */,
 
3169
    GC                  /* gc */,
 
3170
    Pixmap              /* pixmap */
 
3171
);
 
3172
 
 
3173
extern int XSetClipOrigin(
 
3174
    Display*            /* display */,
 
3175
    GC                  /* gc */,
 
3176
    int                 /* clip_x_origin */,
 
3177
    int                 /* clip_y_origin */
 
3178
);
 
3179
 
 
3180
extern int XSetClipRectangles(
 
3181
    Display*            /* display */,
 
3182
    GC                  /* gc */,
 
3183
    int                 /* clip_x_origin */,
 
3184
    int                 /* clip_y_origin */,
 
3185
    XRectangle*         /* rectangles */,
 
3186
    int                 /* n */,
 
3187
    int                 /* ordering */
 
3188
);
 
3189
 
 
3190
extern int XSetCloseDownMode(
 
3191
    Display*            /* display */,
 
3192
    int                 /* close_mode */
 
3193
);
 
3194
 
 
3195
extern int XSetCommand(
 
3196
    Display*            /* display */,
 
3197
    Window              /* w */,
 
3198
    char**              /* argv */,
 
3199
    int                 /* argc */
 
3200
);
 
3201
 
 
3202
extern int XSetDashes(
 
3203
    Display*            /* display */,
 
3204
    GC                  /* gc */,
 
3205
    int                 /* dash_offset */,
 
3206
    _Xconst char*       /* dash_list */,
 
3207
    int                 /* n */
 
3208
);
 
3209
 
 
3210
extern int XSetFillRule(
 
3211
    Display*            /* display */,
 
3212
    GC                  /* gc */,
 
3213
    int                 /* fill_rule */
 
3214
);
 
3215
 
 
3216
extern int XSetFillStyle(
 
3217
    Display*            /* display */,
 
3218
    GC                  /* gc */,
 
3219
    int                 /* fill_style */
 
3220
);
 
3221
 
 
3222
extern int XSetFont(
 
3223
    Display*            /* display */,
 
3224
    GC                  /* gc */,
 
3225
    Font                /* font */
 
3226
);
 
3227
 
 
3228
extern int XSetFontPath(
 
3229
    Display*            /* display */,
 
3230
    char**              /* directories */,
 
3231
    int                 /* ndirs */
 
3232
);
 
3233
 
 
3234
extern int XSetForeground(
 
3235
    Display*            /* display */,
 
3236
    GC                  /* gc */,
 
3237
    unsigned long       /* foreground */
 
3238
);
 
3239
 
 
3240
extern int XSetFunction(
 
3241
    Display*            /* display */,
 
3242
    GC                  /* gc */,
 
3243
    int                 /* function */
 
3244
);
 
3245
 
 
3246
extern int XSetGraphicsExposures(
 
3247
    Display*            /* display */,
 
3248
    GC                  /* gc */,
 
3249
    Bool                /* graphics_exposures */
 
3250
);
 
3251
 
 
3252
extern int XSetIconName(
 
3253
    Display*            /* display */,
 
3254
    Window              /* w */,
 
3255
    _Xconst char*       /* icon_name */
 
3256
);
 
3257
 
 
3258
extern int XSetInputFocus(
 
3259
    Display*            /* display */,
 
3260
    Window              /* focus */,
 
3261
    int                 /* revert_to */,
 
3262
    Time                /* time */
 
3263
);
 
3264
 
 
3265
extern int XSetLineAttributes(
 
3266
    Display*            /* display */,
 
3267
    GC                  /* gc */,
 
3268
    unsigned int        /* line_width */,
 
3269
    int                 /* line_style */,
 
3270
    int                 /* cap_style */,
 
3271
    int                 /* join_style */
 
3272
);
 
3273
 
 
3274
extern int XSetModifierMapping(
 
3275
    Display*            /* display */,
 
3276
    XModifierKeymap*    /* modmap */
 
3277
);
 
3278
 
 
3279
extern int XSetPlaneMask(
 
3280
    Display*            /* display */,
 
3281
    GC                  /* gc */,
 
3282
    unsigned long       /* plane_mask */
 
3283
);
 
3284
 
 
3285
extern int XSetPointerMapping(
 
3286
    Display*            /* display */,
 
3287
    _Xconst unsigned char*      /* map */,
 
3288
    int                 /* nmap */
 
3289
);
 
3290
 
 
3291
extern int XSetScreenSaver(
 
3292
    Display*            /* display */,
 
3293
    int                 /* timeout */,
 
3294
    int                 /* interval */,
 
3295
    int                 /* prefer_blanking */,
 
3296
    int                 /* allow_exposures */
 
3297
);
 
3298
 
 
3299
extern int XSetSelectionOwner(
 
3300
    Display*            /* display */,
 
3301
    Atom                /* selection */,
 
3302
    Window              /* owner */,
 
3303
    Time                /* time */
 
3304
);
 
3305
 
 
3306
extern int XSetState(
 
3307
    Display*            /* display */,
 
3308
    GC                  /* gc */,
 
3309
    unsigned long       /* foreground */,
 
3310
    unsigned long       /* background */,
 
3311
    int                 /* function */,
 
3312
    unsigned long       /* plane_mask */
 
3313
);
 
3314
 
 
3315
extern int XSetStipple(
 
3316
    Display*            /* display */,
 
3317
    GC                  /* gc */,
 
3318
    Pixmap              /* stipple */
 
3319
);
 
3320
 
 
3321
extern int XSetSubwindowMode(
 
3322
    Display*            /* display */,
 
3323
    GC                  /* gc */,
 
3324
    int                 /* subwindow_mode */
 
3325
);
 
3326
 
 
3327
extern int XSetTSOrigin(
 
3328
    Display*            /* display */,
 
3329
    GC                  /* gc */,
 
3330
    int                 /* ts_x_origin */,
 
3331
    int                 /* ts_y_origin */
 
3332
);
 
3333
 
 
3334
extern int XSetTile(
 
3335
    Display*            /* display */,
 
3336
    GC                  /* gc */,
 
3337
    Pixmap              /* tile */
 
3338
);
 
3339
 
 
3340
extern int XSetWindowBackground(
 
3341
    Display*            /* display */,
 
3342
    Window              /* w */,
 
3343
    unsigned long       /* background_pixel */
 
3344
);
 
3345
 
 
3346
extern int XSetWindowBackgroundPixmap(
 
3347
    Display*            /* display */,
 
3348
    Window              /* w */,
 
3349
    Pixmap              /* background_pixmap */
 
3350
);
 
3351
 
 
3352
extern int XSetWindowBorder(
 
3353
    Display*            /* display */,
 
3354
    Window              /* w */,
 
3355
    unsigned long       /* border_pixel */
 
3356
);
 
3357
 
 
3358
extern int XSetWindowBorderPixmap(
 
3359
    Display*            /* display */,
 
3360
    Window              /* w */,
 
3361
    Pixmap              /* border_pixmap */
 
3362
);
 
3363
 
 
3364
extern int XSetWindowBorderWidth(
 
3365
    Display*            /* display */,
 
3366
    Window              /* w */,
 
3367
    unsigned int        /* width */
 
3368
);
 
3369
 
 
3370
extern int XSetWindowColormap(
 
3371
    Display*            /* display */,
 
3372
    Window              /* w */,
 
3373
    Colormap            /* colormap */
 
3374
);
 
3375
 
 
3376
extern int XStoreBuffer(
 
3377
    Display*            /* display */,
 
3378
    _Xconst char*       /* bytes */,
 
3379
    int                 /* nbytes */,
 
3380
    int                 /* buffer */
 
3381
);
 
3382
 
 
3383
extern int XStoreBytes(
 
3384
    Display*            /* display */,
 
3385
    _Xconst char*       /* bytes */,
 
3386
    int                 /* nbytes */
 
3387
);
 
3388
 
 
3389
extern int XStoreColor(
 
3390
    Display*            /* display */,
 
3391
    Colormap            /* colormap */,
 
3392
    XColor*             /* color */
 
3393
);
 
3394
 
 
3395
extern int XStoreColors(
 
3396
    Display*            /* display */,
 
3397
    Colormap            /* colormap */,
 
3398
    XColor*             /* color */,
 
3399
    int                 /* ncolors */
 
3400
);
 
3401
 
 
3402
extern int XStoreName(
 
3403
    Display*            /* display */,
 
3404
    Window              /* w */,
 
3405
    _Xconst char*       /* window_name */
 
3406
);
 
3407
 
 
3408
extern int XStoreNamedColor(
 
3409
    Display*            /* display */,
 
3410
    Colormap            /* colormap */,
 
3411
    _Xconst char*       /* color */,
 
3412
    unsigned long       /* pixel */,
 
3413
    int                 /* flags */
 
3414
);
 
3415
 
 
3416
extern int XSync(
 
3417
    Display*            /* display */,
 
3418
    Bool                /* discard */
 
3419
);
 
3420
 
 
3421
extern int XTextExtents(
 
3422
    XFontStruct*        /* font_struct */,
 
3423
    _Xconst char*       /* string */,
 
3424
    int                 /* nchars */,
 
3425
    int*                /* direction_return */,
 
3426
    int*                /* font_ascent_return */,
 
3427
    int*                /* font_descent_return */,
 
3428
    XCharStruct*        /* overall_return */
 
3429
);
 
3430
 
 
3431
extern int XTextExtents16(
 
3432
    XFontStruct*        /* font_struct */,
 
3433
    _Xconst XChar2b*    /* string */,
 
3434
    int                 /* nchars */,
 
3435
    int*                /* direction_return */,
 
3436
    int*                /* font_ascent_return */,
 
3437
    int*                /* font_descent_return */,
 
3438
    XCharStruct*        /* overall_return */
 
3439
);
 
3440
 
 
3441
extern int XTextWidth(
 
3442
    XFontStruct*        /* font_struct */,
 
3443
    _Xconst char*       /* string */,
 
3444
    int                 /* count */
 
3445
);
 
3446
 
 
3447
extern int XTextWidth16(
 
3448
    XFontStruct*        /* font_struct */,
 
3449
    _Xconst XChar2b*    /* string */,
 
3450
    int                 /* count */
 
3451
);
 
3452
 
 
3453
extern Bool XTranslateCoordinates(
 
3454
    Display*            /* display */,
 
3455
    Window              /* src_w */,
 
3456
    Window              /* dest_w */,
 
3457
    int                 /* src_x */,
 
3458
    int                 /* src_y */,
 
3459
    int*                /* dest_x_return */,
 
3460
    int*                /* dest_y_return */,
 
3461
    Window*             /* child_return */
 
3462
);
 
3463
 
 
3464
extern int XUndefineCursor(
 
3465
    Display*            /* display */,
 
3466
    Window              /* w */
 
3467
);
 
3468
 
 
3469
extern int XUngrabButton(
 
3470
    Display*            /* display */,
 
3471
    unsigned int        /* button */,
 
3472
    unsigned int        /* modifiers */,
 
3473
    Window              /* grab_window */
 
3474
);
 
3475
 
 
3476
extern int XUngrabKey(
 
3477
    Display*            /* display */,
 
3478
    int                 /* keycode */,
 
3479
    unsigned int        /* modifiers */,
 
3480
    Window              /* grab_window */
 
3481
);
 
3482
 
 
3483
extern int XUngrabKeyboard(
 
3484
    Display*            /* display */,
 
3485
    Time                /* time */
 
3486
);
 
3487
 
 
3488
extern int XUngrabPointer(
 
3489
    Display*            /* display */,
 
3490
    Time                /* time */
 
3491
);
 
3492
 
 
3493
extern int XUngrabServer(
 
3494
    Display*            /* display */
 
3495
);
 
3496
 
 
3497
extern int XUninstallColormap(
 
3498
    Display*            /* display */,
 
3499
    Colormap            /* colormap */
 
3500
);
 
3501
 
 
3502
extern int XUnloadFont(
 
3503
    Display*            /* display */,
 
3504
    Font                /* font */
 
3505
);
 
3506
 
 
3507
extern int XUnmapSubwindows(
 
3508
    Display*            /* display */,
 
3509
    Window              /* w */
 
3510
);
 
3511
 
 
3512
extern int XUnmapWindow(
 
3513
    Display*            /* display */,
 
3514
    Window              /* w */
 
3515
);
 
3516
 
 
3517
extern int XVendorRelease(
 
3518
    Display*            /* display */
 
3519
);
 
3520
 
 
3521
extern int XWarpPointer(
 
3522
    Display*            /* display */,
 
3523
    Window              /* src_w */,
 
3524
    Window              /* dest_w */,
 
3525
    int                 /* src_x */,
 
3526
    int                 /* src_y */,
 
3527
    unsigned int        /* src_width */,
 
3528
    unsigned int        /* src_height */,
 
3529
    int                 /* dest_x */,
 
3530
    int                 /* dest_y */
 
3531
);
 
3532
 
 
3533
extern int XWidthMMOfScreen(
 
3534
    Screen*             /* screen */
 
3535
);
 
3536
 
 
3537
extern int XWidthOfScreen(
 
3538
    Screen*             /* screen */
 
3539
);
 
3540
 
 
3541
extern int XWindowEvent(
 
3542
    Display*            /* display */,
 
3543
    Window              /* w */,
 
3544
    long                /* event_mask */,
 
3545
    XEvent*             /* event_return */
 
3546
);
 
3547
 
 
3548
extern int XWriteBitmapFile(
 
3549
    Display*            /* display */,
 
3550
    _Xconst char*       /* filename */,
 
3551
    Pixmap              /* bitmap */,
 
3552
    unsigned int        /* width */,
 
3553
    unsigned int        /* height */,
 
3554
    int                 /* x_hot */,
 
3555
    int                 /* y_hot */
 
3556
);
 
3557
 
 
3558
extern Bool XSupportsLocale (void);
 
3559
 
 
3560
extern char *XSetLocaleModifiers(
 
3561
    const char*         /* modifier_list */
 
3562
);
 
3563
 
 
3564
extern XOM XOpenOM(
 
3565
    Display*                    /* display */,
 
3566
    struct _XrmHashBucketRec*   /* rdb */,
 
3567
    _Xconst char*               /* res_name */,
 
3568
    _Xconst char*               /* res_class */
 
3569
);
 
3570
 
 
3571
extern Status XCloseOM(
 
3572
    XOM                 /* om */
 
3573
);
 
3574
 
 
3575
extern char *XSetOMValues(
 
3576
    XOM                 /* om */,
 
3577
    ...
 
3578
) _X_SENTINEL(0);
 
3579
 
 
3580
extern char *XGetOMValues(
 
3581
    XOM                 /* om */,
 
3582
    ...
 
3583
) _X_SENTINEL(0);
 
3584
 
 
3585
extern Display *XDisplayOfOM(
 
3586
    XOM                 /* om */
 
3587
);
 
3588
 
 
3589
extern char *XLocaleOfOM(
 
3590
    XOM                 /* om */
 
3591
);
 
3592
 
 
3593
extern XOC XCreateOC(
 
3594
    XOM                 /* om */,
 
3595
    ...
 
3596
) _X_SENTINEL(0);
 
3597
 
 
3598
extern void XDestroyOC(
 
3599
    XOC                 /* oc */
 
3600
);
 
3601
 
 
3602
extern XOM XOMOfOC(
 
3603
    XOC                 /* oc */
 
3604
);
 
3605
 
 
3606
extern char *XSetOCValues(
 
3607
    XOC                 /* oc */,
 
3608
    ...
 
3609
) _X_SENTINEL(0);
 
3610
 
 
3611
extern char *XGetOCValues(
 
3612
    XOC                 /* oc */,
 
3613
    ...
 
3614
) _X_SENTINEL(0);
 
3615
 
 
3616
extern XFontSet XCreateFontSet(
 
3617
    Display*            /* display */,
 
3618
    _Xconst char*       /* base_font_name_list */,
 
3619
    char***             /* missing_charset_list */,
 
3620
    int*                /* missing_charset_count */,
 
3621
    char**              /* def_string */
 
3622
);
 
3623
 
 
3624
extern void XFreeFontSet(
 
3625
    Display*            /* display */,
 
3626
    XFontSet            /* font_set */
 
3627
);
 
3628
 
 
3629
extern int XFontsOfFontSet(
 
3630
    XFontSet            /* font_set */,
 
3631
    XFontStruct***      /* font_struct_list */,
 
3632
    char***             /* font_name_list */
 
3633
);
 
3634
 
 
3635
extern char *XBaseFontNameListOfFontSet(
 
3636
    XFontSet            /* font_set */
 
3637
);
 
3638
 
 
3639
extern char *XLocaleOfFontSet(
 
3640
    XFontSet            /* font_set */
 
3641
);
 
3642
 
 
3643
extern Bool XContextDependentDrawing(
 
3644
    XFontSet            /* font_set */
 
3645
);
 
3646
 
 
3647
extern Bool XDirectionalDependentDrawing(
 
3648
    XFontSet            /* font_set */
 
3649
);
 
3650
 
 
3651
extern Bool XContextualDrawing(
 
3652
    XFontSet            /* font_set */
 
3653
);
 
3654
 
 
3655
extern XFontSetExtents *XExtentsOfFontSet(
 
3656
    XFontSet            /* font_set */
 
3657
);
 
3658
 
 
3659
extern int XmbTextEscapement(
 
3660
    XFontSet            /* font_set */,
 
3661
    _Xconst char*       /* text */,
 
3662
    int                 /* bytes_text */
 
3663
);
 
3664
 
 
3665
extern int XwcTextEscapement(
 
3666
    XFontSet            /* font_set */,
 
3667
    _Xconst wchar_t*    /* text */,
 
3668
    int                 /* num_wchars */
 
3669
);
 
3670
 
 
3671
extern int Xutf8TextEscapement(
 
3672
    XFontSet            /* font_set */,
 
3673
    _Xconst char*       /* text */,
 
3674
    int                 /* bytes_text */
 
3675
);
 
3676
 
 
3677
extern int XmbTextExtents(
 
3678
    XFontSet            /* font_set */,
 
3679
    _Xconst char*       /* text */,
 
3680
    int                 /* bytes_text */,
 
3681
    XRectangle*         /* overall_ink_return */,
 
3682
    XRectangle*         /* overall_logical_return */
 
3683
);
 
3684
 
 
3685
extern int XwcTextExtents(
 
3686
    XFontSet            /* font_set */,
 
3687
    _Xconst wchar_t*    /* text */,
 
3688
    int                 /* num_wchars */,
 
3689
    XRectangle*         /* overall_ink_return */,
 
3690
    XRectangle*         /* overall_logical_return */
 
3691
);
 
3692
 
 
3693
extern int Xutf8TextExtents(
 
3694
    XFontSet            /* font_set */,
 
3695
    _Xconst char*       /* text */,
 
3696
    int                 /* bytes_text */,
 
3697
    XRectangle*         /* overall_ink_return */,
 
3698
    XRectangle*         /* overall_logical_return */
 
3699
);
 
3700
 
 
3701
extern Status XmbTextPerCharExtents(
 
3702
    XFontSet            /* font_set */,
 
3703
    _Xconst char*       /* text */,
 
3704
    int                 /* bytes_text */,
 
3705
    XRectangle*         /* ink_extents_buffer */,
 
3706
    XRectangle*         /* logical_extents_buffer */,
 
3707
    int                 /* buffer_size */,
 
3708
    int*                /* num_chars */,
 
3709
    XRectangle*         /* overall_ink_return */,
 
3710
    XRectangle*         /* overall_logical_return */
 
3711
);
 
3712
 
 
3713
extern Status XwcTextPerCharExtents(
 
3714
    XFontSet            /* font_set */,
 
3715
    _Xconst wchar_t*    /* text */,
 
3716
    int                 /* num_wchars */,
 
3717
    XRectangle*         /* ink_extents_buffer */,
 
3718
    XRectangle*         /* logical_extents_buffer */,
 
3719
    int                 /* buffer_size */,
 
3720
    int*                /* num_chars */,
 
3721
    XRectangle*         /* overall_ink_return */,
 
3722
    XRectangle*         /* overall_logical_return */
 
3723
);
 
3724
 
 
3725
extern Status Xutf8TextPerCharExtents(
 
3726
    XFontSet            /* font_set */,
 
3727
    _Xconst char*       /* text */,
 
3728
    int                 /* bytes_text */,
 
3729
    XRectangle*         /* ink_extents_buffer */,
 
3730
    XRectangle*         /* logical_extents_buffer */,
 
3731
    int                 /* buffer_size */,
 
3732
    int*                /* num_chars */,
 
3733
    XRectangle*         /* overall_ink_return */,
 
3734
    XRectangle*         /* overall_logical_return */
 
3735
);
 
3736
 
 
3737
extern void XmbDrawText(
 
3738
    Display*            /* display */,
 
3739
    Drawable            /* d */,
 
3740
    GC                  /* gc */,
 
3741
    int                 /* x */,
 
3742
    int                 /* y */,
 
3743
    XmbTextItem*        /* text_items */,
 
3744
    int                 /* nitems */
 
3745
);
 
3746
 
 
3747
extern void XwcDrawText(
 
3748
    Display*            /* display */,
 
3749
    Drawable            /* d */,
 
3750
    GC                  /* gc */,
 
3751
    int                 /* x */,
 
3752
    int                 /* y */,
 
3753
    XwcTextItem*        /* text_items */,
 
3754
    int                 /* nitems */
 
3755
);
 
3756
 
 
3757
extern void Xutf8DrawText(
 
3758
    Display*            /* display */,
 
3759
    Drawable            /* d */,
 
3760
    GC                  /* gc */,
 
3761
    int                 /* x */,
 
3762
    int                 /* y */,
 
3763
    XmbTextItem*        /* text_items */,
 
3764
    int                 /* nitems */
 
3765
);
 
3766
 
 
3767
extern void XmbDrawString(
 
3768
    Display*            /* display */,
 
3769
    Drawable            /* d */,
 
3770
    XFontSet            /* font_set */,
 
3771
    GC                  /* gc */,
 
3772
    int                 /* x */,
 
3773
    int                 /* y */,
 
3774
    _Xconst char*       /* text */,
 
3775
    int                 /* bytes_text */
 
3776
);
 
3777
 
 
3778
extern void XwcDrawString(
 
3779
    Display*            /* display */,
 
3780
    Drawable            /* d */,
 
3781
    XFontSet            /* font_set */,
 
3782
    GC                  /* gc */,
 
3783
    int                 /* x */,
 
3784
    int                 /* y */,
 
3785
    _Xconst wchar_t*    /* text */,
 
3786
    int                 /* num_wchars */
 
3787
);
 
3788
 
 
3789
extern void Xutf8DrawString(
 
3790
    Display*            /* display */,
 
3791
    Drawable            /* d */,
 
3792
    XFontSet            /* font_set */,
 
3793
    GC                  /* gc */,
 
3794
    int                 /* x */,
 
3795
    int                 /* y */,
 
3796
    _Xconst char*       /* text */,
 
3797
    int                 /* bytes_text */
 
3798
);
 
3799
 
 
3800
extern void XmbDrawImageString(
 
3801
    Display*            /* display */,
 
3802
    Drawable            /* d */,
 
3803
    XFontSet            /* font_set */,
 
3804
    GC                  /* gc */,
 
3805
    int                 /* x */,
 
3806
    int                 /* y */,
 
3807
    _Xconst char*       /* text */,
 
3808
    int                 /* bytes_text */
 
3809
);
 
3810
 
 
3811
extern void XwcDrawImageString(
 
3812
    Display*            /* display */,
 
3813
    Drawable            /* d */,
 
3814
    XFontSet            /* font_set */,
 
3815
    GC                  /* gc */,
 
3816
    int                 /* x */,
 
3817
    int                 /* y */,
 
3818
    _Xconst wchar_t*    /* text */,
 
3819
    int                 /* num_wchars */
 
3820
);
 
3821
 
 
3822
extern void Xutf8DrawImageString(
 
3823
    Display*            /* display */,
 
3824
    Drawable            /* d */,
 
3825
    XFontSet            /* font_set */,
 
3826
    GC                  /* gc */,
 
3827
    int                 /* x */,
 
3828
    int                 /* y */,
 
3829
    _Xconst char*       /* text */,
 
3830
    int                 /* bytes_text */
 
3831
);
 
3832
 
 
3833
extern XIM XOpenIM(
 
3834
    Display*                    /* dpy */,
 
3835
    struct _XrmHashBucketRec*   /* rdb */,
 
3836
    char*                       /* res_name */,
 
3837
    char*                       /* res_class */
 
3838
);
 
3839
 
 
3840
extern Status XCloseIM(
 
3841
    XIM /* im */
 
3842
);
 
3843
 
 
3844
extern char *XGetIMValues(
 
3845
    XIM /* im */, ...
 
3846
) _X_SENTINEL(0);
 
3847
 
 
3848
extern char *XSetIMValues(
 
3849
    XIM /* im */, ...
 
3850
) _X_SENTINEL(0);
 
3851
 
 
3852
extern Display *XDisplayOfIM(
 
3853
    XIM /* im */
 
3854
);
 
3855
 
 
3856
extern char *XLocaleOfIM(
 
3857
    XIM /* im*/
 
3858
);
 
3859
 
 
3860
extern XIC XCreateIC(
 
3861
    XIM /* im */, ...
 
3862
) _X_SENTINEL(0);
 
3863
 
 
3864
extern void XDestroyIC(
 
3865
    XIC /* ic */
 
3866
);
 
3867
 
 
3868
extern void XSetICFocus(
 
3869
    XIC /* ic */
 
3870
);
 
3871
 
 
3872
extern void XUnsetICFocus(
 
3873
    XIC /* ic */
 
3874
);
 
3875
 
 
3876
extern wchar_t *XwcResetIC(
 
3877
    XIC /* ic */
 
3878
);
 
3879
 
 
3880
extern char *XmbResetIC(
 
3881
    XIC /* ic */
 
3882
);
 
3883
 
 
3884
extern char *Xutf8ResetIC(
 
3885
    XIC /* ic */
 
3886
);
 
3887
 
 
3888
extern char *XSetICValues(
 
3889
    XIC /* ic */, ...
 
3890
) _X_SENTINEL(0);
 
3891
 
 
3892
extern char *XGetICValues(
 
3893
    XIC /* ic */, ...
 
3894
) _X_SENTINEL(0);
 
3895
 
 
3896
extern XIM XIMOfIC(
 
3897
    XIC /* ic */
 
3898
);
 
3899
 
 
3900
extern Bool XFilterEvent(
 
3901
    XEvent*     /* event */,
 
3902
    Window      /* window */
 
3903
);
 
3904
 
 
3905
extern int XmbLookupString(
 
3906
    XIC                 /* ic */,
 
3907
    XKeyPressedEvent*   /* event */,
 
3908
    char*               /* buffer_return */,
 
3909
    int                 /* bytes_buffer */,
 
3910
    KeySym*             /* keysym_return */,
 
3911
    Status*             /* status_return */
 
3912
);
 
3913
 
 
3914
extern int XwcLookupString(
 
3915
    XIC                 /* ic */,
 
3916
    XKeyPressedEvent*   /* event */,
 
3917
    wchar_t*            /* buffer_return */,
 
3918
    int                 /* wchars_buffer */,
 
3919
    KeySym*             /* keysym_return */,
 
3920
    Status*             /* status_return */
 
3921
);
 
3922
 
 
3923
extern int Xutf8LookupString(
 
3924
    XIC                 /* ic */,
 
3925
    XKeyPressedEvent*   /* event */,
 
3926
    char*               /* buffer_return */,
 
3927
    int                 /* bytes_buffer */,
 
3928
    KeySym*             /* keysym_return */,
 
3929
    Status*             /* status_return */
 
3930
);
 
3931
 
 
3932
extern XVaNestedList XVaCreateNestedList(
 
3933
    int /*unused*/, ...
 
3934
) _X_SENTINEL(0);
 
3935
 
 
3936
/* internal connections for IMs */
 
3937
 
 
3938
extern Bool XRegisterIMInstantiateCallback(
 
3939
    Display*                    /* dpy */,
 
3940
    struct _XrmHashBucketRec*   /* rdb */,
 
3941
    char*                       /* res_name */,
 
3942
    char*                       /* res_class */,
 
3943
    XIDProc                     /* callback */,
 
3944
    XPointer                    /* client_data */
 
3945
);
 
3946
 
 
3947
extern Bool XUnregisterIMInstantiateCallback(
 
3948
    Display*                    /* dpy */,
 
3949
    struct _XrmHashBucketRec*   /* rdb */,
 
3950
    char*                       /* res_name */,
 
3951
    char*                       /* res_class */,
 
3952
    XIDProc                     /* callback */,
 
3953
    XPointer                    /* client_data */
 
3954
);
 
3955
 
 
3956
typedef void (*XConnectionWatchProc)(
 
3957
    Display*                    /* dpy */,
 
3958
    XPointer                    /* client_data */,
 
3959
    int                         /* fd */,
 
3960
    Bool                        /* opening */,   /* open or close flag */
 
3961
    XPointer*                   /* watch_data */ /* open sets, close uses */
 
3962
);
 
3963
 
 
3964
 
 
3965
extern Status XInternalConnectionNumbers(
 
3966
    Display*                    /* dpy */,
 
3967
    int**                       /* fd_return */,
 
3968
    int*                        /* count_return */
 
3969
);
 
3970
 
 
3971
extern void XProcessInternalConnection(
 
3972
    Display*                    /* dpy */,
 
3973
    int                         /* fd */
 
3974
);
 
3975
 
 
3976
extern Status XAddConnectionWatch(
 
3977
    Display*                    /* dpy */,
 
3978
    XConnectionWatchProc        /* callback */,
 
3979
    XPointer                    /* client_data */
 
3980
);
 
3981
 
 
3982
extern void XRemoveConnectionWatch(
 
3983
    Display*                    /* dpy */,
 
3984
    XConnectionWatchProc        /* callback */,
 
3985
    XPointer                    /* client_data */
 
3986
);
 
3987
 
 
3988
extern void XSetAuthorization(
 
3989
    char *                      /* name */,
 
3990
    int                         /* namelen */,
 
3991
    char *                      /* data */,
 
3992
    int                         /* datalen */
 
3993
);
 
3994
 
 
3995
extern int _Xmbtowc(
 
3996
    wchar_t *                   /* wstr */,
 
3997
#ifdef ISC
 
3998
    char const *                /* str */,
 
3999
    size_t                      /* len */
 
4000
#else
 
4001
    char *                      /* str */,
 
4002
    int                         /* len */
 
4003
#endif
 
4004
);
 
4005
 
 
4006
extern int _Xwctomb(
 
4007
    char *                      /* str */,
 
4008
    wchar_t                     /* wc */
 
4009
);
 
4010
 
 
4011
extern Bool XGetEventData(
 
4012
    Display*                    /* dpy */,
 
4013
    XGenericEventCookie*        /* cookie*/
 
4014
);
 
4015
 
 
4016
extern void XFreeEventData(
 
4017
    Display*                    /* dpy */,
 
4018
    XGenericEventCookie*        /* cookie*/
 
4019
);
 
4020
 
 
4021
_XFUNCPROTOEND
 
4022
 
 
4023
#endif /* _XLIB_H_ */