Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
#   		 Crown Copyright (c) 1997
2
#   
3
#   This TenDRA(r) Computer Program is subject to Copyright
4
#   owned by the United Kingdom Secretary of State for Defence
5
#   acting through the Defence Evaluation and Research Agency
6
#   (DERA).  It is made available to Recipients with a
7
#   royalty-free licence for its use, reproduction, transfer
8
#   to other parties and amendment for any purpose not excluding
9
#   product development provided that any such use et cetera
10
#   shall be deemed to be acceptance of the following conditions:-
11
#   
12
#       (1) Its Recipients shall ensure that this Notice is
13
#       reproduced upon any copies or amended versions of it;
14
#   
15
#       (2) Any amended version of it shall be clearly marked to
16
#       show both the nature of and the organisation responsible
17
#       for the relevant amendment or amendments;
18
#   
19
#       (3) Its onward transfer from a recipient to another
20
#       party shall be deemed to be that party's acceptance of
21
#       these conditions;
22
#   
23
#       (4) DERA gives no warranty or assurance as to its
24
#       quality or suitability for any purpose and DERA accepts
25
#       no liability whatsoever in relation to any use to which
26
#       it may be put.
27
#
28
# Main Xlib header
29
 
30
+USE "x5/lib", "X11/X.h" ;	# see 1.3
31
+USE "x5/lib", "X11/Xproto.h" (!?) ;
32
+USE "x5/lib", "X11/Xresource.h" (!?) ;
33
+USE "x5/lib", "X11/Xutil.h" (!?) ;
34
 
35
 
36
# Specification version (1.3)
37
 
38
+DEFINE XlibSpecificationRelease 5 ;
39
 
40
 
41
# Miscellaneous types
42
 
43
+SUBSET "types" := {
44
    +USE "x5/lib", "X11/X.h" ;
45
 
46
    # Miscellaneous types
47
    +TYPE ( struct ) Display ;	# see 2.1
48
    +TYPE ( struct ) Visual ;	# see 3.1
49
    +TYPE ( struct ) Screen ;	# see 2.1
50
    +TYPEDEF char *XPointer ;	# see 1.4 (generic?)
51
 
52
    # Transfering Images between Client and Server (8.7)
53
    +TYPE ( struct ) XImage ;
54
 
55
    +FIELD struct funcs := {
56
	XImage *( *create_image ) () ;
57
	int ( *destroy_image ) () ;
58
	unsigned long ( *get_pixel ) () ;
59
	int ( *put_pixel ) () ;
60
	XImage *( *sub_image ) () ;
61
	int ( *add_pixel ) () ;
62
    } ;
63
 
64
    +FIELD XImage := {
65
	int width, height ;
66
	int xoffset ;
67
	int format ;
68
	char *data ;
69
	int byte_order ;
70
	int bitmap_unit ;
71
	int bitmap_bit_order ;
72
	int bitmap_pad ;
73
	int depth ;
74
	int bytes_per_line ;
75
	int bits_per_pixel ;
76
	unsigned long red_mask, green_mask, blue_mask ;
77
	XPointer obdata ;
78
	struct funcs f ;
79
    } ;
80
} ;
81
 
82
+TYPE ~GCRec ;
83
+TYPEDEF ~GCRec *GC ;		# RCA : not specified
84
+TYPE ( struct ) XExtData ;	# see below
85
 
86
+FIELD ( struct ) XColor := {	# see 6.1
87
    unsigned long pixel ;
88
    unsigned short red, green, blue ;
89
    char flags ;
90
    char pad ;
91
} ;
92
 
93
 
94
# Opening the Display (2.1)
95
 
96
+FUNC Display *XOpenDisplay ( char * ) ;
97
 
98
 
99
# Display macros (2.2.1)
100
 
101
+FUNC unsigned long XAllPlanes ( void ) ;
102
+FUNC unsigned long XBlackPixel ( Display *, int ) ;
103
+FUNC unsigned long XWhitePixel ( Display *, int ) ;
104
+FUNC int XConnectionNumber ( Display * ) ;
105
+FUNC Colormap XDefaultColormap ( Display *, int ) ;
106
+FUNC int XDefaultDepth ( Display *, int ) ;
107
+FUNC int *XListDepths ( Display *, int, int * ) ;
108
+FUNC GC XDefaultGC ( Display *, int ) ;
109
+FUNC Window XDefaultRootWindow ( Display * ) ;
110
+FUNC Screen *XDefaultScreenOfDisplay ( Display * ) ;
111
+FUNC Screen *XScreenOfDisplay ( Display *, int ) ;
112
+FUNC int XDefaultScreen ( Display * ) ;
113
+FUNC Visual *XDefaultVisual ( Display *, int ) ;
114
+FUNC int XDisplayCells ( Display *, int ) ;
115
+FUNC int XDisplayPlanes ( Display *, int ) ;
116
+FUNC char *XDisplayString ( Display * ) ;
117
+FUNC long XMaxRequestSize ( Display * ) ;
118
+FUNC unsigned long XLastKnownRequestProcessed ( Display * ) ;
119
+FUNC unsigned long XNextRequest ( Display * ) ;
120
+FUNC int XProtocolVersion ( Display * ) ;
121
+FUNC int XProtocolRevision ( Display * ) ;
122
+FUNC int XQLength ( Display * ) ;
123
+FUNC Window XRootWindow ( Display *, int ) ;
124
+FUNC int XScreenCount ( Display * ) ;
125
+FUNC char *XServerVendor ( Display * ) ;
126
+FUNC int XVendorRelease ( Display * ) ;
127
 
128
+CONST unsigned long AllPlanes ;
129
+MACRO unsigned long BlackPixel ( Display *, int ) ;
130
+MACRO unsigned long WhitePixel ( Display *, int ) ;
131
+MACRO int ConnectionNumber ( Display * ) ;
132
+MACRO Colormap DefaultColormap ( Display *, int ) ;
133
+MACRO int DefaultDepth ( Display *, int ) ;
134
+MACRO GC DefaultGC ( Display *, int ) ;
135
+MACRO Window DefaultRootWindow ( Display * ) ;
136
+MACRO Screen *DefaultScreenOfDisplay ( Display * ) ;
137
+MACRO Screen *ScreenOfDisplay ( Display *, int ) ;
138
+MACRO int DefaultScreen ( Display * ) ;
139
+MACRO Visual *DefaultVisual ( Display *, int ) ;
140
+MACRO int DisplayCells ( Display *, int ) ;
141
+MACRO int DisplayPlanes ( Display *, int ) ;
142
+MACRO char *DisplayString ( Display * ) ;
143
+MACRO unsigned long LastKnownRequestProcessed ( Display * ) ;
144
+MACRO unsigned long NextRequest ( Display * ) ;
145
+MACRO int ProtocolVersion ( Display * ) ;
146
+MACRO int ProtocolRevision ( Display * ) ;
147
+MACRO int QLength ( Display * ) ;
148
+MACRO Window RootWindow ( Display *, int ) ;
149
+MACRO int ScreenCount ( Display * ) ;
150
+MACRO char *ServerVendor ( Display * ) ;
151
+MACRO int VendorRelease ( Display * ) ;
152
 
153
 
154
# Image format functions (2.2.2)
155
 
156
+FIELD ( struct ) XPixmapFormatValues := {
157
    int depth ;
158
    int bits_per_pixel ;
159
    int scanline_pad ;
160
} ;
161
 
162
+FUNC XPixmapFormatValues *XListPixmapFormats ( Display *, int * ) ;
163
 
164
+FUNC int XImageByteOrder ( Display * ) ;
165
+FUNC int XBitmapUnit ( Display * ) ;
166
+FUNC int XBitmapBitOrder ( Display * ) ;
167
+FUNC int XBitmapPad ( Display * ) ;
168
+FUNC int XDisplayHeight ( Display *, int ) ;
169
+FUNC int XDisplayHeightMM ( Display *, int ) ;
170
+FUNC int XDisplayWidth ( Display *, int ) ;
171
+FUNC int XDisplayWidthMM ( Display *, int ) ;
172
 
173
+MACRO int ImageByteOrder ( Display * ) ;
174
+MACRO int BitmapUnit ( Display * ) ;
175
+MACRO int BitmapBitOrder ( Display * ) ;
176
+MACRO int BitmapPad ( Display * ) ;
177
+MACRO int DisplayHeight ( Display *, int ) ;
178
+MACRO int DisplayHeightMM ( Display *, int ) ;
179
+MACRO int DisplayWidth ( Display *, int ) ;
180
+MACRO int DisplayWidthMM ( Display *, int ) ;
181
 
182
 
183
# Screen Information Macros (2.2.3)
184
 
185
+FUNC unsigned long XBlackPixelOfScreen ( Screen * ) ;
186
+FUNC unsigned long XWhitePixelOfScreen ( Screen * ) ;
187
+FUNC int XCellsOfScreen ( Screen * ) ;
188
+FUNC Colormap XDefaultColormapOfScreen ( Screen * ) ;
189
+FUNC int XDefaultDepthOfScreen ( Screen * ) ;
190
+FUNC GC XDefaultGCOfScreen ( Screen * ) ;
191
+FUNC Visual *XDefaultVisualOfScreen ( Screen * ) ;
192
+FUNC int XDoesBackingStore ( Screen * ) ;
193
+FUNC Bool XDoesSaveUnders ( Screen * ) ;
194
+FUNC Display *XDisplayOfScreen ( Screen * ) ;
195
+FUNC int XScreenNumberOfScreen ( Screen * ) ;
196
+FUNC long XEventMaskOfScreen ( Screen * ) ;
197
+FUNC int XWidthOfScreen ( Screen * ) ;
198
+FUNC int XHeightOfScreen ( Screen * ) ;
199
+FUNC int XWidthMMOfScreen ( Screen * ) ;
200
+FUNC int XHeightMMOfScreen ( Screen * ) ;
201
+FUNC int XMaxCmapsOfScreen ( Screen * ) ;
202
+FUNC int XMinCmapsOfScreen ( Screen * ) ;
203
+FUNC int XPlanesOfScreen ( Screen * ) ;
204
+FUNC Window XRootWindowOfScreen ( Screen * ) ;
205
 
206
+MACRO unsigned long BlackPixelOfScreen ( Screen * ) ;
207
+MACRO unsigned long WhitePixelOfScreen ( Screen * ) ;
208
+MACRO int CellsOfScreen ( Screen * ) ;
209
+MACRO Colormap DefaultColormapOfScreen ( Screen * ) ;
210
+MACRO int DefaultDepthOfScreen ( Screen * ) ;
211
+MACRO GC DefaultGCOfScreen ( Screen * ) ;
212
+MACRO Visual *DefaultVisualOfScreen ( Screen * ) ;
213
+MACRO int DoesBackingStore ( Screen * ) ;
214
+MACRO Bool DoesSaveUnders ( Screen * ) ;
215
+MACRO Display *DisplayOfScreen ( Screen * ) ;
216
+MACRO long EventMaskOfScreen ( Screen * ) ;
217
+MACRO int WidthOfScreen ( Screen * ) ;
218
+MACRO int HeightOfScreen ( Screen * ) ;
219
+MACRO int WidthMMOfScreen ( Screen * ) ;
220
+MACRO int HeightMMOfScreen ( Screen * ) ;
221
+MACRO int MaxCmapsOfScreen ( Screen * ) ;
222
+MACRO int MinCmapsOfScreen ( Screen * ) ;
223
+MACRO int PlanesOfScreen ( Screen * ) ;
224
+MACRO Window RootWindowOfScreen ( Screen * ) ;
225
 
226
 
227
# NoOperation Protocol Request (2.3)
228
 
229
+FUNC void XNoOp ( Display * ) ;
230
 
231
 
232
# Freeing data (2.4)
233
 
234
+FUNC void XFree ( void * ) ;
235
 
236
 
237
# Closing the display (2.5)
238
 
239
+FUNC void XCloseDisplay ( Display * ) ;
240
+FUNC void XSetCloseDownMode ( Display *, int ) ;
241
 
242
 
243
# Visual types (3.1)
244
 
245
+FUNC VisualID XVisualIDFromVisual ( Visual * ) ;
246
 
247
 
248
# Window attributes (3.2)
249
 
250
+FIELD ( struct ) XSetWindowAttributes := {
251
    Pixmap background_pixmap ;
252
    unsigned long background_pixel ;
253
    Pixmap border_pixmap ;
254
    unsigned long border_pixel ;
255
    int bit_gravity ;
256
    int win_gravity ;
257
    int backing_store ;
258
    unsigned long backing_planes ;
259
    unsigned long backing_pixel ;
260
    Bool save_under ;
261
    long event_mask ;
262
    long do_not_propagate_mask ;
263
    Bool override_redirect ;
264
    Colormap colormap ;
265
    Cursor cursor ;
266
} ;
267
 
268
 
269
# Creating Windows (3.3)
270
 
271
+FUNC Window XCreateWindow ( Display *, Window, int, int, unsigned int,
272
    unsigned int, unsigned int, int, unsigned int, Visual *, unsigned long,
273
    XSetWindowAttributes * ) ;
274
 
275
+FUNC Window XCreateSimpleWindow ( Display *, Window, int, int, unsigned int,
276
    unsigned int, unsigned int, unsigned long, unsigned long ) ;
277
 
278
 
279
# Destroying Windows (3.4)
280
 
281
+FUNC void XDestroyWindow ( Display *, Window ) ;
282
+FUNC void XDestroySubwindows ( Display *, Window ) ;
283
 
284
 
285
# Mapping Windows (3.5)
286
 
287
+FUNC void XMapWindow ( Display *, Window ) ;
288
+FUNC void XMapRaised ( Display *, Window ) ;
289
+FUNC void XMapSubwindows ( Display *, Window ) ;
290
 
291
 
292
# Unmapping Windows (3.6)
293
 
294
+FUNC void XUnmapWindow ( Display *, Window ) ;
295
+FUNC void XUnmapSubwindows ( Display *, Window ) ;
296
 
297
 
298
# Configuring Windows (3.7)
299
 
300
+FIELD ( struct ) XWindowChanges := {
301
    int x, y ;
302
    int width, height ;
303
    int border_width ;
304
    Window sibling ;
305
    int stack_mode ;
306
} ;
307
 
308
+FUNC void XConfigureWindow ( Display *, Window, unsigned int,
309
    XWindowChanges * ) ;
310
+FUNC void XMoveWindow ( Display *, Window, int, int ) ;
311
+FUNC void XResizeWindow ( Display *, Window, unsigned int, unsigned int ) ;
312
+FUNC void XMoveResizeWindow ( Display *, Window, int, int, unsigned int,
313
    unsigned int ) ;
314
+FUNC void XSetWindowBorderWidth ( Display *, Window, unsigned int ) ;
315
 
316
 
317
# Changing Window Stacking Order (3.8)
318
 
319
+FUNC void XRaiseWindow ( Display *, Window ) ;
320
+FUNC void XLowerWindow ( Display *, Window ) ;
321
+FUNC void XCirculateSubwindows ( Display *, Window, int ) ;
322
+FUNC void XCirculateSubwindowsUp ( Display *, Window ) ;
323
+FUNC void XCirculateSubwindowsDown ( Display *, Window ) ;
324
+FUNC void XRestackWindows ( Display *, Window [], int ) ;
325
 
326
 
327
# Changing Window Attributes (3.9)
328
 
329
+FUNC void XChangeWindowAttributes ( Display *, Window, unsigned long,
330
    XSetWindowAttributes * ) ;
331
+FUNC void XSetWindowBackground ( Display *, Window, unsigned long ) ;
332
+FUNC void XSetWindowBackgroundPixmap ( Display *, Window, Pixmap ) ;
333
+FUNC void XSetWindowBorder ( Display *, Window, unsigned long ) ;
334
+FUNC void XSetWindowBorderPixmap ( Display *, Window, Pixmap ) ;
335
+FUNC void XSetWindowColormap ( Display *, Window, Colormap ) ;
336
+FUNC void XDefineCursor ( Display *, Window, Cursor ) ;
337
+FUNC void XUndefineCursor ( Display *, Window ) ;
338
 
339
 
340
# Obtaining Window Information (4.1)
341
 
342
+FIELD ( struct ) XWindowAttributes := {
343
    int x, y ;
344
    int width, height ;
345
    int border_width ;
346
    int depth ;
347
    Visual *visual ;
348
    Window root ;
349
    int class ;
350
    int bit_gravity ;
351
    int win_gravity ;
352
    int backing_store ;
353
    unsigned long backing_planes ;
354
    unsigned long backing_pixels ;
355
    Bool save_under ;
356
    Colormap colormap ;
357
    Bool map_installed ;
358
    int map_state ;
359
    long all_event_masks ;
360
    long your_event_mask ;
361
    long do_not_propagate_mask ;
362
    Bool override_redirect ;
363
    Screen *screen ;
364
} ;
365
 
366
+FUNC Status XQueryTree ( Display *, Window, Window *, Window *,
367
    Window **, unsigned int * ) ;
368
+FUNC Status XGetWindowAttributes ( Display *, Window, XWindowAttributes * ) ;
369
+FUNC Status XGetGeometry ( Display *, Drawable, Window *, int *, int *,
370
    unsigned int *, unsigned int *, unsigned int *, unsigned int * ) ;
371
 
372
 
373
# Translating Screen Coordinates (4.2)
374
 
375
+FUNC Bool XTranslateCoordinates ( Display *, Window, Window, int, int,
376
    int *, int *, Window * ) ;
377
+FUNC Bool XQueryPointer ( Display *, Window, Window *, Window *, int *,
378
    int *, int *, int *, unsigned int * ) ;
379
 
380
 
381
# Properties and Atoms (4.3)
382
 
383
+FUNC Atom XInternAtom ( Display *, char *, Bool ) ;
384
+FUNC char *XGetAtomName ( Display *, Atom ) ;
385
 
386
 
387
# Obtaining and Changing Window Properties (4.4)
388
 
389
+FUNC int XGetWindowProperty ( Display *, Window, Atom, long, long, Bool,
390
    Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char ** ) ;
391
+FUNC Atom *XListProperties ( Display *, Window, int * ) ;
392
+FUNC void XChangeProperty ( Display *, Window, Atom, Atom, int, int,
393
    unsigned char *, int ) ;
394
+FUNC void XRotateWindowProperties ( Display *, Window, Atom [], int, int ) ;
395
+FUNC void XDeleteProperty ( Display *, Window, Atom ) ;
396
 
397
 
398
# Selections (4.5)
399
 
400
+FUNC void XSetSelectionOwner ( Display *, Atom, Window, Time ) ;
401
+FUNC Window XGetSelectionOwner ( Display *, Atom ) ;
402
+FUNC void XConvertSelection ( Display *, Atom, Atom, Atom, Window, Time ) ;
403
 
404
 
405
# Creating and Freeing Pixmaps (5.1)
406
 
407
+FUNC Pixmap XCreatePixmap ( Display *, Drawable, unsigned int, unsigned int,
408
    unsigned int ) ;
409
+FUNC void XFreePixmap ( Display *, Pixmap ) ;
410
 
411
 
412
# Creating and Freeing Cursors (5.2)
413
 
414
+FUNC Cursor XCreateFontCursor ( Display *, unsigned int ) ;
415
+FUNC Cursor XCreateGlyphCursor ( Display *, Font, Font, unsigned int,
416
    unsigned int, XColor *, XColor * ) ;
417
+FUNC Cursor XCreatePixmapCursor ( Display *, Pixmap, Pixmap, XColor *,
418
    XColor *, unsigned int, unsigned int ) ;
419
+FUNC Status XQueryBestCursor ( Display *, Drawable, unsigned int,
420
    unsigned int, unsigned int *, unsigned int * ) ;
421
+FUNC void XRecolorCursor ( Display *, Cursor, XColor *, XColor * ) ;
422
+FUNC void XFreeCursor ( Display *, Cursor ) ;
423
 
424
 
425
# Creating, Copying and Destroying Colormaps (6.4)
426
 
427
+FUNC Colormap XCreateColormap ( Display *, Window, Visual *, int ) ;
428
+FUNC Colormap XCopyColormapAndFree ( Display *, Colormap ) ;
429
+FUNC void XFreeColormap ( Display *, Colormap ) ;
430
 
431
 
432
# Mapping colour names to values (6.5)
433
 
434
+FUNC Status XLookupColor ( Display *, Colormap, char *, XColor *, XColor * ) ;
435
+FUNC Status XParseColor ( Display *, Colormap, char *, XColor * ) ;
436
 
437
 
438
# Allocating and Freeing Colour cells (6.6)
439
 
440
+FUNC Status XAllocColor ( Display *, Colormap, XColor * ) ;
441
+FUNC Status XAllocNamedColor ( Display *, Colormap, char *, XColor *,
442
    XColor * ) ;
443
+FUNC Status XAllocColorCells ( Display *, Colormap, Bool, unsigned long [],
444
    unsigned int, unsigned long [], unsigned int ) ;
445
+FUNC Status XAllocColorPlanes ( Display *, Colormap, Bool, unsigned long [],
446
    int, int, int, int, unsigned long *, unsigned long *, unsigned long * ) ;
447
+FUNC void XFreeColors ( Display *, Colormap, unsigned long [], int,
448
    unsigned long ) ;
449
 
450
 
451
# Modifying and Querying Colormap Cells (6.7)
452
 
453
+FUNC void XStoreColor ( Display *, Colormap, XColor * ) ;
454
+FUNC void XStoreColors ( Display *, Colormap, XColor [], int ) ;
455
+FUNC void XStoreNamedColor ( Display *, Colormap, char *, unsigned long,
456
    int ) ;
457
+FUNC void XQueryColor ( Display *, Colormap, XColor * ) ;
458
+FUNC void XQueryColors ( Display *, Colormap, XColor [], int ) ;
459
 
460
 
461
# Manipulating GCs (7.1)
462
 
463
+FIELD ( struct ) XGCValues := {
464
    int function ;
465
    unsigned long plane_mask ;
466
    unsigned long foreground ;
467
    unsigned long background ;
468
    int line_width ;
469
    int line_style ;
470
    int cap_style ;
471
    int join_style ;
472
    int fill_style ;
473
    int fill_rule ;
474
    int arc_mode ;
475
    Pixmap tile ;
476
    Pixmap stipple ;
477
    int ts_x_origin ;
478
    int ts_y_origin ;
479
    Font font ;
480
    int subwindow_mode ;
481
    Bool graphics_exposures ;
482
    int clip_x_origin ;
483
    int clip_y_origin ;
484
    Pixmap clip_mask ;
485
    int dash_offset ;
486
    char dashes ;
487
} ;
488
 
489
+FUNC GC XCreateGC ( Display *, Drawable, unsigned long, XGCValues * ) ;
490
+FUNC void XCopyGC ( Display *, GC, unsigned long, GC ) ;
491
+FUNC void XChangeGC ( Display *, GC, unsigned long, XGCValues * ) ;
492
+FUNC Status XGetGCValues ( Display *, GC, unsigned long, XGCValues * ) ;
493
+FUNC void XFreeGC ( Display *, GC ) ;
494
+FUNC GContext XGContextFromGC ( GC ) ;
495
+FUNC void XFlushGC ( Display *, GC ) ;
496
 
497
 
498
# Drawing Points, Lines, Rectangles and Arcs (8.3)
499
 
500
+FIELD ( struct ) XSegment := {
501
    short x1, y1, x2, y2 ;
502
} ;
503
 
504
+FIELD ( struct ) XPoint := {
505
    short x, y ;
506
} ;
507
 
508
+FIELD ( struct ) XRectangle := {
509
    short x, y ;
510
    unsigned short width, height ;
511
} ;
512
 
513
+FIELD ( struct ) XArc := {
514
    short x, y ;
515
    unsigned short width, height ;
516
    short angle1, angle2 ;
517
} ;
518
 
519
 
520
# Setting the Foreground etc of a GC (7.2.1 to 7.2.7)
521
 
522
+FUNC void XSetState ( Display *, GC, unsigned long, unsigned long,
523
    int, unsigned long ) ;
524
+FUNC void XSetForeground ( Display *, GC, unsigned long ) ;
525
+FUNC void XSetBackground ( Display *, GC, unsigned long ) ;
526
+FUNC void XSetFunction ( Display *, GC, int ) ;
527
+FUNC void XSetPlaneMask ( Display *, GC, unsigned long ) ;
528
+FUNC void XSetLineAttributes ( Display *, GC, unsigned int, int, int, int ) ;
529
+FUNC void XSetDashes ( Display *, GC, int, char [], int ) ;
530
+FUNC void XSetFillStyle ( Display *, GC, int ) ;
531
+FUNC void XSetFillRule ( Display *, GC, int ) ;
532
+FUNC Status XQueryBestSize ( Display *, int, Drawable, unsigned int,
533
    unsigned int, unsigned int *, unsigned int * ) ;
534
+FUNC Status XQueryBestTile ( Display *, Drawable, unsigned int,
535
    unsigned int, unsigned int *, unsigned int * ) ;
536
+FUNC Status XQueryBestStipple ( Display *, Drawable, unsigned int,
537
    unsigned int, unsigned int *, unsigned int * ) ;
538
+FUNC void XSetTile ( Display *, GC, Pixmap ) ;
539
+FUNC void XSetStipple ( Display *, GC, Pixmap ) ;
540
+FUNC void XSetTSOrigin ( Display *, GC, int, int ) ;
541
+FUNC void XSetFont ( Display *, GC, Font ) ;
542
+FUNC void XSetClipOrigin ( Display *, GC, int, int ) ;
543
+FUNC void XSetClipMask ( Display *, GC, Pixmap ) ;
544
+FUNC void XSetClipRectangles ( Display *, GC, int, int, XRectangle [],
545
    int, int ) ;
546
+FUNC void XSetArcMode ( Display *, GC, int ) ;
547
+FUNC void XSetSubwindowMode ( Display *, GC, int ) ;
548
+FUNC void XSetGraphicsExposures ( Display *, GC, Bool ) ;
549
 
550
 
551
# Clearing Areas (8.1)
552
 
553
+FUNC void XClearArea ( Display *, Window, int, int, unsigned int,
554
    unsigned int, Bool ) ;
555
+FUNC void XClearWindow ( Display *, Window ) ;
556
 
557
 
558
# Copying Areas (8.2)
559
 
560
+FUNC void XCopyArea ( Display *, Drawable, Drawable, GC, int, int,
561
    unsigned int, unsigned int, int, int ) ;
562
+FUNC void XCopyPlane ( Display *, Drawable, Drawable, GC, int, int,
563
    unsigned int, unsigned int, int, int, unsigned long ) ;
564
 
565
 
566
# Drawing Single and Multiple Points etc (8.3.1 to 8.3.4)
567
 
568
+FUNC void XDrawPoint ( Display *, Drawable, GC, int, int ) ;
569
+FUNC void XDrawPoints ( Display *, Drawable, GC, XPoint *, int, int ) ;
570
+FUNC void XDrawLine ( Display *, Drawable, GC, int, int, int, int ) ;
571
+FUNC void XDrawLines ( Display *, Drawable, GC, XPoint *, int, int ) ;
572
+FUNC void XDrawSegments ( Display *, Drawable, GC, XSegment *, int ) ;
573
+FUNC void XDrawRectangle ( Display *, Drawable, GC, int, int,
574
    unsigned int, unsigned int ) ;
575
+FUNC void XDrawRectangles ( Display *, Drawable, GC, XRectangle [], int ) ;
576
+FUNC void XDrawArc ( Display *, Drawable, GC, int, int, unsigned int,
577
    unsigned int, int, int ) ;
578
+FUNC void XDrawArcs ( Display *, Drawable, GC, XArc *, int ) ;
579
 
580
 
581
# Filling Areas (8.4)
582
 
583
+FUNC void XFillRectangle ( Display *, Drawable, GC, int, int,
584
    unsigned int, unsigned int ) ;
585
+FUNC void XFillRectangles ( Display *, Drawable, GC, XRectangle *, int ) ;
586
+FUNC void XFillPolygon ( Display *, Drawable, GC, XPoint *, int, int, int ) ;
587
+FUNC void XFillArc ( Display *, Drawable, GC, int, int, unsigned int,
588
    unsigned int, int, int ) ;
589
+FUNC void XFillArcs ( Display *, Drawable, GC, XArc *, int ) ;
590
 
591
 
592
# Font Metrics (8.5)
593
 
594
+FIELD ( struct ) XCharStruct := {
595
    short lbearing ;
596
    short rbearing ;
597
    short width ;
598
    short ascent ;
599
    short descent ;
600
    unsigned short attributes ;
601
} ;
602
 
603
+FIELD ( struct ) XFontProp := {
604
    Atom name ;
605
    unsigned long card32 ;
606
} ;
607
 
608
+FIELD ( struct ) XChar2b := {
609
    unsigned char byte1 ;
610
    unsigned char byte2 ;
611
} ;
612
 
613
+FIELD ( struct ) XFontStruct := {
614
    XExtData *ext_data ;
615
    Font fid ;
616
    unsigned direction ;
617
    unsigned min_char_or_byte2 ;
618
    unsigned max_char_or_byte2 ;
619
    unsigned min_byte1 ;
620
    unsigned max_byte1 ;
621
    Bool all_chars_exist ;
622
    unsigned default_char ;
623
    int n_properties ;
624
    XFontProp *properties ;
625
    XCharStruct min_bounds ;
626
    XCharStruct max_bounds ;
627
    XCharStruct *per_char ;
628
    int ascent ;
629
    int descent ;
630
} ;
631
 
632
 
633
# Loading and Freeing Fonts (8.5.1)
634
 
635
+FUNC Font XLoadFont ( Display *, char * ) ;
636
+FUNC XFontStruct *XQueryFont ( Display *, XID ) ;
637
+FUNC XFontStruct *XLoadQueryFont ( Display *, char * ) ;
638
+FUNC void XFreeFont ( Display *, XFontStruct * ) ;
639
+FUNC Bool XGetFontProperty ( XFontStruct *, Atom, unsigned long * ) ;
640
+FUNC void XUnloadFont ( Display *, Font ) ;
641
 
642
 
643
# Obtaining and Freeing Font Names (8.5.2)
644
 
645
+FUNC char **XListFonts ( Display *, char *, int, int * ) ;
646
+FUNC void XFreeFontNames ( char * [] ) ;
647
+FUNC char **XListFontsWithInfo ( Display *, char *, int, int *,
648
    XFontStruct ** ) ;
649
+FUNC void XFreeFontInfo ( char **, XFontStruct *, int ) ;
650
 
651
 
652
# Computing Character String Sizes (8.5.3)
653
 
654
+FUNC int XTextWidth ( XFontStruct *, char *, int ) ;
655
+FUNC int XTextWidth16 ( XFontStruct *, XChar2b *, int ) ;
656
 
657
 
658
# Computing Logical Extents (8.5.4)
659
 
660
+FUNC void XTextExtents ( XFontStruct *, char *, int, int *, int *,
661
    int *, XCharStruct * ) ;
662
+FUNC void XTextExtents16 ( XFontStruct *, XChar2b *, int, int *, int *,
663
    int *, XCharStruct * ) ;
664
 
665
 
666
# Querying Character String Sizes (8.5.5)
667
 
668
+FUNC void XQueryTextExtents ( Display *, XID, char *, int, int *,
669
    int *, int *, XCharStruct * ) ;
670
+FUNC void XQueryTextExtents16 ( Display *, XID, XChar2b *, int, int *,
671
    int *, int *, XCharStruct * ) ;
672
 
673
 
674
# Drawing Text (8.6)
675
 
676
+FIELD ( struct ) XTextItem := {
677
    char *chars ;
678
    int nchars ;
679
    int delta ;
680
    Font font ;
681
} ;
682
 
683
+FIELD ( struct ) XTextItem16 := {
684
    XChar2b *chars ;
685
    int nchars ;
686
    int delta ;
687
    Font font ;
688
} ;
689
 
690
 
691
# Drawing Complex Text (8.6.1)
692
 
693
+FUNC void XDrawText ( Display *, Drawable, GC, int, int, XTextItem *, int ) ;
694
+FUNC void XDrawText16 ( Display *, Drawable, GC, int, int, XTextItem16 *,
695
    int ) ;
696
 
697
 
698
# Drawing Text Characters (8.6.2)
699
 
700
+FUNC void XDrawString ( Display *, Drawable, GC, int, int, char *, int ) ;
701
+FUNC void XDrawString16 ( Display *, Drawable, GC, int, int, XChar2b *,
702
    int ) ;
703
 
704
 
705
# Drawing Image Text Characters (8.6.3)
706
 
707
+FUNC void XDrawImageString ( Display *, Drawable, GC, int, int,
708
    char *, int ) ;
709
+FUNC void XDrawImageString16 ( Display *, Drawable, GC, int, int,
710
    XChar2b *, int ) ;
711
 
712
 
713
# Transfering Images between Client and Server (8.7)
714
 
715
+FUNC void XPutImage ( Display *, Drawable, GC, XImage *, int, int,
716
    int, int, unsigned int, unsigned int ) ;
717
+FUNC XImage *XGetImage ( Display *, Drawable, int, int, unsigned int,
718
    unsigned int, unsigned long, int ) ;
719
+FUNC XImage *XGetSubImage ( Display *, Drawable, int, int, unsigned int,
720
    unsigned int, unsigned long, int, XImage *, int, int ) ;
721
 
722
 
723
# Changing the Parent of a Window (9.1)
724
 
725
+FUNC void XReparentWindow ( Display *, Window, Window, int, int ) ;
726
 
727
 
728
# Controlling the Lifetime of a Window (9.2)
729
 
730
+FUNC void XChangeSaveSet ( Display *, Window, int ) ;
731
+FUNC void XAddToSaveSet ( Display *, Window ) ;
732
+FUNC void XRemoveFromSaveSet ( Display *, Window ) ;
733
 
734
 
735
# Managing Installer Colormaps (9.3)
736
 
737
+FUNC void XInstallColormap ( Display *, Colormap ) ;
738
+FUNC void XUninstallColormap ( Display *, Colormap ) ;
739
+FUNC Colormap *XListInstalledColormaps ( Display *, Window, int * ) ;
740
 
741
 
742
# Setting and Retrieving Font Search Paths (9.4)
743
 
744
+FUNC void XSetFontPath ( Display *, char **, int ) ;
745
+FUNC char **XGetFontPath ( Display *, int * ) ;
746
+FUNC void XFreeFontPath ( char ** ) ;
747
 
748
 
749
# Server Grabbing (9.5)
750
 
751
+FUNC void XGrabServer ( Display * ) ;
752
+FUNC void XUngrabServer ( Display * ) ;
753
 
754
 
755
# Killing Clients (9.6)
756
 
757
+FUNC void XKillClient ( Display *, XID ) ;
758
 
759
 
760
# Screen Saver Control (9.7)
761
 
762
+FUNC void XSetScreenSaver ( Display *, int, int, int, int ) ;
763
+FUNC void XForceScreenSaver ( Display *, int ) ;
764
+FUNC void XActivateScreenSaver ( Display * ) ;
765
+FUNC void XResetScreenSaver ( Display * ) ;
766
+FUNC void XGetScreenSaver ( Display *, int *, int *, int *, int * ) ;
767
 
768
 
769
# Adding, Getting and Removing Hosts (9.8.1)
770
 
771
+FIELD ( struct ) XHostAddress := {
772
    int family ;
773
    int length ;
774
    char *address ;
775
} ;
776
 
777
+FUNC void XAddHost ( Display *, XHostAddress * ) ;
778
+FUNC void XAddHosts ( Display *, XHostAddress *, int ) ;
779
+FUNC XHostAddress *XListHosts ( Display *, int *, Bool * ) ;
780
+FUNC void XRemoveHost ( Display *, XHostAddress * ) ;
781
+FUNC void XRemoveHosts ( Display *, XHostAddress *, int ) ;
782
 
783
 
784
# Changing, Enabling or Disabling Access Control (9.8.2)
785
 
786
+FUNC void XSetAccessControl ( Display *, int ) ;
787
+FUNC void XEnableAccessControl ( Display * ) ;
788
+FUNC void XDisableAccessControl ( Display * ) ;
789
 
790
 
791
# Event Structures (10.2)
792
 
793
+FIELD ( struct ) XAnyEvent := {
794
    int type ;
795
    unsigned long serial ;
796
    Bool send_event ;
797
    Display *display ;
798
    Window window ;
799
} ;
800
 
801
 
802
# Keyboard and Pointer Events (10.5.2)
803
 
804
+FIELD ( struct ) XButtonEvent := {
805
    int type ;
806
    unsigned long serial ;
807
    Bool send_event ;
808
    Display *display ;
809
    Window window ;
810
    Window root ;
811
    Window subwindow ;
812
    Time time ;
813
    int x, y ;
814
    int x_root, y_root ;
815
    unsigned int state ;
816
    unsigned int button ;
817
    Bool same_screen ;
818
} ;
819
 
820
+TYPEDEF XButtonEvent XButtonPressedEvent ;
821
+TYPEDEF XButtonEvent XButtonReleasedEvent ;
822
 
823
+FIELD ( struct ) XKeyEvent := {
824
    int type ;
825
    unsigned long serial ;
826
    Bool send_event ;
827
    Display *display ;
828
    Window window ;
829
    Window root ;
830
    Window subwindow ;
831
    Time time ;
832
    int x, y ;
833
    int x_root, y_root ;
834
    unsigned int state ;
835
    unsigned int keycode ;
836
    Bool same_screen ;
837
} ;
838
 
839
+TYPEDEF XKeyEvent XKeyPressedEvent ;
840
+TYPEDEF XKeyEvent XKeyReleasedEvent ;
841
 
842
+FIELD ( struct ) XMotionEvent := {
843
    int type ;
844
    unsigned long serial ;
845
    Bool send_event ;
846
    Display *display ;
847
    Window window ;
848
    Window root ;
849
    Window subwindow ;
850
    Time time ;
851
    int x, y ;
852
    int x_root, y_root ;
853
    unsigned int state ;
854
    char is_hint ;
855
    Bool same_screen ;
856
} ;
857
 
858
+TYPEDEF XMotionEvent XPointerMovedEvent ;
859
 
860
 
861
# Window Entry/Exit Events (10.6)
862
 
863
+FIELD ( struct ) XCrossingEvent := {
864
    int type ;
865
    unsigned long serial ;
866
    Bool send_event ;
867
    Display *display ;
868
    Window window ;
869
    Window root ;
870
    Window subwindow ;
871
    Time time ;
872
    int x, y ;
873
    int x_root, y_root ;
874
    int mode ;
875
    int detail ;
876
    Bool same_screen ;
877
    Bool focus ;
878
    unsigned int state ;
879
} ;
880
 
881
+TYPEDEF XCrossingEvent XEnterWindowEvent ;
882
+TYPEDEF XCrossingEvent XLeaveWindowEvent ;
883
 
884
 
885
# Input Focus Events (10.7)
886
 
887
+FIELD ( struct ) XFocusChangeEvent := {
888
    int type ;
889
    unsigned long serial ;
890
    Bool send_event ;
891
    Display *display ;
892
    Window window ;
893
    int mode ;
894
    int detail ;
895
} ;
896
 
897
+TYPEDEF XFocusChangeEvent XFocusInEvent ;
898
+TYPEDEF XFocusChangeEvent XFocusOutEvent ;
899
 
900
 
901
# Keymap State Notification Events (10.8)
902
 
903
+FIELD ( struct ) XKeymapEvent := {
904
    int type ;
905
    unsigned long serial ;
906
    Bool send_event ;
907
    Display *display ;
908
    Window window ;
909
    char key_vector [32] ;
910
} ;
911
 
912
 
913
# Exposure Events (10.9)
914
 
915
+FIELD ( struct ) XExposeEvent := {
916
    int type ;
917
    unsigned long serial ;
918
    Bool send_event ;
919
    Display *display ;
920
    Window window ;
921
    int x, y ;
922
    int width, height ;
923
    int count ;
924
} ;
925
 
926
+FIELD ( struct ) XGraphicsExposeEvent := {
927
    int type ;
928
    unsigned long serial ;
929
    Bool send_event ;
930
    Display *display ;
931
    Drawable drawable ;
932
    int x, y ;
933
    int width, height ;
934
    int count ;
935
    int major_code ;
936
    int minor_code ;
937
} ;
938
 
939
+FIELD ( struct ) XNoExposeEvent := {
940
    int type ;
941
    unsigned long serial ;
942
    Bool send_event ;
943
    Display *display ;
944
    Drawable drawable ;
945
    int major_code ;
946
    int minor_code ;
947
} ;
948
 
949
 
950
# Window State Change Events (10.10)
951
 
952
+FIELD ( struct ) XCirculateEvent := {
953
    int type ;
954
    unsigned long serial ;
955
    Bool send_event ;
956
    Display *display ;
957
    Window event ;
958
    Window window ;
959
    int place ;
960
} ;
961
 
962
+FIELD ( struct ) XConfigureEvent := {
963
    int type ;
964
    unsigned long serial ;
965
    Bool send_event ;
966
    Display *display ;
967
    Window event ;
968
    Window window ;
969
    int x, y ;
970
    int width, height ;
971
    int border_width ;
972
    Window above ;
973
    Bool override_redirect ;
974
} ;
975
 
976
+FIELD ( struct ) XCreateWindowEvent := {
977
    int type ;
978
    unsigned long serial ;
979
    Bool send_event ;
980
    Display *display ;
981
    Window parent ;
982
    Window window ;
983
    int x, y ;
984
    int width, height ;
985
    int border_width ;
986
    Bool override_redirect ;
987
} ;
988
 
989
+FIELD ( struct ) XDestroyWindowEvent := {
990
    int type ;
991
    unsigned long serial ;
992
    Bool send_event ;
993
    Display *display ;
994
    Window event ;
995
    Window window ;
996
} ;
997
 
998
+FIELD ( struct ) XGravityEvent := {
999
    int type ;
1000
    unsigned long serial ;
1001
    Bool send_event ;
1002
    Display *display ;
1003
    Window event ;
1004
    Window window ;
1005
    int x, y ;
1006
} ;
1007
 
1008
+FIELD ( struct ) XMapEvent := {
1009
    int type ;
1010
    unsigned long serial ;
1011
    Bool send_event ;
1012
    Display *display ;
1013
    Window event ;
1014
    Window window ;
1015
    Bool override_redirect ;
1016
} ;
1017
 
1018
+FIELD ( struct ) XMappingEvent := {
1019
    int type ;
1020
    unsigned long serial ;
1021
    Bool send_event ;
1022
    Display *display ;
1023
    Window window ;
1024
    int request ;
1025
    int first_keycode ;
1026
    int count ;
1027
} ;
1028
 
1029
+FIELD ( struct ) XReparentEvent := {
1030
    int type ;
1031
    unsigned long serial ;
1032
    Bool send_event ;
1033
    Display *display ;
1034
    Window event ;
1035
    Window window ;
1036
    Window parent ;
1037
    int x, y ;
1038
    Bool override_redirect ;
1039
} ;
1040
 
1041
+FIELD ( struct ) XUnmapEvent := {
1042
    int type ;
1043
    unsigned long serial ;
1044
    Bool send_event ;
1045
    Display *display ;
1046
    Window event ;
1047
    Window window ;
1048
    Bool from_configure ;
1049
} ;
1050
 
1051
+FIELD ( struct ) XVisibilityEvent := {
1052
    int type ;
1053
    unsigned long serial ;
1054
    Bool send_event ;
1055
    Display *display ;
1056
    Window window ;
1057
    int state ;
1058
} ;
1059
 
1060
 
1061
# Structure Control Events (10.11)
1062
 
1063
+FIELD ( struct ) XCirculateRequestEvent := {
1064
    int type ;
1065
    unsigned long serial ;
1066
    Bool send_event ;
1067
    Display *display ;
1068
    Window parent ;
1069
    Window window ;
1070
    int place ;
1071
} ;
1072
 
1073
+FIELD ( struct ) XConfigureRequestEvent := {
1074
    int type ;
1075
    unsigned long serial ;
1076
    Bool send_event ;
1077
    Display *display ;
1078
    Window parent ;
1079
    Window window ;
1080
    int x, y ;
1081
    int width, height ;
1082
    int border_width ;
1083
    Window above ;
1084
    int detail ;
1085
    unsigned long value_mask ;
1086
} ;
1087
 
1088
+FIELD ( struct ) XMapRequestEvent := {
1089
    int type ;
1090
    unsigned long serial ;
1091
    Bool send_event ;
1092
    Display *display ;
1093
    Window parent ;
1094
    Window window ;
1095
} ;
1096
 
1097
+FIELD ( struct ) XResizeRequestEvent := {
1098
    int type ;
1099
    unsigned long serial ;
1100
    Bool send_event ;
1101
    Display *display ;
1102
    Window window ;
1103
    int width, height ;
1104
} ;
1105
 
1106
 
1107
# Colormap State Change Events (10.12)
1108
 
1109
+FIELD ( struct ) XColormapEvent := {
1110
    int type ;
1111
    unsigned long serial ;
1112
    Bool send_event ;
1113
    Display *display ;
1114
    Window window ;
1115
    Colormap colormap ;
1116
    Bool new ;
1117
    int state ;
1118
} ;
1119
 
1120
 
1121
# Client Communication Events (10.13)
1122
 
1123
+FIELD union ~XClientMessageData := {
1124
    char b [20] ;
1125
    short s [10] ;
1126
    long l [5] ;
1127
} ;
1128
 
1129
+FIELD ( struct ) XClientMessageEvent := {
1130
    int type ;
1131
    unsigned long serial ;
1132
    Bool send_event ;
1133
    Display *display ;
1134
    Window window ;
1135
    Atom message_type ;
1136
    int format ;
1137
    union ~XClientMessageData data ;
1138
} ;
1139
 
1140
+FIELD ( struct ) XPropertyEvent := {
1141
    int type ;
1142
    unsigned long serial ;
1143
    Bool send_event ;
1144
    Display *display ;
1145
    Window window ;
1146
    Atom atom ;
1147
    Time time ;
1148
    int state ;
1149
} ;
1150
 
1151
+FIELD ( struct ) XSelectionClearEvent := {
1152
    int type ;
1153
    unsigned long serial ;
1154
    Bool send_event ;
1155
    Display *display ;
1156
    Window window ;
1157
    Atom selection ;
1158
    Time time ;
1159
} ;
1160
 
1161
+FIELD ( struct ) XSelectionRequestEvent := {
1162
    int type ;
1163
    unsigned long serial ;
1164
    Bool send_event ;
1165
    Display *display ;
1166
    Window owner ;
1167
    Window requestor ;
1168
    Atom selection ;
1169
    Atom target ;
1170
    Atom property ;
1171
    Time time ;
1172
} ;
1173
 
1174
+FIELD ( struct ) XSelectionEvent := {
1175
    int type ;
1176
    unsigned long serial ;
1177
    Bool send_event ;
1178
    Display *display ;
1179
    Window requestor ;
1180
    Atom selection ;
1181
    Atom target ;
1182
    Atom property ;
1183
    Time time ;
1184
} ;
1185
 
1186
 
1187
# Handing Protocol Errors (11.8): "contains" taken to mean inexact definition
1188
 
1189
+FIELD ( struct ) XErrorEvent {
1190
    int type ;
1191
    Display *display ;
1192
    XID resourceid ;		# Moved from end to reflect implementations
1193
    unsigned long serial ;
1194
    unsigned char error_code ;
1195
    unsigned char request_code ;
1196
    unsigned char minor_code ;
1197
} ;
1198
 
1199
 
1200
# Event Structures (10.2)
1201
 
1202
+FIELD ( union ) XEvent := {
1203
    int type ;
1204
    XAnyEvent xany ;
1205
    XKeyEvent xkey ;
1206
    XButtonEvent xbutton ;
1207
    XMotionEvent xmotion ;
1208
    XCrossingEvent xcrossing ;
1209
    XFocusChangeEvent xfocus ;
1210
    XExposeEvent xexpose ;
1211
    XGraphicsExposeEvent xgraphicsexpose ;
1212
    XNoExposeEvent xnoexpose ;
1213
    XVisibilityEvent xvisibility ;
1214
    XCreateWindowEvent xcreatewindow ;
1215
    XDestroyWindowEvent xdestroywindow ;
1216
    XUnmapEvent xunmap ;
1217
    XMapEvent xmap ;
1218
    XMapRequestEvent xmaprequest ;
1219
    XReparentEvent xreparent ;
1220
    XConfigureEvent xconfigure ;
1221
    XGravityEvent xgravity ;
1222
    XResizeRequestEvent xresizerequest ;
1223
    XConfigureRequestEvent xconfigurerequest ;
1224
    XCirculateEvent xcirculate ;
1225
    XCirculateRequestEvent xcirculaterequest ;
1226
    XPropertyEvent xproperty ;
1227
    XSelectionClearEvent xselectionclear ;
1228
    XSelectionRequestEvent xselectionrequest ;
1229
    XSelectionEvent xselection ;
1230
    XColormapEvent xcolormap ;
1231
    XClientMessageEvent xclient ;
1232
    XMappingEvent xmapping ;
1233
    XErrorEvent xerror ;
1234
    XKeymapEvent xkeymap ;
1235
    long pad [24] ;
1236
} ;
1237
 
1238
 
1239
# Selecting Events (11.1)
1240
 
1241
+FUNC void XSelectInput ( Display *, Window, long ) ;
1242
 
1243
 
1244
# Handling the Output Buffer (11.2)
1245
 
1246
+FUNC void XFlush ( Display * ) ;
1247
+FUNC void XSync ( Display *, Bool ) ;
1248
 
1249
 
1250
# Event Queue Management (11.3)
1251
 
1252
+FUNC int XEventsQueued ( Display *, int ) ;
1253
+FUNC int XPending ( Display * ) ;
1254
 
1255
 
1256
# Manipulating the Event Queue (11.4)
1257
 
1258
+FUNC void XNextEvent ( Display *, XEvent * ) ;
1259
+FUNC void XPeekEvent ( Display *, XEvent * ) ;
1260
+FUNC void XIfEvent ( Display *, XEvent *, Bool (*) (), XPointer ) ;
1261
+FUNC Bool XCheckIfEvent ( Display *, XEvent *, Bool (*) (), XPointer ) ;
1262
+FUNC void XPeekIfEvent ( Display *, XEvent *, Bool (*) (), XPointer ) ;
1263
+FUNC void XWindowEvent ( Display *, Window, long, XEvent * ) ;
1264
+FUNC Bool XCheckWindowEvent ( Display *, Window, long, XEvent * ) ;
1265
+FUNC void XMaskEvent ( Display *, long, XEvent * ) ;
1266
+FUNC Bool XCheckMaskEvent ( Display *, long, XEvent * ) ;
1267
+FUNC Bool XCheckTypedEvent ( Display *, int, XEvent * ) ;
1268
+FUNC Bool XCheckTypedWindowEvent ( Display *, Window, int, XEvent * ) ;
1269
 
1270
 
1271
# Putting an Event back into the Queue (11.5)
1272
 
1273
+FUNC void XPutBackEvent ( Display *, XEvent * ) ;
1274
 
1275
 
1276
# Sending Events to other Applications (11.6)
1277
 
1278
+FUNC Status XSendEvent ( Display *, Window, Bool, long, XEvent * ) ;
1279
 
1280
 
1281
# Getting Pointer Motion History (11.7)
1282
 
1283
+FIELD ( struct ) XTimeCoord := {
1284
    Time time ;
1285
    short x, y ;
1286
} ;
1287
 
1288
+FUNC unsigned long XDisplayMotionBufferSize ( Display * ) ;
1289
+FUNC XTimeCoord *XGetMotionEvents ( Display *, Window, Time, Time, int * ) ;
1290
 
1291
 
1292
# Handing Protocol Errors (11.8)
1293
 
1294
+FUNC int ( *XSetAfterFunction ( Display *, int (*) () ) ) () ;
1295
+FUNC int ( *XSynchronize ( Display *, Bool ) ) () ;
1296
+FUNC int ( *XSetErrorHandler ( int (*) ( Display *, XErrorEvent * ) ) ) () ;
1297
+FUNC void XGetErrorText ( Display *, int, char *, int ) ;
1298
+FUNC void XGetErrorDatabaseText ( Display *, char *, char *, char *,
1299
    char *, int ) ;
1300
+FUNC char *XDisplayName ( char * ) ;
1301
+FUNC int ( *XSetIOErrorHandler ( int (*) ( Display * ) ) ) () ;
1302
 
1303
 
1304
# Pointer Grabbing (12.1)
1305
 
1306
+FUNC int XGrabPointer ( Display *, Window, Bool, unsigned int, int,
1307
    int, Window, Cursor, Time ) ;
1308
+FUNC void XUngrabPointer ( Display *, Time ) ;
1309
+FUNC void XChangeActivePointerGrab ( Display *, unsigned int, Cursor, Time ) ;
1310
+FUNC void XGrabButton ( Display *, unsigned int, unsigned int, Window,
1311
    Bool, unsigned int, int, int, Window, Cursor ) ;
1312
+FUNC void XUngrabButton ( Display *, unsigned int, unsigned int, Window ) ;
1313
 
1314
 
1315
# Keyboard Grabbing (12.2)
1316
 
1317
+FUNC int XGrabKeyboard ( Display *, Window, Bool, int, int, Time ) ;
1318
+FUNC void XUngrabKeyboard ( Display *, Time ) ;
1319
+FUNC void XGrabKey ( Display *, int, unsigned int, Window, Bool, int, int ) ;
1320
+FUNC void XUngrabKey ( Display *, int, unsigned int, Window ) ;
1321
 
1322
 
1323
# Resuming Event Processing (12.3)
1324
 
1325
+FUNC void XAllowEvents ( Display *, int, Time ) ;
1326
 
1327
 
1328
# Moving the Pointer (12.4)
1329
 
1330
+FUNC void XWarpPointer ( Display *, Window, Window, int, int, unsigned int,
1331
    unsigned int, int, int ) ;
1332
 
1333
 
1334
# Controlling Input Focus (12.5)
1335
 
1336
+FUNC void XSetInputFocus ( Display *, Window, int, Time ) ;
1337
+FUNC void XGetInputFocus ( Display *, Window *, int * ) ;
1338
 
1339
 
1340
# Keyboard and Pointer Settings (12.6)
1341
 
1342
+FIELD ( struct ) XKeyboardControl := {
1343
    int key_click_percent ;
1344
    int bell_percent ;
1345
    int bell_pitch ;
1346
    int bell_duration ;
1347
    int led ;
1348
    int led_mode ;
1349
    int key ;
1350
    int auto_repeat_mode ;
1351
} ;
1352
 
1353
+FIELD ( struct ) XKeyboardState := {
1354
    int key_click_percent ;
1355
    int bell_percent ;
1356
    unsigned int bell_pitch ;
1357
    unsigned int bell_duration ;
1358
    unsigned long led_mask ;
1359
    int global_auto_repeat ;
1360
    char auto_repeats [32] ;
1361
} ;
1362
 
1363
+FUNC void XChangeKeyboardControl ( Display *, unsigned long,
1364
    XKeyboardControl * ) ;
1365
+FUNC void XGetKeyboardControl ( Display *, XKeyboardState * ) ;
1366
+FUNC void XAutoRepeatOn ( Display * ) ;
1367
+FUNC void XAutoRepeatOff ( Display * ) ;
1368
+FUNC void XBell ( Display *, int ) ;
1369
+FUNC void XQueryKeymap ( Display *, char [32] ) ;
1370
+FUNC int XSetPointerMapping ( Display *, unsigned char [], int ) ;
1371
+FUNC int XGetPointerMapping ( Display *, unsigned char [], int ) ;
1372
+FUNC void XChangePointerControl ( Display *, Bool, Bool, int, int, int ) ;
1373
+FUNC void XGetPointerControl ( Display *, int *, int *, int * ) ;
1374
 
1375
 
1376
# Keyboard Encoding (12.7)
1377
 
1378
+FIELD ( struct ) XModifierKeymap := {
1379
    int max_keypermod ;
1380
    KeyCode *modifiermap ;
1381
} ;
1382
 
1383
+FUNC void XDisplayKeycodes ( Display *, int *, int * ) ;
1384
+FUNC KeySym *XGetKeyboardMapping ( Display *, KeyCode, int, int * ) ;
1385
+FUNC void XChangeKeyboardMapping ( Display *, int, int, KeySym *, int ) ;
1386
+FUNC XModifierKeymap *XNewModifiermap ( int ) ;
1387
+FUNC XModifierKeymap *XInsertModifiermapEntry ( XModifierKeymap *,
1388
    KeyCode, int ) ;
1389
+FUNC XModifierKeymap *XDeleteModifiermapEntry ( XModifierKeymap *,
1390
    KeyCode, int ) ;
1391
+FUNC void XFreeModifiermap ( XModifierKeymap * ) ;
1392
+FUNC int XSetModifierMapping ( Display *, XModifierKeymap * ) ;
1393
+FUNC XModifierKeymap *XGetModifierMapping ( Display * ) ;
1394
 
1395
 
1396
# X Locale Management (13.1)
1397
 
1398
+FUNC Bool XSupportsLocale ( void ) ;
1399
+FUNC char *XSetLocaleModifiers ( char * ) ;
1400
 
1401
 
1402
# Creating and Freeing a Font Set (13.3)
1403
 
1404
+TYPE XFontSet ;
1405
 
1406
+FUNC XFontSet XCreateFontSet ( Display *, char *, char ***, int *,
1407
    char ** ) ;
1408
+FUNC int XFontsOfFontSet ( XFontSet, XFontStruct ***, char *** ) ;
1409
+FUNC char *XBaseFontNameListOfFontSet ( XFontSet ) ;
1410
+FUNC char *XLocaleOfFontSet ( XFontSet ) ;
1411
+FUNC void XFreeFontSet ( Display *, XFontSet ) ;
1412
 
1413
 
1414
# Obtaining Font Set Metrics (13.4)
1415
 
1416
+FIELD ( struct ) XFontSetExtents := {
1417
    XRectangle max_ink_extent ;
1418
    XRectangle max_logical_extent ;
1419
} ;
1420
 
1421
+FUNC Bool XContextDependentDrawing ( XFontSet ) ;
1422
+FUNC XFontSetExtents *XExtentsOfFontSet ( XFontSet ) ;
1423
+FUNC int XmbTextEscapement ( XFontSet, char *, int ) ;
1424
+FUNC int XwcTextEscapement ( XFontSet, wchar_t *, int ) ;
1425
+FUNC int XmbTextExtents ( XFontSet, char *, int, XRectangle *,
1426
    XRectangle * ) ;
1427
+FUNC int XwcTextExtents ( XFontSet, wchar_t *, int, XRectangle *,
1428
    XRectangle * ) ;
1429
+FUNC Status XmbTextPerCharExtents ( XFontSet, char *, int, XRectangle *,
1430
    XRectangle *, int, int *, XRectangle *, XRectangle * ) ;
1431
+FUNC Status XwcTextPerCharExtents ( XFontSet, wchar_t *, int, XRectangle *,
1432
    XRectangle *, int, int *, XRectangle *, XRectangle * ) ;
1433
 
1434
 
1435
# Drawing Text Using Font Sets (13.5)
1436
 
1437
+FIELD ( struct ) XmbTextItem := {
1438
    char *chars ;
1439
    int nchars ;
1440
    int delta ;
1441
    XFontSet font_set ;
1442
} ;
1443
 
1444
+FIELD ( struct ) XwcTextItem := {
1445
    wchar_t *chars ;
1446
    int nchars ;
1447
    int delta ;
1448
    XFontSet font_set ;
1449
} ;
1450
 
1451
+FUNC void XmbDrawText ( Display *, Drawable, GC, int, int, XmbTextItem *,
1452
    int ) ;
1453
+FUNC void XwcDrawText ( Display *, Drawable, GC, int, int, XwcTextItem *,
1454
    int ) ;
1455
+FUNC void XmbDrawString ( Display *, Drawable, XFontSet, GC, int, int,
1456
    char *, int ) ;
1457
+FUNC void XwcDrawString ( Display *, Drawable, XFontSet, GC, int, int,
1458
    wchar_t *, int ) ;
1459
+FUNC void XmbDrawImageString ( Display *, Drawable, XFontSet, GC, int,
1460
    int, char *, int ) ;
1461
+FUNC void XwcDrawImageString ( Display *, Drawable, XFontSet, GC, int,
1462
    int, wchar_t *, int ) ;
1463
 
1464
 
1465
# Input Methods (13.6)
1466
 
1467
+TYPE XIM, XIC ;
1468
 
1469
 
1470
# Variable Argument Lists (13.7)
1471
 
1472
+TYPEDEF void *XVaNestedList ;
1473
+FUNC XVaNestedList XVaCreateNestedList ( int, ... ) ;
1474
 
1475
 
1476
# Input Method Functions (13.8)
1477
 
1478
+FUNC XIM XOpenIM ( Display *, XrmDatabase, char *, char * ) ;
1479
+FUNC Status XCloseIM ( XIM ) ;
1480
+FUNC char *XGetIMValues ( XIM, ... ) ;
1481
 
1482
+TYPEDEF unsigned long XIMStyle ;
1483
+FIELD ( struct ) XIMStyles := {
1484
    unsigned short count_styles ;
1485
    XIMStyle *supported_styles ;
1486
} ;
1487
 
1488
+DEFINE XIMPreeditArea		%% 0x0001L %% ;
1489
+DEFINE XIMPreeditCallbacks	%% 0x0002L %% ;
1490
+DEFINE XIMPreeditPosition	%% 0x0004L %% ;
1491
+DEFINE XIMPreeditNothing	%% 0x0008L %% ;
1492
+DEFINE XIMPreeditNone		%% 0x0010L %% ;
1493
+DEFINE XIMStatusArea		%% 0x0100L %% ;
1494
+DEFINE XIMStatusCallbacks	%% 0x0200L %% ;
1495
+DEFINE XIMStatusNothing	%% 0x0400L %% ;
1496
+DEFINE XIMStatusNone		%% 0x0800L %% ;
1497
 
1498
+FUNC Display *XDisplayOfIM ( XIM ) ;
1499
+FUNC char *XLocaleOfIM ( XIM ) ;
1500
 
1501
 
1502
# Input Context Functions (13.9)
1503
 
1504
+FUNC XIC XCreateIC ( XIM, ... ) ;
1505
+FUNC void XDestroyIC ( XIC ) ;
1506
+FUNC void XSetICFocus ( XIC ) ;
1507
+FUNC void XUnsetICFocus ( XIC ) ;
1508
+FUNC char *XmbResetIC ( XIC ) ;
1509
+FUNC wchar_t *XwcResetIC ( XIC ) ;
1510
+FUNC XIM XIMOfIC ( XIC ) ;
1511
+FUNC char *XSetICValues ( XIC, ... ) ;
1512
+FUNC char *XGetICValues ( XIC, ... ) ;
1513
 
1514
 
1515
# XIC Value Arguments (13.10)
1516
 
1517
+TYPEDEF void ( *XIMProc ) () ;
1518
+FIELD ( struct ) XIMCallback := {
1519
    XPointer client_data ;
1520
    XIMProc callback ;
1521
} ;
1522
 
1523
 
1524
# Callback Semantic (13.11)
1525
 
1526
+TYPEDEF unsigned long XIMFeedback ;
1527
 
1528
+FIELD union ~XIMTextString := {
1529
    char *multi_byte ;
1530
    wchar_t *wide_char ;
1531
} ;
1532
 
1533
+FIELD ( struct ) XIMText := {
1534
    unsigned short length ;
1535
    XIMFeedback *feedback ;
1536
    Bool encoding_is_wchar ;
1537
    union ~XIMTextString string ;
1538
} ;
1539
 
1540
+FIELD ( struct ) XIMPreeditDrawCallbackStruct := {
1541
    int caret ;
1542
    int chg_first ;
1543
    int chg_length ;
1544
    XIMText *text ;
1545
} ;
1546
 
1547
+DEFINE XIMReverse		%% 1 %% ;
1548
+DEFINE XIMUnderline		%% (1L<<1) %% ;
1549
+DEFINE XIMHighlight		%% (1L<<2) %% ;
1550
+DEFINE XIMPrimary		%% (1L<<3) %% ;
1551
+DEFINE XIMSecondary		%% (1L<<4) %% ;
1552
+DEFINE XIMTertiary		%% (1L<<5) %% ;
1553
 
1554
+ENUM XIMCaretStyle := {
1555
    XIMIsInvisible,
1556
    XIMIsPrimary,
1557
    XIMIsSecondary
1558
} ;
1559
 
1560
+ENUM XIMCaretDirection := {
1561
    XIMForwardChar, XIMBackwardChar,
1562
    XIMForwardWord, XIMBackwardWord,
1563
    XIMCaretUp, XIMCaretDown,
1564
    XIMNextLine, XIMPreviousLine,
1565
    XIMLineStart, XIMLineEnd,
1566
    XIMAbsolutePosition,
1567
    XIMDontChange
1568
} ;
1569
 
1570
+FIELD ( struct ) XIMPreeditCaretCallbackStruct := {
1571
    int position ;
1572
    XIMCaretDirection direction ;
1573
    XIMCaretStyle style ;
1574
} ;
1575
 
1576
+ENUM XIMStatusDataType := {
1577
    XIMTextType,
1578
    XIMBitmapType
1579
} ;
1580
 
1581
+FIELD union ~XIMStatusDrawCallbackData := {
1582
    XIMText *text ;
1583
    Pixmap bitmap ;
1584
} ;
1585
 
1586
+FIELD ( struct ) XIMStatusDrawCallbackStruct := {
1587
    XIMStatusDataType type ;
1588
    union ~XIMStatusDrawCallbackData data ;
1589
} ;
1590
 
1591
 
1592
# Event Filtering (13.12)
1593
 
1594
+FUNC Bool XFilterEvent ( XEvent *, Window ) ;
1595
 
1596
 
1597
# Getting Keyboard Input (13.13)
1598
 
1599
+FUNC int XmbLookupString ( XIC, XKeyPressedEvent *, char *, int,
1600
    KeySym *, Status * ) ;
1601
+FUNC int XwcLookupString ( XIC, XKeyPressedEvent *, wchar_t *, int,
1602
    KeySym *, Status * ) ;
1603
 
1604
+CONST Status XBufferOverflow, XLookupNone, XLookupChars ;
1605
+CONST Status XLookupKeySym, XLookupBoth ;
1606
 
1607
 
1608
# String Constants (13.15)
1609
 
1610
+EXP char *XNVaNestedList ;
1611
+EXP char *XNQueryInputStyle ;
1612
+EXP char *XNClientWindow ;
1613
+EXP char *XNInputStyle ;
1614
+EXP char *XNFocusWindow ;
1615
+EXP char *XNResourceName ;
1616
+EXP char *XNResourceClass ;
1617
+EXP char *XNGeometryCallback ;
1618
+EXP char *XNFilterEvents ;
1619
+EXP char *XNPreeditStartCallback ;
1620
+EXP char *XNPreeditDoneCallback ;
1621
+EXP char *XNPreeditDrawCallback ;
1622
+EXP char *XNPreeditCaretCallback ;
1623
+EXP char *XNPreeditAttributes ;
1624
+EXP char *XNStatusStartCallback ;
1625
+EXP char *XNStatusDoneCallback ;
1626
+EXP char *XNStatusDrawCallback ;
1627
+EXP char *XNStatusAttributes ;
1628
+EXP char *XNArea ;
1629
+EXP char *XNAreaNeeded ;
1630
+EXP char *XNSpotLocation ;
1631
+EXP char *XNColormap ;
1632
+EXP char *XNStdColormap ;
1633
+EXP char *XNForeground ;
1634
+EXP char *XNBackground ;
1635
+EXP char *XNBackgroundPixmap ;
1636
+EXP char *XNFontSet ;
1637
+EXP char *XNLineSpace ;
1638
+EXP char *XNCursor ;
1639
 
1640
 
1641
# Client to Window Manager Communication (14.1)
1642
 
1643
+FUNC Status XIconifyWindow ( Display *, Window, int ) ;
1644
+FUNC Status XWithdrawWindow ( Display *, Window, int ) ;
1645
+FUNC Status XReconfigureWMWindow ( Display *, Window, int, unsigned int,
1646
    XWindowChanges * ) ;
1647
 
1648
+FIELD ( struct ) XTextProperty := {
1649
    unsigned char *value ;
1650
    Atom encoding ;
1651
    int format ;
1652
    unsigned long nitems ;
1653
} ;
1654
 
1655
+DEFINE XNoMemory		%% -1 %% ;
1656
+DEFINE XLocaleNotSupported	%% -2 %% ;
1657
+DEFINE XConverterNotFound	%% -3 %% ;
1658
 
1659
+ENUM XICCEncodingStyle := {
1660
    XStringStyle,
1661
    XCompoundTextStyle,
1662
    XTextStyle,
1663
    XStdICCTextStyle
1664
} ;
1665
 
1666
+FUNC int XmbTextListToTextProperty ( Display *, char **, int,
1667
    XICCEncodingStyle, XTextProperty * ) ;
1668
+FUNC int XwcTextListToTextProperty ( Display *, wchar_t **, int,
1669
    XICCEncodingStyle, XTextProperty * ) ;
1670
+FUNC int XmbTextPropertyToTextList ( Display *, XTextProperty *,
1671
    char ***, int * ) ;
1672
+FUNC int XwcTextPropertyToTextList ( Display *, XTextProperty *,
1673
    wchar_t ***, int * ) ;
1674
+FUNC void XwcFreeStringList ( wchar_t ** ) ;
1675
+FUNC char *XDefaultString ( void ) ;
1676
+FUNC Status XStringListToTextProperty ( char **, int, XTextProperty * ) ;
1677
+FUNC Status XTextPropertyToStringList ( XTextProperty *, char ***, int * ) ;
1678
+FUNC void XFreeStringList ( char ** ) ;
1679
+FUNC void XSetTextProperty ( Display *, Window, XTextProperty *, Atom ) ;
1680
+FUNC Status XGetTextProperty ( Display *, Window, XTextProperty *, Atom ) ;
1681
+FUNC void XSetWMName ( Display *, Window, XTextProperty * ) ;
1682
+FUNC Status XGetWMName ( Display *, Window, XTextProperty * ) ;
1683
+FUNC void XStoreName ( Display *, Window, char * ) ;
1684
+FUNC Status XFetchName ( Display *, Window, char ** ) ;
1685
+FUNC void XSetWMIconName ( Display *, Window, XTextProperty * ) ;
1686
+FUNC Status XGetWMIconName ( Display *, Window, XTextProperty * ) ;
1687
+FUNC void XSetIconName ( Display *, Window, char * ) ;
1688
+FUNC Status XGetIconName ( Display *, Window, char ** ) ;
1689
 
1690
+FUNC XWMHints *XAllocWMHints ( void ) ;
1691
+FUNC void XSetWMHints ( Display *, Window, XWMHints * ) ;
1692
+FUNC XWMHints *XGetWMHints ( Display *, Window ) ;
1693
 
1694
+FUNC XSizeHints *XAllocSizeHints ( void ) ;
1695
+FUNC void XSetWMNormalHints ( Display *, Window, XSizeHints * ) ;
1696
+FUNC Status XGetWMNormalHints ( Display *, Window, XSizeHints *, long * ) ;
1697
+FUNC void XSetWMSizeHints ( Display *, Window, XSizeHints *, Atom ) ;
1698
+FUNC Status XGetWMSizeHints ( Display *, Window, XSizeHints *, long *,
1699
    Atom ) ;
1700
 
1701
+FUNC XClassHint *XAllocClassHint ( void ) ;
1702
+FUNC void XSetClassHint ( Display *, Window, XClassHint * ) ;
1703
+FUNC Status XGetClassHint ( Display *, Window, XClassHint * ) ;
1704
 
1705
+FUNC void XSetTransientForHint ( Display *, Window, Window ) ;
1706
+FUNC Status XGetTransientForHint ( Display *, Window, Window * ) ;
1707
 
1708
+FUNC Status XSetWMProtocols ( Display *, Window, Atom *, int ) ;
1709
+FUNC Status XGetWMProtocols ( Display *, Window, Atom **, int * ) ;
1710
 
1711
+FUNC Status XSetWMColormapWindows ( Display *, Window, Window *, int ) ;
1712
+FUNC Status XGetWMColormapWindows ( Display *, Window, Window **, int * ) ;
1713
 
1714
+FUNC XIconSize *XAllocIconSize ( void ) ;
1715
+FUNC void XSetIconSizes ( Display *, Window, XIconSize *, int ) ;
1716
+FUNC Status XGetIconSizes ( Display *, Window, XIconSize **, int * ) ;
1717
 
1718
+FUNC void XmbSetWMProperties ( Display *, Window, char *, char *,
1719
    char * [], int, XSizeHints *, XWMHints *, XClassHint * ) ;
1720
+FUNC void XSetWMProperties ( Display *, Window, XTextProperty *,
1721
    XTextProperty *, char **, int, XSizeHints *, XWMHints *, XClassHint * ) ;
1722
 
1723
 
1724
# Client to Session Manager Communication (14.2)
1725
 
1726
+FUNC void XSetCommand ( Display *, Window, char **, int ) ;
1727
+FUNC Status XGetCommand ( Display *, Window, char ***, int * ) ;
1728
+FUNC void XSetWMClientMachine ( Display *, Window, XTextProperty * ) ;
1729
+FUNC Status XGetWMClientMachine ( Display *, Window, XTextProperty * ) ;
1730
 
1731
 
1732
# Standard Colormaps (14.3)
1733
 
1734
+DEFINE ReleaseByFreeingColormap	%% ((XID)1L) %% ;
1735
 
1736
+FIELD ( struct ) XStandardColormap := {
1737
    Colormap colormap ;
1738
    unsigned long red_max, red_mult ;
1739
    unsigned long green_max, green_mult ;
1740
    unsigned long blue_max, blue_mult ;
1741
    unsigned long base_pixel ;
1742
    VisualID visualid ;
1743
    XID killid ;
1744
} ;
1745
 
1746
+FUNC XStandardColormap *XAllocStandardColormap ( void ) ;
1747
 
1748
+FUNC void XSetRGBColormaps ( Display *, Window, XStandardColormap *,
1749
    int, Atom ) ;
1750
+FUNC Status XGetRGBColormaps ( Display *, Window, XStandardColormap **,
1751
    int *, Atom ) ;
1752
 
1753
 
1754
# Keyboard Utility Functions (16.1)
1755
 
1756
+FUNC KeySym XLookupKeysym ( XKeyEvent *, int ) ;
1757
+FUNC KeySym XKeycodeToKeysym ( Display *, KeyCode, int ) ;
1758
+FUNC KeyCode XKeysymToKeycode ( Display *, KeySym ) ;
1759
+FUNC void XRefreshKeyboardMapping ( XMappingEvent * ) ;
1760
+FUNC KeySym XStringToKeysym ( char * ) ;
1761
+FUNC char *XKeysymToString ( KeySym ) ;
1762
 
1763
+MACRO Bool IsCursorKey ( KeySym ) ;
1764
+MACRO Bool IsFunctionKey ( KeySym ) ;
1765
+MACRO Bool IsKeypadKey ( KeySym ) ;
1766
+MACRO Bool IsMiscFunctionKey ( KeySym ) ;
1767
+MACRO Bool IsModifierKey ( KeySym ) ;
1768
+MACRO Bool IsPFKey ( KeySym ) ;
1769
 
1770
 
1771
# Latin-1 Keyboard Event Functions (16.2)
1772
 
1773
+TYPE ( struct ) XComposeStatus ;
1774
+FUNC int XLookupString ( XKeyEvent *, char *, int, KeySym *,
1775
    XComposeStatus * ) ;
1776
+FUNC void XRebindKeysym ( Display *, KeySym, KeySym [], int,
1777
    unsigned char *, int ) ;
1778
 
1779
 
1780
# Allocating Permanent Storage (16.3)
1781
 
1782
+FUNC char *Xpermalloc ( unsigned int ) ;
1783
 
1784
 
1785
# Parsing the Window Geometry (16.4)
1786
 
1787
+FUNC int XParseGeometry ( char *, int *, int *, unsigned int *,
1788
    unsigned int * ) ;
1789
+FUNC int XWMGeometry ( Display *, int, char *, char *, unsigned int,
1790
    XSizeHints *, int *, int *, int *, int *, int * ) ;
1791
 
1792
 
1793
# Manipulating Regions (16.5)
1794
 
1795
+FUNC Region XCreateRegion ( void ) ;
1796
+FUNC Region XPolygonRegion ( XPoint [], int, int ) ;
1797
+FUNC void XSetRegion ( Display *, GC, Region ) ;
1798
+FUNC void XDestroyRegion ( Region ) ;
1799
+FUNC void XOffsetRegion ( Region, int, int ) ;
1800
+FUNC void XShrinkRegion ( Region, int, int ) ;
1801
+FUNC void XClipBox ( Region, XRectangle * ) ;
1802
+FUNC void XIntersectRegion ( Region, Region, Region ) ;
1803
+FUNC void XUnionRegion ( Region, Region, Region ) ;
1804
+FUNC void XUnionRectWithRegion ( XRectangle *, Region, Region ) ;
1805
+FUNC void XSubtractRegion ( Region, Region, Region ) ;
1806
+FUNC void XXorRegion ( Region, Region, Region ) ;
1807
+FUNC Bool XEmptyRegion ( Region ) ;
1808
+FUNC Bool XEqualRegion ( Region, Region ) ;
1809
+FUNC Bool XPointInRegion ( Region, int, int ) ;
1810
+FUNC Bool XRectInRegion ( Region, int, int, unsigned int, unsigned int ) ;
1811
 
1812
 
1813
# Using Cut Buffers (16.6)
1814
 
1815
+FUNC void XStoreBytes ( Display *, char *, int ) ;
1816
+FUNC void XStoreBuffer ( Display *, char *, int, int ) ;
1817
+FUNC char *XFetchBytes ( Display *, int * ) ;
1818
+FUNC char *XFetchBuffer ( Display *, int *, int ) ;
1819
+FUNC void XRotateBuffers ( Display *, int ) ;
1820
 
1821
 
1822
# Determining a Visual Type (16.7)
1823
 
1824
+FUNC XVisualInfo *XGetVisualInfo ( Display *, long, XVisualInfo *, int * ) ;
1825
+FUNC Status XMatchVisualInfo ( Display *, int, int, int, XVisualInfo * ) ;
1826
 
1827
 
1828
# Manipulating Images (16.8)
1829
 
1830
+FUNC XImage *XCreateImage ( Display *, Visual *, unsigned int, int,
1831
    int, char *, unsigned int, unsigned int, int, int ) ;
1832
+FUNC void XDestroyImage ( XImage * ) ;
1833
 
1834
 
1835
# Manipulating Bitmaps (16.9)
1836
 
1837
+FUNC int XReadBitmapFile ( Display *, Drawable, char *, unsigned int *,
1838
    unsigned int *, Pixmap *, int *, int * ) ;
1839
+FUNC int XWriteBitmapFile ( Display *, char *, Pixmap, unsigned int,
1840
    unsigned int, int, int ) ;
1841
+FUNC Pixmap XCreatePixmapFromBitmapData ( Display *, Drawable, char *,
1842
    unsigned int, unsigned int, unsigned long, unsigned long, unsigned int ) ;
1843
+FUNC Pixmap XCreateBitmapFromData ( Display *, Drawable, char *,
1844
    unsigned int, unsigned int ) ;
1845
 
1846
 
1847
# Using the Context Manager (16.10)
1848
 
1849
+TYPE XContext ;	# not actually specified
1850
+FUNC int XSaveContext ( Display *, XID, XContext, XPointer ) ;
1851
+FUNC int XFindContext ( Display *, XID, XContext, XPointer * ) ;
1852
+FUNC int XDeleteContext ( Display *, XID, XContext ) ;
1853
+FUNC XContext XUniqueContext ( void ) ;
1854
 
1855
 
1856
# Extensions (Appendix C)
1857
 
1858
+FUNC Bool XQueryExtension ( Display *, char *, int *, int *, int * ) ;
1859
+FUNC char **XListExtensions ( Display *, int * ) ;
1860
+FUNC void XFreeExtensionList ( char ** ) ;
1861
 
1862
+FIELD ( struct ) XExtCodes := {
1863
    int extension ;
1864
    int major_opcode ;
1865
    int first_event ;
1866
    int first_error ;
1867
} ;
1868
 
1869
+FUNC XExtCodes *XInitExtension ( Display *, char * ) ;
1870
+FUNC XExtCodes *XAddExtension ( Display * ) ;
1871
 
1872
+FUNC int ( *XESetCloseDisplay ( Display *, int, int (*) () ) ) () ;
1873
+FUNC int ( *XESetCreateGC ( Display *, int, int (*) () ) ) () ;
1874
+FUNC int ( *XESetCopyGC ( Display *, int, int (*) () ) ) () ;
1875
+FUNC int ( *XESetFreeGC ( Display *, int, int (*) () ) ) () ;
1876
+FUNC int ( *XESetCreateFont ( Display *, int, int (*) () ) ) () ;
1877
+FUNC int ( *XESetFreeFont ( Display *, int, int (*) () ) ) () ;
1878
+FUNC int ( *XESetWireToEvent ( Display *, int, Status (*) () ) ) () ;
1879
+FUNC unsigned long _XSetLastRequestRead ( Display *, xGenericReply * ) ;
1880
+FUNC Status ( *XESetEventToWire ( Display *, int, int (*) () ) ) () ;
1881
+FUNC Bool ( *XESetWireToError ( Display *, int, Bool (*) () ) ) () ;
1882
+FUNC int ( *XESetError ( Display *, int, int (*) () ) ) () ;
1883
+FUNC char *( *XESetErrorString ( Display *, int, char *(*) () ) ) () ;
1884
+FUNC void ( *XESetPrintErrorValues ( Display *, int, void (*) () ) ) () ;
1885
+FUNC int ( *XESetFlushGC ( Display *, int, int (*) () ) ) () ;
1886
 
1887
+FIELD XExtData := {
1888
    int number ;
1889
    XExtData *next ;
1890
    int ( *free_private ) () ;
1891
    XPointer private_data ;
1892
} ;
1893
 
1894
+TYPE ScreenFormat ;	# RCA : not specified
1895
 
1896
+FIELD ( union ) XEDataObject := {
1897
    Display *display ;
1898
    GC gc ;
1899
    Visual *visual ;
1900
    Screen *screen ;
1901
    ScreenFormat *pixmap_format ;
1902
    XFontStruct *font ;
1903
} ;
1904
 
1905
+FUNC XExtData **XEHeadOfExtensionList ( XEDataObject ) ;
1906
+FUNC void XAddToExtensionList ( XExtData **, XExtData * ) ;
1907
+FUNC XExtData *XFindOnExtensionList ( XExtData **, int ) ;
1908
+MACRO XID XAllocID ( Display * ) ;
1909
+STATEMENT FlushGC ( Display *, GC ) ;
1910
+FUNC void _XFlushGCCache ( Display *, GC ) ;
1911
 
1912
 
1913
# X11 Compatibility Functions (Appendix D)
1914
 
1915
+FUNC void XSetStandardProperties ( Display *, Window, char *, char *,
1916
    Pixmap, char **, int, XSizeHints * ) ;
1917
+FUNC void XSetNormalHints ( Display *, Window, XSizeHints * ) ;
1918
+FUNC Status XGetNormalHints ( Display *, Window, XSizeHints * ) ;
1919
+FUNC void XSetZoomHints ( Display *, Window, XSizeHints * ) ;
1920
+FUNC Status XGetZoomHints ( Display *, Window, XSizeHints * ) ;
1921
+FUNC void XSetSizeHints ( Display *, Window, XSizeHints *, Atom ) ;
1922
+FUNC Status XGetSizeHints ( Display *, Window, XSizeHints *, Atom ) ;
1923
+FUNC Status XGetStandardColormap ( Display *, Window,
1924
    XStandardColormap *, Atom ) ;
1925
+FUNC void XSetStandardColormap ( Display *, Window,
1926
    XStandardColormap *, Atom ) ;
1927
+FUNC int XGeometry ( Display *, int, char *, char *, unsigned int,
1928
    unsigned int, unsigned int, int, int, int *, int *, int *, int * ) ;
1929
+FUNC char *XGetDefault ( Display *, char *, char * ) ;