lfp


Logs | Files | README | README | LICENSE | GitLab


1
commit eade0867cbf20cadd8e850fd981083ad2eac6383
2
Author: Connor Etherington <[email protected]>
3
Date:   Mon Apr 1 23:12:11 2024 +0200
4
5
    Auto-Commit Update - 20240401
6
---
7
 PKGBUILD                                           |    4 +-
8
 lfpreviewer/conda-install-requirements.txt         |    3 +
9
 .../lfpreviewer-1.0.1-cp311-cp311-linux_x86_64.whl |  Bin 0 -> 53330 bytes
10
 lfpreviewer/lfpreviewer-1.0.1.tar.gz               |  Bin 0 -> 33638 bytes
11
 lfpreviewer/lfpreviewer/X/Xlib.h                   | 4025 ++++++++++++++++++++
12
 lfpreviewer/setup.py                               |    2 +-
13
 6 files changed, 4032 insertions(+), 2 deletions(-)
14
15
diff --git a/PKGBUILD b/PKGBUILD
16
index beb74d1..2b0ba6f 100644
17
--- a/PKGBUILD
18
+++ b/PKGBUILD
19
@@ -33,7 +33,9 @@ package() {
20
   cd "$srcdir/${pkgname}/lfpreviewer"
21
 
22
   pip install . --root="$pkgdir" --prefix=/usr --no-deps
23
-  pip install ./lfpreviewer-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 2>/dev/null || true
24
+  pip install ./lfpreviewer-1.0.1-cp311-cp311-linux_x86_64.whl 2>/dev/null ||
25
+    pip install ./lfpreviewer-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 2>/dev/null || true
26
+
27
 
28
   cd "$srcdir/${pkgname}-${pkgver}-${pkgrel}-${arch}" >/dev/null 2>&1 ||
29
   cd "$srcdir/${pkgname}"
30
diff --git a/lfpreviewer/conda-install-requirements.txt b/lfpreviewer/conda-install-requirements.txt
31
new file mode 100644
32
index 0000000..bc8197b
33
--- /dev/null
34
+++ b/lfpreviewer/conda-install-requirements.txt
35
@@ -0,0 +1,3 @@
36
+xorg-libx11
37
+xorg-libxres
38
+xorg-libxext
39
diff --git a/lfpreviewer/lfpreviewer-1.0.1-cp311-cp311-linux_x86_64.whl b/lfpreviewer/lfpreviewer-1.0.1-cp311-cp311-linux_x86_64.whl
40
new file mode 100644
41
index 0000000..92e4cd2
42
Binary files /dev/null and b/lfpreviewer/lfpreviewer-1.0.1-cp311-cp311-linux_x86_64.whl differ
43
diff --git a/lfpreviewer/lfpreviewer-1.0.1.tar.gz b/lfpreviewer/lfpreviewer-1.0.1.tar.gz
44
new file mode 100644
45
index 0000000..8066cea
46
Binary files /dev/null and b/lfpreviewer/lfpreviewer-1.0.1.tar.gz differ
47
diff --git a/lfpreviewer/lfpreviewer/X/Xlib.h b/lfpreviewer/lfpreviewer/X/Xlib.h
48
new file mode 100644
49
index 0000000..4952e9e
50
--- /dev/null
51
+++ b/lfpreviewer/lfpreviewer/X/Xlib.h
52
@@ -0,0 +1,4025 @@
53
+/*
54
+
55
+Copyright 1985, 1986, 1987, 1991, 1998  The Open Group
56
+
57
+Permission to use, copy, modify, distribute, and sell this software and its
58
+documentation for any purpose is hereby granted without fee, provided that
59
+the above copyright notice appear in all copies and that both that
60
+copyright notice and this permission notice appear in supporting
61
+documentation.
62
+
63
+The above copyright notice and this permission notice shall be included in
64
+all copies or substantial portions of the Software.
65
+
66
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
67
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
68
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
69
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
70
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
71
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72
+
73
+Except as contained in this notice, the name of The Open Group shall not be
74
+used in advertising or otherwise to promote the sale, use or other dealings
75
+in this Software without prior written authorization from The Open Group.
76
+
77
+*/
78
+
79
+
80
+/*
81
+ *	Xlib.h - Header definition and support file for the C subroutine
82
+ *	interface library (Xlib) to the X Window System Protocol (V11).
83
+ *	Structures and symbols starting with "_" are private to the library.
84
+ */
85
+#ifndef _X11_XLIB_H_
86
+#define _X11_XLIB_H_
87
+
88
+#define XlibSpecificationRelease 6
89
+
90
+#include <sys/types.h>
91
+
92
+#if defined(__SCO__) || defined(__UNIXWARE__)
93
+#include <stdint.h>
94
+#endif
95
+
96
+#include <X11/X.h>
97
+
98
+/* applications should not depend on these two headers being included! */
99
+#include <X11/Xfuncproto.h>
100
+#include <X11/Xosdefs.h>
101
+
102
+#ifndef X_WCHAR
103
+#include <stddef.h>
104
+#else
105
+/* replace this with #include or typedef appropriate for your system */
106
+typedef unsigned long wchar_t;
107
+#endif
108
+
109
+
110
+extern int
111
+_Xmblen(
112
+    char *str,
113
+    int len
114
+    );
115
+
116
+/* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
117
+   November 2000. Its presence is indicated through the following macro. */
118
+#define X_HAVE_UTF8_STRING 1
119
+
120
+/* The Xlib structs are full of implicit padding to properly align members.
121
+   We can't clean that up without breaking ABI, so tell clang not to bother
122
+   complaining about it. */
123
+#ifdef __clang__
124
+#pragma clang diagnostic push
125
+#pragma clang diagnostic ignored "-Wpadded"
126
+#endif
127
+
128
+typedef char *XPointer;
129
+
130
+#define Bool int
131
+#define Status int
132
+#define True 1
133
+#define False 0
134
+
135
+#define QueuedAlready 0
136
+#define QueuedAfterReading 1
137
+#define QueuedAfterFlush 2
138
+
139
+#define ConnectionNumber(dpy) 	(((_XPrivDisplay)(dpy))->fd)
140
+#define RootWindow(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->root)
141
+#define DefaultScreen(dpy) 	(((_XPrivDisplay)(dpy))->default_screen)
142
+#define DefaultRootWindow(dpy) 	(ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
143
+#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
144
+#define DefaultGC(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->default_gc)
145
+#define BlackPixel(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->black_pixel)
146
+#define WhitePixel(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->white_pixel)
147
+#define AllPlanes 		((unsigned long)~0L)
148
+#define QLength(dpy) 		(((_XPrivDisplay)(dpy))->qlen)
149
+#define DisplayWidth(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->width)
150
+#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
151
+#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
152
+#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
153
+#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
154
+#define DisplayCells(dpy, scr) 	(DefaultVisual(dpy,scr)->map_entries)
155
+#define ScreenCount(dpy) 	(((_XPrivDisplay)(dpy))->nscreens)
156
+#define ServerVendor(dpy) 	(((_XPrivDisplay)(dpy))->vendor)
157
+#define ProtocolVersion(dpy) 	(((_XPrivDisplay)(dpy))->proto_major_version)
158
+#define ProtocolRevision(dpy) 	(((_XPrivDisplay)(dpy))->proto_minor_version)
159
+#define VendorRelease(dpy) 	(((_XPrivDisplay)(dpy))->release)
160
+#define DisplayString(dpy) 	(((_XPrivDisplay)(dpy))->display_name)
161
+#define DefaultDepth(dpy, scr) 	(ScreenOfDisplay(dpy,scr)->root_depth)
162
+#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
163
+#define BitmapUnit(dpy) 	(((_XPrivDisplay)(dpy))->bitmap_unit)
164
+#define BitmapBitOrder(dpy) 	(((_XPrivDisplay)(dpy))->bitmap_bit_order)
165
+#define BitmapPad(dpy) 		(((_XPrivDisplay)(dpy))->bitmap_pad)
166
+#define ImageByteOrder(dpy) 	(((_XPrivDisplay)(dpy))->byte_order)
167
+#define NextRequest(dpy)	(((_XPrivDisplay)(dpy))->request + 1)
168
+#define LastKnownRequestProcessed(dpy)	(((_XPrivDisplay)(dpy))->last_request_read)
169
+
170
+/* macros for screen oriented applications (toolkit) */
171
+#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)(dpy))->screens[scr])
172
+#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
173
+#define DisplayOfScreen(s)	((s)->display)
174
+#define RootWindowOfScreen(s)	((s)->root)
175
+#define BlackPixelOfScreen(s)	((s)->black_pixel)
176
+#define WhitePixelOfScreen(s)	((s)->white_pixel)
177
+#define DefaultColormapOfScreen(s)((s)->cmap)
178
+#define DefaultDepthOfScreen(s)	((s)->root_depth)
179
+#define DefaultGCOfScreen(s)	((s)->default_gc)
180
+#define DefaultVisualOfScreen(s)((s)->root_visual)
181
+#define WidthOfScreen(s)	((s)->width)
182
+#define HeightOfScreen(s)	((s)->height)
183
+#define WidthMMOfScreen(s)	((s)->mwidth)
184
+#define HeightMMOfScreen(s)	((s)->mheight)
185
+#define PlanesOfScreen(s)	((s)->root_depth)
186
+#define CellsOfScreen(s)	(DefaultVisualOfScreen((s))->map_entries)
187
+#define MinCmapsOfScreen(s)	((s)->min_maps)
188
+#define MaxCmapsOfScreen(s)	((s)->max_maps)
189
+#define DoesSaveUnders(s)	((s)->save_unders)
190
+#define DoesBackingStore(s)	((s)->backing_store)
191
+#define EventMaskOfScreen(s)	((s)->root_input_mask)
192
+
193
+/*
194
+ * Extensions need a way to hang private data on some structures.
195
+ */
196
+typedef struct _XExtData {
197
+	int number;		/* number returned by XRegisterExtension */
198
+	struct _XExtData *next;	/* next item on list of data for structure */
199
+	int (*free_private)(	/* called to free private storage */
200
+	struct _XExtData *extension
201
+	);
202
+	XPointer private_data;	/* data private to this extension. */
203
+} XExtData;
204
+
205
+/*
206
+ * This file contains structures used by the extension mechanism.
207
+ */
208
+typedef struct {		/* public to extension, cannot be changed */
209
+	int extension;		/* extension number */
210
+	int major_opcode;	/* major op-code assigned by server */
211
+	int first_event;	/* first event number for the extension */
212
+	int first_error;	/* first error number for the extension */
213
+} XExtCodes;
214
+
215
+/*
216
+ * Data structure for retrieving info about pixmap formats.
217
+ */
218
+
219
+typedef struct {
220
+    int depth;
221
+    int bits_per_pixel;
222
+    int scanline_pad;
223
+} XPixmapFormatValues;
224
+
225
+
226
+/*
227
+ * Data structure for setting graphics context.
228
+ */
229
+typedef struct {
230
+	int function;		/* logical operation */
231
+	unsigned long plane_mask;/* plane mask */
232
+	unsigned long foreground;/* foreground pixel */
233
+	unsigned long background;/* background pixel */
234
+	int line_width;		/* line width */
235
+	int line_style;	 	/* LineSolid, LineOnOffDash, LineDoubleDash */
236
+	int cap_style;	  	/* CapNotLast, CapButt,
237
+				   CapRound, CapProjecting */
238
+	int join_style;	 	/* JoinMiter, JoinRound, JoinBevel */
239
+	int fill_style;	 	/* FillSolid, FillTiled,
240
+				   FillStippled, FillOpaqueStippled */
241
+	int fill_rule;	  	/* EvenOddRule, WindingRule */
242
+	int arc_mode;		/* ArcChord, ArcPieSlice */
243
+	Pixmap tile;		/* tile pixmap for tiling operations */
244
+	Pixmap stipple;		/* stipple 1 plane pixmap for stippling */
245
+	int ts_x_origin;	/* offset for tile or stipple operations */
246
+	int ts_y_origin;
247
+        Font font;	        /* default text font for text operations */
248
+	int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
249
+	Bool graphics_exposures;/* boolean, should exposures be generated */
250
+	int clip_x_origin;	/* origin for clipping */
251
+	int clip_y_origin;
252
+	Pixmap clip_mask;	/* bitmap clipping; other calls for rects */
253
+	int dash_offset;	/* patterned/dashed line information */
254
+	char dashes;
255
+} XGCValues;
256
+
257
+/*
258
+ * Graphics context.  The contents of this structure are implementation
259
+ * dependent.  A GC should be treated as opaque by application code.
260
+ */
261
+
262
+typedef struct _XGC
263
+#ifdef XLIB_ILLEGAL_ACCESS
264
+{
265
+    XExtData *ext_data;	/* hook for extension to hang data */
266
+    GContext gid;	/* protocol ID for graphics context */
267
+    /* there is more to this structure, but it is private to Xlib */
268
+}
269
+#endif
270
+*GC;
271
+
272
+/*
273
+ * Visual structure; contains information about colormapping possible.
274
+ */
275
+typedef struct {
276
+	XExtData *ext_data;	/* hook for extension to hang data */
277
+	VisualID visualid;	/* visual id of this visual */
278
+#if defined(__cplusplus) || defined(c_plusplus)
279
+	int c_class;		/* C++ class of screen (monochrome, etc.) */
280
+#else
281
+	int class;		/* class of screen (monochrome, etc.) */
282
+#endif
283
+	unsigned long red_mask, green_mask, blue_mask;	/* mask values */
284
+	int bits_per_rgb;	/* log base 2 of distinct color values */
285
+	int map_entries;	/* color map entries */
286
+} Visual;
287
+
288
+/*
289
+ * Depth structure; contains information for each possible depth.
290
+ */
291
+typedef struct {
292
+	int depth;		/* this depth (Z) of the depth */
293
+	int nvisuals;		/* number of Visual types at this depth */
294
+	Visual *visuals;	/* list of visuals possible at this depth */
295
+} Depth;
296
+
297
+/*
298
+ * Information about the screen.  The contents of this structure are
299
+ * implementation dependent.  A Screen should be treated as opaque
300
+ * by application code.
301
+ */
302
+
303
+struct _XDisplay;		/* Forward declare before use for C++ */
304
+
305
+typedef struct {
306
+	XExtData *ext_data;	/* hook for extension to hang data */
307
+	struct _XDisplay *display;/* back pointer to display structure */
308
+	Window root;		/* Root window id. */
309
+	int width, height;	/* width and height of screen */
310
+	int mwidth, mheight;	/* width and height of  in millimeters */
311
+	int ndepths;		/* number of depths possible */
312
+	Depth *depths;		/* list of allowable depths on the screen */
313
+	int root_depth;		/* bits per pixel */
314
+	Visual *root_visual;	/* root visual */
315
+	GC default_gc;		/* GC for the root root visual */
316
+	Colormap cmap;		/* default color map */
317
+	unsigned long white_pixel;
318
+	unsigned long black_pixel;	/* White and Black pixel values */
319
+	int max_maps, min_maps;	/* max and min color maps */
320
+	int backing_store;	/* Never, WhenMapped, Always */
321
+	Bool save_unders;
322
+	long root_input_mask;	/* initial root input mask */
323
+} Screen;
324
+
325
+/*
326
+ * Format structure; describes ZFormat data the screen will understand.
327
+ */
328
+typedef struct {
329
+	XExtData *ext_data;	/* hook for extension to hang data */
330
+	int depth;		/* depth of this image format */
331
+	int bits_per_pixel;	/* bits/pixel at this depth */
332
+	int scanline_pad;	/* scanline must padded to this multiple */
333
+} ScreenFormat;
334
+
335
+/*
336
+ * Data structure for setting window attributes.
337
+ */
338
+typedef struct {
339
+    Pixmap background_pixmap;	/* background or None or ParentRelative */
340
+    unsigned long background_pixel;	/* background pixel */
341
+    Pixmap border_pixmap;	/* border of the window */
342
+    unsigned long border_pixel;	/* border pixel value */
343
+    int bit_gravity;		/* one of bit gravity values */
344
+    int win_gravity;		/* one of the window gravity values */
345
+    int backing_store;		/* NotUseful, WhenMapped, Always */
346
+    unsigned long backing_planes;/* planes to be preserved if possible */
347
+    unsigned long backing_pixel;/* value to use in restoring planes */
348
+    Bool save_under;		/* should bits under be saved? (popups) */
349
+    long event_mask;		/* set of events that should be saved */
350
+    long do_not_propagate_mask;	/* set of events that should not propagate */
351
+    Bool override_redirect;	/* boolean value for override-redirect */
352
+    Colormap colormap;		/* color map to be associated with window */
353
+    Cursor cursor;		/* cursor to be displayed (or None) */
354
+} XSetWindowAttributes;
355
+
356
+typedef struct {
357
+    int x, y;			/* location of window */
358
+    int width, height;		/* width and height of window */
359
+    int border_width;		/* border width of window */
360
+    int depth;          	/* depth of window */
361
+    Visual *visual;		/* the associated visual structure */
362
+    Window root;        	/* root of screen containing window */
363
+#if defined(__cplusplus) || defined(c_plusplus)
364
+    int c_class;		/* C++ InputOutput, InputOnly*/
365
+#else
366
+    int class;			/* InputOutput, InputOnly*/
367
+#endif
368
+    int bit_gravity;		/* one of bit gravity values */
369
+    int win_gravity;		/* one of the window gravity values */
370
+    int backing_store;		/* NotUseful, WhenMapped, Always */
371
+    unsigned long backing_planes;/* planes to be preserved if possible */
372
+    unsigned long backing_pixel;/* value to be used when restoring planes */
373
+    Bool save_under;		/* boolean, should bits under be saved? */
374
+    Colormap colormap;		/* color map to be associated with window */
375
+    Bool map_installed;		/* boolean, is color map currently installed*/
376
+    int map_state;		/* IsUnmapped, IsUnviewable, IsViewable */
377
+    long all_event_masks;	/* set of events all people have interest in*/
378
+    long your_event_mask;	/* my event mask */
379
+    long do_not_propagate_mask; /* set of events that should not propagate */
380
+    Bool override_redirect;	/* boolean value for override-redirect */
381
+    Screen *screen;		/* back pointer to correct screen */
382
+} XWindowAttributes;
383
+
384
+/*
385
+ * Data structure for host setting; getting routines.
386
+ *
387
+ */
388
+
389
+typedef struct {
390
+	int family;		/* for example FamilyInternet */
391
+	int length;		/* length of address, in bytes */
392
+	char *address;		/* pointer to where to find the bytes */
393
+} XHostAddress;
394
+
395
+/*
396
+ * Data structure for ServerFamilyInterpreted addresses in host routines
397
+ */
398
+typedef struct {
399
+	int typelength;		/* length of type string, in bytes */
400
+	int valuelength;	/* length of value string, in bytes */
401
+	char *type;		/* pointer to where to find the type string */
402
+	char *value;		/* pointer to where to find the address */
403
+} XServerInterpretedAddress;
404
+
405
+/*
406
+ * Data structure for "image" data, used by image manipulation routines.
407
+ */
408
+typedef struct _XImage {
409
+    int width, height;		/* size of image */
410
+    int xoffset;		/* number of pixels offset in X direction */
411
+    int format;			/* XYBitmap, XYPixmap, ZPixmap */
412
+    char *data;			/* pointer to image data */
413
+    int byte_order;		/* data byte order, LSBFirst, MSBFirst */
414
+    int bitmap_unit;		/* quant. of scanline 8, 16, 32 */
415
+    int bitmap_bit_order;	/* LSBFirst, MSBFirst */
416
+    int bitmap_pad;		/* 8, 16, 32 either XY or ZPixmap */
417
+    int depth;			/* depth of image */
418
+    int bytes_per_line;		/* accelerator to next line */
419
+    int bits_per_pixel;		/* bits per pixel (ZPixmap) */
420
+    unsigned long red_mask;	/* bits in z arrangement */
421
+    unsigned long green_mask;
422
+    unsigned long blue_mask;
423
+    XPointer obdata;		/* hook for the object routines to hang on */
424
+    struct funcs {		/* image manipulation routines */
425
+	struct _XImage *(*create_image)(
426
+		struct _XDisplay* /* display */,
427
+		Visual*		/* visual */,
428
+		unsigned int	/* depth */,
429
+		int		/* format */,
430
+		int		/* offset */,
431
+		char*		/* data */,
432
+		unsigned int	/* width */,
433
+		unsigned int	/* height */,
434
+		int		/* bitmap_pad */,
435
+		int		/* bytes_per_line */);
436
+	int (*destroy_image)        (struct _XImage *);
437
+	unsigned long (*get_pixel)  (struct _XImage *, int, int);
438
+	int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
439
+	struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
440
+	int (*add_pixel)            (struct _XImage *, long);
441
+	} f;
442
+} XImage;
443
+
444
+/*
445
+ * Data structure for XReconfigureWindow
446
+ */
447
+typedef struct {
448
+    int x, y;
449
+    int width, height;
450
+    int border_width;
451
+    Window sibling;
452
+    int stack_mode;
453
+} XWindowChanges;
454
+
455
+/*
456
+ * Data structure used by color operations
457
+ */
458
+typedef struct {
459
+	unsigned long pixel;
460
+	unsigned short red, green, blue;
461
+	char flags;  /* do_red, do_green, do_blue */
462
+	char pad;
463
+} XColor;
464
+
465
+/*
466
+ * Data structures for graphics operations.  On most machines, these are
467
+ * congruent with the wire protocol structures, so reformatting the data
468
+ * can be avoided on these architectures.
469
+ */
470
+typedef struct {
471
+    short x1, y1, x2, y2;
472
+} XSegment;
473
+
474
+typedef struct {
475
+    short x, y;
476
+} XPoint;
477
+
478
+typedef struct {
479
+    short x, y;
480
+    unsigned short width, height;
481
+} XRectangle;
482
+
483
+typedef struct {
484
+    short x, y;
485
+    unsigned short width, height;
486
+    short angle1, angle2;
487
+} XArc;
488
+
489
+
490
+/* Data structure for XChangeKeyboardControl */
491
+
492
+typedef struct {
493
+        int key_click_percent;
494
+        int bell_percent;
495
+        int bell_pitch;
496
+        int bell_duration;
497
+        int led;
498
+        int led_mode;
499
+        int key;
500
+        int auto_repeat_mode;   /* On, Off, Default */
501
+} XKeyboardControl;
502
+
503
+/* Data structure for XGetKeyboardControl */
504
+
505
+typedef struct {
506
+        int key_click_percent;
507
+	int bell_percent;
508
+	unsigned int bell_pitch, bell_duration;
509
+	unsigned long led_mask;
510
+	int global_auto_repeat;
511
+	char auto_repeats[32];
512
+} XKeyboardState;
513
+
514
+/* Data structure for XGetMotionEvents.  */
515
+
516
+typedef struct {
517
+        Time time;
518
+	short x, y;
519
+} XTimeCoord;
520
+
521
+/* Data structure for X{Set,Get}ModifierMapping */
522
+
523
+typedef struct {
524
+ 	int max_keypermod;	/* The server's max # of keys per modifier */
525
+ 	KeyCode *modifiermap;	/* An 8 by max_keypermod array of modifiers */
526
+} XModifierKeymap;
527
+
528
+
529
+/*
530
+ * Display datatype maintaining display specific data.
531
+ * The contents of this structure are implementation dependent.
532
+ * A Display should be treated as opaque by application code.
533
+ */
534
+#ifndef XLIB_ILLEGAL_ACCESS
535
+typedef struct _XDisplay Display;
536
+#endif
537
+
538
+struct _XPrivate;		/* Forward declare before use for C++ */
539
+struct _XrmHashBucketRec;
540
+
541
+typedef struct
542
+#ifdef XLIB_ILLEGAL_ACCESS
543
+_XDisplay
544
+#endif
545
+{
546
+	XExtData *ext_data;	/* hook for extension to hang data */
547
+	struct _XPrivate *private1;
548
+	int fd;			/* Network socket. */
549
+	int private2;
550
+	int proto_major_version;/* major version of server's X protocol */
551
+	int proto_minor_version;/* minor version of servers X protocol */
552
+	char *vendor;		/* vendor of the server hardware */
553
+        XID private3;
554
+	XID private4;
555
+	XID private5;
556
+	int private6;
557
+	XID (*resource_alloc)(	/* allocator function */
558
+		struct _XDisplay*
559
+	);
560
+	int byte_order;		/* screen byte order, LSBFirst, MSBFirst */
561
+	int bitmap_unit;	/* padding and data requirements */
562
+	int bitmap_pad;		/* padding requirements on bitmaps */
563
+	int bitmap_bit_order;	/* LeastSignificant or MostSignificant */
564
+	int nformats;		/* number of pixmap formats in list */
565
+	ScreenFormat *pixmap_format;	/* pixmap format list */
566
+	int private8;
567
+	int release;		/* release of the server */
568
+	struct _XPrivate *private9, *private10;
569
+	int qlen;		/* Length of input event queue */
570
+	unsigned long last_request_read; /* seq number of last event read */
571
+	unsigned long request;	/* sequence number of last request. */
572
+	XPointer private11;
573
+	XPointer private12;
574
+	XPointer private13;
575
+	XPointer private14;
576
+	unsigned max_request_size; /* maximum number 32 bit words in request*/
577
+	struct _XrmHashBucketRec *db;
578
+	int (*private15)(
579
+		struct _XDisplay*
580
+		);
581
+	char *display_name;	/* "host:display" string used on this connect*/
582
+	int default_screen;	/* default screen for operations */
583
+	int nscreens;		/* number of screens on this server*/
584
+	Screen *screens;	/* pointer to list of screens */
585
+	unsigned long motion_buffer;	/* size of motion buffer */
586
+	unsigned long private16;
587
+	int min_keycode;	/* minimum defined keycode */
588
+	int max_keycode;	/* maximum defined keycode */
589
+	XPointer private17;
590
+	XPointer private18;
591
+	int private19;
592
+	char *xdefaults;	/* contents of defaults from server */
593
+	/* there is more to this structure, but it is private to Xlib */
594
+}
595
+#ifdef XLIB_ILLEGAL_ACCESS
596
+Display,
597
+#endif
598
+*_XPrivDisplay;
599
+
600
+#undef _XEVENT_
601
+#ifndef _XEVENT_
602
+/*
603
+ * Definitions of specific events.
604
+ */
605
+typedef struct {
606
+	int type;		/* of event */
607
+	unsigned long serial;	/* # of last request processed by server */
608
+	Bool send_event;	/* true if this came from a SendEvent request */
609
+	Display *display;	/* Display the event was read from */
610
+	Window window;	        /* "event" window it is reported relative to */
611
+	Window root;	        /* root window that the event occurred on */
612
+	Window subwindow;	/* child window */
613
+	Time time;		/* milliseconds */
614
+	int x, y;		/* pointer x, y coordinates in event window */
615
+	int x_root, y_root;	/* coordinates relative to root */
616
+	unsigned int state;	/* key or button mask */
617
+	unsigned int keycode;	/* detail */
618
+	Bool same_screen;	/* same screen flag */
619
+} XKeyEvent;
620
+typedef XKeyEvent XKeyPressedEvent;
621
+typedef XKeyEvent XKeyReleasedEvent;
622
+
623
+typedef struct {
624
+	int type;		/* of event */
625
+	unsigned long serial;	/* # of last request processed by server */
626
+	Bool send_event;	/* true if this came from a SendEvent request */
627
+	Display *display;	/* Display the event was read from */
628
+	Window window;	        /* "event" window it is reported relative to */
629
+	Window root;	        /* root window that the event occurred on */
630
+	Window subwindow;	/* child window */
631
+	Time time;		/* milliseconds */
632
+	int x, y;		/* pointer x, y coordinates in event window */
633
+	int x_root, y_root;	/* coordinates relative to root */
634
+	unsigned int state;	/* key or button mask */
635
+	unsigned int button;	/* detail */
636
+	Bool same_screen;	/* same screen flag */
637
+} XButtonEvent;
638
+typedef XButtonEvent XButtonPressedEvent;
639
+typedef XButtonEvent XButtonReleasedEvent;
640
+
641
+typedef struct {
642
+	int type;		/* of event */
643
+	unsigned long serial;	/* # of last request processed by server */
644
+	Bool send_event;	/* true if this came from a SendEvent request */
645
+	Display *display;	/* Display the event was read from */
646
+	Window window;	        /* "event" window reported relative to */
647
+	Window root;	        /* root window that the event occurred on */
648
+	Window subwindow;	/* child window */
649
+	Time time;		/* milliseconds */
650
+	int x, y;		/* pointer x, y coordinates in event window */
651
+	int x_root, y_root;	/* coordinates relative to root */
652
+	unsigned int state;	/* key or button mask */
653
+	char is_hint;		/* detail */
654
+	Bool same_screen;	/* same screen flag */
655
+} XMotionEvent;
656
+typedef XMotionEvent XPointerMovedEvent;
657
+
658
+typedef struct {
659
+	int type;		/* of event */
660
+	unsigned long serial;	/* # of last request processed by server */
661
+	Bool send_event;	/* true if this came from a SendEvent request */
662
+	Display *display;	/* Display the event was read from */
663
+	Window window;	        /* "event" window reported relative to */
664
+	Window root;	        /* root window that the event occurred on */
665
+	Window subwindow;	/* child window */
666
+	Time time;		/* milliseconds */
667
+	int x, y;		/* pointer x, y coordinates in event window */
668
+	int x_root, y_root;	/* coordinates relative to root */
669
+	int mode;		/* NotifyNormal, NotifyGrab, NotifyUngrab */
670
+	int detail;
671
+	/*
672
+	 * NotifyAncestor, NotifyVirtual, NotifyInferior,
673
+	 * NotifyNonlinear,NotifyNonlinearVirtual
674
+	 */
675
+	Bool same_screen;	/* same screen flag */
676
+	Bool focus;		/* boolean focus */
677
+	unsigned int state;	/* key or button mask */
678
+} XCrossingEvent;
679
+typedef XCrossingEvent XEnterWindowEvent;
680
+typedef XCrossingEvent XLeaveWindowEvent;
681
+
682
+typedef struct {
683
+	int type;		/* FocusIn or FocusOut */
684
+	unsigned long serial;	/* # of last request processed by server */
685
+	Bool send_event;	/* true if this came from a SendEvent request */
686
+	Display *display;	/* Display the event was read from */
687
+	Window window;		/* window of event */
688
+	int mode;		/* NotifyNormal, NotifyWhileGrabbed,
689
+				   NotifyGrab, NotifyUngrab */
690
+	int detail;
691
+	/*
692
+	 * NotifyAncestor, NotifyVirtual, NotifyInferior,
693
+	 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
694
+	 * NotifyPointerRoot, NotifyDetailNone
695
+	 */
696
+} XFocusChangeEvent;
697
+typedef XFocusChangeEvent XFocusInEvent;
698
+typedef XFocusChangeEvent XFocusOutEvent;
699
+
700
+/* generated on EnterWindow and FocusIn  when KeyMapState selected */
701
+typedef struct {
702
+	int type;
703
+	unsigned long serial;	/* # of last request processed by server */
704
+	Bool send_event;	/* true if this came from a SendEvent request */
705
+	Display *display;	/* Display the event was read from */
706
+	Window window;
707
+	char key_vector[32];
708
+} XKeymapEvent;
709
+
710
+typedef struct {
711
+	int type;
712
+	unsigned long serial;	/* # of last request processed by server */
713
+	Bool send_event;	/* true if this came from a SendEvent request */
714
+	Display *display;	/* Display the event was read from */
715
+	Window window;
716
+	int x, y;
717
+	int width, height;
718
+	int count;		/* if non-zero, at least this many more */
719
+} XExposeEvent;
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
+	Drawable drawable;
727
+	int x, y;
728
+	int width, height;
729
+	int count;		/* if non-zero, at least this many more */
730
+	int major_code;		/* core is CopyArea or CopyPlane */
731
+	int minor_code;		/* not defined in the core */
732
+} XGraphicsExposeEvent;
733
+
734
+typedef struct {
735
+	int type;
736
+	unsigned long serial;	/* # of last request processed by server */
737
+	Bool send_event;	/* true if this came from a SendEvent request */
738
+	Display *display;	/* Display the event was read from */
739
+	Drawable drawable;
740
+	int major_code;		/* core is CopyArea or CopyPlane */
741
+	int minor_code;		/* not defined in the core */
742
+} XNoExposeEvent;
743
+
744
+typedef struct {
745
+	int type;
746
+	unsigned long serial;	/* # of last request processed by server */
747
+	Bool send_event;	/* true if this came from a SendEvent request */
748
+	Display *display;	/* Display the event was read from */
749
+	Window window;
750
+	int state;		/* Visibility state */
751
+} XVisibilityEvent;
752
+
753
+typedef struct {
754
+	int type;
755
+	unsigned long serial;	/* # of last request processed by server */
756
+	Bool send_event;	/* true if this came from a SendEvent request */
757
+	Display *display;	/* Display the event was read from */
758
+	Window parent;		/* parent of the window */
759
+	Window window;		/* window id of window created */
760
+	int x, y;		/* window location */
761
+	int width, height;	/* size of window */
762
+	int border_width;	/* border width */
763
+	Bool override_redirect;	/* creation should be overridden */
764
+} XCreateWindowEvent;
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
+} XDestroyWindowEvent;
774
+
775
+typedef struct {
776
+	int type;
777
+	unsigned long serial;	/* # of last request processed by server */
778
+	Bool send_event;	/* true if this came from a SendEvent request */
779
+	Display *display;	/* Display the event was read from */
780
+	Window event;
781
+	Window window;
782
+	Bool from_configure;
783
+} XUnmapEvent;
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 event;
791
+	Window window;
792
+	Bool override_redirect;	/* boolean, is override set... */
793
+} XMapEvent;
794
+
795
+typedef struct {
796
+	int type;
797
+	unsigned long serial;	/* # of last request processed by server */
798
+	Bool send_event;	/* true if this came from a SendEvent request */
799
+	Display *display;	/* Display the event was read from */
800
+	Window parent;
801
+	Window window;
802
+} XMapRequestEvent;
803
+
804
+typedef struct {
805
+	int type;
806
+	unsigned long serial;	/* # of last request processed by server */
807
+	Bool send_event;	/* true if this came from a SendEvent request */
808
+	Display *display;	/* Display the event was read from */
809
+	Window event;
810
+	Window window;
811
+	Window parent;
812
+	int x, y;
813
+	Bool override_redirect;
814
+} XReparentEvent;
815
+
816
+typedef struct {
817
+	int type;
818
+	unsigned long serial;	/* # of last request processed by server */
819
+	Bool send_event;	/* true if this came from a SendEvent request */
820
+	Display *display;	/* Display the event was read from */
821
+	Window event;
822
+	Window window;
823
+	int x, y;
824
+	int width, height;
825
+	int border_width;
826
+	Window above;
827
+	Bool override_redirect;
828
+} XConfigureEvent;
829
+
830
+typedef struct {
831
+	int type;
832
+	unsigned long serial;	/* # of last request processed by server */
833
+	Bool send_event;	/* true if this came from a SendEvent request */
834
+	Display *display;	/* Display the event was read from */
835
+	Window event;
836
+	Window window;
837
+	int x, y;
838
+} XGravityEvent;
839
+
840
+typedef struct {
841
+	int type;
842
+	unsigned long serial;	/* # of last request processed by server */
843
+	Bool send_event;	/* true if this came from a SendEvent request */
844
+	Display *display;	/* Display the event was read from */
845
+	Window window;
846
+	int width, height;
847
+} XResizeRequestEvent;
848
+
849
+typedef struct {
850
+	int type;
851
+	unsigned long serial;	/* # of last request processed by server */
852
+	Bool send_event;	/* true if this came from a SendEvent request */
853
+	Display *display;	/* Display the event was read from */
854
+	Window parent;
855
+	Window window;
856
+	int x, y;
857
+	int width, height;
858
+	int border_width;
859
+	Window above;
860
+	int detail;		/* Above, Below, TopIf, BottomIf, Opposite */
861
+	unsigned long value_mask;
862
+} XConfigureRequestEvent;
863
+
864
+typedef struct {
865
+	int type;
866
+	unsigned long serial;	/* # of last request processed by server */
867
+	Bool send_event;	/* true if this came from a SendEvent request */
868
+	Display *display;	/* Display the event was read from */
869
+	Window event;
870
+	Window window;
871
+	int place;		/* PlaceOnTop, PlaceOnBottom */
872
+} XCirculateEvent;
873
+
874
+typedef struct {
875
+	int type;
876
+	unsigned long serial;	/* # of last request processed by server */
877
+	Bool send_event;	/* true if this came from a SendEvent request */
878
+	Display *display;	/* Display the event was read from */
879
+	Window parent;
880
+	Window window;
881
+	int place;		/* PlaceOnTop, PlaceOnBottom */
882
+} XCirculateRequestEvent;
883
+
884
+typedef struct {
885
+	int type;
886
+	unsigned long serial;	/* # of last request processed by server */
887
+	Bool send_event;	/* true if this came from a SendEvent request */
888
+	Display *display;	/* Display the event was read from */
889
+	Window window;
890
+	Atom atom;
891
+	Time time;
892
+	int state;		/* NewValue, Deleted */
893
+} XPropertyEvent;
894
+
895
+typedef struct {
896
+	int type;
897
+	unsigned long serial;	/* # of last request processed by server */
898
+	Bool send_event;	/* true if this came from a SendEvent request */
899
+	Display *display;	/* Display the event was read from */
900
+	Window window;
901
+	Atom selection;
902
+	Time time;
903
+} XSelectionClearEvent;
904
+
905
+typedef struct {
906
+	int type;
907
+	unsigned long serial;	/* # of last request processed by server */
908
+	Bool send_event;	/* true if this came from a SendEvent request */
909
+	Display *display;	/* Display the event was read from */
910
+	Window owner;
911
+	Window requestor;
912
+	Atom selection;
913
+	Atom target;
914
+	Atom property;
915
+	Time time;
916
+} XSelectionRequestEvent;
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 requestor;
924
+	Atom selection;
925
+	Atom target;
926
+	Atom property;		/* ATOM or None */
927
+	Time time;
928
+} XSelectionEvent;
929
+
930
+typedef struct {
931
+	int type;
932
+	unsigned long serial;	/* # of last request processed by server */
933
+	Bool send_event;	/* true if this came from a SendEvent request */
934
+	Display *display;	/* Display the event was read from */
935
+	Window window;
936
+	Colormap colormap;	/* COLORMAP or None */
937
+#if defined(__cplusplus) || defined(c_plusplus)
938
+	Bool c_new;		/* C++ */
939
+#else
940
+	Bool new;
941
+#endif
942
+	int state;		/* ColormapInstalled, ColormapUninstalled */
943
+} XColormapEvent;
944
+
945
+typedef struct {
946
+	int type;
947
+	unsigned long serial;	/* # of last request processed by server */
948
+	Bool send_event;	/* true if this came from a SendEvent request */
949
+	Display *display;	/* Display the event was read from */
950
+	Window window;
951
+	Atom message_type;
952
+	int format;
953
+	union {
954
+		char b[20];
955
+		short s[10];
956
+		long l[5];
957
+		} data;
958
+} XClientMessageEvent;
959
+
960
+typedef struct {
961
+	int type;
962
+	unsigned long serial;	/* # of last request processed by server */
963
+	Bool send_event;	/* true if this came from a SendEvent request */
964
+	Display *display;	/* Display the event was read from */
965
+	Window window;		/* unused */
966
+	int request;		/* one of MappingModifier, MappingKeyboard,
967
+				   MappingPointer */
968
+	int first_keycode;	/* first keycode */
969
+	int count;		/* defines range of change w. first_keycode*/
970
+} XMappingEvent;
971
+
972
+typedef struct {
973
+	int type;
974
+	Display *display;	/* Display the event was read from */
975
+	XID resourceid;		/* resource id */
976
+	unsigned long serial;	/* serial number of failed request */
977
+	unsigned char error_code;	/* error code of failed request */
978
+	unsigned char request_code;	/* Major op-code of failed request */
979
+	unsigned char minor_code;	/* Minor op-code of failed request */
980
+} XErrorEvent;
981
+
982
+typedef struct {
983
+	int type;
984
+	unsigned long serial;	/* # of last request processed by server */
985
+	Bool send_event;	/* true if this came from a SendEvent request */
986
+	Display *display;/* Display the event was read from */
987
+	Window window;	/* window on which event was requested in event mask */
988
+} XAnyEvent;
989
+
990
+
991
+/***************************************************************
992
+ *
993
+ * GenericEvent.  This event is the standard event for all newer extensions.
994
+ */
995
+
996
+typedef struct
997
+    {
998
+    int            type;         /* of event. Always GenericEvent */
999
+    unsigned long  serial;       /* # of last request processed */