OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [xlib/] [X11/] [Xlib.h] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.