summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CVS/Entries11
-rw-r--r--CVS/Repository1
-rw-r--r--CVS/Root1
-rw-r--r--CVS/Template0
-rw-r--r--DECkeysym.h65
-rw-r--r--FS.h129
-rw-r--r--FSproto.h814
-rw-r--r--HPkeysym.h164
-rw-r--r--INSTALL8
-rw-r--r--Makefile482
-rw-r--r--Makefile.in482
-rw-r--r--NEWS2
-rw-r--r--Sunkeysym.h106
-rw-r--r--X.h717
-rw-r--r--XF86keysym.h227
-rw-r--r--XI.h308
-rw-r--r--XI2.h245
-rw-r--r--XI2proto.h1091
-rw-r--r--XIproto.h1758
-rw-r--r--XKB.h786
-rw-r--r--XKBgeom.h662
-rw-r--r--XKBproto.h1281
-rw-r--r--XKBsrv.h1184
-rw-r--r--XKBstr.h642
-rw-r--r--XWDFile.h113
-rw-r--r--Xalloca.h121
-rw-r--r--Xarch.h94
-rw-r--r--Xatom.h79
-rw-r--r--Xdefs.h108
-rw-r--r--Xeviestr.h3
-rw-r--r--Xfuncproto.h.in220
-rw-r--r--Xfuncs.h69
-rw-r--r--Xmd.h142
-rw-r--r--Xos.h148
-rw-r--r--Xos_r.h1095
-rw-r--r--Xosdefs.h116
-rw-r--r--Xpoll.h.in230
-rw-r--r--Xproto.h2157
-rw-r--r--Xprotostr.h77
-rw-r--r--Xthreads.h314
-rw-r--r--Xw32defs.h79
-rw-r--r--Xwindows.h114
-rw-r--r--Xwinsock.h77
-rw-r--r--aclocal.m4585
-rw-r--r--ap_keysym.h51
-rw-r--r--applewmconst.h84
-rw-r--r--applewmproto.h293
-rw-r--r--applewmproto.pc.in9
-rw-r--r--applewmproto/.gitignore78
-rw-r--r--applewmproto/COPYING27
-rw-r--r--applewmproto/Makefile.am19
-rw-r--r--applewmproto/README31
-rwxr-xr-xapplewmproto/autogen.sh14
-rw-r--r--applewmproto/configure.ac13
-rw-r--r--autom4te.cache/output.02612
-rw-r--r--autom4te.cache/output.12626
-rw-r--r--autom4te.cache/output.22626
-rw-r--r--autom4te.cache/requests418
-rw-r--r--autom4te.cache/traces.0128
-rw-r--r--autom4te.cache/traces.197
-rw-r--r--autom4te.cache/traces.2630
-rw-r--r--bigreqsproto.h67
-rw-r--r--bigreqsproto.pc.in9
-rw-r--r--bigreqsproto/.gitignore78
-rw-r--r--bigreqsproto/COPYING21
-rw-r--r--bigreqsproto/Makefile.am22
-rw-r--r--bigreqsproto/README30
-rwxr-xr-xbigreqsproto/autogen.sh17
-rw-r--r--bigreqsproto/configure.ac20
-rw-r--r--bigreqsproto/docbook.am105
-rw-r--r--bigreqsproto/specs/.gitignore5
-rw-r--r--bigreqsproto/specs/Makefile.am13
-rw-r--r--bigreqstr.h3
-rw-r--r--calibrateproto/Makefile.am39
-rwxr-xr-xcalibrateproto/autogen.sh12
-rw-r--r--calibrateproto/configure.ac6
-rw-r--r--composite.h71
-rw-r--r--compositeproto.h192
-rw-r--r--compositeproto.pc.in9
-rw-r--r--compositeproto.txt299
-rw-r--r--compositeproto/.gitignore78
-rw-r--r--compositeproto/AUTHORS1
-rw-r--r--compositeproto/COPYING41
-rw-r--r--compositeproto/Makefile.am43
-rw-r--r--compositeproto/README33
-rwxr-xr-xcompositeproto/autogen.sh17
-rw-r--r--compositeproto/configure.ac38
-rw-r--r--config.log169
-rwxr-xr-xconfig.status726
-rwxr-xr-xconfigure2626
-rw-r--r--damageproto.h158
-rw-r--r--damageproto.pc.in9
-rw-r--r--damageproto.txt222
-rw-r--r--damageproto/.gitignore78
-rw-r--r--damageproto/AUTHORS2
-rw-r--r--damageproto/COPYING21
-rw-r--r--damageproto/Makefile.am43
-rw-r--r--damageproto/README34
-rwxr-xr-xdamageproto/autogen.sh17
-rw-r--r--damageproto/configure.ac38
-rw-r--r--damagewire.h56
-rw-r--r--dmx.h68
-rw-r--r--dmxproto.h445
-rw-r--r--dmxproto.pc.in9
-rw-r--r--dmxproto/.gitignore78
-rw-r--r--dmxproto/COPYING24
-rw-r--r--dmxproto/Makefile.am20
-rw-r--r--dmxproto/README40
-rwxr-xr-xdmxproto/autogen.sh17
-rw-r--r--dmxproto/configure.ac21
-rw-r--r--dri2proto.h357
-rw-r--r--dri2proto.pc.in9
-rw-r--r--dri2proto.txt909
-rw-r--r--dri2proto/.gitignore78
-rw-r--r--dri2proto/COPYING29
-rw-r--r--dri2proto/Makefile.am20
-rw-r--r--dri2proto/README30
-rwxr-xr-xdri2proto/autogen.sh14
-rw-r--r--dri2proto/configure.ac13
-rw-r--r--dri2tokens.h61
-rw-r--r--dri3proto.h167
-rw-r--r--dri3proto.pc.in9
-rw-r--r--dri3proto.txt378
-rw-r--r--dri3proto/.gitignore78
-rw-r--r--dri3proto/COPYING19
-rw-r--r--dri3proto/Makefile.am19
-rw-r--r--dri3proto/README31
-rwxr-xr-xdri3proto/autogen.sh17
-rw-r--r--dri3proto/configure.ac13
-rw-r--r--evieproto.h156
-rw-r--r--evieproto.pc.in9
-rw-r--r--evieproto/.gitignore78
-rw-r--r--evieproto/COPYING20
-rw-r--r--evieproto/Makefile.am21
-rw-r--r--evieproto/README44
-rwxr-xr-xevieproto/autogen.sh14
-rw-r--r--evieproto/configure.ac19
-rw-r--r--fixesproto.pc.in10
-rw-r--r--fixesproto.txt651
-rw-r--r--fixesproto/.gitignore78
-rw-r--r--fixesproto/AUTHORS1
-rw-r--r--fixesproto/COPYING42
-rw-r--r--fixesproto/Makefile.am43
-rw-r--r--fixesproto/README31
-rwxr-xr-xfixesproto/autogen.sh17
-rw-r--r--fixesproto/configure.ac38
-rw-r--r--font.h168
-rw-r--r--fontcache.h106
-rw-r--r--fontcacheP.h40
-rw-r--r--fontcacheproto.pc.in9
-rw-r--r--fontcacheproto/.gitignore78
-rw-r--r--fontcacheproto/COPYING24
-rw-r--r--fontcacheproto/Makefile.am22
-rw-r--r--fontcacheproto/README30
-rwxr-xr-xfontcacheproto/autogen.sh14
-rw-r--r--fontcacheproto/configure.ac12
-rw-r--r--fontcachstr.h130
-rw-r--r--fontproto.h94
-rw-r--r--fontsproto.pc.in9
-rw-r--r--fontsproto/.gitignore78
-rw-r--r--fontsproto/COPYING86
-rw-r--r--fontsproto/Makefile.am26
-rw-r--r--fontsproto/README25
-rwxr-xr-xfontsproto/autogen.sh17
-rw-r--r--fontsproto/configure.ac20
-rw-r--r--fontsproto/docbook.am105
-rw-r--r--fontsproto/specs/.gitignore5
-rw-r--r--fontsproto/specs/Makefile.am13
-rw-r--r--fontstruct.h297
-rw-r--r--fsmasks.h97
-rw-r--r--glproto.pc.in9
-rw-r--r--glproto/.gitignore78
-rw-r--r--glproto/COPYING27
-rw-r--r--glproto/Makefile.am27
-rw-r--r--glproto/README30
-rwxr-xr-xglproto/autogen.sh17
-rw-r--r--glproto/configure.ac13
-rw-r--r--include/GL/glxint.h137
-rw-r--r--include/GL/glxmd.h54
-rw-r--r--include/GL/glxproto.h2722
-rw-r--r--include/GL/glxtokens.h316
-rw-r--r--include/GL/internal/glcore.h181
-rw-r--r--inputproto.pc.in9
-rw-r--r--inputproto/.gitignore78
-rw-r--r--inputproto/COPYING63
-rw-r--r--inputproto/Makefile.am24
-rw-r--r--inputproto/README30
-rwxr-xr-xinputproto/autogen.sh17
-rw-r--r--inputproto/configure.ac16
-rw-r--r--inputproto/specs/.gitignore1
-rw-r--r--inputproto/specs/Makefile.am14
-rwxr-xr-xinstall-sh316
-rw-r--r--kbproto.pc.in9
-rw-r--r--kbproto/.gitignore78
-rw-r--r--kbproto/COPYING22
-rw-r--r--kbproto/Makefile.am25
-rw-r--r--kbproto/README30
-rwxr-xr-xkbproto/autogen.sh17
-rw-r--r--kbproto/configure.ac20
-rw-r--r--kbproto/docbook.am105
-rw-r--r--kbproto/specs/.gitignore5
-rw-r--r--kbproto/specs/Makefile.am48
-rw-r--r--keysym.h74
-rw-r--r--keysymdef.h2497
-rw-r--r--lg3dproto.pc9
-rw-r--r--lg3dproto.pc.in9
-rw-r--r--lg3dproto/AUTHORS1
-rw-r--r--lg3dproto/COPYING22
-rw-r--r--lg3dproto/Makefile.am39
-rw-r--r--lg3dproto/README9
-rwxr-xr-xlg3dproto/autogen.sh12
-rw-r--r--lg3dproto/configure.ac30
-rw-r--r--lgewire.h120
-rw-r--r--meson.build42
-rwxr-xr-xmissing360
-rw-r--r--specs/SIAddresses/.gitignore4
-rw-r--r--specs/SIAddresses/IPv6.txt11
-rw-r--r--specs/SIAddresses/Makefile.am6
-rw-r--r--specs/SIAddresses/README4
-rw-r--r--specs/SIAddresses/hostname.txt11
-rw-r--r--specs/SIAddresses/localuser.txt20
-rw-r--r--specs/XI2proto.txt2715
-rw-r--r--specs/XIproto.txt2576
-rw-r--r--specs/XKBproto-1.svg1177
-rw-r--r--specs/XKBproto-10.svg142
-rw-r--r--specs/XKBproto-11.svg2730
-rw-r--r--specs/XKBproto-2.svg544
-rw-r--r--specs/XKBproto-3.svg461
-rw-r--r--specs/XKBproto-4.svg463
-rw-r--r--specs/XKBproto-5.svg468
-rw-r--r--specs/XKBproto-6.svg558
-rw-r--r--specs/XKBproto-7.svg474
-rw-r--r--specs/XKBproto-8.svg138
-rw-r--r--specs/XKBproto-9.svg138
-rw-r--r--specs/acknowledgements.xml41
-rw-r--r--specs/appA.xml916
-rw-r--r--specs/appB.xml129
-rw-r--r--specs/appC.xml715
-rw-r--r--specs/appD.xml2096
-rw-r--r--specs/bigreq.xml332
-rw-r--r--specs/ch01.xml101
-rw-r--r--specs/ch02.xml441
-rw-r--r--specs/ch03.xml220
-rw-r--r--specs/ch04.xml865
-rw-r--r--specs/ch05.xml86
-rw-r--r--specs/ch06.xml1767
-rw-r--r--specs/ch07.xml688
-rw-r--r--specs/ch08.xml157
-rw-r--r--specs/ch09.xml605
-rw-r--r--specs/ch10.xml174
-rw-r--r--specs/ch11.xml413
-rw-r--r--specs/ch12.xml1024
-rw-r--r--specs/ch13.xml442
-rw-r--r--specs/ch14.xml94
-rw-r--r--specs/ch15.xml233
-rw-r--r--specs/ch16.xml9427
-rw-r--r--specs/encoding.xml3268
-rw-r--r--specs/fsproto.xml4417
-rw-r--r--specs/glossary.xml1320
-rw-r--r--specs/keysyms.xml6050
-rw-r--r--specs/sect1-9.xml15309
-rw-r--r--specs/x11protocol.xml64
-rw-r--r--specs/xkbproto.xml70
-rw-r--r--x11proto/.gitignore82
-rw-r--r--x11proto/AUTHORS23
-rw-r--r--x11proto/COPYING108
-rw-r--r--x11proto/Makefile.am49
-rw-r--r--x11proto/README32
-rwxr-xr-xx11proto/autogen.sh17
-rw-r--r--x11proto/configure.ac217
-rw-r--r--x11proto/docbook.am105
-rw-r--r--x11proto/specs/.gitignore5
-rw-r--r--x11proto/specs/Makefile.am21
-rw-r--r--xcalibrateproto.h120
-rw-r--r--xcalibrateproto.pc.in9
-rw-r--r--xcalibratewire.h44
-rw-r--r--xfixesproto.h551
-rw-r--r--xfixeswire.h139
-rw-r--r--xproto.pc.in10
279 files changed, 111479 insertions, 0 deletions
diff --git a/CVS/Entries b/CVS/Entries
new file mode 100644
index 0000000..89000c0
--- /dev/null
+++ b/CVS/Entries
@@ -0,0 +1,11 @@
+/COPYING/0/dummy timestamp//
+/ChangeLog/0/dummy timestamp//
+/Makefile.am/0/dummy timestamp//
+/aclocal.m4/0/dummy timestamp//
+/autogen.sh/0/dummy timestamp//
+/configure.ac/0/dummy timestamp//
+/install-sh/0/dummy timestamp//
+/lg3dproto.pc.in/0/dummy timestamp//
+/lgewire.h/0/dummy timestamp//
+/missing/0/dummy timestamp//
+D
diff --git a/CVS/Repository b/CVS/Repository
new file mode 100644
index 0000000..eaf1e5e
--- /dev/null
+++ b/CVS/Repository
@@ -0,0 +1 @@
+proto/Lg3d
diff --git a/CVS/Root b/CVS/Root
new file mode 100644
index 0000000..bbe3733
--- /dev/null
+++ b/CVS/Root
@@ -0,0 +1 @@
+:ext:deronj@cvs.freedesktop.org:/cvs/xorg
diff --git a/CVS/Template b/CVS/Template
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/CVS/Template
diff --git a/DECkeysym.h b/DECkeysym.h
new file mode 100644
index 0000000..0730716
--- /dev/null
+++ b/DECkeysym.h
@@ -0,0 +1,65 @@
+/***********************************************************
+
+Copyright 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+ * DEC private keysyms
+ * (29th bit set)
+ */
+
+/* two-key compose sequence initiators, chosen to map to Latin1 characters */
+
+#define DXK_ring_accent 0x1000FEB0
+#define DXK_circumflex_accent 0x1000FE5E
+#define DXK_cedilla_accent 0x1000FE2C
+#define DXK_acute_accent 0x1000FE27
+#define DXK_grave_accent 0x1000FE60
+#define DXK_tilde 0x1000FE7E
+#define DXK_diaeresis 0x1000FE22
+
+/* special keysym for LK2** "Remove" key on editing keypad */
+
+#define DXK_Remove 0x1000FF00 /* Remove */
diff --git a/FS.h b/FS.h
new file mode 100644
index 0000000..605b5a8
--- /dev/null
+++ b/FS.h
@@ -0,0 +1,129 @@
+/*
+ * Copyright 1990, 1991 Network Computing Devices;
+ * Portions Copyright 1987 by Digital Equipment Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of Network Computing Devices or Digital
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ * Network Computing Devices and Digital make no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
+ * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+/*
+
+Portions Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+#ifndef _FS_H_
+#define _FS_H_
+
+#include <X11/Xdefs.h>
+#include <X11/fonts/fsmasks.h>
+
+#define FS_PROTOCOL 2
+#define FS_PROTOCOL_MINOR 0
+
+#ifndef X_PROTOCOL
+/* protocol familes */
+#define FamilyInternet 0
+#define FamilyDECnet 1
+#define FamilyChaos 2
+#define FamilyInternet6 6
+
+
+typedef unsigned int FSDrawDirection;
+#endif
+
+#ifndef None
+#define None 0L
+#endif
+
+#define LeftToRightDrawDirection 0
+#define RightToLeftDrawDirection 1
+
+/* font info flags */
+#define FontInfoAllCharsExist (1L << 0)
+#define FontInfoInkInside (1L << 1)
+#define FontInfoHorizontalOverlap (1L << 2)
+
+/* auth status flags */
+#define AuthSuccess 0
+#define AuthContinue 1
+#define AuthBusy 2
+#define AuthDenied 3
+
+/* property types */
+#define PropTypeString 0
+#define PropTypeUnsigned 1
+#define PropTypeSigned 2
+
+#ifndef LSBFirst
+/* byte order */
+#define LSBFirst 0
+#define MSBFirst 1
+#endif
+
+/* event masks */
+#define CatalogueChangeNotifyMask (1L << 0)
+#define FontChangeNotifyMask (1L << 1)
+
+/* errors */
+#define FSSuccess -1
+#define FSBadRequest 0
+#define FSBadFormat 1
+#define FSBadFont 2
+#define FSBadRange 3
+#define FSBadEventMask 4
+#define FSBadAccessContext 5
+#define FSBadIDChoice 6
+#define FSBadName 7
+#define FSBadResolution 8
+#define FSBadAlloc 9
+#define FSBadLength 10
+#define FSBadImplementation 11
+
+#define FirstExtensionError 128
+#define LastExtensionError 255
+
+/* events */
+#define KeepAlive 0
+#define CatalogueChangeNotify 1
+#define FontChangeNotify 2
+#define FSLASTEvent 3
+
+#endif /* _FS_H_ */
diff --git a/FSproto.h b/FSproto.h
new file mode 100644
index 0000000..028156f
--- /dev/null
+++ b/FSproto.h
@@ -0,0 +1,814 @@
+/*
+
+Copyright 1990, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+ * Copyright 1990, 1991 Network Computing Devices;
+ * Portions Copyright 1987 by Digital Equipment Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of Network Computing Devices, or Digital
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ *
+ * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
+ * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#ifndef _FS_PROTO_H_
+#define _FS_PROTO_H_
+
+#include <X11/fonts/FS.h>
+
+#define sz_fsPropOffset 20
+#define sz_fsPropInfo 8
+#define sz_fsResolution 6
+
+#define sz_fsChar2b 2
+#define sz_fsChar2b_version1 2
+#define sz_fsOffset32 8
+#define sz_fsRange 4
+
+#define sz_fsXCharInfo 12
+#define sz_fsXFontInfoHeader 40
+
+#define sz_fsConnClientPrefix 8
+#define sz_fsConnSetup 12
+#define sz_fsConnSetupExtra 8
+#define sz_fsConnSetupAccept 12
+
+/* request sizes */
+#define sz_fsReq 4
+#define sz_fsListExtensionsReq 4
+#define sz_fsResourceReq 8
+
+#define sz_fsNoopReq 4
+#define sz_fsListExtensionReq 4
+#define sz_fsQueryExtensionReq 4
+#define sz_fsListCataloguesReq 12
+#define sz_fsSetCataloguesReq 4
+#define sz_fsGetCataloguesReq 4
+#define sz_fsSetEventMaskReq 8
+#define sz_fsGetEventMaskReq 4
+#define sz_fsCreateACReq 8
+#define sz_fsFreeACReq 8
+#define sz_fsSetAuthorizationReq 8
+#define sz_fsSetResolutionReq 4
+#define sz_fsGetResolutionReq 4
+#define sz_fsListFontsReq 12
+#define sz_fsListFontsWithXInfoReq 12
+#define sz_fsOpenBitmapFontReq 16
+#define sz_fsQueryXInfoReq 8
+#define sz_fsQueryXExtents8Req 12
+#define sz_fsQueryXExtents16Req 12
+#define sz_fsQueryXBitmaps8Req 16
+#define sz_fsQueryXBitmaps16Req 16
+#define sz_fsCloseReq 8
+
+/* reply sizes */
+#define sz_fsReply 8
+#define sz_fsGenericReply 8
+
+#define sz_fsListExtensionsReply 8
+#define sz_fsQueryExtensionReply 20
+#define sz_fsListCataloguesReply 16
+#define sz_fsGetCataloguesReply 8
+#define sz_fsGetEventMaskReply 12
+#define sz_fsCreateACReply 12
+#define sz_fsGetResolutionReply 8
+#define sz_fsListFontsReply 16
+#define sz_fsListFontsWithXInfoReply (12 + sz_fsXFontInfoHeader)
+#define sz_fsOpenBitmapFontReply 16
+#define sz_fsQueryXInfoReply (8 + sz_fsXFontInfoHeader)
+#define sz_fsQueryXExtents8Reply 12
+#define sz_fsQueryXExtents16Reply 12
+#define sz_fsQueryXBitmaps8Reply 20
+#define sz_fsQueryXBitmaps16Reply 20
+
+#define sz_fsError 16
+#define sz_fsEvent 12
+#define sz_fsKeepAliveEvent 12
+
+#define fsTrue 1
+#define fsFalse 0
+
+/* temp decls */
+#define Mask CARD32
+#define Font CARD32
+#define AccContext CARD32
+
+typedef CARD32 fsTimestamp;
+
+#ifdef NOTDEF /* in fsmasks.h */
+typedef CARD32 fsBitmapFormat;
+typedef CARD32 fsBitmapFormatMask;
+#endif
+
+#define sz_fsBitmapFormat 4
+
+typedef struct {
+ INT16 left B16,
+ right B16;
+ INT16 width B16;
+ INT16 ascent B16,
+ descent B16;
+ CARD16 attributes B16;
+} fsXCharInfo;
+
+typedef struct {
+ CARD8 high;
+ CARD8 low;
+} fsChar2b;
+
+typedef struct {
+ CARD8 low;
+ CARD8 high;
+} fsChar2b_version1;
+
+typedef struct {
+ CARD8 min_char_high;
+ CARD8 min_char_low;
+ CARD8 max_char_high;
+ CARD8 max_char_low;
+} fsRange;
+
+typedef struct {
+ CARD32 position B32;
+ CARD32 length B32;
+} fsOffset32;
+
+typedef struct {
+ fsOffset32 name;
+ fsOffset32 value;
+ CARD8 type;
+ BYTE pad0;
+ CARD16 pad1 B16;
+} fsPropOffset;
+
+typedef struct {
+ CARD32 num_offsets B32;
+ CARD32 data_len B32;
+ /* offsets */
+ /* data */
+} fsPropInfo;
+
+typedef struct {
+ CARD16 x_resolution B16;
+ CARD16 y_resolution B16;
+ CARD16 point_size B16;
+} fsResolution;
+
+
+typedef struct {
+ CARD32 flags B32;
+ CARD8 char_range_min_char_high;
+ CARD8 char_range_min_char_low;
+ CARD8 char_range_max_char_high;
+ CARD8 char_range_max_char_low;
+
+ CARD8 draw_direction;
+ CARD8 pad;
+ CARD8 default_char_high;
+ CARD8 default_char_low;
+ INT16 min_bounds_left B16;
+ INT16 min_bounds_right B16;
+
+ INT16 min_bounds_width B16;
+ INT16 min_bounds_ascent B16;
+ INT16 min_bounds_descent B16;
+ CARD16 min_bounds_attributes B16;
+
+ INT16 max_bounds_left B16;
+ INT16 max_bounds_right B16;
+ INT16 max_bounds_width B16;
+ INT16 max_bounds_ascent B16;
+
+ INT16 max_bounds_descent B16;
+ CARD16 max_bounds_attributes B16;
+ INT16 font_ascent B16;
+ INT16 font_descent B16;
+ /* propinfo */
+} fsXFontInfoHeader;
+
+
+/* requests */
+
+typedef struct {
+ BYTE byteOrder;
+ CARD8 num_auths;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ CARD16 auth_len B16;
+ /* auth data */
+} fsConnClientPrefix;
+
+typedef struct {
+ CARD16 status B16;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ CARD8 num_alternates;
+ CARD8 auth_index;
+ CARD16 alternate_len B16;
+ CARD16 auth_len B16;
+ /* alternates */
+ /* auth data */
+} fsConnSetup;
+
+typedef struct {
+ CARD32 length B32;
+ CARD16 status B16;
+ CARD16 pad B16;
+ /* more auth data */
+} fsConnSetupExtra;
+
+typedef struct {
+ CARD32 length B32;
+ CARD16 max_request_len B16;
+ CARD16 vendor_len B16;
+ CARD32 release_number B32;
+ /* vendor string */
+} fsConnSetupAccept;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 length B16;
+} fsReq;
+
+/*
+ * The fsFakeReq structure is never used in the protocol; it is prepended
+ * to incoming packets when setting up a connection so we can index
+ * through InitialVector. To avoid alignment problems, it is padded
+ * to the size of a word on the largest machine this code runs on.
+ * Hence no sz_fsFakeReq constant is necessary.
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 length B16;
+ CARD32 pad B32; /* to fill out to multiple of 64 bits */
+} fsFakeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Font id B32;
+} fsResourceReq;
+
+typedef fsReq fsNoopReq;
+typedef fsReq fsListExtensionsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE nbytes;
+ CARD16 length B16;
+ /* name */
+} fsQueryExtensionReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 length B16;
+ CARD32 maxNames B32;
+ CARD16 nbytes B16;
+ CARD16 pad2 B16;
+ /* pattern */
+} fsListCataloguesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE num_catalogues;
+ CARD16 length B16;
+ /* catalogues */
+} fsSetCataloguesReq;
+
+typedef fsReq fsGetCataloguesReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ext_opcode;
+ CARD16 length B16;
+ Mask event_mask;
+} fsSetEventMaskReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ext_opcode;
+ CARD16 length B16;
+} fsGetEventMaskReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE num_auths;
+ CARD16 length B16;
+ AccContext acid B32;
+ /* auth protocols */
+} fsCreateACReq;
+
+typedef fsResourceReq fsFreeACReq;
+typedef fsResourceReq fsSetAuthorizationReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE num_resolutions;
+ CARD16 length B16;
+ /* resolutions */
+} fsSetResolutionReq;
+
+typedef fsReq fsGetResolutionReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 maxNames B32;
+ CARD16 nbytes B16;
+ CARD16 pad2 B16;
+ /* pattern */
+} fsListFontsReq;
+
+typedef fsListFontsReq fsListFontsWithXInfoReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Font fid B32;
+ fsBitmapFormatMask format_mask B32;
+ fsBitmapFormat format_hint B32;
+ /* pattern */
+} fsOpenBitmapFontReq;
+
+typedef fsResourceReq fsQueryXInfoReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL range;
+ CARD16 length B16;
+ Font fid B32;
+ CARD32 num_ranges B32;
+ /* list of chars */
+} fsQueryXExtents8Req;
+
+typedef fsQueryXExtents8Req fsQueryXExtents16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL range;
+ CARD16 length B16;
+ Font fid B32;
+ fsBitmapFormat format B32;
+ CARD32 num_ranges B32;
+ /* list of chars */
+} fsQueryXBitmaps8Req;
+
+typedef fsQueryXBitmaps8Req fsQueryXBitmaps16Req;
+
+typedef fsResourceReq fsCloseReq;
+
+
+/* replies */
+typedef struct {
+ BYTE type;
+ BYTE data1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+} fsGenericReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 nExtensions;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ /* extension names */
+} fsListExtensionsReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 present;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ CARD8 major_opcode;
+ CARD8 first_event;
+ CARD8 num_events;
+ CARD8 first_error;
+ CARD8 num_errors;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} fsQueryExtensionReply;
+
+typedef struct {
+ BYTE type;
+ BYTE pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num_replies B32;
+ CARD32 num_catalogues B32;
+ /* catalog names */
+} fsListCataloguesReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 num_catalogues;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ /* catalogue names */
+} fsGetCataloguesReply;
+
+typedef struct {
+ BYTE type;
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 event_mask B32;
+} fsGetEventMaskReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 auth_index;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 status B16;
+ CARD16 pad B16;
+ /* auth data */
+} fsCreateACReply;
+
+typedef struct {
+ CARD32 length B32;
+ CARD16 status B16;
+ CARD16 pad B16;
+ /* auth data */
+} fsCreateACExtraReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 num_resolutions;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ /* resolutions */
+} fsGetResolutionReply;
+
+typedef struct {
+ BYTE type;
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 following B32;
+ CARD32 nFonts B32;
+ /* font names */
+} fsListFontsReply;
+
+/*
+ * this one is messy. the reply itself is variable length (unknown
+ * number of replies) and the contents of each is variable (unknown
+ * number of properties)
+ *
+ */
+
+typedef struct {
+ BYTE type;
+ CARD8 nameLength; /* 0 is end-of-reply */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 nReplies B32;
+ CARD32 font_header_flags B32;
+ CARD8 font_hdr_char_range_min_char_high;
+ CARD8 font_hdr_char_range_min_char_low;
+ CARD8 font_hdr_char_range_max_char_high;
+ CARD8 font_hdr_char_range_max_char_low;
+ CARD8 font_header_draw_direction;
+ CARD8 font_header_pad;
+ CARD8 font_header_default_char_high;
+ CARD8 font_header_default_char_low;
+ INT16 font_header_min_bounds_left B16;
+ INT16 font_header_min_bounds_right B16;
+ INT16 font_header_min_bounds_width B16;
+ INT16 font_header_min_bounds_ascent B16;
+ INT16 font_header_min_bounds_descent B16;
+ CARD16 font_header_min_bounds_attributes B16;
+ INT16 font_header_max_bounds_left B16;
+ INT16 font_header_max_bounds_right B16;
+ INT16 font_header_max_bounds_width B16;
+ INT16 font_header_max_bounds_ascent B16;
+ INT16 font_header_max_bounds_descent B16;
+ CARD16 font_header_max_bounds_attributes B16;
+ INT16 font_header_font_ascent B16;
+ INT16 font_header_font_descent B16;
+ /* propinfo */
+ /* name */
+} fsListFontsWithXInfoReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 otherid_valid;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 otherid B32;
+ BYTE cachable;
+ BYTE pad1;
+ CARD16 pad2 B16;
+} fsOpenBitmapFontReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 font_header_flags B32;
+ CARD8 font_hdr_char_range_min_char_high;
+ CARD8 font_hdr_char_range_min_char_low;
+ CARD8 font_hdr_char_range_max_char_high;
+ CARD8 font_hdr_char_range_max_char_low;
+ CARD8 font_header_draw_direction;
+ CARD8 font_header_pad;
+ CARD8 font_header_default_char_high;
+ CARD8 font_header_default_char_low;
+ INT16 font_header_min_bounds_left B16;
+ INT16 font_header_min_bounds_right B16;
+ INT16 font_header_min_bounds_width B16;
+ INT16 font_header_min_bounds_ascent B16;
+ INT16 font_header_min_bounds_descent B16;
+ CARD16 font_header_min_bounds_attributes B16;
+ INT16 font_header_max_bounds_left B16;
+ INT16 font_header_max_bounds_right B16;
+ INT16 font_header_max_bounds_width B16;
+ INT16 font_header_max_bounds_ascent B16;
+ INT16 font_header_max_bounds_descent B16;
+ CARD16 font_header_max_bounds_attributes B16;
+ INT16 font_header_font_ascent B16;
+ INT16 font_header_font_descent B16;
+ /* propinfo */
+} fsQueryXInfoReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num_extents B32;
+ /* extents */
+} fsQueryXExtents8Reply;
+
+typedef fsQueryXExtents8Reply fsQueryXExtents16Reply;
+
+typedef struct {
+ BYTE type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 replies_hint B32;
+ CARD32 num_chars B32;
+ CARD32 nbytes B32;
+ /* offsets */
+ /* glyphs */
+} fsQueryXBitmaps8Reply;
+
+typedef fsQueryXBitmaps8Reply fsQueryXBitmaps16Reply;
+
+typedef union {
+ fsGenericReply generic;
+ fsListExtensionsReply extensions;
+ fsGetResolutionReply getres;
+} fsReply;
+
+/* errors */
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsRequestError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ fsBitmapFormat format B32;
+} fsFormatError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ Font fontid;
+} fsFontError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ fsRange range;
+} fsRangeError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ Mask event_mask;
+} fsEventMaskError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ AccContext acid;
+} fsAccessContextError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ Font fontid;
+} fsIDChoiceError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsNameError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ fsResolution resolution;
+} fsResolutionError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsAllocError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+ CARD32 bad_length B32;
+} fsLengthError;
+
+typedef struct {
+ BYTE type;
+ BYTE request;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ CARD8 major_opcode;
+ CARD8 minor_opcode;
+ CARD16 pad B16;
+} fsImplementationError;
+
+/* events */
+typedef struct {
+ BYTE type;
+ BYTE event_code;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+} fsKeepAliveEvent;
+
+typedef struct {
+ BYTE type;
+ BYTE event_code;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ fsTimestamp timestamp;
+ BOOL added;
+ BOOL deleted;
+ CARD16 pad B16;
+} fsCatalogueChangeNotifyEvent;
+
+typedef fsCatalogueChangeNotifyEvent fsFontChangeNotifyEvent;
+
+typedef fsCatalogueChangeNotifyEvent fsEvent;
+
+/* reply codes */
+#define FS_Reply 0 /* normal reply */
+#define FS_Error 1 /* error */
+#define FS_Event 2
+
+/* request codes */
+#define FS_Noop 0
+#define FS_ListExtensions 1
+#define FS_QueryExtension 2
+#define FS_ListCatalogues 3
+#define FS_SetCatalogues 4
+#define FS_GetCatalogues 5
+#define FS_SetEventMask 6
+#define FS_GetEventMask 7
+#define FS_CreateAC 8
+#define FS_FreeAC 9
+#define FS_SetAuthorization 10
+#define FS_SetResolution 11
+#define FS_GetResolution 12
+#define FS_ListFonts 13
+#define FS_ListFontsWithXInfo 14
+#define FS_OpenBitmapFont 15
+#define FS_QueryXInfo 16
+#define FS_QueryXExtents8 17
+#define FS_QueryXExtents16 18
+#define FS_QueryXBitmaps8 19
+#define FS_QueryXBitmaps16 20
+#define FS_CloseFont 21
+
+/* restore decls */
+#undef Mask
+#undef Font
+#undef AccContext
+
+#endif /* _FS_PROTO_H_ */
diff --git a/HPkeysym.h b/HPkeysym.h
new file mode 100644
index 0000000..4a0655a
--- /dev/null
+++ b/HPkeysym.h
@@ -0,0 +1,164 @@
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Hewlett Packard
+or Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
+TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. Hewlett-Packard shall not be liable for errors
+contained herein or direct, indirect, special, incidental or
+consequential damages in connection with the furnishing,
+performance, or use of this material.
+
+*/
+
+#ifndef _HPKEYSYM_H
+
+#define _HPKEYSYM_H
+
+#define hpXK_ClearLine 0x1000FF6F
+#define hpXK_InsertLine 0x1000FF70
+#define hpXK_DeleteLine 0x1000FF71
+#define hpXK_InsertChar 0x1000FF72
+#define hpXK_DeleteChar 0x1000FF73
+#define hpXK_BackTab 0x1000FF74
+#define hpXK_KP_BackTab 0x1000FF75
+#define hpXK_Modelock1 0x1000FF48
+#define hpXK_Modelock2 0x1000FF49
+#define hpXK_Reset 0x1000FF6C
+#define hpXK_System 0x1000FF6D
+#define hpXK_User 0x1000FF6E
+#define hpXK_mute_acute 0x100000A8
+#define hpXK_mute_grave 0x100000A9
+#define hpXK_mute_asciicircum 0x100000AA
+#define hpXK_mute_diaeresis 0x100000AB
+#define hpXK_mute_asciitilde 0x100000AC
+#define hpXK_lira 0x100000AF
+#define hpXK_guilder 0x100000BE
+#define hpXK_Ydiaeresis 0x100000EE
+#define hpXK_IO 0x100000EE
+#define hpXK_longminus 0x100000F6
+#define hpXK_block 0x100000FC
+
+
+#ifndef _OSF_Keysyms
+#define _OSF_Keysyms
+
+#define osfXK_Copy 0x1004FF02
+#define osfXK_Cut 0x1004FF03
+#define osfXK_Paste 0x1004FF04
+#define osfXK_BackTab 0x1004FF07
+#define osfXK_BackSpace 0x1004FF08
+#define osfXK_Clear 0x1004FF0B
+#define osfXK_Escape 0x1004FF1B
+#define osfXK_AddMode 0x1004FF31
+#define osfXK_PrimaryPaste 0x1004FF32
+#define osfXK_QuickPaste 0x1004FF33
+#define osfXK_PageLeft 0x1004FF40
+#define osfXK_PageUp 0x1004FF41
+#define osfXK_PageDown 0x1004FF42
+#define osfXK_PageRight 0x1004FF43
+#define osfXK_Activate 0x1004FF44
+#define osfXK_MenuBar 0x1004FF45
+#define osfXK_Left 0x1004FF51
+#define osfXK_Up 0x1004FF52
+#define osfXK_Right 0x1004FF53
+#define osfXK_Down 0x1004FF54
+#define osfXK_EndLine 0x1004FF57
+#define osfXK_BeginLine 0x1004FF58
+#define osfXK_EndData 0x1004FF59
+#define osfXK_BeginData 0x1004FF5A
+#define osfXK_PrevMenu 0x1004FF5B
+#define osfXK_NextMenu 0x1004FF5C
+#define osfXK_PrevField 0x1004FF5D
+#define osfXK_NextField 0x1004FF5E
+#define osfXK_Select 0x1004FF60
+#define osfXK_Insert 0x1004FF63
+#define osfXK_Undo 0x1004FF65
+#define osfXK_Menu 0x1004FF67
+#define osfXK_Cancel 0x1004FF69
+#define osfXK_Help 0x1004FF6A
+#define osfXK_SelectAll 0x1004FF71
+#define osfXK_DeselectAll 0x1004FF72
+#define osfXK_Reselect 0x1004FF73
+#define osfXK_Extend 0x1004FF74
+#define osfXK_Restore 0x1004FF78
+#define osfXK_Delete 0x1004FFFF
+
+#endif /* _OSF_Keysyms */
+
+
+/**************************************************************
+ * The use of the following macros is deprecated.
+ * They are listed below only for backwards compatibility.
+ */
+#define XK_Reset 0x1000FF6C
+#define XK_System 0x1000FF6D
+#define XK_User 0x1000FF6E
+#define XK_ClearLine 0x1000FF6F
+#define XK_InsertLine 0x1000FF70
+#define XK_DeleteLine 0x1000FF71
+#define XK_InsertChar 0x1000FF72
+#define XK_DeleteChar 0x1000FF73
+#define XK_BackTab 0x1000FF74
+#define XK_KP_BackTab 0x1000FF75
+#define XK_Ext16bit_L 0x1000FF76
+#define XK_Ext16bit_R 0x1000FF77
+#define XK_mute_acute 0x100000a8
+#define XK_mute_grave 0x100000a9
+#define XK_mute_asciicircum 0x100000aa
+#define XK_mute_diaeresis 0x100000ab
+#define XK_mute_asciitilde 0x100000ac
+#define XK_lira 0x100000af
+#define XK_guilder 0x100000be
+#ifndef XK_Ydiaeresis
+#define XK_Ydiaeresis 0x100000ee
+#endif
+#define XK_IO 0x100000ee
+#define XK_longminus 0x100000f6
+#define XK_block 0x100000fc
+
+#endif /* _HPKEYSYM_H */
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..6d0ae2d
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,8 @@
+Lg3dProto is built with the traditional configure script:
+
+ $ ./configure --prefix=/usr/X11R6
+
+This should generate valid Makefiles, then:
+
+ $ make
+ $ make install
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f2e53ca
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,482 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+srcdir = .
+top_srcdir = .
+
+pkgdatadir = $(datadir)/lg3dproto
+pkglibdir = $(libdir)/lg3dproto
+pkgincludedir = $(includedir)/lg3dproto
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(lg3d_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/lg3dproto.pc.in $(top_srcdir)/configure COPYING \
+ ChangeLog install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = lg3dproto.pc
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(lg3ddir)"
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+lg3dHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(lg3d_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = aclocal -I /home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal
+AMTAR = ${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run tar
+AUTOCONF = ${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run automake-1.9
+AWK = gawk
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"Lg3dProto\" -DPACKAGE_TARNAME=\"lg3dproto\" -DPACKAGE_VERSION=\"5.0\" -DPACKAGE_STRING=\"Lg3dProto\ 5.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=xorg\" -DPACKAGE=\"lg3dproto\" -DVERSION=\"5.0\"
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run makeinfo
+PACKAGE = lg3dproto
+PACKAGE_BUGREPORT = https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+PACKAGE_NAME = Lg3dProto
+PACKAGE_STRING = Lg3dProto 5.0
+PACKAGE_TARNAME = lg3dproto
+PACKAGE_VERSION = 5.0
+PATH_SEPARATOR = :
+SET_MAKE =
+SHELL = /bin/sh
+STRIP =
+VERSION = 5.0
+ac_ct_STRIP =
+am__leading_dot = .
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host_alias =
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+prefix = /home/dj4236/lgn/x/xorg/cvs/head/modular
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias =
+lg3ddir = $(includedir)/X11/extensions
+lg3d_HEADERS = lgewire.h
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = lg3dproto.pc
+EXTRA_DIST = autogen.sh lg3dproto.pc.in
+all: all-am
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+lg3dproto.pc: $(top_builddir)/config.status $(srcdir)/lg3dproto.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+install-lg3dHEADERS: $(lg3d_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(lg3ddir)" || $(mkdir_p) "$(DESTDIR)$(lg3ddir)"
+ @list='$(lg3d_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(lg3dHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(lg3ddir)/$$f'"; \
+ $(lg3dHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(lg3ddir)/$$f"; \
+ done
+
+uninstall-lg3dHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lg3d_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(lg3ddir)/$$f'"; \
+ rm -f "$(DESTDIR)$(lg3ddir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/.
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(lg3ddir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-lg3dHEADERS install-pkgconfigDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-lg3dHEADERS \
+ uninstall-pkgconfigDATA
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am \
+ install-lg3dHEADERS install-man install-pkgconfigDATA \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-info-am uninstall-lg3dHEADERS \
+ uninstall-pkgconfigDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..54c57c4
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,482 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(lg3d_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/lg3dproto.pc.in $(top_srcdir)/configure COPYING \
+ ChangeLog install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = lg3dproto.pc
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(lg3ddir)"
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+lg3dHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(lg3d_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+lg3ddir = $(includedir)/X11/extensions
+lg3d_HEADERS = lgewire.h
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = lg3dproto.pc
+EXTRA_DIST = autogen.sh lg3dproto.pc.in
+all: all-am
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+lg3dproto.pc: $(top_builddir)/config.status $(srcdir)/lg3dproto.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+install-lg3dHEADERS: $(lg3d_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(lg3ddir)" || $(mkdir_p) "$(DESTDIR)$(lg3ddir)"
+ @list='$(lg3d_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(lg3dHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(lg3ddir)/$$f'"; \
+ $(lg3dHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(lg3ddir)/$$f"; \
+ done
+
+uninstall-lg3dHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lg3d_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(lg3ddir)/$$f'"; \
+ rm -f "$(DESTDIR)$(lg3ddir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/.
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(lg3ddir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-lg3dHEADERS install-pkgconfigDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-lg3dHEADERS \
+ uninstall-pkgconfigDATA
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am \
+ install-lg3dHEADERS install-man install-pkgconfigDATA \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-info-am uninstall-lg3dHEADERS \
+ uninstall-pkgconfigDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..29b8edd
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,2 @@
+2004-01-05: Version 1.0 released.
+2007-01-09: Version 1.1 released, adding the DamageAdd request. \ No newline at end of file
diff --git a/Sunkeysym.h b/Sunkeysym.h
new file mode 100644
index 0000000..78d1286
--- /dev/null
+++ b/Sunkeysym.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 1991, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/************************************************************
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+***********************************************************/
+
+/*
+ * Floating Accent
+ */
+
+#define SunXK_FA_Grave 0x1005FF00
+#define SunXK_FA_Circum 0x1005FF01
+#define SunXK_FA_Tilde 0x1005FF02
+#define SunXK_FA_Acute 0x1005FF03
+#define SunXK_FA_Diaeresis 0x1005FF04
+#define SunXK_FA_Cedilla 0x1005FF05
+
+/*
+ * Miscellaneous Functions
+ */
+
+#define SunXK_F36 0x1005FF10 /* Labeled F11 */
+#define SunXK_F37 0x1005FF11 /* Labeled F12 */
+
+#define SunXK_Sys_Req 0x1005FF60
+#define SunXK_Print_Screen 0x0000FF61 /* Same as XK_Print */
+
+/*
+ * International & Multi-Key Character Composition
+ */
+
+#define SunXK_Compose 0x0000FF20 /* Same as XK_Multi_key */
+#define SunXK_AltGraph 0x0000FF7E /* Same as XK_Mode_switch */
+
+/*
+ * Cursor Control
+ */
+
+#define SunXK_PageUp 0x0000FF55 /* Same as XK_Prior */
+#define SunXK_PageDown 0x0000FF56 /* Same as XK_Next */
+
+/*
+ * Open Look Functions
+ */
+
+#define SunXK_Undo 0x0000FF65 /* Same as XK_Undo */
+#define SunXK_Again 0x0000FF66 /* Same as XK_Redo */
+#define SunXK_Find 0x0000FF68 /* Same as XK_Find */
+#define SunXK_Stop 0x0000FF69 /* Same as XK_Cancel */
+#define SunXK_Props 0x1005FF70
+#define SunXK_Front 0x1005FF71
+#define SunXK_Copy 0x1005FF72
+#define SunXK_Open 0x1005FF73
+#define SunXK_Paste 0x1005FF74
+#define SunXK_Cut 0x1005FF75
+
+#define SunXK_PowerSwitch 0x1005FF76
+#define SunXK_AudioLowerVolume 0x1005FF77
+#define SunXK_AudioMute 0x1005FF78
+#define SunXK_AudioRaiseVolume 0x1005FF79
+#define SunXK_VideoDegauss 0x1005FF7A
+#define SunXK_VideoLowerBrightness 0x1005FF7B
+#define SunXK_VideoRaiseBrightness 0x1005FF7C
+#define SunXK_PowerSwitchShift 0x1005FF7D
diff --git a/X.h b/X.h
new file mode 100644
index 0000000..5cf695d
--- /dev/null
+++ b/X.h
@@ -0,0 +1,717 @@
+/* Definitions for the X window system likely to be used by applications */
+
+#ifndef X_H
+#define X_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#define X_PROTOCOL 11 /* current protocol version */
+#define X_PROTOCOL_REVISION 0 /* current minor version */
+
+/* Resources */
+
+/*
+ * _XSERVER64 must ONLY be defined when compiling X server sources on
+ * systems where unsigned long is not 32 bits, must NOT be used in
+ * client or library code.
+ */
+#ifndef _XSERVER64
+# ifndef _XTYPEDEF_XID
+# define _XTYPEDEF_XID
+typedef unsigned long XID;
+# endif
+# ifndef _XTYPEDEF_MASK
+# define _XTYPEDEF_MASK
+typedef unsigned long Mask;
+# endif
+# ifndef _XTYPEDEF_ATOM
+# define _XTYPEDEF_ATOM
+typedef unsigned long Atom; /* Also in Xdefs.h */
+# endif
+typedef unsigned long VisualID;
+typedef unsigned long Time;
+#else
+# include <X11/Xmd.h>
+# ifndef _XTYPEDEF_XID
+# define _XTYPEDEF_XID
+typedef CARD32 XID;
+# endif
+# ifndef _XTYPEDEF_MASK
+# define _XTYPEDEF_MASK
+typedef CARD32 Mask;
+# endif
+# ifndef _XTYPEDEF_ATOM
+# define _XTYPEDEF_ATOM
+typedef CARD32 Atom;
+# endif
+typedef CARD32 VisualID;
+typedef CARD32 Time;
+#endif
+
+typedef XID Window;
+typedef XID Drawable;
+#ifndef _XTYPEDEF_FONT
+# define _XTYPEDEF_FONT
+typedef XID Font;
+#endif
+typedef XID Pixmap;
+typedef XID Cursor;
+typedef XID Colormap;
+typedef XID GContext;
+typedef XID KeySym;
+
+typedef unsigned char KeyCode;
+
+/*****************************************************************
+ * RESERVED RESOURCE AND CONSTANT DEFINITIONS
+ *****************************************************************/
+
+#ifndef None
+#define None 0L /* universal null resource or null atom */
+#endif
+
+#define ParentRelative 1L /* background pixmap in CreateWindow
+ and ChangeWindowAttributes */
+
+#define CopyFromParent 0L /* border pixmap in CreateWindow
+ and ChangeWindowAttributes
+ special VisualID and special window
+ class passed to CreateWindow */
+
+#define PointerWindow 0L /* destination window in SendEvent */
+#define InputFocus 1L /* destination window in SendEvent */
+
+#define PointerRoot 1L /* focus window in SetInputFocus */
+
+#define AnyPropertyType 0L /* special Atom, passed to GetProperty */
+
+#define AnyKey 0L /* special Key Code, passed to GrabKey */
+
+#define AnyButton 0L /* special Button Code, passed to GrabButton */
+
+#define AllTemporary 0L /* special Resource ID passed to KillClient */
+
+#define CurrentTime 0L /* special Time */
+
+#define NoSymbol 0L /* special KeySym */
+
+/*****************************************************************
+ * EVENT DEFINITIONS
+ *****************************************************************/
+
+/* Input Event Masks. Used as event-mask window attribute and as arguments
+ to Grab requests. Not to be confused with event names. */
+
+#define NoEventMask 0L
+#define KeyPressMask (1L<<0)
+#define KeyReleaseMask (1L<<1)
+#define ButtonPressMask (1L<<2)
+#define ButtonReleaseMask (1L<<3)
+#define EnterWindowMask (1L<<4)
+#define LeaveWindowMask (1L<<5)
+#define PointerMotionMask (1L<<6)
+#define PointerMotionHintMask (1L<<7)
+#define Button1MotionMask (1L<<8)
+#define Button2MotionMask (1L<<9)
+#define Button3MotionMask (1L<<10)
+#define Button4MotionMask (1L<<11)
+#define Button5MotionMask (1L<<12)
+#define ButtonMotionMask (1L<<13)
+#define KeymapStateMask (1L<<14)
+#define ExposureMask (1L<<15)
+#define VisibilityChangeMask (1L<<16)
+#define StructureNotifyMask (1L<<17)
+#define ResizeRedirectMask (1L<<18)
+#define SubstructureNotifyMask (1L<<19)
+#define SubstructureRedirectMask (1L<<20)
+#define FocusChangeMask (1L<<21)
+#define PropertyChangeMask (1L<<22)
+#define ColormapChangeMask (1L<<23)
+#define OwnerGrabButtonMask (1L<<24)
+
+/* Event names. Used in "type" field in XEvent structures. Not to be
+confused with event masks above. They start from 2 because 0 and 1
+are reserved in the protocol for errors and replies. */
+
+#define KeyPress 2
+#define KeyRelease 3
+#define ButtonPress 4
+#define ButtonRelease 5
+#define MotionNotify 6
+#define EnterNotify 7
+#define LeaveNotify 8
+#define FocusIn 9
+#define FocusOut 10
+#define KeymapNotify 11
+#define Expose 12
+#define GraphicsExpose 13
+#define NoExpose 14
+#define VisibilityNotify 15
+#define CreateNotify 16
+#define DestroyNotify 17
+#define UnmapNotify 18
+#define MapNotify 19
+#define MapRequest 20
+#define ReparentNotify 21
+#define ConfigureNotify 22
+#define ConfigureRequest 23
+#define GravityNotify 24
+#define ResizeRequest 25
+#define CirculateNotify 26
+#define CirculateRequest 27
+#define PropertyNotify 28
+#define SelectionClear 29
+#define SelectionRequest 30
+#define SelectionNotify 31
+#define ColormapNotify 32
+#define ClientMessage 33
+#define MappingNotify 34
+#define GenericEvent 35
+#define LASTEvent 36 /* must be bigger than any event # */
+
+
+/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
+ state in various key-, mouse-, and button-related events. */
+
+#define ShiftMask (1<<0)
+#define LockMask (1<<1)
+#define ControlMask (1<<2)
+#define Mod1Mask (1<<3)
+#define Mod2Mask (1<<4)
+#define Mod3Mask (1<<5)
+#define Mod4Mask (1<<6)
+#define Mod5Mask (1<<7)
+
+/* modifier names. Used to build a SetModifierMapping request or
+ to read a GetModifierMapping request. These correspond to the
+ masks defined above. */
+#define ShiftMapIndex 0
+#define LockMapIndex 1
+#define ControlMapIndex 2
+#define Mod1MapIndex 3
+#define Mod2MapIndex 4
+#define Mod3MapIndex 5
+#define Mod4MapIndex 6
+#define Mod5MapIndex 7
+
+
+/* button masks. Used in same manner as Key masks above. Not to be confused
+ with button names below. */
+
+#define Button1Mask (1<<8)
+#define Button2Mask (1<<9)
+#define Button3Mask (1<<10)
+#define Button4Mask (1<<11)
+#define Button5Mask (1<<12)
+
+#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
+
+
+/* button names. Used as arguments to GrabButton and as detail in ButtonPress
+ and ButtonRelease events. Not to be confused with button masks above.
+ Note that 0 is already defined above as "AnyButton". */
+
+#define Button1 1
+#define Button2 2
+#define Button3 3
+#define Button4 4
+#define Button5 5
+
+/* Notify modes */
+
+#define NotifyNormal 0
+#define NotifyGrab 1
+#define NotifyUngrab 2
+#define NotifyWhileGrabbed 3
+
+#define NotifyHint 1 /* for MotionNotify events */
+
+/* Notify detail */
+
+#define NotifyAncestor 0
+#define NotifyVirtual 1
+#define NotifyInferior 2
+#define NotifyNonlinear 3
+#define NotifyNonlinearVirtual 4
+#define NotifyPointer 5
+#define NotifyPointerRoot 6
+#define NotifyDetailNone 7
+
+/* Visibility notify */
+
+#define VisibilityUnobscured 0
+#define VisibilityPartiallyObscured 1
+#define VisibilityFullyObscured 2
+
+/* Circulation request */
+
+#define PlaceOnTop 0
+#define PlaceOnBottom 1
+
+/* protocol families */
+
+#define FamilyInternet 0 /* IPv4 */
+#define FamilyDECnet 1
+#define FamilyChaos 2
+#define FamilyInternet6 6 /* IPv6 */
+
+/* authentication families not tied to a specific protocol */
+#define FamilyServerInterpreted 5
+
+/* Property notification */
+
+#define PropertyNewValue 0
+#define PropertyDelete 1
+
+/* Color Map notification */
+
+#define ColormapUninstalled 0
+#define ColormapInstalled 1
+
+/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
+
+#define GrabModeSync 0
+#define GrabModeAsync 1
+
+/* GrabPointer, GrabKeyboard reply status */
+
+#define GrabSuccess 0
+#define AlreadyGrabbed 1
+#define GrabInvalidTime 2
+#define GrabNotViewable 3
+#define GrabFrozen 4
+
+/* AllowEvents modes */
+
+#define AsyncPointer 0
+#define SyncPointer 1
+#define ReplayPointer 2
+#define AsyncKeyboard 3
+#define SyncKeyboard 4
+#define ReplayKeyboard 5
+#define AsyncBoth 6
+#define SyncBoth 7
+
+/* Used in SetInputFocus, GetInputFocus */
+
+#define RevertToNone (int)None
+#define RevertToPointerRoot (int)PointerRoot
+#define RevertToParent 2
+
+/*****************************************************************
+ * ERROR CODES
+ *****************************************************************/
+
+#define Success 0 /* everything's okay */
+#define BadRequest 1 /* bad request code */
+#define BadValue 2 /* int parameter out of range */
+#define BadWindow 3 /* parameter not a Window */
+#define BadPixmap 4 /* parameter not a Pixmap */
+#define BadAtom 5 /* parameter not an Atom */
+#define BadCursor 6 /* parameter not a Cursor */
+#define BadFont 7 /* parameter not a Font */
+#define BadMatch 8 /* parameter mismatch */
+#define BadDrawable 9 /* parameter not a Pixmap or Window */
+#define BadAccess 10 /* depending on context:
+ - key/button already grabbed
+ - attempt to free an illegal
+ cmap entry
+ - attempt to store into a read-only
+ color map entry.
+ - attempt to modify the access control
+ list from other than the local host.
+ */
+#define BadAlloc 11 /* insufficient resources */
+#define BadColor 12 /* no such colormap */
+#define BadGC 13 /* parameter not a GC */
+#define BadIDChoice 14 /* choice not in range or already used */
+#define BadName 15 /* font or color name doesn't exist */
+#define BadLength 16 /* Request length incorrect */
+#define BadImplementation 17 /* server is defective */
+
+#define FirstExtensionError 128
+#define LastExtensionError 255
+
+/*****************************************************************
+ * WINDOW DEFINITIONS
+ *****************************************************************/
+
+/* Window classes used by CreateWindow */
+/* Note that CopyFromParent is already defined as 0 above */
+
+#define InputOutput 1
+#define InputOnly 2
+
+/* Window attributes for CreateWindow and ChangeWindowAttributes */
+
+#define CWBackPixmap (1L<<0)
+#define CWBackPixel (1L<<1)
+#define CWBorderPixmap (1L<<2)
+#define CWBorderPixel (1L<<3)
+#define CWBitGravity (1L<<4)
+#define CWWinGravity (1L<<5)
+#define CWBackingStore (1L<<6)
+#define CWBackingPlanes (1L<<7)
+#define CWBackingPixel (1L<<8)
+#define CWOverrideRedirect (1L<<9)
+#define CWSaveUnder (1L<<10)
+#define CWEventMask (1L<<11)
+#define CWDontPropagate (1L<<12)
+#define CWColormap (1L<<13)
+#define CWCursor (1L<<14)
+
+/* ConfigureWindow structure */
+
+#define CWX (1<<0)
+#define CWY (1<<1)
+#define CWWidth (1<<2)
+#define CWHeight (1<<3)
+#define CWBorderWidth (1<<4)
+#define CWSibling (1<<5)
+#define CWStackMode (1<<6)
+
+
+/* Bit Gravity */
+
+#define ForgetGravity 0
+#define NorthWestGravity 1
+#define NorthGravity 2
+#define NorthEastGravity 3
+#define WestGravity 4
+#define CenterGravity 5
+#define EastGravity 6
+#define SouthWestGravity 7
+#define SouthGravity 8
+#define SouthEastGravity 9
+#define StaticGravity 10
+
+/* Window gravity + bit gravity above */
+
+#define UnmapGravity 0
+
+/* Used in CreateWindow for backing-store hint */
+
+#define NotUseful 0
+#define WhenMapped 1
+#define Always 2
+
+/* Used in GetWindowAttributes reply */
+
+#define IsUnmapped 0
+#define IsUnviewable 1
+#define IsViewable 2
+
+/* Used in ChangeSaveSet */
+
+#define SetModeInsert 0
+#define SetModeDelete 1
+
+/* Used in ChangeCloseDownMode */
+
+#define DestroyAll 0
+#define RetainPermanent 1
+#define RetainTemporary 2
+
+/* Window stacking method (in configureWindow) */
+
+#define Above 0
+#define Below 1
+#define TopIf 2
+#define BottomIf 3
+#define Opposite 4
+
+/* Circulation direction */
+
+#define RaiseLowest 0
+#define LowerHighest 1
+
+/* Property modes */
+
+#define PropModeReplace 0
+#define PropModePrepend 1
+#define PropModeAppend 2
+
+/*****************************************************************
+ * GRAPHICS DEFINITIONS
+ *****************************************************************/
+
+/* graphics functions, as in GC.alu */
+
+#define GXclear 0x0 /* 0 */
+#define GXand 0x1 /* src AND dst */
+#define GXandReverse 0x2 /* src AND NOT dst */
+#define GXcopy 0x3 /* src */
+#define GXandInverted 0x4 /* NOT src AND dst */
+#define GXnoop 0x5 /* dst */
+#define GXxor 0x6 /* src XOR dst */
+#define GXor 0x7 /* src OR dst */
+#define GXnor 0x8 /* NOT src AND NOT dst */
+#define GXequiv 0x9 /* NOT src XOR dst */
+#define GXinvert 0xa /* NOT dst */
+#define GXorReverse 0xb /* src OR NOT dst */
+#define GXcopyInverted 0xc /* NOT src */
+#define GXorInverted 0xd /* NOT src OR dst */
+#define GXnand 0xe /* NOT src OR NOT dst */
+#define GXset 0xf /* 1 */
+
+/* LineStyle */
+
+#define LineSolid 0
+#define LineOnOffDash 1
+#define LineDoubleDash 2
+
+/* capStyle */
+
+#define CapNotLast 0
+#define CapButt 1
+#define CapRound 2
+#define CapProjecting 3
+
+/* joinStyle */
+
+#define JoinMiter 0
+#define JoinRound 1
+#define JoinBevel 2
+
+/* fillStyle */
+
+#define FillSolid 0
+#define FillTiled 1
+#define FillStippled 2
+#define FillOpaqueStippled 3
+
+/* fillRule */
+
+#define EvenOddRule 0
+#define WindingRule 1
+
+/* subwindow mode */
+
+#define ClipByChildren 0
+#define IncludeInferiors 1
+
+/* SetClipRectangles ordering */
+
+#define Unsorted 0
+#define YSorted 1
+#define YXSorted 2
+#define YXBanded 3
+
+/* CoordinateMode for drawing routines */
+
+#define CoordModeOrigin 0 /* relative to the origin */
+#define CoordModePrevious 1 /* relative to previous point */
+
+/* Polygon shapes */
+
+#define Complex 0 /* paths may intersect */
+#define Nonconvex 1 /* no paths intersect, but not convex */
+#define Convex 2 /* wholly convex */
+
+/* Arc modes for PolyFillArc */
+
+#define ArcChord 0 /* join endpoints of arc */
+#define ArcPieSlice 1 /* join endpoints to center of arc */
+
+/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
+ GC.stateChanges */
+
+#define GCFunction (1L<<0)
+#define GCPlaneMask (1L<<1)
+#define GCForeground (1L<<2)
+#define GCBackground (1L<<3)
+#define GCLineWidth (1L<<4)
+#define GCLineStyle (1L<<5)
+#define GCCapStyle (1L<<6)
+#define GCJoinStyle (1L<<7)
+#define GCFillStyle (1L<<8)
+#define GCFillRule (1L<<9)
+#define GCTile (1L<<10)
+#define GCStipple (1L<<11)
+#define GCTileStipXOrigin (1L<<12)
+#define GCTileStipYOrigin (1L<<13)
+#define GCFont (1L<<14)
+#define GCSubwindowMode (1L<<15)
+#define GCGraphicsExposures (1L<<16)
+#define GCClipXOrigin (1L<<17)
+#define GCClipYOrigin (1L<<18)
+#define GCClipMask (1L<<19)
+#define GCDashOffset (1L<<20)
+#define GCDashList (1L<<21)
+#define GCArcMode (1L<<22)
+
+#define GCLastBit 22
+/*****************************************************************
+ * FONTS
+ *****************************************************************/
+
+/* used in QueryFont -- draw direction */
+
+#define FontLeftToRight 0
+#define FontRightToLeft 1
+
+#define FontChange 255
+
+/*****************************************************************
+ * IMAGING
+ *****************************************************************/
+
+/* ImageFormat -- PutImage, GetImage */
+
+#define XYBitmap 0 /* depth 1, XYFormat */
+#define XYPixmap 1 /* depth == drawable depth */
+#define ZPixmap 2 /* depth == drawable depth */
+
+/*****************************************************************
+ * COLOR MAP STUFF
+ *****************************************************************/
+
+/* For CreateColormap */
+
+#define AllocNone 0 /* create map with no entries */
+#define AllocAll 1 /* allocate entire map writeable */
+
+
+/* Flags used in StoreNamedColor, StoreColors */
+
+#define DoRed (1<<0)
+#define DoGreen (1<<1)
+#define DoBlue (1<<2)
+
+/*****************************************************************
+ * CURSOR STUFF
+ *****************************************************************/
+
+/* QueryBestSize Class */
+
+#define CursorShape 0 /* largest size that can be displayed */
+#define TileShape 1 /* size tiled fastest */
+#define StippleShape 2 /* size stippled fastest */
+
+/*****************************************************************
+ * KEYBOARD/POINTER STUFF
+ *****************************************************************/
+
+#define AutoRepeatModeOff 0
+#define AutoRepeatModeOn 1
+#define AutoRepeatModeDefault 2
+
+#define LedModeOff 0
+#define LedModeOn 1
+
+/* masks for ChangeKeyboardControl */
+
+#define KBKeyClickPercent (1L<<0)
+#define KBBellPercent (1L<<1)
+#define KBBellPitch (1L<<2)
+#define KBBellDuration (1L<<3)
+#define KBLed (1L<<4)
+#define KBLedMode (1L<<5)
+#define KBKey (1L<<6)
+#define KBAutoRepeatMode (1L<<7)
+
+#define MappingSuccess 0
+#define MappingBusy 1
+#define MappingFailed 2
+
+#define MappingModifier 0
+#define MappingKeyboard 1
+#define MappingPointer 2
+
+/*****************************************************************
+ * SCREEN SAVER STUFF
+ *****************************************************************/
+
+#define DontPreferBlanking 0
+#define PreferBlanking 1
+#define DefaultBlanking 2
+
+#define DisableScreenSaver 0
+#define DisableScreenInterval 0
+
+#define DontAllowExposures 0
+#define AllowExposures 1
+#define DefaultExposures 2
+
+/* for ForceScreenSaver */
+
+#define ScreenSaverReset 0
+#define ScreenSaverActive 1
+
+/*****************************************************************
+ * HOSTS AND CONNECTIONS
+ *****************************************************************/
+
+/* for ChangeHosts */
+
+#define HostInsert 0
+#define HostDelete 1
+
+/* for ChangeAccessControl */
+
+#define EnableAccess 1
+#define DisableAccess 0
+
+/* Display classes used in opening the connection
+ * Note that the statically allocated ones are even numbered and the
+ * dynamically changeable ones are odd numbered */
+
+#define StaticGray 0
+#define GrayScale 1
+#define StaticColor 2
+#define PseudoColor 3
+#define TrueColor 4
+#define DirectColor 5
+
+
+/* Byte order used in imageByteOrder and bitmapBitOrder */
+
+#define LSBFirst 0
+#define MSBFirst 1
+
+#endif /* X_H */
diff --git a/XF86keysym.h b/XF86keysym.h
new file mode 100644
index 0000000..c0d12c1
--- /dev/null
+++ b/XF86keysym.h
@@ -0,0 +1,227 @@
+/*
+ * XFree86 vendor specific keysyms.
+ *
+ * The XFree86 keysym range is 0x10080001 - 0x1008FFFF.
+ *
+ * X.Org will not be adding to the XF86 set of keysyms, though they have
+ * been adopted and are considered a "standard" part of X keysym definitions.
+ * XFree86 never properly commented these keysyms, so we have done our
+ * best to explain the semantic meaning of these keys.
+ *
+ * XFree86 has removed their mail archives of the period, that might have
+ * shed more light on some of these definitions. Until/unless we resurrect
+ * these archives, these are from memory and usage.
+ */
+
+/*
+ * ModeLock
+ *
+ * This one is old, and not really used any more since XKB offers this
+ * functionality.
+ */
+
+#define XF86XK_ModeLock 0x1008FF01 /* Mode Switch Lock */
+
+/* Backlight controls. */
+#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
+#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
+#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
+#define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
+#define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
+
+/*
+ * Keys found on some "Internet" keyboards.
+ */
+#define XF86XK_Standby 0x1008FF10 /* System into standby mode */
+#define XF86XK_AudioLowerVolume 0x1008FF11 /* Volume control down */
+#define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */
+#define XF86XK_AudioRaiseVolume 0x1008FF13 /* Volume control up */
+#define XF86XK_AudioPlay 0x1008FF14 /* Start playing of audio > */
+#define XF86XK_AudioStop 0x1008FF15 /* Stop playing audio */
+#define XF86XK_AudioPrev 0x1008FF16 /* Previous track */
+#define XF86XK_AudioNext 0x1008FF17 /* Next track */
+#define XF86XK_HomePage 0x1008FF18 /* Display user's home page */
+#define XF86XK_Mail 0x1008FF19 /* Invoke user's mail program */
+#define XF86XK_Start 0x1008FF1A /* Start application */
+#define XF86XK_Search 0x1008FF1B /* Search */
+#define XF86XK_AudioRecord 0x1008FF1C /* Record audio application */
+
+/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */
+#define XF86XK_Calculator 0x1008FF1D /* Invoke calculator program */
+#define XF86XK_Memo 0x1008FF1E /* Invoke Memo taking program */
+#define XF86XK_ToDoList 0x1008FF1F /* Invoke To Do List program */
+#define XF86XK_Calendar 0x1008FF20 /* Invoke Calendar program */
+#define XF86XK_PowerDown 0x1008FF21 /* Deep sleep the system */
+#define XF86XK_ContrastAdjust 0x1008FF22 /* Adjust screen contrast */
+#define XF86XK_RockerUp 0x1008FF23 /* Rocker switches exist up */
+#define XF86XK_RockerDown 0x1008FF24 /* and down */
+#define XF86XK_RockerEnter 0x1008FF25 /* and let you press them */
+
+/* Some more "Internet" keyboard symbols */
+#define XF86XK_Back 0x1008FF26 /* Like back on a browser */
+#define XF86XK_Forward 0x1008FF27 /* Like forward on a browser */
+#define XF86XK_Stop 0x1008FF28 /* Stop current operation */
+#define XF86XK_Refresh 0x1008FF29 /* Refresh the page */
+#define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */
+#define XF86XK_WakeUp 0x1008FF2B /* Wake up system from sleep */
+#define XF86XK_Eject 0x1008FF2C /* Eject device (e.g. DVD) */
+#define XF86XK_ScreenSaver 0x1008FF2D /* Invoke screensaver */
+#define XF86XK_WWW 0x1008FF2E /* Invoke web browser */
+#define XF86XK_Sleep 0x1008FF2F /* Put system to sleep */
+#define XF86XK_Favorites 0x1008FF30 /* Show favorite locations */
+#define XF86XK_AudioPause 0x1008FF31 /* Pause audio playing */
+#define XF86XK_AudioMedia 0x1008FF32 /* Launch media collection app */
+#define XF86XK_MyComputer 0x1008FF33 /* Display "My Computer" window */
+#define XF86XK_VendorHome 0x1008FF34 /* Display vendor home web site */
+#define XF86XK_LightBulb 0x1008FF35 /* Light bulb keys exist */
+#define XF86XK_Shop 0x1008FF36 /* Display shopping web site */
+#define XF86XK_History 0x1008FF37 /* Show history of web surfing */
+#define XF86XK_OpenURL 0x1008FF38 /* Open selected URL */
+#define XF86XK_AddFavorite 0x1008FF39 /* Add URL to favorites list */
+#define XF86XK_HotLinks 0x1008FF3A /* Show "hot" links */
+#define XF86XK_BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */
+#define XF86XK_Finance 0x1008FF3C /* Display financial site */
+#define XF86XK_Community 0x1008FF3D /* Display user's community */
+#define XF86XK_AudioRewind 0x1008FF3E /* "rewind" audio track */
+#define XF86XK_BackForward 0x1008FF3F /* ??? */
+#define XF86XK_Launch0 0x1008FF40 /* Launch Application */
+#define XF86XK_Launch1 0x1008FF41 /* Launch Application */
+#define XF86XK_Launch2 0x1008FF42 /* Launch Application */
+#define XF86XK_Launch3 0x1008FF43 /* Launch Application */
+#define XF86XK_Launch4 0x1008FF44 /* Launch Application */
+#define XF86XK_Launch5 0x1008FF45 /* Launch Application */
+#define XF86XK_Launch6 0x1008FF46 /* Launch Application */
+#define XF86XK_Launch7 0x1008FF47 /* Launch Application */
+#define XF86XK_Launch8 0x1008FF48 /* Launch Application */
+#define XF86XK_Launch9 0x1008FF49 /* Launch Application */
+#define XF86XK_LaunchA 0x1008FF4A /* Launch Application */
+#define XF86XK_LaunchB 0x1008FF4B /* Launch Application */
+#define XF86XK_LaunchC 0x1008FF4C /* Launch Application */
+#define XF86XK_LaunchD 0x1008FF4D /* Launch Application */
+#define XF86XK_LaunchE 0x1008FF4E /* Launch Application */
+#define XF86XK_LaunchF 0x1008FF4F /* Launch Application */
+
+#define XF86XK_ApplicationLeft 0x1008FF50 /* switch to application, left */
+#define XF86XK_ApplicationRight 0x1008FF51 /* switch to application, right*/
+#define XF86XK_Book 0x1008FF52 /* Launch bookreader */
+#define XF86XK_CD 0x1008FF53 /* Launch CD/DVD player */
+#define XF86XK_Calculater 0x1008FF54 /* Launch Calculater */
+#define XF86XK_Clear 0x1008FF55 /* Clear window, screen */
+#define XF86XK_Close 0x1008FF56 /* Close window */
+#define XF86XK_Copy 0x1008FF57 /* Copy selection */
+#define XF86XK_Cut 0x1008FF58 /* Cut selection */
+#define XF86XK_Display 0x1008FF59 /* Output switch key */
+#define XF86XK_DOS 0x1008FF5A /* Launch DOS (emulation) */
+#define XF86XK_Documents 0x1008FF5B /* Open documents window */
+#define XF86XK_Excel 0x1008FF5C /* Launch spread sheet */
+#define XF86XK_Explorer 0x1008FF5D /* Launch file explorer */
+#define XF86XK_Game 0x1008FF5E /* Launch game */
+#define XF86XK_Go 0x1008FF5F /* Go to URL */
+#define XF86XK_iTouch 0x1008FF60 /* Logitch iTouch- don't use */
+#define XF86XK_LogOff 0x1008FF61 /* Log off system */
+#define XF86XK_Market 0x1008FF62 /* ?? */
+#define XF86XK_Meeting 0x1008FF63 /* enter meeting in calendar */
+#define XF86XK_MenuKB 0x1008FF65 /* distingush keyboard from PB */
+#define XF86XK_MenuPB 0x1008FF66 /* distinuish PB from keyboard */
+#define XF86XK_MySites 0x1008FF67 /* Favourites */
+#define XF86XK_New 0x1008FF68 /* New (folder, document... */
+#define XF86XK_News 0x1008FF69 /* News */
+#define XF86XK_OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/
+#define XF86XK_Open 0x1008FF6B /* Open */
+#define XF86XK_Option 0x1008FF6C /* ?? */
+#define XF86XK_Paste 0x1008FF6D /* Paste */
+#define XF86XK_Phone 0x1008FF6E /* Launch phone; dial number */
+#define XF86XK_Q 0x1008FF70 /* Compaq's Q - don't use */
+#define XF86XK_Reply 0x1008FF72 /* Reply e.g., mail */
+#define XF86XK_Reload 0x1008FF73 /* Reload web page, file, etc. */
+#define XF86XK_RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */
+#define XF86XK_RotationPB 0x1008FF75 /* don't use */
+#define XF86XK_RotationKB 0x1008FF76 /* don't use */
+#define XF86XK_Save 0x1008FF77 /* Save (file, document, state */
+#define XF86XK_ScrollUp 0x1008FF78 /* Scroll window/contents up */
+#define XF86XK_ScrollDown 0x1008FF79 /* Scrool window/contentd down */
+#define XF86XK_ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */
+#define XF86XK_Send 0x1008FF7B /* Send mail, file, object */
+#define XF86XK_Spell 0x1008FF7C /* Spell checker */
+#define XF86XK_SplitScreen 0x1008FF7D /* Split window or screen */
+#define XF86XK_Support 0x1008FF7E /* Get support (??) */
+#define XF86XK_TaskPane 0x1008FF7F /* Show tasks */
+#define XF86XK_Terminal 0x1008FF80 /* Launch terminal emulator */
+#define XF86XK_Tools 0x1008FF81 /* toolbox of desktop/app. */
+#define XF86XK_Travel 0x1008FF82 /* ?? */
+#define XF86XK_UserPB 0x1008FF84 /* ?? */
+#define XF86XK_User1KB 0x1008FF85 /* ?? */
+#define XF86XK_User2KB 0x1008FF86 /* ?? */
+#define XF86XK_Video 0x1008FF87 /* Launch video player */
+#define XF86XK_WheelButton 0x1008FF88 /* button from a mouse wheel */
+#define XF86XK_Word 0x1008FF89 /* Launch word processor */
+#define XF86XK_Xfer 0x1008FF8A
+#define XF86XK_ZoomIn 0x1008FF8B /* zoom in view, map, etc. */
+#define XF86XK_ZoomOut 0x1008FF8C /* zoom out view, map, etc. */
+
+#define XF86XK_Away 0x1008FF8D /* mark yourself as away */
+#define XF86XK_Messenger 0x1008FF8E /* as in instant messaging */
+#define XF86XK_WebCam 0x1008FF8F /* Launch web camera app. */
+#define XF86XK_MailForward 0x1008FF90 /* Forward in mail */
+#define XF86XK_Pictures 0x1008FF91 /* Show pictures */
+#define XF86XK_Music 0x1008FF92 /* Launch music application */
+
+#define XF86XK_Battery 0x1008FF93 /* Display battery information */
+#define XF86XK_Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */
+#define XF86XK_WLAN 0x1008FF95 /* Enable/disable WLAN */
+#define XF86XK_UWB 0x1008FF96 /* Enable/disable UWB */
+
+#define XF86XK_AudioForward 0x1008FF97 /* fast-forward audio track */
+#define XF86XK_AudioRepeat 0x1008FF98 /* toggle repeat mode */
+#define XF86XK_AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */
+#define XF86XK_Subtitle 0x1008FF9A /* cycle through subtitle */
+#define XF86XK_AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */
+#define XF86XK_CycleAngle 0x1008FF9C /* cycle through angles */
+#define XF86XK_FrameBack 0x1008FF9D /* video: go one frame back */
+#define XF86XK_FrameForward 0x1008FF9E /* video: go one frame forward */
+#define XF86XK_Time 0x1008FF9F /* display, or shows an entry for time seeking */
+#define XF86XK_Select 0x1008FFA0 /* Select button on joypads and remotes */
+#define XF86XK_View 0x1008FFA1 /* Show a view options/properties */
+#define XF86XK_TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */
+
+#define XF86XK_Red 0x1008FFA3 /* Red button */
+#define XF86XK_Green 0x1008FFA4 /* Green button */
+#define XF86XK_Yellow 0x1008FFA5 /* Yellow button */
+#define XF86XK_Blue 0x1008FFA6 /* Blue button */
+
+#define XF86XK_Suspend 0x1008FFA7 /* Sleep to RAM */
+#define XF86XK_Hibernate 0x1008FFA8 /* Sleep to disk */
+#define XF86XK_TouchpadToggle 0x1008FFA9 /* Toggle between touchpad/trackstick */
+#define XF86XK_TouchpadOn 0x1008FFB0 /* The touchpad got switched on */
+#define XF86XK_TouchpadOff 0x1008FFB1 /* The touchpad got switched off */
+
+#define XF86XK_AudioMicMute 0x1008FFB2 /* Mute the Mic from the system */
+
+#define XF86XK_Keyboard 0x1008FFB3 /* User defined keyboard related action */
+
+#define XF86XK_WWAN 0x1008FFB4 /* Toggle WWAN (LTE, UMTS, etc.) radio */
+#define XF86XK_RFKill 0x1008FFB5 /* Toggle radios on/off */
+
+#define XF86XK_AudioPreset 0x1008FFB6 /* Select equalizer preset, e.g. theatre-mode */
+
+/* Keys for special action keys (hot keys) */
+/* Virtual terminals on some operating systems */
+#define XF86XK_Switch_VT_1 0x1008FE01
+#define XF86XK_Switch_VT_2 0x1008FE02
+#define XF86XK_Switch_VT_3 0x1008FE03
+#define XF86XK_Switch_VT_4 0x1008FE04
+#define XF86XK_Switch_VT_5 0x1008FE05
+#define XF86XK_Switch_VT_6 0x1008FE06
+#define XF86XK_Switch_VT_7 0x1008FE07
+#define XF86XK_Switch_VT_8 0x1008FE08
+#define XF86XK_Switch_VT_9 0x1008FE09
+#define XF86XK_Switch_VT_10 0x1008FE0A
+#define XF86XK_Switch_VT_11 0x1008FE0B
+#define XF86XK_Switch_VT_12 0x1008FE0C
+
+#define XF86XK_Ungrab 0x1008FE20 /* force ungrab */
+#define XF86XK_ClearGrab 0x1008FE21 /* kill application with grab */
+#define XF86XK_Next_VMode 0x1008FE22 /* next video mode available */
+#define XF86XK_Prev_VMode 0x1008FE23 /* prev. video mode available */
+#define XF86XK_LogWindowTree 0x1008FE24 /* print window tree to log */
+#define XF86XK_LogGrabInfo 0x1008FE25 /* print all active grabs to log */
diff --git a/XI.h b/XI.h
new file mode 100644
index 0000000..7b44399
--- /dev/null
+++ b/XI.h
@@ -0,0 +1,308 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+/* Definitions used by the server, library and client */
+
+#ifndef _XI_H_
+#define _XI_H_
+
+#define sz_xGetExtensionVersionReq 8
+#define sz_xGetExtensionVersionReply 32
+#define sz_xListInputDevicesReq 4
+#define sz_xListInputDevicesReply 32
+#define sz_xOpenDeviceReq 8
+#define sz_xOpenDeviceReply 32
+#define sz_xCloseDeviceReq 8
+#define sz_xSetDeviceModeReq 8
+#define sz_xSetDeviceModeReply 32
+#define sz_xSelectExtensionEventReq 12
+#define sz_xGetSelectedExtensionEventsReq 8
+#define sz_xGetSelectedExtensionEventsReply 32
+#define sz_xChangeDeviceDontPropagateListReq 12
+#define sz_xGetDeviceDontPropagateListReq 8
+#define sz_xGetDeviceDontPropagateListReply 32
+#define sz_xGetDeviceMotionEventsReq 16
+#define sz_xGetDeviceMotionEventsReply 32
+#define sz_xChangeKeyboardDeviceReq 8
+#define sz_xChangeKeyboardDeviceReply 32
+#define sz_xChangePointerDeviceReq 8
+#define sz_xChangePointerDeviceReply 32
+#define sz_xGrabDeviceReq 20
+#define sz_xGrabDeviceReply 32
+#define sz_xUngrabDeviceReq 12
+#define sz_xGrabDeviceKeyReq 20
+#define sz_xGrabDeviceKeyReply 32
+#define sz_xUngrabDeviceKeyReq 16
+#define sz_xGrabDeviceButtonReq 20
+#define sz_xGrabDeviceButtonReply 32
+#define sz_xUngrabDeviceButtonReq 16
+#define sz_xAllowDeviceEventsReq 12
+#define sz_xGetDeviceFocusReq 8
+#define sz_xGetDeviceFocusReply 32
+#define sz_xSetDeviceFocusReq 16
+#define sz_xGetFeedbackControlReq 8
+#define sz_xGetFeedbackControlReply 32
+#define sz_xChangeFeedbackControlReq 12
+#define sz_xGetDeviceKeyMappingReq 8
+#define sz_xGetDeviceKeyMappingReply 32
+#define sz_xChangeDeviceKeyMappingReq 8
+#define sz_xGetDeviceModifierMappingReq 8
+#define sz_xSetDeviceModifierMappingReq 8
+#define sz_xSetDeviceModifierMappingReply 32
+#define sz_xGetDeviceButtonMappingReq 8
+#define sz_xGetDeviceButtonMappingReply 32
+#define sz_xSetDeviceButtonMappingReq 8
+#define sz_xSetDeviceButtonMappingReply 32
+#define sz_xQueryDeviceStateReq 8
+#define sz_xQueryDeviceStateReply 32
+#define sz_xSendExtensionEventReq 16
+#define sz_xDeviceBellReq 8
+#define sz_xSetDeviceValuatorsReq 8
+#define sz_xSetDeviceValuatorsReply 32
+#define sz_xGetDeviceControlReq 8
+#define sz_xGetDeviceControlReply 32
+#define sz_xChangeDeviceControlReq 8
+#define sz_xChangeDeviceControlReply 32
+#define sz_xListDevicePropertiesReq 8
+#define sz_xListDevicePropertiesReply 32
+#define sz_xChangeDevicePropertyReq 20
+#define sz_xDeleteDevicePropertyReq 12
+#define sz_xGetDevicePropertyReq 24
+#define sz_xGetDevicePropertyReply 32
+
+#define INAME "XInputExtension"
+
+#define XI_KEYBOARD "KEYBOARD"
+#define XI_MOUSE "MOUSE"
+#define XI_TABLET "TABLET"
+#define XI_TOUCHSCREEN "TOUCHSCREEN"
+#define XI_TOUCHPAD "TOUCHPAD"
+#define XI_BARCODE "BARCODE"
+#define XI_BUTTONBOX "BUTTONBOX"
+#define XI_KNOB_BOX "KNOB_BOX"
+#define XI_ONE_KNOB "ONE_KNOB"
+#define XI_NINE_KNOB "NINE_KNOB"
+#define XI_TRACKBALL "TRACKBALL"
+#define XI_QUADRATURE "QUADRATURE"
+#define XI_ID_MODULE "ID_MODULE"
+#define XI_SPACEBALL "SPACEBALL"
+#define XI_DATAGLOVE "DATAGLOVE"
+#define XI_EYETRACKER "EYETRACKER"
+#define XI_CURSORKEYS "CURSORKEYS"
+#define XI_FOOTMOUSE "FOOTMOUSE"
+#define XI_JOYSTICK "JOYSTICK"
+
+/* Indices into the versions[] array (XExtInt.c). Used as a index to
+ * retrieve the minimum version of XI from _XiCheckExtInit */
+#define Dont_Check 0
+#define XInput_Initial_Release 1
+#define XInput_Add_XDeviceBell 2
+#define XInput_Add_XSetDeviceValuators 3
+#define XInput_Add_XChangeDeviceControl 4
+#define XInput_Add_DevicePresenceNotify 5
+#define XInput_Add_DeviceProperties 6
+/* DO NOT ADD TO HERE -> XI2 */
+
+#define XI_Absent 0
+#define XI_Present 1
+
+#define XI_Initial_Release_Major 1
+#define XI_Initial_Release_Minor 0
+
+#define XI_Add_XDeviceBell_Major 1
+#define XI_Add_XDeviceBell_Minor 1
+
+#define XI_Add_XSetDeviceValuators_Major 1
+#define XI_Add_XSetDeviceValuators_Minor 2
+
+#define XI_Add_XChangeDeviceControl_Major 1
+#define XI_Add_XChangeDeviceControl_Minor 3
+
+#define XI_Add_DevicePresenceNotify_Major 1
+#define XI_Add_DevicePresenceNotify_Minor 4
+
+#define XI_Add_DeviceProperties_Major 1
+#define XI_Add_DeviceProperties_Minor 5
+
+#define DEVICE_RESOLUTION 1
+#define DEVICE_ABS_CALIB 2
+#define DEVICE_CORE 3
+#define DEVICE_ENABLE 4
+#define DEVICE_ABS_AREA 5
+
+#define NoSuchExtension 1
+
+#define COUNT 0
+#define CREATE 1
+
+#define NewPointer 0
+#define NewKeyboard 1
+
+#define XPOINTER 0
+#define XKEYBOARD 1
+
+#define UseXKeyboard 0xFF
+
+#define IsXPointer 0
+#define IsXKeyboard 1
+#define IsXExtensionDevice 2
+#define IsXExtensionKeyboard 3
+#define IsXExtensionPointer 4
+
+#define AsyncThisDevice 0
+#define SyncThisDevice 1
+#define ReplayThisDevice 2
+#define AsyncOtherDevices 3
+#define AsyncAll 4
+#define SyncAll 5
+
+#define FollowKeyboard 3
+#ifndef RevertToFollowKeyboard
+#define RevertToFollowKeyboard 3
+#endif
+
+#define DvAccelNum (1L << 0)
+#define DvAccelDenom (1L << 1)
+#define DvThreshold (1L << 2)
+
+#define DvKeyClickPercent (1L<<0)
+#define DvPercent (1L<<1)
+#define DvPitch (1L<<2)
+#define DvDuration (1L<<3)
+#define DvLed (1L<<4)
+#define DvLedMode (1L<<5)
+#define DvKey (1L<<6)
+#define DvAutoRepeatMode (1L<<7)
+
+#define DvString (1L << 0)
+
+#define DvInteger (1L << 0)
+
+#define DeviceMode (1L << 0)
+#define Relative 0
+#define Absolute 1
+
+#define ProximityState (1L << 1)
+#define InProximity (0L << 1)
+#define OutOfProximity (1L << 1)
+
+#define AddToList 0
+#define DeleteFromList 1
+
+#define KeyClass 0
+#define ButtonClass 1
+#define ValuatorClass 2
+#define FeedbackClass 3
+#define ProximityClass 4
+#define FocusClass 5
+#define OtherClass 6
+#define AttachClass 7
+
+#define KbdFeedbackClass 0
+#define PtrFeedbackClass 1
+#define StringFeedbackClass 2
+#define IntegerFeedbackClass 3
+#define LedFeedbackClass 4
+#define BellFeedbackClass 5
+
+#define _devicePointerMotionHint 0
+#define _deviceButton1Motion 1
+#define _deviceButton2Motion 2
+#define _deviceButton3Motion 3
+#define _deviceButton4Motion 4
+#define _deviceButton5Motion 5
+#define _deviceButtonMotion 6
+#define _deviceButtonGrab 7
+#define _deviceOwnerGrabButton 8
+#define _noExtensionEvent 9
+
+#define _devicePresence 0
+
+#define _deviceEnter 0
+#define _deviceLeave 1
+
+/* Device presence notify states */
+#define DeviceAdded 0
+#define DeviceRemoved 1
+#define DeviceEnabled 2
+#define DeviceDisabled 3
+#define DeviceUnrecoverable 4
+#define DeviceControlChanged 5
+
+/* XI Errors */
+#define XI_BadDevice 0
+#define XI_BadEvent 1
+#define XI_BadMode 2
+#define XI_DeviceBusy 3
+#define XI_BadClass 4
+
+/*
+ * Make XEventClass be a CARD32 for 64 bit servers. Don't affect client
+ * definition of XEventClass since that would be a library interface change.
+ * See the top of X.h for more _XSERVER64 magic.
+ *
+ * But, don't actually use the CARD32 type. We can't get it defined here
+ * without polluting the namespace.
+ */
+#ifdef _XSERVER64
+typedef unsigned int XEventClass;
+#else
+typedef unsigned long XEventClass;
+#endif
+
+/*******************************************************************
+ *
+ * Extension version structure.
+ *
+ */
+
+typedef struct {
+ int present;
+ short major_version;
+ short minor_version;
+} XExtensionVersion;
+
+#endif /* _XI_H_ */
diff --git a/XI2.h b/XI2.h
new file mode 100644
index 0000000..5a1c66a
--- /dev/null
+++ b/XI2.h
@@ -0,0 +1,245 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef _XI2_H_
+#define _XI2_H_
+
+#define XInput_2_0 7
+/* DO NOT ADD TO THIS LIST. These are libXi-specific defines.
+ See commit libXi-1.4.2-21-ge8531dd */
+
+#define XI_2_Major 2
+#define XI_2_Minor 3
+
+/* Property event flags */
+#define XIPropertyDeleted 0
+#define XIPropertyCreated 1
+#define XIPropertyModified 2
+
+/* Property modes */
+#define XIPropModeReplace 0
+#define XIPropModePrepend 1
+#define XIPropModeAppend 2
+
+/* Special property type used for XIGetProperty */
+#define XIAnyPropertyType 0L
+
+/* Enter/Leave and Focus In/Out modes */
+#define XINotifyNormal 0
+#define XINotifyGrab 1
+#define XINotifyUngrab 2
+#define XINotifyWhileGrabbed 3
+#define XINotifyPassiveGrab 4
+#define XINotifyPassiveUngrab 5
+
+/* Enter/Leave and focus In/out detail */
+#define XINotifyAncestor 0
+#define XINotifyVirtual 1
+#define XINotifyInferior 2
+#define XINotifyNonlinear 3
+#define XINotifyNonlinearVirtual 4
+#define XINotifyPointer 5
+#define XINotifyPointerRoot 6
+#define XINotifyDetailNone 7
+
+/* Grab modes */
+#define XIGrabModeSync 0
+#define XIGrabModeAsync 1
+#define XIGrabModeTouch 2
+
+/* Grab reply status codes */
+#define XIGrabSuccess 0
+#define XIAlreadyGrabbed 1
+#define XIGrabInvalidTime 2
+#define XIGrabNotViewable 3
+#define XIGrabFrozen 4
+
+/* Grab owner events values */
+#define XIOwnerEvents True
+#define XINoOwnerEvents False
+
+/* Passive grab types */
+#define XIGrabtypeButton 0
+#define XIGrabtypeKeycode 1
+#define XIGrabtypeEnter 2
+#define XIGrabtypeFocusIn 3
+#define XIGrabtypeTouchBegin 4
+
+/* Passive grab modifier */
+#define XIAnyModifier (1U << 31)
+#define XIAnyButton 0
+#define XIAnyKeycode 0
+
+/* XIAllowEvents event-modes */
+#define XIAsyncDevice 0
+#define XISyncDevice 1
+#define XIReplayDevice 2
+#define XIAsyncPairedDevice 3
+#define XIAsyncPair 4
+#define XISyncPair 5
+#define XIAcceptTouch 6
+#define XIRejectTouch 7
+
+/* DeviceChangedEvent change reasons */
+#define XISlaveSwitch 1
+#define XIDeviceChange 2
+
+/* Hierarchy flags */
+#define XIMasterAdded (1 << 0)
+#define XIMasterRemoved (1 << 1)
+#define XISlaveAdded (1 << 2)
+#define XISlaveRemoved (1 << 3)
+#define XISlaveAttached (1 << 4)
+#define XISlaveDetached (1 << 5)
+#define XIDeviceEnabled (1 << 6)
+#define XIDeviceDisabled (1 << 7)
+
+/* ChangeHierarchy constants */
+#define XIAddMaster 1
+#define XIRemoveMaster 2
+#define XIAttachSlave 3
+#define XIDetachSlave 4
+
+#define XIAttachToMaster 1
+#define XIFloating 2
+
+/* Valuator modes */
+#define XIModeRelative 0
+#define XIModeAbsolute 1
+
+/* Device types */
+#define XIMasterPointer 1
+#define XIMasterKeyboard 2
+#define XISlavePointer 3
+#define XISlaveKeyboard 4
+#define XIFloatingSlave 5
+
+/* Device classes: classes that are not identical to Xi 1.x classes must be
+ * numbered starting from 8. */
+#define XIKeyClass 0
+#define XIButtonClass 1
+#define XIValuatorClass 2
+#define XIScrollClass 3
+#define XITouchClass 8
+
+/* Scroll class types */
+#define XIScrollTypeVertical 1
+#define XIScrollTypeHorizontal 2
+
+/* Scroll class flags */
+#define XIScrollFlagNoEmulation (1 << 0)
+#define XIScrollFlagPreferred (1 << 1)
+
+/* Device event flags (common) */
+/* Device event flags (key events only) */
+#define XIKeyRepeat (1 << 16)
+/* Device event flags (pointer events only) */
+#define XIPointerEmulated (1 << 16)
+/* Device event flags (touch events only) */
+#define XITouchPendingEnd (1 << 16)
+#define XITouchEmulatingPointer (1 << 17)
+
+/* Barrier event flags */
+#define XIBarrierPointerReleased (1 << 0)
+#define XIBarrierDeviceIsGrabbed (1 << 1)
+
+
+/* Touch modes */
+#define XIDirectTouch 1
+#define XIDependentTouch 2
+
+/* XI2 event mask macros */
+#define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7)))
+#define XIClearMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] &= ~(1 << ((event) & 7)))
+#define XIMaskIsSet(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7)))
+#define XIMaskLen(event) (((event) >> 3) + 1)
+
+/* Fake device ID's for event selection */
+#define XIAllDevices 0
+#define XIAllMasterDevices 1
+
+/* Event types */
+#define XI_DeviceChanged 1
+#define XI_KeyPress 2
+#define XI_KeyRelease 3
+#define XI_ButtonPress 4
+#define XI_ButtonRelease 5
+#define XI_Motion 6
+#define XI_Enter 7
+#define XI_Leave 8
+#define XI_FocusIn 9
+#define XI_FocusOut 10
+#define XI_HierarchyChanged 11
+#define XI_PropertyEvent 12
+#define XI_RawKeyPress 13
+#define XI_RawKeyRelease 14
+#define XI_RawButtonPress 15
+#define XI_RawButtonRelease 16
+#define XI_RawMotion 17
+#define XI_TouchBegin 18 /* XI 2.2 */
+#define XI_TouchUpdate 19
+#define XI_TouchEnd 20
+#define XI_TouchOwnership 21
+#define XI_RawTouchBegin 22
+#define XI_RawTouchUpdate 23
+#define XI_RawTouchEnd 24
+#define XI_BarrierHit 25 /* XI 2.3 */
+#define XI_BarrierLeave 26
+#define XI_LASTEVENT XI_BarrierLeave
+/* NOTE: XI2LASTEVENT in xserver/include/inputstr.h must be the same value
+ * as XI_LASTEVENT if the server is supposed to handle masks etc. for this
+ * type of event. */
+
+/* Event masks.
+ * Note: the protocol spec defines a mask to be of (1 << type). Clients are
+ * free to create masks by bitshifting instead of using these defines.
+ */
+#define XI_DeviceChangedMask (1 << XI_DeviceChanged)
+#define XI_KeyPressMask (1 << XI_KeyPress)
+#define XI_KeyReleaseMask (1 << XI_KeyRelease)
+#define XI_ButtonPressMask (1 << XI_ButtonPress)
+#define XI_ButtonReleaseMask (1 << XI_ButtonRelease)
+#define XI_MotionMask (1 << XI_Motion)
+#define XI_EnterMask (1 << XI_Enter)
+#define XI_LeaveMask (1 << XI_Leave)
+#define XI_FocusInMask (1 << XI_FocusIn)
+#define XI_FocusOutMask (1 << XI_FocusOut)
+#define XI_HierarchyChangedMask (1 << XI_HierarchyChanged)
+#define XI_PropertyEventMask (1 << XI_PropertyEvent)
+#define XI_RawKeyPressMask (1 << XI_RawKeyPress)
+#define XI_RawKeyReleaseMask (1 << XI_RawKeyRelease)
+#define XI_RawButtonPressMask (1 << XI_RawButtonPress)
+#define XI_RawButtonReleaseMask (1 << XI_RawButtonRelease)
+#define XI_RawMotionMask (1 << XI_RawMotion)
+#define XI_TouchBeginMask (1 << XI_TouchBegin)
+#define XI_TouchEndMask (1 << XI_TouchEnd)
+#define XI_TouchOwnershipChangedMask (1 << XI_TouchOwnership)
+#define XI_TouchUpdateMask (1 << XI_TouchUpdate)
+#define XI_RawTouchBeginMask (1 << XI_RawTouchBegin)
+#define XI_RawTouchEndMask (1 << XI_RawTouchEnd)
+#define XI_RawTouchUpdateMask (1 << XI_RawTouchUpdate)
+#define XI_BarrierHitMask (1 << XI_BarrierHit)
+#define XI_BarrierLeaveMask (1 << XI_BarrierLeave)
+
+#endif /* _XI2_H_ */
diff --git a/XI2proto.h b/XI2proto.h
new file mode 100644
index 0000000..4cdaa0d
--- /dev/null
+++ b/XI2proto.h
@@ -0,0 +1,1091 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/* Conventions for this file:
+ * Names:
+ * structs: always typedef'd, prefixed with xXI, CamelCase
+ * struct members: lower_case_with_underscores
+ * Exceptions: reqType, ReqType, repType, RepType, sequenceNumber are
+ * named as such for historical reasons.
+ * request opcodes: X_XIRequestName as CamelCase
+ * defines: defines used in client applications must go in XI2.h
+ * defines used only in protocol handling: XISOMENAME
+ *
+ * Data types: unless there is a historical name for a datatype (e.g.
+ * Window), use stdint types specifying the size of the datatype.
+ * historical data type names must be defined and undefined at the top and
+ * end of the file.
+ *
+ * General:
+ * spaces, not tabs.
+ * structs specific to a request or reply added before the request
+ * definition. structs used in more than one request, reply or event
+ * appended to the common structs section before the definition of the
+ * first request.
+ * members of structs vertically aligned on column 16 if datatypes permit.
+ * otherwise alingned on next available 8n column.
+ */
+
+/**
+ * Protocol definitions for the XI2 protocol.
+ * This file should not be included by clients that merely use XI2, but do not
+ * need the wire protocol. Such clients should include XI2.h, or the matching
+ * header from the library.
+ *
+ */
+#ifndef _XI2PROTO_H_
+#define _XI2PROTO_H_
+
+#include <X11/Xproto.h>
+#include <X11/X.h>
+#include <X11/extensions/XI2.h>
+#include <stdint.h>
+
+/* make sure types have right sizes for protocol structures. */
+#define Window uint32_t
+#define Time uint32_t
+#define Atom uint32_t
+#define Cursor uint32_t
+#define Barrier uint32_t
+
+/**
+ * XI2 Request opcodes
+ */
+#define X_XIQueryPointer 40
+#define X_XIWarpPointer 41
+#define X_XIChangeCursor 42
+#define X_XIChangeHierarchy 43
+#define X_XISetClientPointer 44
+#define X_XIGetClientPointer 45
+#define X_XISelectEvents 46
+#define X_XIQueryVersion 47
+#define X_XIQueryDevice 48
+#define X_XISetFocus 49
+#define X_XIGetFocus 50
+#define X_XIGrabDevice 51
+#define X_XIUngrabDevice 52
+#define X_XIAllowEvents 53
+#define X_XIPassiveGrabDevice 54
+#define X_XIPassiveUngrabDevice 55
+#define X_XIListProperties 56
+#define X_XIChangeProperty 57
+#define X_XIDeleteProperty 58
+#define X_XIGetProperty 59
+#define X_XIGetSelectedEvents 60
+#define X_XIBarrierReleasePointer 61
+
+/** Number of XI requests */
+#define XI2REQUESTS (X_XIBarrierReleasePointer - X_XIQueryPointer + 1)
+/** Number of XI2 events */
+#define XI2EVENTS (XI_LASTEVENT + 1)
+
+/*************************************************************************************
+ * *
+ * COMMON STRUCTS *
+ * *
+ *************************************************************************************/
+/** Fixed point 16.16 */
+typedef int32_t FP1616;
+
+/** Fixed point 32.32 */
+typedef struct {
+ int32_t integral;
+ uint32_t frac;
+} FP3232;
+
+/**
+ * Struct to describe a device.
+ *
+ * For a MasterPointer or a MasterKeyboard, 'attachment' specifies the
+ * paired master device.
+ * For a SlaveKeyboard or SlavePointer, 'attachment' specifies the master
+ * device this device is attached to.
+ * For a FloatingSlave, 'attachment' is undefined.
+ */
+typedef struct {
+ uint16_t deviceid;
+ uint16_t use; /**< ::XIMasterPointer, ::XIMasterKeyboard,
+ ::XISlavePointer, ::XISlaveKeyboard,
+ ::XIFloatingSlave */
+ uint16_t attachment; /**< Current attachment or pairing.*/
+ uint16_t num_classes; /**< Number of classes following this struct. */
+ uint16_t name_len; /**< Length of name in bytes. */
+ uint8_t enabled; /**< TRUE if device is enabled. */
+ uint8_t pad;
+} xXIDeviceInfo;
+
+/**
+ * Default template for a device class.
+ * A device class is equivalent to a device's capabilities. Multiple classes
+ * are supported per device.
+ */
+typedef struct {
+ uint16_t type; /**< One of *class */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t pad;
+} xXIAnyInfo;
+
+/**
+ * Denotes button capability on a device.
+ * Struct is followed by num_buttons * Atom that names the buttons in the
+ * device-native setup (i.e. ignoring button mappings).
+ */
+typedef struct {
+ uint16_t type; /**< Always ButtonClass */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t num_buttons; /**< Number of buttons provided */
+} xXIButtonInfo;
+
+/**
+ * Denotes key capability on a device.
+ * Struct is followed by num_keys * CARD32 that lists the keycodes available
+ * on the device.
+ */
+typedef struct {
+ uint16_t type; /**< Always KeyClass */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t num_keycodes; /**< Number of keys provided */
+} xXIKeyInfo;
+
+/**
+ * Denotes an valuator capability on a device.
+ * One XIValuatorInfo describes exactly one valuator (axis) on the device.
+ */
+typedef struct {
+ uint16_t type; /**< Always ValuatorClass */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t number; /**< Valuator number */
+ Atom label; /**< Axis label */
+ FP3232 min; /**< Min value */
+ FP3232 max; /**< Max value */
+ FP3232 value; /**< Last published value */
+ uint32_t resolution; /**< Resolutions in units/m */
+ uint8_t mode; /**< ModeRelative or ModeAbsolute */
+ uint8_t pad1;
+ uint16_t pad2;
+} xXIValuatorInfo;
+
+/***
+ * Denotes a scroll valuator on a device.
+ * One XIScrollInfo describes exactly one scroll valuator that must have a
+ * XIValuatorInfo struct.
+ */
+typedef struct {
+ uint16_t type; /**< Always ValuatorClass */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t number; /**< Valuator number */
+ uint16_t scroll_type; /**< ::XIScrollTypeVertical, ::XIScrollTypeHorizontal */
+ uint16_t pad0;
+ uint32_t flags; /**< ::XIScrollFlagEmulate, ::XIScrollFlagPreferred */
+ FP3232 increment; /**< Increment for one unit of scrolling */
+} xXIScrollInfo;
+
+/**
+ * Denotes multitouch capability on a device.
+ */
+typedef struct {
+ uint16_t type; /**< Always TouchClass */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint8_t mode; /**< DirectTouch or DependentTouch */
+ uint8_t num_touches; /**< Maximum number of touches (0==unlimited) */
+} xXITouchInfo;
+
+/**
+ * Used to select for events on a given window.
+ * Struct is followed by (mask_len * CARD8), with each bit set representing
+ * the event mask for the given type. A mask bit represents an event type if
+ * (mask == (1 << type)).
+ */
+typedef struct {
+ uint16_t deviceid; /**< Device id to select for */
+ uint16_t mask_len; /**< Length of mask in 4 byte units */
+} xXIEventMask;
+
+/**
+ * XKB modifier information.
+ * The effective modifier is a binary mask of base, latched, and locked
+ * modifiers.
+ */
+typedef struct
+{
+ uint32_t base_mods; /**< Logically pressed modifiers */
+ uint32_t latched_mods; /**< Logically latched modifiers */
+ uint32_t locked_mods; /**< Logically locked modifiers */
+ uint32_t effective_mods; /**< Effective modifiers */
+} xXIModifierInfo;
+
+/**
+ * XKB group information.
+ * The effective group is the mathematical sum of base, latched, and locked
+ * group after group wrapping is taken into account.
+ */
+typedef struct
+{
+ uint8_t base_group; /**< Logically "pressed" group */
+ uint8_t latched_group; /**< Logically latched group */
+ uint8_t locked_group; /**< Logically locked group */
+ uint8_t effective_group; /**< Effective group */
+} xXIGroupInfo;
+
+
+/*************************************************************************************
+ * *
+ * REQUESTS *
+ * *
+ *************************************************************************************/
+
+/**
+ * Query the server for the supported X Input extension version.
+ */
+
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIQueryVersion */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t major_version;
+ uint16_t minor_version;
+} xXIQueryVersionReq;
+#define sz_xXIQueryVersionReq 8
+
+typedef struct {
+ uint8_t repType; /**< ::X_Reply */
+ uint8_t RepType; /**< Always ::X_XIQueryVersion */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint16_t major_version;
+ uint16_t minor_version;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+} xXIQueryVersionReply;
+#define sz_xXIQueryVersionReply 32
+
+/**
+ * Query the server for information about a specific device or all input
+ * devices.
+ */
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIQueryDevice */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t deviceid;
+ uint16_t pad;
+} xXIQueryDeviceReq;
+#define sz_xXIQueryDeviceReq 8
+
+typedef struct {
+ uint8_t repType; /**< ::X_Reply */
+ uint8_t RepType; /**< Always ::X_XIQueryDevice */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint16_t num_devices;
+ uint16_t pad0;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+} xXIQueryDeviceReply;
+#define sz_xXIQueryDeviceReply 32
+
+/**
+ * Select for events on a given window.
+ */
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XISelectEvents */
+ uint16_t length; /**< Length in 4 byte units */
+ Window win;
+ uint16_t num_masks;
+ uint16_t pad;
+} xXISelectEventsReq;
+#define sz_xXISelectEventsReq 12
+
+/**
+ * Query for selected events on a given window.
+ */
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIGetSelectedEvents */
+ uint16_t length; /**< Length in 4 byte units */
+ Window win;
+} xXIGetSelectedEventsReq;
+#define sz_xXIGetSelectedEventsReq 8
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_XIGetSelectedEvents */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint16_t num_masks; /**< Number of xXIEventMask structs
+ trailing the reply */
+ uint16_t pad0;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+} xXIGetSelectedEventsReply;
+#define sz_xXIGetSelectedEventsReply 32
+
+/**
+ * Query the given device's screen/window coordinates.
+ */
+
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIQueryPointer */
+ uint16_t length; /**< Length in 4 byte units */
+ Window win;
+ uint16_t deviceid;
+ uint16_t pad1;
+} xXIQueryPointerReq;
+#define sz_xXIQueryPointerReq 12
+
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_XIQueryPointer */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ Window root;
+ Window child;
+ FP1616 root_x;
+ FP1616 root_y;
+ FP1616 win_x;
+ FP1616 win_y;
+ uint8_t same_screen;
+ uint8_t pad0;
+ uint16_t buttons_len;
+ xXIModifierInfo mods;
+ xXIGroupInfo group;
+} xXIQueryPointerReply;
+#define sz_xXIQueryPointerReply 56
+
+/**
+ * Warp the given device's pointer to the specified position.
+ */
+
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIWarpPointer */
+ uint16_t length; /**< Length in 4 byte units */
+ Window src_win;
+ Window dst_win;
+ FP1616 src_x;
+ FP1616 src_y;
+ uint16_t src_width;
+ uint16_t src_height;
+ FP1616 dst_x;
+ FP1616 dst_y;
+ uint16_t deviceid;
+ uint16_t pad1;
+} xXIWarpPointerReq;
+#define sz_xXIWarpPointerReq 36
+
+/**
+ * Change the given device's sprite to the given cursor.
+ */
+
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIChangeCursor */
+ uint16_t length; /**< Length in 4 byte units */
+ Window win;
+ Cursor cursor;
+ uint16_t deviceid;
+ uint16_t pad1;
+} xXIChangeCursorReq;
+#define sz_xXIChangeCursorReq 16
+
+/**
+ * Modify the device hierarchy.
+ */
+
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIChangeHierarchy */
+ uint16_t length; /**< Length in 4 byte units */
+ uint8_t num_changes;
+ uint8_t pad0;
+ uint16_t pad1;
+} xXIChangeHierarchyReq;
+#define sz_xXIChangeHierarchyReq 8
+
+/**
+ * Generic header for any hierarchy change.
+ */
+typedef struct {
+ uint16_t type;
+ uint16_t length; /**< Length in 4 byte units */
+} xXIAnyHierarchyChangeInfo;
+
+/**
+ * Create a new master device.
+ * Name of new master follows struct (4-byte padded)
+ */
+typedef struct {
+ uint16_t type; /**< Always ::XIAddMaster */
+ uint16_t length; /**< 2 + (namelen + padding)/4 */
+ uint16_t name_len;
+ uint8_t send_core;
+ uint8_t enable;
+} xXIAddMasterInfo;
+
+/**
+ * Delete a master device. Will automatically delete the master device paired
+ * with the given master device.
+ */
+typedef struct {
+ uint16_t type; /**< Always ::XIRemoveMaster */
+ uint16_t length; /**< 3 */
+ uint16_t deviceid;
+ uint8_t return_mode; /**< ::XIAttachToMaster, ::XIFloating */
+ uint8_t pad;
+ uint16_t return_pointer; /**< Pointer to attach slave ptr devices to */
+ uint16_t return_keyboard; /**< keyboard to attach slave keybd devices to*/
+} xXIRemoveMasterInfo;
+
+/**
+ * Attach an SD to a new device.
+ * NewMaster has to be of same type (pointer->pointer, keyboard->keyboard);
+ */
+typedef struct {
+ uint16_t type; /**< Always ::XIAttachSlave */
+ uint16_t length; /**< 2 */
+ uint16_t deviceid;
+ uint16_t new_master; /**< id of new master device */
+} xXIAttachSlaveInfo;
+
+/**
+ * Detach an SD from its current master device.
+ */
+typedef struct {
+ uint16_t type; /**< Always ::XIDetachSlave */
+ uint16_t length; /**< 2 */
+ uint16_t deviceid;
+ uint16_t pad;
+} xXIDetachSlaveInfo;
+
+
+/**
+ * Set the window/client's ClientPointer.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XISetClientPointer */
+ uint16_t length; /**< Length in 4 byte units */
+ Window win;
+ uint16_t deviceid;
+ uint16_t pad1;
+} xXISetClientPointerReq;
+#define sz_xXISetClientPointerReq 12
+
+/**
+ * Query the given window/client's ClientPointer setting.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_GetClientPointer */
+ uint16_t length; /**< Length in 4 byte units */
+ Window win;
+} xXIGetClientPointerReq;
+#define sz_xXIGetClientPointerReq 8
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_GetClientPointer */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ BOOL set; /**< client pointer is set? */
+ uint8_t pad0;
+ uint16_t deviceid;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+} xXIGetClientPointerReply;
+#define sz_xXIGetClientPointerReply 32
+
+/**
+ * Set the input focus to the specified window.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XISetFocus */
+ uint16_t length; /**< Length in 4 byte units */
+ Window focus;
+ Time time;
+ uint16_t deviceid;
+ uint16_t pad0;
+} xXISetFocusReq;
+#define sz_xXISetFocusReq 16
+
+/**
+ * Query the current input focus.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIGetDeviceFocus */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t deviceid;
+ uint16_t pad0;
+} xXIGetFocusReq;
+#define sz_xXIGetFocusReq 8
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_XIGetFocus */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ Window focus;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+} xXIGetFocusReply;
+#define sz_xXIGetFocusReply 32
+
+
+/**
+ * Grab the given device.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIGrabDevice */
+ uint16_t length; /**< Length in 4 byte units */
+ Window grab_window;
+ Time time;
+ Cursor cursor;
+ uint16_t deviceid;
+ uint8_t grab_mode;
+ uint8_t paired_device_mode;
+ uint8_t owner_events;
+ uint8_t pad;
+ uint16_t mask_len;
+} xXIGrabDeviceReq;
+#define sz_xXIGrabDeviceReq 24
+
+/**
+ * Return codes from a XIPassiveGrabDevice request.
+ */
+typedef struct {
+ uint32_t modifiers; /**< Modifier state */
+ uint8_t status; /**< Grab status code */
+ uint8_t pad0;
+ uint16_t pad1;
+} xXIGrabModifierInfo;
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_XIGrabDevice */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint8_t status;
+ uint8_t pad0;
+ uint16_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+ uint32_t pad6;
+} xXIGrabDeviceReply;
+#define sz_xXIGrabDeviceReply 32
+
+/**
+ * Ungrab the specified device.
+ *
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIUngrabDevice */
+ uint16_t length; /**< Length in 4 byte units */
+ Time time;
+ uint16_t deviceid;
+ uint16_t pad;
+} xXIUngrabDeviceReq;
+#define sz_xXIUngrabDeviceReq 12
+
+
+/**
+ * Allow or replay events on the specified grabbed device.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIAllowEvents */
+ uint16_t length; /**< Length in 4 byte units */
+ Time time;
+ uint16_t deviceid;
+ uint8_t mode;
+ uint8_t pad;
+} xXIAllowEventsReq;
+#define sz_xXIAllowEventsReq 12
+
+/**
+ * Allow or replay events on the specified grabbed device.
+ * Since XI 2.2
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIAllowEvents */
+ uint16_t length; /**< Length in 4 byte units */
+ Time time;
+ uint16_t deviceid;
+ uint8_t mode;
+ uint8_t pad;
+ uint32_t touchid; /**< Since XI 2.2 */
+ Window grab_window; /**< Since XI 2.2 */
+} xXI2_2AllowEventsReq;
+#define sz_xXI2_2AllowEventsReq 20
+
+
+/**
+ * Passively grab the device.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIPassiveGrabDevice */
+ uint16_t length; /**< Length in 4 byte units */
+ Time time;
+ Window grab_window;
+ Cursor cursor;
+ uint32_t detail;
+ uint16_t deviceid;
+ uint16_t num_modifiers;
+ uint16_t mask_len;
+ uint8_t grab_type;
+ uint8_t grab_mode;
+ uint8_t paired_device_mode;
+ uint8_t owner_events;
+ uint16_t pad1;
+} xXIPassiveGrabDeviceReq;
+#define sz_xXIPassiveGrabDeviceReq 32
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_XIPassiveGrabDevice */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint16_t num_modifiers;
+ uint16_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+ uint32_t pad6;
+} xXIPassiveGrabDeviceReply;
+#define sz_xXIPassiveGrabDeviceReply 32
+
+/**
+ * Delete a passive grab for the given device.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIPassiveUngrabDevice */
+ uint16_t length; /**< Length in 4 byte units */
+ Window grab_window;
+ uint32_t detail;
+ uint16_t deviceid;
+ uint16_t num_modifiers;
+ uint8_t grab_type;
+ uint8_t pad0;
+ uint16_t pad1;
+} xXIPassiveUngrabDeviceReq;
+#define sz_xXIPassiveUngrabDeviceReq 20
+
+/**
+ * List all device properties on the specified device.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIListProperties */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t deviceid;
+ uint16_t pad;
+} xXIListPropertiesReq;
+#define sz_xXIListPropertiesReq 8
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_XIListProperties */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint16_t num_properties;
+ uint16_t pad0;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+} xXIListPropertiesReply;
+#define sz_xXIListPropertiesReply 32
+
+/**
+ * Change a property on the specified device.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always ::X_XIChangeProperty */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t deviceid;
+ uint8_t mode;
+ uint8_t format;
+ Atom property;
+ Atom type;
+ uint32_t num_items;
+} xXIChangePropertyReq;
+#define sz_xXIChangePropertyReq 20
+
+/**
+ * Delete the specified property.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always X_XIDeleteProperty */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t deviceid;
+ uint16_t pad0;
+ Atom property;
+} xXIDeletePropertyReq;
+#define sz_xXIDeletePropertyReq 12
+
+/**
+ * Query the specified property's values.
+ */
+typedef struct {
+ uint8_t reqType;
+ uint8_t ReqType; /**< Always X_XIGetProperty */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t deviceid;
+#if defined(__cplusplus) || defined(c_plusplus)
+ uint8_t c_delete;
+#else
+ uint8_t delete;
+#endif
+ uint8_t pad0;
+ Atom property;
+ Atom type;
+ uint32_t offset;
+ uint32_t len;
+} xXIGetPropertyReq;
+#define sz_xXIGetPropertyReq 24
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always X_XIGetProperty */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ Atom type;
+ uint32_t bytes_after;
+ uint32_t num_items;
+ uint8_t format;
+ uint8_t pad0;
+ uint16_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+} xXIGetPropertyReply;
+#define sz_xXIGetPropertyReply 32
+
+typedef struct {
+ uint16_t deviceid;
+ uint16_t pad;
+ Barrier barrier;
+ uint32_t eventid;
+} xXIBarrierReleasePointerInfo;
+
+typedef struct {
+ uint8_t reqType; /**< Input extension major opcode */
+ uint8_t ReqType; /**< Always X_XIBarrierReleasePointer */
+ uint16_t length;
+ uint32_t num_barriers;
+ /* array of xXIBarrierReleasePointerInfo */
+} xXIBarrierReleasePointerReq;
+#define sz_xXIBarrierReleasePointerReq 8
+
+/*************************************************************************************
+ * *
+ * EVENTS *
+ * *
+ *************************************************************************************/
+
+/**
+ * Generic XI2 event header. All XI2 events use the same header.
+ */
+typedef struct
+{
+ uint8_t type;
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint16_t evtype;
+ uint16_t deviceid;
+ Time time;
+} xXIGenericDeviceEvent;
+
+/**
+ * Device hierarchy information.
+ */
+typedef struct
+{
+ uint16_t deviceid;
+ uint16_t attachment; /**< ID of master or paired device */
+ uint8_t use; /**< ::XIMasterKeyboard,
+ ::XIMasterPointer,
+ ::XISlaveKeyboard,
+ ::XISlavePointer,
+ ::XIFloatingSlave */
+ BOOL enabled; /**< TRUE if the device is enabled */
+ uint16_t pad;
+ uint32_t flags; /**< ::XIMasterAdded, ::XIMasterRemoved,
+ ::XISlaveAttached, ::XISlaveDetached,
+ ::XISlaveAdded, ::XISlaveRemoved,
+ ::XIDeviceEnabled, ::XIDeviceDisabled */
+} xXIHierarchyInfo;
+
+/**
+ * The device hierarchy has been modified. This event includes the device
+ * hierarchy after the modification has been applied.
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte units */
+ uint16_t evtype; /**< ::XI_Hierarchy */
+ uint16_t deviceid;
+ Time time;
+ uint32_t flags; /**< ::XIMasterAdded, ::XIMasterDeleted,
+ ::XISlaveAttached, ::XISlaveDetached,
+ ::XISlaveAdded, ::XISlaveRemoved,
+ ::XIDeviceEnabled, ::XIDeviceDisabled */
+ uint16_t num_info;
+ uint16_t pad0;
+ uint32_t pad1;
+ uint32_t pad2;
+} xXIHierarchyEvent;
+
+/**
+ * A device has changed capabilities.
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte units */
+ uint16_t evtype; /**< XI_DeviceChanged */
+ uint16_t deviceid; /**< Device that has changed */
+ Time time;
+ uint16_t num_classes; /**< Number of classes that have changed */
+ uint16_t sourceid; /**< Source of the new classes */
+ uint8_t reason; /**< ::XISlaveSwitch, ::XIDeviceChange */
+ uint8_t pad0;
+ uint16_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+} xXIDeviceChangedEvent;
+
+/**
+ * The owner of a touch stream has passed on ownership to another client.
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte units */
+ uint16_t evtype; /**< XI_TouchOwnership */
+ uint16_t deviceid; /**< Device that has changed */
+ Time time;
+ uint32_t touchid;
+ Window root;
+ Window event;
+ Window child;
+/* └──────── 32 byte boundary ────────┘ */
+ uint16_t sourceid;
+ uint16_t pad0;
+ uint32_t flags;
+ uint32_t pad1;
+ uint32_t pad2;
+} xXITouchOwnershipEvent;
+
+/**
+ * Default input event for pointer, keyboard or touch input.
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte uints */
+ uint16_t evtype;
+ uint16_t deviceid;
+ Time time;
+ uint32_t detail; /**< Keycode or button */
+ Window root;
+ Window event;
+ Window child;
+/* └──────── 32 byte boundary ────────┘ */
+ FP1616 root_x; /**< Always screen coords, 16.16 fixed point */
+ FP1616 root_y;
+ FP1616 event_x; /**< Always screen coords, 16.16 fixed point */
+ FP1616 event_y;
+ uint16_t buttons_len; /**< Len of button flags in 4 b units */
+ uint16_t valuators_len; /**< Len of val. flags in 4 b units */
+ uint16_t sourceid; /**< The source device */
+ uint16_t pad0;
+ uint32_t flags; /**< ::XIKeyRepeat */
+ xXIModifierInfo mods;
+ xXIGroupInfo group;
+} xXIDeviceEvent;
+
+
+/**
+ * Sent when an input event is generated. RawEvents include valuator
+ * information in both device-specific data (i.e. unaccelerated) and
+ * processed data (i.e. accelerated, if applicable).
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte uints */
+ uint16_t evtype; /**< ::XI_RawEvent */
+ uint16_t deviceid;
+ Time time;
+ uint32_t detail;
+ uint16_t sourceid; /**< The source device (XI 2.1) */
+ uint16_t valuators_len; /**< Length of trailing valuator
+ mask in 4 byte units */
+ uint32_t flags; /**< ::XIKeyRepeat */
+ uint32_t pad2;
+} xXIRawEvent;
+
+/**
+ * Note that the layout of root, event, child, root_x, root_y, event_x,
+ * event_y must be identical to the xXIDeviceEvent.
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte uints */
+ uint16_t evtype; /**< ::XI_Enter */
+ uint16_t deviceid;
+ Time time;
+ uint16_t sourceid;
+ uint8_t mode;
+ uint8_t detail;
+ Window root;
+ Window event;
+ Window child;
+/* └──────── 32 byte boundary ────────┘ */
+ FP1616 root_x;
+ FP1616 root_y;
+ FP1616 event_x;
+ FP1616 event_y;
+ BOOL same_screen;
+ BOOL focus;
+ uint16_t buttons_len; /**< Length of trailing button mask
+ in 4 byte units */
+ xXIModifierInfo mods;
+ xXIGroupInfo group;
+} xXIEnterEvent;
+
+typedef xXIEnterEvent xXILeaveEvent;
+typedef xXIEnterEvent xXIFocusInEvent;
+typedef xXIEnterEvent xXIFocusOutEvent;
+
+/**
+ * Sent when a device property is created, modified or deleted. Does not
+ * include property data, the client is required to query the data.
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte units */
+ uint16_t evtype; /**< ::XI_PropertyEvent */
+ uint16_t deviceid;
+ Time time;
+ Atom property;
+ uint8_t what; /**< ::XIPropertyDeleted,
+ ::XIPropertyCreated,
+ ::XIPropertyMotified */
+ uint8_t pad0;
+ uint16_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+} xXIPropertyEvent;
+
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte units */
+ uint16_t evtype; /**< ::XI_BarrierHit or ::XI_BarrierLeave */
+ uint16_t deviceid;
+ Time time;
+ uint32_t eventid;
+ Window root;
+ Window event;
+ Barrier barrier;
+/* └──────── 32 byte boundary ────────┘ */
+ uint32_t dtime;
+ uint32_t flags; /**< ::XIBarrierPointerReleased
+ ::XIBarrierDeviceIsGrabbed */
+ uint16_t sourceid;
+ int16_t pad;
+ FP1616 root_x;
+ FP1616 root_y;
+ FP3232 dx;
+ FP3232 dy;
+} xXIBarrierEvent;
+
+typedef xXIBarrierEvent xXIBarrierHitEvent;
+typedef xXIBarrierEvent xXIBarrierPointerReleasedEvent;
+typedef xXIBarrierEvent xXIBarrierLeaveEvent;
+
+#undef Window
+#undef Time
+#undef Atom
+#undef Cursor
+#undef Barrier
+
+#endif /* _XI2PROTO_H_ */
diff --git a/XIproto.h b/XIproto.h
new file mode 100644
index 0000000..82323d8
--- /dev/null
+++ b/XIproto.h
@@ -0,0 +1,1758 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+#ifndef _XIPROTO_H
+#define _XIPROTO_H
+
+#include <X11/Xproto.h>
+#include <X11/X.h>
+
+/* make sure types have right sizes for protocol structures. */
+#define Window CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define Mask CARD32
+#define Atom CARD32
+#define Cursor CARD32
+
+/*********************************************************
+ *
+ * number of events, errors, and extension name.
+ *
+ */
+
+#define MORE_EVENTS 0x80
+#define DEVICE_BITS 0x7F
+
+#define InputClassBits 0x3F /* bits in mode field for input classes */
+#define ModeBitsShift 6 /* amount to shift the remaining bits */
+
+#define numInputClasses 7
+
+#define IEVENTS 17 /* does NOT include generic events */
+#define IERRORS 5
+#define IREQUESTS 39
+
+#define CLIENT_REQ 1
+
+typedef struct _XExtEventInfo
+ {
+ Mask mask;
+ BYTE type;
+ BYTE word;
+ } XExtEventInfo;
+
+#ifndef _XITYPEDEF_POINTER
+typedef void *Pointer;
+#endif
+
+struct tmask
+ {
+ Mask mask;
+ void *dev;
+ };
+
+/*********************************************************
+ *
+ * Event constants used by library.
+ *
+ */
+
+#define XI_DeviceValuator 0
+#define XI_DeviceKeyPress 1
+#define XI_DeviceKeyRelease 2
+#define XI_DeviceButtonPress 3
+#define XI_DeviceButtonRelease 4
+#define XI_DeviceMotionNotify 5
+#define XI_DeviceFocusIn 6
+#define XI_DeviceFocusOut 7
+#define XI_ProximityIn 8
+#define XI_ProximityOut 9
+#define XI_DeviceStateNotify 10
+#define XI_DeviceMappingNotify 11
+#define XI_ChangeDeviceNotify 12
+#define XI_DeviceKeystateNotify 13
+#define XI_DeviceButtonstateNotify 14
+#define XI_DevicePresenceNotify 15
+#define XI_DevicePropertyNotify 16
+
+/*********************************************************
+ *
+ * Protocol request constants
+ *
+ */
+
+#define X_GetExtensionVersion 1
+#define X_ListInputDevices 2
+#define X_OpenDevice 3
+#define X_CloseDevice 4
+#define X_SetDeviceMode 5
+#define X_SelectExtensionEvent 6
+#define X_GetSelectedExtensionEvents 7
+#define X_ChangeDeviceDontPropagateList 8
+#define X_GetDeviceDontPropagateList 9
+#define X_GetDeviceMotionEvents 10
+#define X_ChangeKeyboardDevice 11
+#define X_ChangePointerDevice 12
+#define X_GrabDevice 13
+#define X_UngrabDevice 14
+#define X_GrabDeviceKey 15
+#define X_UngrabDeviceKey 16
+#define X_GrabDeviceButton 17
+#define X_UngrabDeviceButton 18
+#define X_AllowDeviceEvents 19
+#define X_GetDeviceFocus 20
+#define X_SetDeviceFocus 21
+#define X_GetFeedbackControl 22
+#define X_ChangeFeedbackControl 23
+#define X_GetDeviceKeyMapping 24
+#define X_ChangeDeviceKeyMapping 25
+#define X_GetDeviceModifierMapping 26
+#define X_SetDeviceModifierMapping 27
+#define X_GetDeviceButtonMapping 28
+#define X_SetDeviceButtonMapping 29
+#define X_QueryDeviceState 30
+#define X_SendExtensionEvent 31
+#define X_DeviceBell 32
+#define X_SetDeviceValuators 33
+#define X_GetDeviceControl 34
+#define X_ChangeDeviceControl 35
+/* XI 1.5 */
+#define X_ListDeviceProperties 36
+#define X_ChangeDeviceProperty 37
+#define X_DeleteDeviceProperty 38
+#define X_GetDeviceProperty 39
+
+/*********************************************************
+ *
+ * Protocol request and reply structures.
+ *
+ * GetExtensionVersion.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetExtensionVersion */
+ CARD16 length B16;
+ CARD16 nbytes B16;
+ CARD8 pad1, pad2;
+} xGetExtensionVersionReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetExtensionVersion */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 major_version B16;
+ CARD16 minor_version B16;
+ BOOL present;
+ CARD8 pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+} xGetExtensionVersionReply;
+
+/*********************************************************
+ *
+ * ListInputDevices.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_ListInputDevices */
+ CARD16 length B16;
+} xListInputDevicesReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ListInputDevices */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 ndevices;
+ CARD8 pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xListInputDevicesReply;
+
+typedef struct _xDeviceInfo *xDeviceInfoPtr;
+
+typedef struct _xAnyClassinfo *xAnyClassPtr;
+
+typedef struct _xAnyClassinfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ } xAnyClassInfo;
+
+typedef struct _xDeviceInfo {
+ CARD32 type B32;
+ CARD8 id;
+ CARD8 num_classes;
+ CARD8 use; /* IsXPointer | IsXKeyboard | IsXExtension... */
+ CARD8 attached; /* id of master dev (if IsXExtension..) */
+ } xDeviceInfo;
+
+typedef struct _xKeyInfo *xKeyInfoPtr;
+
+typedef struct _xKeyInfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ KeyCode min_keycode;
+ KeyCode max_keycode;
+ CARD16 num_keys B16;
+ CARD8 pad1,pad2;
+ } xKeyInfo;
+
+typedef struct _xButtonInfo *xButtonInfoPtr;
+
+typedef struct _xButtonInfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD16 num_buttons B16;
+ } xButtonInfo;
+
+typedef struct _xValuatorInfo *xValuatorInfoPtr;
+
+typedef struct _xValuatorInfo {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_axes;
+ CARD8 mode;
+ CARD32 motion_buffer_size B32;
+ } xValuatorInfo;
+
+typedef struct _xAxisInfo *xAxisInfoPtr;
+
+typedef struct _xAxisInfo {
+ CARD32 resolution B32;
+ CARD32 min_value B32;
+ CARD32 max_value B32;
+ } xAxisInfo;
+
+/*********************************************************
+ *
+ * OpenDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_OpenDevice */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xOpenDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_OpenDevice */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 num_classes;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ } xOpenDeviceReply;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 event_type_base;
+ } xInputClassInfo;
+
+/*********************************************************
+ *
+ * CloseDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_CloseDevice */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xCloseDeviceReq;
+
+/*********************************************************
+ *
+ * SetDeviceMode.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceMode */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 mode;
+ BYTE pad1, pad2;
+} xSetDeviceModeReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceMode */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xSetDeviceModeReply;
+
+/*********************************************************
+ *
+ * SelectExtensionEvent.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SelectExtensionEvent */
+ CARD16 length B16;
+ Window window B32;
+ CARD16 count B16;
+ CARD16 pad00 B16;
+} xSelectExtensionEventReq;
+
+/*********************************************************
+ *
+ * GetSelectedExtensionEvent.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetSelectedExtensionEvents */
+ CARD16 length B16;
+ Window window B32;
+} xGetSelectedExtensionEventsReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* GetSelectedExtensionEvents */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 this_client_count B16;
+ CARD16 all_clients_count B16;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xGetSelectedExtensionEventsReply;
+
+/*********************************************************
+ *
+ * ChangeDeviceDontPropagateList.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */
+ CARD16 length B16;
+ Window window B32;
+ CARD16 count B16;
+ CARD8 mode;
+ BYTE pad;
+} xChangeDeviceDontPropagateListReq;
+
+/*********************************************************
+ *
+ * GetDeviceDontPropagateList.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetDeviceDontPropagateList */
+ CARD16 length B16;
+ Window window B32;
+} xGetDeviceDontPropagateListReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* GetDeviceDontPropagateList */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 count B16;
+ CARD16 pad00 B16;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xGetDeviceDontPropagateListReply;
+
+/*********************************************************
+ *
+ * GetDeviceMotionEvents.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceMotionEvents*/
+ CARD16 length B16;
+ Time start B32;
+ Time stop B32;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceMotionEventsReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceMotionEvents */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 nEvents B32;
+ CARD8 axes;
+ CARD8 mode;
+ BYTE pad1, pad2;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+} xGetDeviceMotionEventsReply;
+
+/*********************************************************
+ *
+ * ChangeKeyboardDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangeKeyboardDevice */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xChangeKeyboardDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ChangeKeyboardDevice*/
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xChangeKeyboardDeviceReply;
+
+/*********************************************************
+ *
+ * ChangePointerDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangePointerDevice */
+ CARD16 length B16;
+ CARD8 xaxis;
+ CARD8 yaxis;
+ CARD8 deviceid;
+ BYTE pad1;
+} xChangePointerDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ChangePointerDevice */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xChangePointerDeviceReply;
+
+/*********************************************************
+ *
+ * GrabDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GrabDevice */
+ CARD16 length B16;
+ Window grabWindow B32;
+ Time time B32;
+ CARD16 event_count B16;
+ CARD8 this_device_mode;
+ CARD8 other_devices_mode;
+ BOOL ownerEvents;
+ CARD8 deviceid;
+ CARD16 pad01 B16;
+} xGrabDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GrabDevice */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ } xGrabDeviceReply;
+
+/*********************************************************
+ *
+ * UngrabDevice.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_UnGrabDevice */
+ CARD16 length B16;
+ Time time B32;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xUngrabDeviceReq;
+
+/*********************************************************
+ *
+ * GrabDeviceKey.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GrabDeviceKey */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 event_count B16;
+ CARD16 modifiers B16;
+ CARD8 modifier_device;
+ CARD8 grabbed_device;
+ CARD8 key;
+ BYTE this_device_mode;
+ BYTE other_devices_mode;
+ BOOL ownerEvents;
+ BYTE pad1, pad2;
+} xGrabDeviceKeyReq;
+
+/*********************************************************
+ *
+ * UngrabDeviceKey.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_UngrabDeviceKey */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD8 modifier_device;
+ CARD8 key;
+ CARD8 grabbed_device;
+ BYTE pad1, pad2, pad3;
+} xUngrabDeviceKeyReq;
+
+/*********************************************************
+ *
+ * GrabDeviceButton.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GrabDeviceButton */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD8 grabbed_device;
+ CARD8 modifier_device;
+ CARD16 event_count B16;
+ CARD16 modifiers B16;
+ BYTE this_device_mode;
+ BYTE other_devices_mode;
+ CARD8 button;
+ BOOL ownerEvents;
+ BYTE pad1, pad2;
+} xGrabDeviceButtonReq;
+
+/*********************************************************
+ *
+ * UngrabDeviceButton.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_UngrabDeviceButton */
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD8 modifier_device;
+ CARD8 button;
+ CARD8 grabbed_device;
+ BYTE pad1, pad2, pad3;
+} xUngrabDeviceButtonReq;
+
+/*********************************************************
+ *
+ * AllowDeviceEvents.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_AllowDeviceEvents */
+ CARD16 length B16;
+ Time time B32;
+ CARD8 mode;
+ CARD8 deviceid;
+ BYTE pad1, pad2;
+} xAllowDeviceEventsReq;
+
+/*********************************************************
+ *
+ * GetDeviceFocus.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceFocus */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceFocusReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceFocus */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 focus B32;
+ Time time B32;
+ CARD8 revertTo;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ } xGetDeviceFocusReply;
+
+/*********************************************************
+ *
+ * SetDeviceFocus.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceFocus */
+ CARD16 length B16;
+ Window focus B32;
+ Time time B32;
+ CARD8 revertTo;
+ CARD8 device;
+ CARD16 pad01 B16;
+} xSetDeviceFocusReq;
+
+/*********************************************************
+ *
+ * GetFeedbackControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetFeedbackControl */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetFeedbackControlReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetFeedbackControl */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 num_feedbacks B16;
+ CARD16 pad01 B16;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ CARD32 pad06 B32;
+} xGetFeedbackControlReply;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class */
+#else
+ CARD8 class; /* feedback class */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+} xFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 id;
+ CARD16 length B16;
+ CARD16 pitch B16;
+ CARD16 duration B16;
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+ BOOL global_auto_repeat;
+ CARD8 click;
+ CARD8 percent;
+ BYTE pad;
+ BYTE auto_repeats[32];
+} xKbdFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 id;
+ CARD16 length B16;
+ CARD8 pad1,pad2;
+ CARD16 accelNum B16;
+ CARD16 accelDenom B16;
+ CARD16 threshold B16;
+} xPtrFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD32 resolution B32;
+ INT32 min_value B32;
+ INT32 max_value B32;
+} xIntegerFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD16 max_symbols B16;
+ CARD16 num_syms_supported B16;
+} xStringFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD8 percent;
+ BYTE pad1, pad2, pad3;
+ CARD16 pitch B16;
+ CARD16 duration B16;
+} xBellFeedbackState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+} xLedFeedbackState;
+
+/*********************************************************
+ *
+ * ChangeFeedbackControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_ChangeFeedbackControl */
+ CARD16 length B16;
+ CARD32 mask B32;
+ CARD8 deviceid;
+ CARD8 feedbackid;
+ BYTE pad1, pad2;
+} xChangeFeedbackControlReq;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+} xFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback length */
+ CARD16 length B16; /* feedback length */
+ KeyCode key;
+ CARD8 auto_repeat_mode;
+ INT8 click;
+ INT8 percent;
+ INT16 pitch B16;
+ INT16 duration B16;
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+} xKbdFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ CARD8 pad1,pad2;
+ INT16 num B16;
+ INT16 denom B16;
+ INT16 thresh B16;
+} xPtrFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ INT32 int_to_display B32;
+} xIntegerFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ CARD8 pad1,pad2;
+ CARD16 num_keysyms B16;
+} xStringFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ INT8 percent;
+ BYTE pad1, pad2, pad3;
+ INT16 pitch B16;
+ INT16 duration B16;
+} xBellFeedbackCtl;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class; /* feedback class id */
+#else
+ CARD8 class; /* feedback class id */
+#endif
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ CARD32 led_mask B32;
+ CARD32 led_values B32;
+} xLedFeedbackCtl;
+
+/*********************************************************
+ *
+ * GetDeviceKeyMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceKeyMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ BYTE pad1;
+} xGetDeviceKeyMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceKeyMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 keySymsPerKeyCode;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGetDeviceKeyMappingReply;
+
+/*********************************************************
+ *
+ * ChangeDeviceKeyMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ KeyCode firstKeyCode;
+ CARD8 keySymsPerKeyCode;
+ CARD8 keyCodes;
+} xChangeDeviceKeyMappingReq;
+
+/*********************************************************
+ *
+ * GetDeviceModifierMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceModifierMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceModifierMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceModifierMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 numKeyPerModifier;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGetDeviceModifierMappingReply;
+
+/*********************************************************
+ *
+ * SetDeviceModifierMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceModifierMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 numKeyPerModifier;
+ CARD16 pad1 B16;
+} xSetDeviceModifierMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceModifierMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 success;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xSetDeviceModifierMappingReply;
+
+/*********************************************************
+ *
+ * GetDeviceButtonMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_GetDeviceButtonMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xGetDeviceButtonMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceButtonMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 nElts;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xGetDeviceButtonMappingReply;
+
+/*********************************************************
+ *
+ * SetDeviceButtonMapping.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* X_SetDeviceButtonMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 map_length;
+ BYTE pad1, pad2;
+} xSetDeviceButtonMappingReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceButtonMapping */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xSetDeviceButtonMappingReply;
+
+/*********************************************************
+ *
+ * QueryDeviceState.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* always X_QueryDeviceState */
+ CARD16 length B16;
+ CARD8 deviceid;
+ BYTE pad1, pad2, pad3;
+} xQueryDeviceStateReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_QueryDeviceState */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 num_classes;
+ BYTE pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xQueryDeviceStateReply;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_keys;
+ BYTE pad1;
+ CARD8 keys[32];
+} xKeyState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_buttons;
+ BYTE pad1;
+ CARD8 buttons[32];
+} xButtonState;
+
+typedef struct {
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 length;
+ CARD8 num_valuators;
+ CARD8 mode;
+} xValuatorState;
+
+/*********************************************************
+ *
+ * SendExtensionEvent.
+ * THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH!
+ * MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED!
+ *
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* always X_SendExtensionEvent */
+ CARD16 length B16;
+ Window destination B32;
+ CARD8 deviceid;
+ BOOL propagate;
+ CARD16 count B16;
+ CARD8 num_events;
+ BYTE pad1,pad2,pad3;
+} xSendExtensionEventReq;
+
+/*********************************************************
+ *
+ * DeviceBell.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* always X_DeviceBell */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 feedbackid;
+ CARD8 feedbackclass;
+ INT8 percent;
+} xDeviceBellReq;
+
+/*********************************************************
+ *
+ * SetDeviceValuators.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceValuators */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 first_valuator;
+ CARD8 num_valuators;
+ BYTE pad1;
+} xSetDeviceValuatorsReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_SetDeviceValuators */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xSetDeviceValuatorsReply;
+
+/*********************************************************
+ *
+ * GetDeviceControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceControl */
+ CARD16 length B16;
+ CARD16 control B16;
+ CARD8 deviceid;
+ BYTE pad2;
+} xGetDeviceControlReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceControl */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xGetDeviceControlReply;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+} xDeviceState;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD32 num_valuators B32; /* number of valuators */
+} xDeviceResolutionState;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ INT32 min_x B32;
+ INT32 max_x B32;
+ INT32 min_y B32;
+ INT32 max_y B32;
+ CARD32 flip_x B32;
+ CARD32 flip_y B32;
+ CARD32 rotation B32;
+ CARD32 button_threshold B32;
+} xDeviceAbsCalibState;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD32 offset_x B32;
+ CARD32 offset_y B32;
+ CARD32 width B32;
+ CARD32 height B32;
+ CARD32 screen B32;
+ CARD32 following B32;
+} xDeviceAbsAreaState;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD8 status;
+ CARD8 iscore;
+ CARD16 pad1 B16;
+} xDeviceCoreState;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD8 enable;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xDeviceEnableState;
+
+/*********************************************************
+ *
+ * ChangeDeviceControl.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_ChangeDeviceControl */
+ CARD16 length B16;
+ CARD16 control B16;
+ CARD8 deviceid;
+ BYTE pad0;
+} xChangeDeviceControlReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ChangeDeviceControl */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xChangeDeviceControlReply;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+} xDeviceCtl;
+
+typedef struct {
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD8 first_valuator; /* first valuator to change */
+ CARD8 num_valuators; /* number of valuators to change*/
+ CARD8 pad1,pad2;
+} xDeviceResolutionCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ INT32 min_x;
+ INT32 max_x;
+ INT32 min_y;
+ INT32 max_y;
+ CARD32 flip_x;
+ CARD32 flip_y;
+ CARD32 rotation;
+ CARD32 button_threshold;
+} xDeviceAbsCalibCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD32 offset_x;
+ CARD32 offset_y;
+ INT32 width;
+ INT32 height;
+ INT32 screen;
+ CARD32 following;
+} xDeviceAbsAreaCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD8 status;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xDeviceCoreCtl;
+
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ CARD8 enable;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xDeviceEnableCtl;
+
+/* XI 1.5 */
+
+/*********************************************************
+ *
+ * ListDeviceProperties.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major opcode */
+ CARD8 ReqType; /* always X_ListDeviceProperties */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xListDevicePropertiesReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ListDeviceProperties */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nAtoms B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xListDevicePropertiesReply;
+
+/*********************************************************
+ *
+ * ChangeDeviceProperty.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major opcode */
+ CARD8 ReqType; /* always X_ChangeDeviceProperty */
+ CARD16 length B16;
+ Atom property B32;
+ Atom type B32;
+ CARD8 deviceid;
+ CARD8 format;
+ CARD8 mode;
+ CARD8 pad;
+ CARD32 nUnits B32;
+} xChangeDevicePropertyReq;
+
+/*********************************************************
+ *
+ * DeleteDeviceProperty.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major opcode */
+ CARD8 ReqType; /* always X_DeleteDeviceProperty */
+ CARD16 length B16;
+ Atom property B32;
+ CARD8 deviceid;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xDeleteDevicePropertyReq;
+
+/*********************************************************
+ *
+ * GetDeviceProperty.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major opcode */
+ CARD8 ReqType; /* always X_GetDeviceProperty */
+ CARD16 length B16;
+ Atom property B32;
+ Atom type B32;
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+ CARD8 deviceid;
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_delete;
+#else
+ BOOL delete;
+#endif
+ CARD16 pad;
+} xGetDevicePropertyReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_GetDeviceProperty */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32;
+ CARD8 format;
+ CARD8 deviceid;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xGetDevicePropertyReply;
+
+
+/**********************************************************
+ *
+ * Input extension events.
+ *
+ * DeviceValuator
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ CARD8 deviceid;
+ CARD16 sequenceNumber B16;
+ KeyButMask device_state B16;
+ CARD8 num_valuators;
+ CARD8 first_valuator;
+ INT32 valuator0 B32;
+ INT32 valuator1 B32;
+ INT32 valuator2 B32;
+ INT32 valuator3 B32;
+ INT32 valuator4 B32;
+ INT32 valuator5 B32;
+ } deviceValuator;
+
+/**********************************************************
+ *
+ * DeviceKeyButtonPointer.
+ *
+ * Used for: DeviceKeyPress, DeviceKeyRelease,
+ * DeviceButtonPress, DeviceButtonRelease,
+ * ProximityIn, ProximityOut
+ * DeviceMotionNotify,
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ Window root B32;
+ Window event B32;
+ Window child B32;
+ INT16 root_x B16;
+ INT16 root_y B16;
+ INT16 event_x B16;
+ INT16 event_y B16;
+ KeyButMask state B16;
+ BOOL same_screen;
+ CARD8 deviceid;
+ } deviceKeyButtonPointer;
+
+/**********************************************************
+ *
+ * DeviceFocus.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ Window window B32;
+ BYTE mode;
+ CARD8 deviceid;
+ BYTE pad1, pad2;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ } deviceFocus;
+
+/**********************************************************
+ *
+ * DeviceStateNotify.
+ *
+ * Note that the two high-order bits in the classes_reported
+ * field are the proximity state (InProximity or OutOfProximity),
+ * and the device mode (Absolute or Relative), respectively.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 num_keys;
+ CARD8 num_buttons;
+ CARD8 num_valuators;
+ CARD8 classes_reported;
+ CARD8 buttons[4];
+ CARD8 keys[4];
+ INT32 valuator0 B32;
+ INT32 valuator1 B32;
+ INT32 valuator2 B32;
+ } deviceStateNotify;
+
+/**********************************************************
+ *
+ * DeviceKeyStateNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ CARD8 keys[28];
+ } deviceKeyStateNotify;
+
+/**********************************************************
+ *
+ * DeviceButtonStateNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ CARD8 buttons[28];
+ } deviceButtonStateNotify;
+
+/**********************************************************
+ *
+ * DeviceMappingNotify.
+ * Fields must be kept in sync with core mappingnotify event.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ CARD8 request;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ BYTE pad1;
+ Time time B32;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ } deviceMappingNotify;
+
+/**********************************************************
+ *
+ * ChangeDeviceNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE deviceid;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 request;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad00 B32;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ } changeDeviceNotify;
+
+/**********************************************************
+ *
+ * devicePresenceNotify.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE pad00;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ BYTE devchange; /* Device{Added|Removed|Enabled|Disabled|ControlChanged} */
+ BYTE deviceid;
+ CARD16 control B16;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ CARD32 pad06 B32;
+ } devicePresenceNotify;
+
+
+/*********************************************************
+ * DevicePropertyNotifyEvent
+ *
+ * Sent whenever a device's property changes.
+ *
+ */
+
+typedef struct
+ {
+ BYTE type;
+ BYTE state; /* NewValue or Deleted */
+ CARD16 sequenceNumber B16;
+ CARD32 time B32;
+ Atom atom B32; /* affected property */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD16 pad5 B16;
+ CARD8 pad4;
+ CARD8 deviceid; /* id of device */
+ } devicePropertyNotify;
+
+#undef Window
+#undef Time
+#undef KeyCode
+#undef Mask
+#undef Atom
+#undef Cursor
+
+#endif
diff --git a/XKB.h b/XKB.h
new file mode 100644
index 0000000..ee4f740
--- /dev/null
+++ b/XKB.h
@@ -0,0 +1,786 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKB_H_
+#define _XKB_H_
+
+ /*
+ * XKB request codes, used in:
+ * - xkbReqType field of all requests
+ * - requestMinor field of some events
+ */
+#define X_kbUseExtension 0
+#define X_kbSelectEvents 1
+#define X_kbBell 3
+#define X_kbGetState 4
+#define X_kbLatchLockState 5
+#define X_kbGetControls 6
+#define X_kbSetControls 7
+#define X_kbGetMap 8
+#define X_kbSetMap 9
+#define X_kbGetCompatMap 10
+#define X_kbSetCompatMap 11
+#define X_kbGetIndicatorState 12
+#define X_kbGetIndicatorMap 13
+#define X_kbSetIndicatorMap 14
+#define X_kbGetNamedIndicator 15
+#define X_kbSetNamedIndicator 16
+#define X_kbGetNames 17
+#define X_kbSetNames 18
+#define X_kbGetGeometry 19
+#define X_kbSetGeometry 20
+#define X_kbPerClientFlags 21
+#define X_kbListComponents 22
+#define X_kbGetKbdByName 23
+#define X_kbGetDeviceInfo 24
+#define X_kbSetDeviceInfo 25
+#define X_kbSetDebuggingFlags 101
+
+ /*
+ * In the X sense, XKB reports only one event.
+ * The type field of all XKB events is XkbEventCode
+ */
+#define XkbEventCode 0
+#define XkbNumberEvents (XkbEventCode+1)
+
+ /*
+ * XKB has a minor event code so it can use one X event code for
+ * multiple purposes.
+ * - reported in the xkbType field of all XKB events.
+ * - XkbSelectEventDetails: Indicates the event for which event details
+ * are being changed
+ */
+#define XkbNewKeyboardNotify 0
+#define XkbMapNotify 1
+#define XkbStateNotify 2
+#define XkbControlsNotify 3
+#define XkbIndicatorStateNotify 4
+#define XkbIndicatorMapNotify 5
+#define XkbNamesNotify 6
+#define XkbCompatMapNotify 7
+#define XkbBellNotify 8
+#define XkbActionMessage 9
+#define XkbAccessXNotify 10
+#define XkbExtensionDeviceNotify 11
+
+ /*
+ * Event Mask:
+ * - XkbSelectEvents: Specifies event interest.
+ */
+#define XkbNewKeyboardNotifyMask (1L << 0)
+#define XkbMapNotifyMask (1L << 1)
+#define XkbStateNotifyMask (1L << 2)
+#define XkbControlsNotifyMask (1L << 3)
+#define XkbIndicatorStateNotifyMask (1L << 4)
+#define XkbIndicatorMapNotifyMask (1L << 5)
+#define XkbNamesNotifyMask (1L << 6)
+#define XkbCompatMapNotifyMask (1L << 7)
+#define XkbBellNotifyMask (1L << 8)
+#define XkbActionMessageMask (1L << 9)
+#define XkbAccessXNotifyMask (1L << 10)
+#define XkbExtensionDeviceNotifyMask (1L << 11)
+#define XkbAllEventsMask (0xFFF)
+
+ /*
+ * NewKeyboardNotify event details:
+ */
+#define XkbNKN_KeycodesMask (1L << 0)
+#define XkbNKN_GeometryMask (1L << 1)
+#define XkbNKN_DeviceIDMask (1L << 2)
+#define XkbAllNewKeyboardEventsMask (0x7)
+
+ /*
+ * AccessXNotify event types:
+ * - The 'what' field of AccessXNotify events reports the
+ * reason that the event was generated.
+ */
+#define XkbAXN_SKPress 0
+#define XkbAXN_SKAccept 1
+#define XkbAXN_SKReject 2
+#define XkbAXN_SKRelease 3
+#define XkbAXN_BKAccept 4
+#define XkbAXN_BKReject 5
+#define XkbAXN_AXKWarning 6
+
+ /*
+ * AccessXNotify details:
+ * - Used as an event detail mask to limit the conditions under which
+ * AccessXNotify events are reported
+ */
+#define XkbAXN_SKPressMask (1L << 0)
+#define XkbAXN_SKAcceptMask (1L << 1)
+#define XkbAXN_SKRejectMask (1L << 2)
+#define XkbAXN_SKReleaseMask (1L << 3)
+#define XkbAXN_BKAcceptMask (1L << 4)
+#define XkbAXN_BKRejectMask (1L << 5)
+#define XkbAXN_AXKWarningMask (1L << 6)
+#define XkbAllAccessXEventsMask (0x7f)
+
+ /*
+ * Miscellaneous event details:
+ * - event detail masks for assorted events that don't reall
+ * have any details.
+ */
+#define XkbAllStateEventsMask XkbAllStateComponentsMask
+#define XkbAllMapEventsMask XkbAllMapComponentsMask
+#define XkbAllControlEventsMask XkbAllControlsMask
+#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask
+#define XkbAllNameEventsMask XkbAllNamesMask
+#define XkbAllCompatMapEventsMask XkbAllCompatMask
+#define XkbAllBellEventsMask (1L << 0)
+#define XkbAllActionMessagesMask (1L << 0)
+
+ /*
+ * XKB reports one error: BadKeyboard
+ * A further reason for the error is encoded into to most significant
+ * byte of the resourceID for the error:
+ * XkbErr_BadDevice - the device in question was not found
+ * XkbErr_BadClass - the device was found but it doesn't belong to
+ * the appropriate class.
+ * XkbErr_BadId - the device was found and belongs to the right
+ * class, but not feedback with a matching id was
+ * found.
+ * The low byte of the resourceID for this error contains the device
+ * id, class specifier or feedback id that failed.
+ */
+#define XkbKeyboard 0
+#define XkbNumberErrors 1
+
+#define XkbErr_BadDevice 0xff
+#define XkbErr_BadClass 0xfe
+#define XkbErr_BadId 0xfd
+
+ /*
+ * Keyboard Components Mask:
+ * - Specifies the components that follow a GetKeyboardByNameReply
+ */
+#define XkbClientMapMask (1L << 0)
+#define XkbServerMapMask (1L << 1)
+#define XkbCompatMapMask (1L << 2)
+#define XkbIndicatorMapMask (1L << 3)
+#define XkbNamesMask (1L << 4)
+#define XkbGeometryMask (1L << 5)
+#define XkbControlsMask (1L << 6)
+#define XkbAllComponentsMask (0x7f)
+
+ /*
+ * State detail mask:
+ * - The 'changed' field of StateNotify events reports which of
+ * the keyboard state components have changed.
+ * - Used as an event detail mask to limit the conditions under
+ * which StateNotify events are reported.
+ */
+#define XkbModifierStateMask (1L << 0)
+#define XkbModifierBaseMask (1L << 1)
+#define XkbModifierLatchMask (1L << 2)
+#define XkbModifierLockMask (1L << 3)
+#define XkbGroupStateMask (1L << 4)
+#define XkbGroupBaseMask (1L << 5)
+#define XkbGroupLatchMask (1L << 6)
+#define XkbGroupLockMask (1L << 7)
+#define XkbCompatStateMask (1L << 8)
+#define XkbGrabModsMask (1L << 9)
+#define XkbCompatGrabModsMask (1L << 10)
+#define XkbLookupModsMask (1L << 11)
+#define XkbCompatLookupModsMask (1L << 12)
+#define XkbPointerButtonMask (1L << 13)
+#define XkbAllStateComponentsMask (0x3fff)
+
+ /*
+ * Controls detail masks:
+ * The controls specified in XkbAllControlsMask:
+ * - The 'changed' field of ControlsNotify events reports which of
+ * the keyboard controls have changed.
+ * - The 'changeControls' field of the SetControls request specifies
+ * the controls for which values are to be changed.
+ * - Used as an event detail mask to limit the conditions under
+ * which ControlsNotify events are reported.
+ *
+ * The controls specified in the XkbAllBooleanCtrlsMask:
+ * - The 'enabledControls' field of ControlsNotify events reports the
+ * current status of the boolean controls.
+ * - The 'enabledControlsChanges' field of ControlsNotify events reports
+ * any boolean controls that have been turned on or off.
+ * - The 'affectEnabledControls' and 'enabledControls' fields of the
+ * kbSetControls request change the set of enabled controls.
+ * - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of
+ * an XkbControlsRec specify the controls to be changed if the keyboard
+ * times out and the values to which they should be changed.
+ * - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags
+ * request specifies the specify the controls to be reset when the
+ * client exits and the values to which they should be reset.
+ * - The 'ctrls' field of an indicator map specifies the controls
+ * that drive the indicator.
+ * - Specifies the boolean controls affected by the SetControls and
+ * LockControls key actions.
+ */
+#define XkbRepeatKeysMask (1L << 0)
+#define XkbSlowKeysMask (1L << 1)
+#define XkbBounceKeysMask (1L << 2)
+#define XkbStickyKeysMask (1L << 3)
+#define XkbMouseKeysMask (1L << 4)
+#define XkbMouseKeysAccelMask (1L << 5)
+#define XkbAccessXKeysMask (1L << 6)
+#define XkbAccessXTimeoutMask (1L << 7)
+#define XkbAccessXFeedbackMask (1L << 8)
+#define XkbAudibleBellMask (1L << 9)
+#define XkbOverlay1Mask (1L << 10)
+#define XkbOverlay2Mask (1L << 11)
+#define XkbIgnoreGroupLockMask (1L << 12)
+#define XkbGroupsWrapMask (1L << 27)
+#define XkbInternalModsMask (1L << 28)
+#define XkbIgnoreLockModsMask (1L << 29)
+#define XkbPerKeyRepeatMask (1L << 30)
+#define XkbControlsEnabledMask (1L << 31)
+
+#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask)
+
+#define XkbAllBooleanCtrlsMask (0x00001FFF)
+#define XkbAllControlsMask (0xF8001FFF)
+#define XkbAllControlEventsMask XkbAllControlsMask
+
+ /*
+ * AccessX Options Mask
+ * - The 'accessXOptions' field of an XkbControlsRec specifies the
+ * AccessX options that are currently in effect.
+ * - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'
+ * fields of an XkbControlsRec specify the Access X options to be
+ * changed if the keyboard times out and the values to which they
+ * should be changed.
+ */
+#define XkbAX_SKPressFBMask (1L << 0)
+#define XkbAX_SKAcceptFBMask (1L << 1)
+#define XkbAX_FeatureFBMask (1L << 2)
+#define XkbAX_SlowWarnFBMask (1L << 3)
+#define XkbAX_IndicatorFBMask (1L << 4)
+#define XkbAX_StickyKeysFBMask (1L << 5)
+#define XkbAX_TwoKeysMask (1L << 6)
+#define XkbAX_LatchToLockMask (1L << 7)
+#define XkbAX_SKReleaseFBMask (1L << 8)
+#define XkbAX_SKRejectFBMask (1L << 9)
+#define XkbAX_BKRejectFBMask (1L << 10)
+#define XkbAX_DumbBellFBMask (1L << 11)
+#define XkbAX_FBOptionsMask (0xF3F)
+#define XkbAX_SKOptionsMask (0x0C0)
+#define XkbAX_AllOptionsMask (0xFFF)
+
+ /*
+ * XkbUseCoreKbd is used to specify the core keyboard without having
+ * to look up its X input extension identifier.
+ * XkbUseCorePtr is used to specify the core pointer without having
+ * to look up its X input extension identifier.
+ * XkbDfltXIClass is used to specify "don't care" any place that the
+ * XKB protocol is looking for an X Input Extension
+ * device class.
+ * XkbDfltXIId is used to specify "don't care" any place that the
+ * XKB protocol is looking for an X Input Extension
+ * feedback identifier.
+ * XkbAllXIClasses is used to get information about all device indicators,
+ * whether they're part of the indicator feedback class
+ * or the keyboard feedback class.
+ * XkbAllXIIds is used to get information about all device indicator
+ * feedbacks without having to list them.
+ * XkbXINone is used to indicate that no class or id has been specified.
+ * XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs
+ * XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells
+ * XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device
+ * XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class
+ * XkbExplicitXIId(c) True if 'i' explicitly specifies a device id
+ * XkbSingleXIClass(c) True if 'c' specifies exactly one device class,
+ * including the default.
+ * XkbSingleXIId(i) True if 'i' specifies exactly one device
+ * identifier, including the default.
+ */
+#define XkbUseCoreKbd 0x0100
+#define XkbUseCorePtr 0x0200
+#define XkbDfltXIClass 0x0300
+#define XkbDfltXIId 0x0400
+#define XkbAllXIClasses 0x0500
+#define XkbAllXIIds 0x0600
+#define XkbXINone 0xff00
+
+#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\
+ ((c)==LedFeedbackClass)||\
+ ((c)==XkbDfltXIClass)||\
+ ((c)==XkbAllXIClasses))
+#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\
+ ((c)==BellFeedbackClass)||\
+ ((c)==XkbDfltXIClass)||\
+ ((c)==XkbAllXIClasses))
+#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)
+#define XkbExplicitXIClass(c) (((c)&(~0xff))==0)
+#define XkbExplicitXIId(c) (((c)&(~0xff))==0)
+#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))
+#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))
+
+#define XkbNoModifier 0xff
+#define XkbNoShiftLevel 0xff
+#define XkbNoShape 0xff
+#define XkbNoIndicator 0xff
+
+#define XkbNoModifierMask 0
+#define XkbAllModifiersMask 0xff
+#define XkbAllVirtualModsMask 0xffff
+
+#define XkbNumKbdGroups 4
+#define XkbMaxKbdGroup (XkbNumKbdGroups-1)
+
+#define XkbMaxMouseKeysBtn 4
+
+ /*
+ * Group Index and Mask:
+ * - Indices into the kt_index array of a key type.
+ * - Mask specifies types to be changed for XkbChangeTypesOfKey
+ */
+#define XkbGroup1Index 0
+#define XkbGroup2Index 1
+#define XkbGroup3Index 2
+#define XkbGroup4Index 3
+#define XkbAnyGroup 254
+#define XkbAllGroups 255
+
+#define XkbGroup1Mask (1<<0)
+#define XkbGroup2Mask (1<<1)
+#define XkbGroup3Mask (1<<2)
+#define XkbGroup4Mask (1<<3)
+#define XkbAnyGroupMask (1<<7)
+#define XkbAllGroupsMask (0xf)
+
+ /*
+ * BuildCoreState: Given a keyboard group and a modifier state,
+ * construct the value to be reported an event.
+ * GroupForCoreState: Given the state reported in an event,
+ * determine the keyboard group.
+ * IsLegalGroup: Returns TRUE if 'g' is a valid group index.
+ */
+#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))
+#define XkbGroupForCoreState(s) (((s)>>13)&0x3)
+#define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
+
+ /*
+ * GroupsWrap values:
+ * - The 'groupsWrap' field of an XkbControlsRec specifies the
+ * treatment of out of range groups.
+ * - Bits 6 and 7 of the group info field of a key symbol map
+ * specify the interpretation of out of range groups for the
+ * corresponding key.
+ */
+#define XkbWrapIntoRange (0x00)
+#define XkbClampIntoRange (0x40)
+#define XkbRedirectIntoRange (0x80)
+
+ /*
+ * Action flags: Reported in the 'flags' field of most key actions.
+ * Interpretation depends on the type of the action; not all actions
+ * accept all flags.
+ *
+ * Option Used for Actions
+ * ------ ----------------
+ * ClearLocks SetMods, LatchMods, SetGroup, LatchGroup
+ * LatchToLock SetMods, LatchMods, SetGroup, LatchGroup
+ * LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
+ * LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
+ * UseModMapMods SetMods, LatchMods, LockMods, ISOLock
+ * GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock
+ * UseDfltButton PtrBtn, LockPtrBtn
+ * NoAcceleration MovePtr
+ * MoveAbsoluteX MovePtr
+ * MoveAbsoluteY MovePtr
+ * ISODfltIsGroup ISOLock
+ * ISONoAffectMods ISOLock
+ * ISONoAffectGroup ISOLock
+ * ISONoAffectPtr ISOLock
+ * ISONoAffectCtrls ISOLock
+ * MessageOnPress ActionMessage
+ * MessageOnRelease ActionMessage
+ * MessageGenKeyEvent ActionMessage
+ * AffectDfltBtn SetPtrDflt
+ * DfltBtnAbsolute SetPtrDflt
+ * SwitchApplication SwitchScreen
+ * SwitchAbsolute SwitchScreen
+ */
+
+#define XkbSA_ClearLocks (1L << 0)
+#define XkbSA_LatchToLock (1L << 1)
+
+#define XkbSA_LockNoLock (1L << 0)
+#define XkbSA_LockNoUnlock (1L << 1)
+
+#define XkbSA_UseModMapMods (1L << 2)
+
+#define XkbSA_GroupAbsolute (1L << 2)
+#define XkbSA_UseDfltButton 0
+
+#define XkbSA_NoAcceleration (1L << 0)
+#define XkbSA_MoveAbsoluteX (1L << 1)
+#define XkbSA_MoveAbsoluteY (1L << 2)
+
+#define XkbSA_ISODfltIsGroup (1L << 7)
+#define XkbSA_ISONoAffectMods (1L << 6)
+#define XkbSA_ISONoAffectGroup (1L << 5)
+#define XkbSA_ISONoAffectPtr (1L << 4)
+#define XkbSA_ISONoAffectCtrls (1L << 3)
+#define XkbSA_ISOAffectMask (0x78)
+
+#define XkbSA_MessageOnPress (1L << 0)
+#define XkbSA_MessageOnRelease (1L << 1)
+#define XkbSA_MessageGenKeyEvent (1L << 2)
+
+#define XkbSA_AffectDfltBtn 1
+#define XkbSA_DfltBtnAbsolute (1L << 2)
+
+#define XkbSA_SwitchApplication (1L << 0)
+#define XkbSA_SwitchAbsolute (1L << 2)
+
+ /*
+ * The following values apply to the SA_DeviceValuator
+ * action only. Valuator operations specify the action
+ * to be taken. Values specified in the action are
+ * multiplied by 2^scale before they are applied.
+ */
+#define XkbSA_IgnoreVal (0x00)
+#define XkbSA_SetValMin (0x10)
+#define XkbSA_SetValCenter (0x20)
+#define XkbSA_SetValMax (0x30)
+#define XkbSA_SetValRelative (0x40)
+#define XkbSA_SetValAbsolute (0x50)
+#define XkbSA_ValOpMask (0x70)
+#define XkbSA_ValScaleMask (0x07)
+#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)
+#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)
+
+ /*
+ * Action types: specifies the type of a key action. Reported in the
+ * type field of all key actions.
+ */
+#define XkbSA_NoAction 0x00
+#define XkbSA_SetMods 0x01
+#define XkbSA_LatchMods 0x02
+#define XkbSA_LockMods 0x03
+#define XkbSA_SetGroup 0x04
+#define XkbSA_LatchGroup 0x05
+#define XkbSA_LockGroup 0x06
+#define XkbSA_MovePtr 0x07
+#define XkbSA_PtrBtn 0x08
+#define XkbSA_LockPtrBtn 0x09
+#define XkbSA_SetPtrDflt 0x0a
+#define XkbSA_ISOLock 0x0b
+#define XkbSA_Terminate 0x0c
+#define XkbSA_SwitchScreen 0x0d
+#define XkbSA_SetControls 0x0e
+#define XkbSA_LockControls 0x0f
+#define XkbSA_ActionMessage 0x10
+#define XkbSA_RedirectKey 0x11
+#define XkbSA_DeviceBtn 0x12
+#define XkbSA_LockDeviceBtn 0x13
+#define XkbSA_DeviceValuator 0x14
+#define XkbSA_LastAction XkbSA_DeviceValuator
+#define XkbSA_NumActions (XkbSA_LastAction+1)
+
+#define XkbSA_XFree86Private 0x86
+
+ /*
+ * Specifies the key actions that clear latched groups or modifiers.
+ */
+#define XkbSA_BreakLatch \
+ ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\
+ (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\
+ (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\
+ (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))
+
+ /*
+ * Macros to classify key actions
+ */
+#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))
+#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))
+#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))
+
+
+ /*
+ * Key Behavior Qualifier:
+ * KB_Permanent indicates that the behavior describes an unalterable
+ * characteristic of the keyboard, not an XKB software-simulation of
+ * the listed behavior.
+ * Key Behavior Types:
+ * Specifies the behavior of the underlying key.
+ */
+#define XkbKB_Permanent 0x80
+#define XkbKB_OpMask 0x7f
+
+#define XkbKB_Default 0x00
+#define XkbKB_Lock 0x01
+#define XkbKB_RadioGroup 0x02
+#define XkbKB_Overlay1 0x03
+#define XkbKB_Overlay2 0x04
+
+#define XkbKB_RGAllowNone 0x80
+
+ /*
+ * Various macros which describe the range of legal keycodes.
+ */
+#define XkbMinLegalKeyCode 8
+#define XkbMaxLegalKeyCode 255
+#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)
+#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
+/* Seems kinda silly to check that an unsigned char is <= 255... */
+#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode)
+
+ /*
+ * Assorted constants and limits.
+ */
+#define XkbNumModifiers 8
+#define XkbNumVirtualMods 16
+#define XkbNumIndicators 32
+#define XkbAllIndicatorsMask (0xffffffff)
+#define XkbMaxRadioGroups 32
+#define XkbAllRadioGroupsMask (0xffffffff)
+#define XkbMaxShiftLevel 63
+#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups)
+#define XkbRGMaxMembers 12
+#define XkbActionMessageLength 6
+#define XkbKeyNameLength 4
+#define XkbMaxRedirectCount 8
+
+#define XkbGeomPtsPerMM 10
+#define XkbGeomMaxColors 32
+#define XkbGeomMaxLabelColors 3
+#define XkbGeomMaxPriority 255
+
+ /*
+ * Key Type index and mask for the four standard key types.
+ */
+#define XkbOneLevelIndex 0
+#define XkbTwoLevelIndex 1
+#define XkbAlphabeticIndex 2
+#define XkbKeypadIndex 3
+#define XkbLastRequiredType XkbKeypadIndex
+#define XkbNumRequiredTypes (XkbLastRequiredType+1)
+#define XkbMaxKeyTypes 255
+
+#define XkbOneLevelMask (1<<0)
+#define XkbTwoLevelMask (1<<1)
+#define XkbAlphabeticMask (1<<2)
+#define XkbKeypadMask (1<<3)
+#define XkbAllRequiredTypes (0xf)
+
+#define XkbShiftLevel(n) ((n)-1)
+#define XkbShiftLevelMask(n) (1<<((n)-1))
+
+ /*
+ * Extension name and version information
+ */
+#define XkbName "XKEYBOARD"
+#define XkbMajorVersion 1
+#define XkbMinorVersion 0
+
+ /*
+ * Explicit map components:
+ * - Used in the 'explicit' field of an XkbServerMap. Specifies
+ * the keyboard components that should _not_ be updated automatically
+ * in response to core protocol keyboard mapping requests.
+ */
+#define XkbExplicitKeyTypesMask (0x0f)
+#define XkbExplicitKeyType1Mask (1<<0)
+#define XkbExplicitKeyType2Mask (1<<1)
+#define XkbExplicitKeyType3Mask (1<<2)
+#define XkbExplicitKeyType4Mask (1<<3)
+#define XkbExplicitInterpretMask (1<<4)
+#define XkbExplicitAutoRepeatMask (1<<5)
+#define XkbExplicitBehaviorMask (1<<6)
+#define XkbExplicitVModMapMask (1<<7)
+#define XkbAllExplicitMask (0xff)
+
+ /*
+ * Map components masks:
+ * Those in AllMapComponentsMask:
+ * - Specifies the individual fields to be loaded or changed for the
+ * GetMap and SetMap requests.
+ * Those in ClientInfoMask:
+ * - Specifies the components to be allocated by XkbAllocClientMap.
+ * Those in ServerInfoMask:
+ * - Specifies the components to be allocated by XkbAllocServerMap.
+ */
+#define XkbKeyTypesMask (1<<0)
+#define XkbKeySymsMask (1<<1)
+#define XkbModifierMapMask (1<<2)
+#define XkbExplicitComponentsMask (1<<3)
+#define XkbKeyActionsMask (1<<4)
+#define XkbKeyBehaviorsMask (1<<5)
+#define XkbVirtualModsMask (1<<6)
+#define XkbVirtualModMapMask (1<<7)
+
+#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask)
+#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)
+#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask)
+
+ /*
+ * Symbol interpretations flags:
+ * - Used in the flags field of a symbol interpretation
+ */
+#define XkbSI_AutoRepeat (1<<0)
+#define XkbSI_LockingKey (1<<1)
+
+ /*
+ * Symbol interpretations match specification:
+ * - Used in the match field of a symbol interpretation to specify
+ * the conditions under which an interpretation is used.
+ */
+#define XkbSI_LevelOneOnly (0x80)
+#define XkbSI_OpMask (0x7f)
+#define XkbSI_NoneOf (0)
+#define XkbSI_AnyOfOrNone (1)
+#define XkbSI_AnyOf (2)
+#define XkbSI_AllOf (3)
+#define XkbSI_Exactly (4)
+
+ /*
+ * Indicator map flags:
+ * - Used in the flags field of an indicator map to indicate the
+ * conditions under which and indicator can be changed and the
+ * effects of changing the indicator.
+ */
+#define XkbIM_NoExplicit (1L << 7)
+#define XkbIM_NoAutomatic (1L << 6)
+#define XkbIM_LEDDrivesKB (1L << 5)
+
+ /*
+ * Indicator map component specifications:
+ * - Used by the 'which_groups' and 'which_mods' fields of an indicator
+ * map to specify which keyboard components should be used to drive
+ * the indicator.
+ */
+#define XkbIM_UseBase (1L << 0)
+#define XkbIM_UseLatched (1L << 1)
+#define XkbIM_UseLocked (1L << 2)
+#define XkbIM_UseEffective (1L << 3)
+#define XkbIM_UseCompat (1L << 4)
+
+#define XkbIM_UseNone 0
+#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\
+ |XkbIM_UseEffective)
+#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat)
+
+ /*
+ * Compatibility Map Compontents:
+ * - Specifies the components to be allocated in XkbAllocCompatMap.
+ */
+#define XkbSymInterpMask (1<<0)
+#define XkbGroupCompatMask (1<<1)
+#define XkbAllCompatMask (0x3)
+
+ /*
+ * Names component mask:
+ * - Specifies the names to be loaded or changed for the GetNames and
+ * SetNames requests.
+ * - Specifies the names that have changed in a NamesNotify event.
+ * - Specifies the names components to be allocated by XkbAllocNames.
+ */
+#define XkbKeycodesNameMask (1<<0)
+#define XkbGeometryNameMask (1<<1)
+#define XkbSymbolsNameMask (1<<2)
+#define XkbPhysSymbolsNameMask (1<<3)
+#define XkbTypesNameMask (1<<4)
+#define XkbCompatNameMask (1<<5)
+#define XkbKeyTypeNamesMask (1<<6)
+#define XkbKTLevelNamesMask (1<<7)
+#define XkbIndicatorNamesMask (1<<8)
+#define XkbKeyNamesMask (1<<9)
+#define XkbKeyAliasesMask (1<<10)
+#define XkbVirtualModNamesMask (1<<11)
+#define XkbGroupNamesMask (1<<12)
+#define XkbRGNamesMask (1<<13)
+#define XkbComponentNamesMask (0x3f)
+#define XkbAllNamesMask (0x3fff)
+
+ /*
+ * GetByName components:
+ * - Specifies desired or necessary components to GetKbdByName request.
+ * - Reports the components that were found in a GetKbdByNameReply
+ */
+#define XkbGBN_TypesMask (1L << 0)
+#define XkbGBN_CompatMapMask (1L << 1)
+#define XkbGBN_ClientSymbolsMask (1L << 2)
+#define XkbGBN_ServerSymbolsMask (1L << 3)
+#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask)
+#define XkbGBN_IndicatorMapMask (1L << 4)
+#define XkbGBN_KeyNamesMask (1L << 5)
+#define XkbGBN_GeometryMask (1L << 6)
+#define XkbGBN_OtherNamesMask (1L << 7)
+#define XkbGBN_AllComponentsMask (0xff)
+
+ /*
+ * ListComponents flags
+ */
+#define XkbLC_Hidden (1L << 0)
+#define XkbLC_Default (1L << 1)
+#define XkbLC_Partial (1L << 2)
+
+#define XkbLC_AlphanumericKeys (1L << 8)
+#define XkbLC_ModifierKeys (1L << 9)
+#define XkbLC_KeypadKeys (1L << 10)
+#define XkbLC_FunctionKeys (1L << 11)
+#define XkbLC_AlternateGroup (1L << 12)
+
+ /*
+ * X Input Extension Interactions
+ * - Specifies the possible interactions between XKB and the X input
+ * extension
+ * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)
+ * XKB information about an extension device.
+ * - Reports the list of supported optional features in the reply to
+ * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.
+ * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify
+ * events to indicate an attempt to use an unsupported feature.
+ */
+#define XkbXI_KeyboardsMask (1L << 0)
+#define XkbXI_ButtonActionsMask (1L << 1)
+#define XkbXI_IndicatorNamesMask (1L << 2)
+#define XkbXI_IndicatorMapsMask (1L << 3)
+#define XkbXI_IndicatorStateMask (1L << 4)
+#define XkbXI_UnsupportedFeatureMask (1L << 15)
+#define XkbXI_AllFeaturesMask (0x001f)
+#define XkbXI_AllDeviceFeaturesMask (0x001e)
+
+#define XkbXI_IndicatorsMask (0x001c)
+#define XkbAllExtensionDeviceEventsMask (0x801f)
+
+ /*
+ * Per-Client Flags:
+ * - Specifies flags to be changed by the PerClientFlags request.
+ */
+#define XkbPCF_DetectableAutoRepeatMask (1L << 0)
+#define XkbPCF_GrabsUseXKBStateMask (1L << 1)
+#define XkbPCF_AutoResetControlsMask (1L << 2)
+#define XkbPCF_LookupStateWhenGrabbed (1L << 3)
+#define XkbPCF_SendEventUsesXKBState (1L << 4)
+#define XkbPCF_AllFlagsMask (0x1F)
+
+ /*
+ * Debugging flags and controls
+ */
+#define XkbDF_DisableLocks (1<<0)
+
+#endif /* _XKB_H_ */
diff --git a/XKBgeom.h b/XKBgeom.h
new file mode 100644
index 0000000..cef78fa
--- /dev/null
+++ b/XKBgeom.h
@@ -0,0 +1,662 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBGEOM_H_
+#define _XKBGEOM_H_
+
+#include <X11/extensions/XKBstr.h>
+
+#ifdef XKB_IN_SERVER
+#define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias
+#define XkbAddGeomColor SrvXkbAddGeomColor
+#define XkbAddGeomDoodad SrvXkbAddGeomDoodad
+#define XkbAddGeomKey SrvXkbAddGeomKey
+#define XkbAddGeomOutline SrvXkbAddGeomOutline
+#define XkbAddGeomOverlay SrvXkbAddGeomOverlay
+#define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow
+#define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey
+#define XkbAddGeomProperty SrvXkbAddGeomProperty
+#define XkbAddGeomRow SrvXkbAddGeomRow
+#define XkbAddGeomSection SrvXkbAddGeomSection
+#define XkbAddGeomShape SrvXkbAddGeomShape
+#define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases
+#define XkbAllocGeomColors SrvXkbAllocGeomColors
+#define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads
+#define XkbAllocGeomKeys SrvXkbAllocGeomKeys
+#define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines
+#define XkbAllocGeomPoints SrvXkbAllocGeomPoints
+#define XkbAllocGeomProps SrvXkbAllocGeomProps
+#define XkbAllocGeomRows SrvXkbAllocGeomRows
+#define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads
+#define XkbAllocGeomSections SrvXkbAllocGeomSections
+#define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays
+#define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows
+#define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys
+#define XkbAllocGeomShapes SrvXkbAllocGeomShapes
+#define XkbAllocGeometry SrvXkbAllocGeometry
+#define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases
+#define XkbFreeGeomColors SrvXkbFreeGeomColors
+#define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads
+#define XkbFreeGeomProperties SrvXkbFreeGeomProperties
+#define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys
+#define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows
+#define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays
+#define XkbFreeGeomKeys SrvXkbFreeGeomKeys
+#define XkbFreeGeomRows SrvXkbFreeGeomRows
+#define XkbFreeGeomSections SrvXkbFreeGeomSections
+#define XkbFreeGeomPoints SrvXkbFreeGeomPoints
+#define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines
+#define XkbFreeGeomShapes SrvXkbFreeGeomShapes
+#define XkbFreeGeometry SrvXkbFreeGeometry
+#endif
+
+typedef struct _XkbProperty {
+ char *name;
+ char *value;
+} XkbPropertyRec,*XkbPropertyPtr;
+
+typedef struct _XkbColor {
+ unsigned int pixel;
+ char * spec;
+} XkbColorRec,*XkbColorPtr;
+
+typedef struct _XkbPoint {
+ short x;
+ short y;
+} XkbPointRec, *XkbPointPtr;
+
+typedef struct _XkbBounds {
+ short x1,y1;
+ short x2,y2;
+} XkbBoundsRec, *XkbBoundsPtr;
+#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
+#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
+
+/*
+ * In the following structs, this pattern is used for dynamically sized arrays:
+ * foo is an array for which sz_foo entries are allocated & num_foo are used
+ */
+
+typedef struct _XkbOutline {
+ unsigned short num_points;
+ unsigned short sz_points;
+ unsigned short corner_radius;
+ XkbPointPtr points;
+} XkbOutlineRec, *XkbOutlinePtr;
+
+typedef struct _XkbShape {
+ Atom name;
+ unsigned short num_outlines;
+ unsigned short sz_outlines;
+ XkbOutlinePtr outlines;
+ XkbOutlinePtr approx;
+ XkbOutlinePtr primary;
+ XkbBoundsRec bounds;
+} XkbShapeRec, *XkbShapePtr;
+#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
+
+typedef struct _XkbShapeDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ unsigned short color_ndx;
+ unsigned short shape_ndx;
+} XkbShapeDoodadRec, *XkbShapeDoodadPtr;
+#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
+#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
+#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
+#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbTextDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ short width;
+ short height;
+ unsigned short color_ndx;
+ char * text;
+ char * font;
+} XkbTextDoodadRec, *XkbTextDoodadPtr;
+#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
+#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
+
+typedef struct _XkbIndicatorDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ unsigned short shape_ndx;
+ unsigned short on_color_ndx;
+ unsigned short off_color_ndx;
+} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr;
+#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
+#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
+#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
+#define XkbSetIndicatorDoodadOnColor(g,d,c) \
+ ((d)->on_color_ndx= (c)-&(g)->colors[0])
+#define XkbSetIndicatorDoodadOffColor(g,d,c) \
+ ((d)->off_color_ndx= (c)-&(g)->colors[0])
+#define XkbSetIndicatorDoodadShape(g,d,s) \
+ ((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbLogoDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+ unsigned short color_ndx;
+ unsigned short shape_ndx;
+ char * logo_name;
+} XkbLogoDoodadRec, *XkbLogoDoodadPtr;
+#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
+#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
+#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
+#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
+
+typedef struct _XkbAnyDoodad {
+ Atom name;
+ unsigned char type;
+ unsigned char priority;
+ short top;
+ short left;
+ short angle;
+} XkbAnyDoodadRec, *XkbAnyDoodadPtr;
+
+typedef union _XkbDoodad {
+ XkbAnyDoodadRec any;
+ XkbShapeDoodadRec shape;
+ XkbTextDoodadRec text;
+ XkbIndicatorDoodadRec indicator;
+ XkbLogoDoodadRec logo;
+} XkbDoodadRec, *XkbDoodadPtr;
+
+#define XkbUnknownDoodad 0
+#define XkbOutlineDoodad 1
+#define XkbSolidDoodad 2
+#define XkbTextDoodad 3
+#define XkbIndicatorDoodad 4
+#define XkbLogoDoodad 5
+
+typedef struct _XkbKey {
+ XkbKeyNameRec name;
+ short gap;
+ unsigned char shape_ndx;
+ unsigned char color_ndx;
+} XkbKeyRec, *XkbKeyPtr;
+#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
+#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
+#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
+#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
+
+typedef struct _XkbRow {
+ short top;
+ short left;
+ unsigned short num_keys;
+ unsigned short sz_keys;
+ int vertical;
+ XkbKeyPtr keys;
+ XkbBoundsRec bounds;
+} XkbRowRec, *XkbRowPtr;
+
+typedef struct _XkbSection {
+ Atom name;
+ unsigned char priority;
+ short top;
+ short left;
+ unsigned short width;
+ unsigned short height;
+ short angle;
+ unsigned short num_rows;
+ unsigned short num_doodads;
+ unsigned short num_overlays;
+ unsigned short sz_rows;
+ unsigned short sz_doodads;
+ unsigned short sz_overlays;
+ XkbRowPtr rows;
+ XkbDoodadPtr doodads;
+ XkbBoundsRec bounds;
+ struct _XkbOverlay *overlays;
+} XkbSectionRec, *XkbSectionPtr;
+
+typedef struct _XkbOverlayKey {
+ XkbKeyNameRec over;
+ XkbKeyNameRec under;
+} XkbOverlayKeyRec,*XkbOverlayKeyPtr;
+
+typedef struct _XkbOverlayRow {
+ unsigned short row_under;
+ unsigned short num_keys;
+ unsigned short sz_keys;
+ XkbOverlayKeyPtr keys;
+} XkbOverlayRowRec,*XkbOverlayRowPtr;
+
+typedef struct _XkbOverlay {
+ Atom name;
+ XkbSectionPtr section_under;
+ unsigned short num_rows;
+ unsigned short sz_rows;
+ XkbOverlayRowPtr rows;
+ XkbBoundsPtr bounds;
+} XkbOverlayRec,*XkbOverlayPtr;
+
+typedef struct _XkbGeometry {
+ Atom name;
+ unsigned short width_mm;
+ unsigned short height_mm;
+ char * label_font;
+ XkbColorPtr label_color;
+ XkbColorPtr base_color;
+ unsigned short sz_properties;
+ unsigned short sz_colors;
+ unsigned short sz_shapes;
+ unsigned short sz_sections;
+ unsigned short sz_doodads;
+ unsigned short sz_key_aliases;
+ unsigned short num_properties;
+ unsigned short num_colors;
+ unsigned short num_shapes;
+ unsigned short num_sections;
+ unsigned short num_doodads;
+ unsigned short num_key_aliases;
+ XkbPropertyPtr properties;
+ XkbColorPtr colors;
+ XkbShapePtr shapes;
+ XkbSectionPtr sections;
+ XkbDoodadPtr doodads;
+ XkbKeyAliasPtr key_aliases;
+} XkbGeometryRec;
+#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
+
+#define XkbGeomPropertiesMask (1<<0)
+#define XkbGeomColorsMask (1<<1)
+#define XkbGeomShapesMask (1<<2)
+#define XkbGeomSectionsMask (1<<3)
+#define XkbGeomDoodadsMask (1<<4)
+#define XkbGeomKeyAliasesMask (1<<5)
+#define XkbGeomAllMask (0x3f)
+
+typedef struct _XkbGeometrySizes {
+ unsigned int which;
+ unsigned short num_properties;
+ unsigned short num_colors;
+ unsigned short num_shapes;
+ unsigned short num_sections;
+ unsigned short num_doodads;
+ unsigned short num_key_aliases;
+} XkbGeometrySizesRec,*XkbGeometrySizesPtr;
+
+_XFUNCPROTOBEGIN
+
+extern XkbPropertyPtr
+XkbAddGeomProperty(
+ XkbGeometryPtr /* geom */,
+ char * /* name */,
+ char * /* value */
+);
+
+extern XkbKeyAliasPtr
+XkbAddGeomKeyAlias(
+ XkbGeometryPtr /* geom */,
+ char * /* alias */,
+ char * /* real */
+);
+
+extern XkbColorPtr
+XkbAddGeomColor(
+ XkbGeometryPtr /* geom */,
+ char * /* spec */,
+ unsigned int /* pixel */
+);
+
+extern XkbOutlinePtr
+XkbAddGeomOutline(
+ XkbShapePtr /* shape */,
+ int /* sz_points */
+);
+
+extern XkbShapePtr
+XkbAddGeomShape(
+ XkbGeometryPtr /* geom */,
+ Atom /* name */,
+ int /* sz_outlines */
+);
+
+extern XkbKeyPtr
+XkbAddGeomKey(
+ XkbRowPtr /* row */
+);
+
+extern XkbRowPtr
+XkbAddGeomRow(
+ XkbSectionPtr /* section */,
+ int /* sz_keys */
+);
+
+extern XkbSectionPtr
+XkbAddGeomSection(
+ XkbGeometryPtr /* geom */,
+ Atom /* name */,
+ int /* sz_rows */,
+ int /* sz_doodads */,
+ int /* sz_overlays */
+);
+
+extern XkbOverlayPtr
+XkbAddGeomOverlay(
+ XkbSectionPtr /* section */,
+ Atom /* name */,
+ int /* sz_rows */
+);
+
+extern XkbOverlayRowPtr
+XkbAddGeomOverlayRow(
+ XkbOverlayPtr /* overlay */,
+ int /* row_under */,
+ int /* sz_keys */
+);
+
+extern XkbOverlayKeyPtr
+XkbAddGeomOverlayKey(
+ XkbOverlayPtr /* overlay */,
+ XkbOverlayRowPtr /* row */,
+ char * /* over */,
+ char * /* under */
+);
+
+extern XkbDoodadPtr
+XkbAddGeomDoodad(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */,
+ Atom /* name */
+);
+
+
+extern void
+XkbFreeGeomKeyAliases(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomColors(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomDoodads(
+ XkbDoodadPtr /* doodads */,
+ int /* nDoodads */,
+ Bool /* freeAll */
+);
+
+
+extern void
+XkbFreeGeomProperties(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlayKeys(
+ XkbOverlayRowPtr /* row */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlayRows(
+ XkbOverlayPtr /* overlay */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOverlays(
+ XkbSectionPtr /* section */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomKeys(
+ XkbRowPtr /* row */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomRows(
+ XkbSectionPtr /* section */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomSections(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+
+extern void
+XkbFreeGeomPoints(
+ XkbOutlinePtr /* outline */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomOutlines(
+ XkbShapePtr /* shape */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeomShapes(
+ XkbGeometryPtr /* geom */,
+ int /* first */,
+ int /* count */,
+ Bool /* freeAll */
+);
+
+extern void
+XkbFreeGeometry(
+ XkbGeometryPtr /* geom */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern Status
+XkbAllocGeomProps(
+ XkbGeometryPtr /* geom */,
+ int /* nProps */
+);
+
+extern Status
+XkbAllocGeomKeyAliases(
+ XkbGeometryPtr /* geom */,
+ int /* nAliases */
+);
+
+extern Status
+XkbAllocGeomColors(
+ XkbGeometryPtr /* geom */,
+ int /* nColors */
+);
+
+extern Status
+XkbAllocGeomShapes(
+ XkbGeometryPtr /* geom */,
+ int /* nShapes */
+);
+
+extern Status
+XkbAllocGeomSections(
+ XkbGeometryPtr /* geom */,
+ int /* nSections */
+);
+
+extern Status
+XkbAllocGeomOverlays(
+ XkbSectionPtr /* section */,
+ int /* num_needed */
+);
+
+extern Status
+XkbAllocGeomOverlayRows(
+ XkbOverlayPtr /* overlay */,
+ int /* num_needed */
+);
+
+extern Status
+XkbAllocGeomOverlayKeys(
+ XkbOverlayRowPtr /* row */,
+ int /* num_needed */
+);
+
+extern Status
+XkbAllocGeomDoodads(
+ XkbGeometryPtr /* geom */,
+ int /* nDoodads */
+);
+
+extern Status
+XkbAllocGeomSectionDoodads(
+ XkbSectionPtr /* section */,
+ int /* nDoodads */
+);
+
+extern Status
+XkbAllocGeomOutlines(
+ XkbShapePtr /* shape */,
+ int /* nOL */
+);
+
+extern Status
+XkbAllocGeomRows(
+ XkbSectionPtr /* section */,
+ int /* nRows */
+);
+
+extern Status
+XkbAllocGeomPoints(
+ XkbOutlinePtr /* ol */,
+ int /* nPts */
+);
+
+extern Status
+XkbAllocGeomKeys(
+ XkbRowPtr /* row */,
+ int /* nKeys */
+);
+
+extern Status
+XkbAllocGeometry(
+ XkbDescPtr /* xkb */,
+ XkbGeometrySizesPtr /* sizes */
+);
+
+extern Status
+XkbSetGeometry(
+ Display * /* dpy */,
+ unsigned /* deviceSpec */,
+ XkbGeometryPtr /* geom */
+);
+
+extern Bool
+XkbComputeShapeTop(
+ XkbShapePtr /* shape */,
+ XkbBoundsPtr /* bounds */
+);
+
+extern Bool
+XkbComputeShapeBounds(
+ XkbShapePtr /* shape */
+);
+
+extern Bool
+XkbComputeRowBounds(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */,
+ XkbRowPtr /* row */
+);
+
+extern Bool
+XkbComputeSectionBounds(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* section */
+);
+
+extern char *
+XkbFindOverlayForKey(
+ XkbGeometryPtr /* geom */,
+ XkbSectionPtr /* wanted */,
+ char * /* under */
+);
+
+extern Status
+XkbGetGeometry(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status
+XkbGetNamedGeometry(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ Atom /* name */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _XKBSTR_H_ */
diff --git a/XKBproto.h b/XKBproto.h
new file mode 100644
index 0000000..b867659
--- /dev/null
+++ b/XKBproto.h
@@ -0,0 +1,1281 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBPROTO_H_
+#define _XKBPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/XKB.h>
+
+#define Window CARD32
+#define Atom CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define XkbPaddedSize(n) ((((unsigned int)(n)+3) >> 2) << 2)
+
+typedef struct _xkbUseExtension {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBUseExtension */
+ CARD16 length B16;
+ CARD16 wantedMajor B16;
+ CARD16 wantedMinor B16;
+} xkbUseExtensionReq;
+#define sz_xkbUseExtensionReq 8
+
+typedef struct _xkbUseExtensionReply {
+ BYTE type; /* X_Reply */
+ BOOL supported;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 serverMajor B16;
+ CARD16 serverMinor B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbUseExtensionReply;
+#define sz_xkbUseExtensionReply 32
+
+typedef struct _xkbSelectEvents {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBSelectEvents */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 affectWhich B16;
+ CARD16 clear B16;
+ CARD16 selectAll B16;
+ CARD16 affectMap B16;
+ CARD16 map B16;
+} xkbSelectEventsReq;
+#define sz_xkbSelectEventsReq 16
+
+typedef struct _xkbBell {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBBell */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 bellClass B16;
+ CARD16 bellID B16;
+ INT8 percent;
+ BOOL forceSound;
+ BOOL eventOnly;
+ CARD8 pad1;
+ INT16 pitch B16;
+ INT16 duration B16;
+ CARD16 pad2 B16;
+ Atom name B32;
+ Window window B32;
+} xkbBellReq;
+#define sz_xkbBellReq 28
+
+typedef struct _xkbGetState {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetState */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+} xkbGetStateReq;
+#define sz_xkbGetStateReq 8
+
+typedef struct _xkbGetStateReply {
+ BYTE type;
+ BYTE deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 mods;
+ CARD8 baseMods;
+ CARD8 latchedMods;
+ CARD8 lockedMods;
+ CARD8 group;
+ CARD8 lockedGroup;
+ INT16 baseGroup B16;
+ INT16 latchedGroup B16;
+ CARD8 compatState;
+ CARD8 grabMods;
+ CARD8 compatGrabMods;
+ CARD8 lookupMods;
+ CARD8 compatLookupMods;
+ CARD8 pad1;
+ CARD16 ptrBtnState B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+} xkbGetStateReply;
+#define sz_xkbGetStateReply 32
+
+typedef struct _xkbLatchLockState {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBLatchLockState */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 affectModLocks;
+ CARD8 modLocks;
+ BOOL lockGroup;
+ CARD8 groupLock;
+ CARD8 affectModLatches;
+ CARD8 modLatches;
+ CARD8 pad;
+ BOOL latchGroup;
+ INT16 groupLatch B16;
+} xkbLatchLockStateReq;
+#define sz_xkbLatchLockStateReq 16
+
+typedef struct _xkbGetControls {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetControls */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+} xkbGetControlsReq;
+#define sz_xkbGetControlsReq 8
+
+typedef struct _xkbGetControlsReply {
+ BYTE type; /* X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 mkDfltBtn;
+ CARD8 numGroups;
+ CARD8 groupsWrap;
+ CARD8 internalMods;
+ CARD8 ignoreLockMods;
+ CARD8 internalRealMods;
+ CARD8 ignoreLockRealMods;
+ CARD8 pad1;
+ CARD16 internalVMods B16;
+ CARD16 ignoreLockVMods B16;
+ CARD16 repeatDelay B16;
+ CARD16 repeatInterval B16;
+ CARD16 slowKeysDelay B16;
+ CARD16 debounceDelay B16;
+ CARD16 mkDelay B16;
+ CARD16 mkInterval B16;
+ CARD16 mkTimeToMax B16;
+ CARD16 mkMaxSpeed B16;
+ INT16 mkCurve B16;
+ CARD16 axOptions B16;
+ CARD16 axTimeout B16;
+ CARD16 axtOptsMask B16;
+ CARD16 axtOptsValues B16;
+ CARD16 pad2 B16;
+ CARD32 axtCtrlsMask B32;
+ CARD32 axtCtrlsValues B32;
+ CARD32 enabledCtrls B32;
+ BYTE perKeyRepeat[XkbPerKeyBitArraySize];
+} xkbGetControlsReply;
+#define sz_xkbGetControlsReply 92
+
+typedef struct _xkbSetControls {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetControls */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 affectInternalMods;
+ CARD8 internalMods;
+ CARD8 affectIgnoreLockMods;
+ CARD8 ignoreLockMods;
+ CARD16 affectInternalVMods B16;
+ CARD16 internalVMods B16;
+ CARD16 affectIgnoreLockVMods B16;
+ CARD16 ignoreLockVMods B16;
+ CARD8 mkDfltBtn;
+ CARD8 groupsWrap;
+ CARD16 axOptions B16;
+ CARD16 pad1 B16;
+ CARD32 affectEnabledCtrls B32;
+ CARD32 enabledCtrls B32;
+ CARD32 changeCtrls B32;
+ CARD16 repeatDelay B16;
+ CARD16 repeatInterval B16;
+ CARD16 slowKeysDelay B16;
+ CARD16 debounceDelay B16;
+ CARD16 mkDelay B16;
+ CARD16 mkInterval B16;
+ CARD16 mkTimeToMax B16;
+ CARD16 mkMaxSpeed B16;
+ INT16 mkCurve B16;
+ CARD16 axTimeout B16;
+ CARD32 axtCtrlsMask B32;
+ CARD32 axtCtrlsValues B32;
+ CARD16 axtOptsMask B16;
+ CARD16 axtOptsValues B16;
+ BYTE perKeyRepeat[XkbPerKeyBitArraySize];
+} xkbSetControlsReq;
+#define sz_xkbSetControlsReq 100
+
+typedef struct _xkbKTMapEntryWireDesc {
+ BOOL active;
+ CARD8 mask;
+ CARD8 level;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD16 pad B16;
+} xkbKTMapEntryWireDesc;
+#define sz_xkbKTMapEntryWireDesc 8
+
+typedef struct _xkbKTSetMapEntryWireDesc {
+ CARD8 level;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+} xkbKTSetMapEntryWireDesc;
+#define sz_xkbKTSetMapEntryWireDesc 4
+
+typedef struct _xkbModsWireDesc {
+ CARD8 mask; /* GetMap only */
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+} xkbModsWireDesc;
+#define sz_xkbModsWireDesc 4
+
+typedef struct _xkbKeyTypeWireDesc {
+ CARD8 mask;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD8 numLevels;
+ CARD8 nMapEntries;
+ BOOL preserve;
+ CARD8 pad;
+} xkbKeyTypeWireDesc;
+#define sz_xkbKeyTypeWireDesc 8
+
+typedef struct _xkbSymMapWireDesc {
+ CARD8 ktIndex[XkbNumKbdGroups];
+ CARD8 groupInfo;
+ CARD8 width;
+ CARD16 nSyms B16;
+} xkbSymMapWireDesc;
+#define sz_xkbSymMapWireDesc 8
+
+typedef struct _xkbVModMapWireDesc {
+ KeyCode key;
+ CARD8 pad;
+ CARD16 vmods B16;
+} xkbVModMapWireDesc;
+#define sz_xkbVModMapWireDesc 4
+
+typedef struct _xkbBehaviorWireDesc {
+ CARD8 key;
+ CARD8 type;
+ CARD8 data;
+ CARD8 pad;
+} xkbBehaviorWireDesc;
+#define sz_xkbBehaviorWireDesc 4
+
+typedef struct _xkbActionWireDesc {
+ CARD8 type;
+ CARD8 data[7];
+} xkbActionWireDesc;
+#define sz_xkbActionWireDesc 8
+
+typedef struct _xkbGetMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 full B16;
+ CARD16 partial B16;
+ CARD8 firstType;
+ CARD8 nTypes;
+ KeyCode firstKeySym;
+ CARD8 nKeySyms;
+ KeyCode firstKeyAct;
+ CARD8 nKeyActs;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ CARD16 virtualMods B16;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD16 pad1 B16;
+} xkbGetMapReq;
+#define sz_xkbGetMapReq 28
+
+typedef struct _xkbGetMapReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 pad1 B16;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD16 present B16;
+ CARD8 firstType;
+ CARD8 nTypes;
+ CARD8 totalTypes;
+ KeyCode firstKeySym;
+ CARD16 totalSyms B16;
+ CARD8 nKeySyms;
+ KeyCode firstKeyAct;
+ CARD16 totalActs B16;
+ CARD8 nKeyActs;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ CARD8 totalKeyBehaviors;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ CARD8 totalKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ CARD8 totalModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD8 totalVModMapKeys;
+ CARD8 pad2;
+ CARD16 virtualMods B16;
+} xkbGetMapReply;
+#define sz_xkbGetMapReply 40
+
+#define XkbSetMapResizeTypes (1L<<0)
+#define XkbSetMapRecomputeActions (1L<<1)
+#define XkbSetMapAllFlags (0x3)
+
+typedef struct _xkbSetMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 present B16;
+ CARD16 flags B16;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD8 firstType;
+ CARD8 nTypes;
+ KeyCode firstKeySym;
+ CARD8 nKeySyms;
+ CARD16 totalSyms B16;
+ KeyCode firstKeyAct;
+ CARD8 nKeyActs;
+ CARD16 totalActs B16;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ CARD8 totalKeyBehaviors;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ CARD8 totalKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ CARD8 totalModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD8 totalVModMapKeys;
+ CARD16 virtualMods B16;
+} xkbSetMapReq;
+#define sz_xkbSetMapReq 36
+
+typedef struct _xkbSymInterpretWireDesc {
+ CARD32 sym B32;
+ CARD8 mods;
+ CARD8 match;
+ CARD8 virtualMod;
+ CARD8 flags;
+ xkbActionWireDesc act;
+} xkbSymInterpretWireDesc;
+#define sz_xkbSymInterpretWireDesc 16
+
+typedef struct _xkbGetCompatMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetCompatMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 groups;
+ BOOL getAllSI;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+} xkbGetCompatMapReq;
+#define sz_xkbGetCompatMapReq 12
+
+typedef struct _xkbGetCompatMapReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 groups;
+ CARD8 pad1;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+ CARD16 nTotalSI B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbGetCompatMapReply;
+#define sz_xkbGetCompatMapReply 32
+
+typedef struct _xkbSetCompatMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetCompatMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 pad1;
+ BOOL recomputeActions;
+ BOOL truncateSI;
+ CARD8 groups;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+ CARD16 pad2 B16;
+} xkbSetCompatMapReq;
+#define sz_xkbSetCompatMapReq 16
+
+typedef struct _xkbGetIndicatorState {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetIndicatorState */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad1 B16;
+} xkbGetIndicatorStateReq;
+#define sz_xkbGetIndicatorStateReq 8
+
+typedef struct _xkbGetIndicatorStateReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 state B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbGetIndicatorStateReply;
+#define sz_xkbGetIndicatorStateReply 32
+
+typedef struct _xkbGetIndicatorMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetIndicatorMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+ CARD32 which B32;
+} xkbGetIndicatorMapReq;
+#define sz_xkbGetIndicatorMapReq 12
+
+typedef struct _xkbGetIndicatorMapReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 which B32;
+ CARD32 realIndicators B32;
+ CARD8 nIndicators;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbGetIndicatorMapReply;
+#define sz_xkbGetIndicatorMapReply 32
+
+typedef struct _xkbIndicatorMapWireDesc {
+ CARD8 flags;
+ CARD8 whichGroups;
+ CARD8 groups;
+ CARD8 whichMods;
+ CARD8 mods;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD32 ctrls B32;
+} xkbIndicatorMapWireDesc;
+#define sz_xkbIndicatorMapWireDesc 12
+
+typedef struct _xkbSetIndicatorMap {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetIndicatorMap */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad1 B16;
+ CARD32 which B32;
+} xkbSetIndicatorMapReq;
+#define sz_xkbSetIndicatorMapReq 12
+
+typedef struct _xkbGetNamedIndicator {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBGetNamedIndicator */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD16 pad1 B16;
+ Atom indicator B32;
+} xkbGetNamedIndicatorReq;
+#define sz_xkbGetNamedIndicatorReq 16
+
+typedef struct _xkbGetNamedIndicatorReply {
+ BYTE type;
+ BYTE deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom indicator B32;
+ BOOL found;
+ BOOL on;
+ BOOL realIndicator;
+ CARD8 ndx;
+ CARD8 flags;
+ CARD8 whichGroups;
+ CARD8 groups;
+ CARD8 whichMods;
+ CARD8 mods;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD32 ctrls B32;
+ BOOL supported;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkbGetNamedIndicatorReply;
+#define sz_xkbGetNamedIndicatorReply 32
+
+typedef struct _xkbSetNamedIndicator {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* X_KBSetNamedIndicator */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD16 pad1 B16;
+ Atom indicator B32;
+ BOOL setState;
+ BOOL on;
+ BOOL setMap;
+ BOOL createMap;
+ CARD8 pad2;
+ CARD8 flags;
+ CARD8 whichGroups;
+ CARD8 groups;
+ CARD8 whichMods;
+ CARD8 realMods;
+ CARD16 virtualMods B16;
+ CARD32 ctrls B32;
+} xkbSetNamedIndicatorReq;
+#define sz_xkbSetNamedIndicatorReq 32
+
+typedef struct _xkbGetNames {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetNames */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+ CARD32 which B32;
+} xkbGetNamesReq;
+#define sz_xkbGetNamesReq 12
+
+typedef struct _xkbGetNamesReply {
+ BYTE type;
+ BYTE deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 which B32;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD8 nTypes;
+ CARD8 groupNames;
+ CARD16 virtualMods B16;
+ KeyCode firstKey;
+ CARD8 nKeys;
+ CARD32 indicators B32;
+ CARD8 nRadioGroups;
+ CARD8 nKeyAliases;
+ CARD16 nKTLevels B16;
+ CARD32 pad3 B32;
+} xkbGetNamesReply;
+#define sz_xkbGetNamesReply 32
+
+typedef struct _xkbSetNames {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetNames */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 virtualMods B16;
+ CARD32 which B32;
+ CARD8 firstType;
+ CARD8 nTypes;
+ CARD8 firstKTLevel;
+ CARD8 nKTLevels;
+ CARD32 indicators B32;
+ CARD8 groupNames;
+ CARD8 nRadioGroups;
+ KeyCode firstKey;
+ CARD8 nKeys;
+ CARD8 nKeyAliases;
+ CARD8 pad1;
+ CARD16 totalKTLevelNames B16;
+} xkbSetNamesReq;
+#define sz_xkbSetNamesReq 28
+
+typedef struct _xkbPointWireDesc {
+ INT16 x B16;
+ INT16 y B16;
+} xkbPointWireDesc;
+#define sz_xkbPointWireDesc 4
+
+typedef struct _xkbOutlineWireDesc {
+ CARD8 nPoints;
+ CARD8 cornerRadius;
+ CARD16 pad B16;
+} xkbOutlineWireDesc;
+#define sz_xkbOutlineWireDesc 4
+
+typedef struct _xkbShapeWireDesc {
+ Atom name B32;
+ CARD8 nOutlines;
+ CARD8 primaryNdx;
+ CARD8 approxNdx;
+ CARD8 pad;
+} xkbShapeWireDesc;
+#define sz_xkbShapeWireDesc 8
+
+typedef struct _xkbSectionWireDesc {
+ Atom name B32;
+ INT16 top B16;
+ INT16 left B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ INT16 angle B16;
+ CARD8 priority;
+ CARD8 nRows;
+ CARD8 nDoodads;
+ CARD8 nOverlays;
+ CARD16 pad B16;
+} xkbSectionWireDesc;
+#define sz_xkbSectionWireDesc 20
+
+typedef struct _xkbRowWireDesc {
+ INT16 top B16;
+ INT16 left B16;
+ CARD8 nKeys;
+ BOOL vertical;
+ CARD16 pad B16;
+} xkbRowWireDesc;
+#define sz_xkbRowWireDesc 8
+
+typedef struct _xkbKeyWireDesc {
+ CARD8 name[XkbKeyNameLength];
+ INT16 gap B16;
+ CARD8 shapeNdx;
+ CARD8 colorNdx;
+} xkbKeyWireDesc;
+#define sz_xkbKeyWireDesc 8
+
+typedef struct _xkbOverlayWireDesc {
+ Atom name B32;
+ CARD8 nRows;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkbOverlayWireDesc;
+#define sz_xkbOverlayWireDesc 8
+
+typedef struct _xkbOverlayRowWireDesc {
+ CARD8 rowUnder;
+ CARD8 nKeys;
+ CARD16 pad1 B16;
+} xkbOverlayRowWireDesc;
+#define sz_xkbOverlayRowWireDesc 4
+
+typedef struct _xkbOverlayKeyWireDesc {
+ CARD8 over[XkbKeyNameLength];
+ CARD8 under[XkbKeyNameLength];
+} xkbOverlayKeyWireDesc;
+#define sz_xkbOverlayKeyWireDesc 8
+
+typedef struct _xkbShapeDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 colorNdx;
+ CARD8 shapeNdx;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+} xkbShapeDoodadWireDesc;
+#define sz_xkbShapeDoodadWireDesc 20
+
+typedef struct _xkbTextDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD8 colorNdx;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xkbTextDoodadWireDesc;
+#define sz_xkbTextDoodadWireDesc 20
+
+typedef struct _xkbIndicatorDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 shapeNdx;
+ CARD8 onColorNdx;
+ CARD8 offColorNdx;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+} xkbIndicatorDoodadWireDesc;
+#define sz_xkbIndicatorDoodadWireDesc 20
+
+typedef struct _xkbLogoDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD8 colorNdx;
+ CARD8 shapeNdx;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+} xkbLogoDoodadWireDesc;
+#define sz_xkbLogoDoodadWireDesc 20
+
+typedef struct _xkbAnyDoodadWireDesc {
+ Atom name B32;
+ CARD8 type;
+ CARD8 priority;
+ INT16 top B16;
+ INT16 left B16;
+ INT16 angle B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xkbAnyDoodadWireDesc;
+#define sz_xkbAnyDoodadWireDesc 20
+
+typedef union _xkbDoodadWireDesc {
+ xkbAnyDoodadWireDesc any;
+ xkbShapeDoodadWireDesc shape;
+ xkbTextDoodadWireDesc text;
+ xkbIndicatorDoodadWireDesc indicator;
+ xkbLogoDoodadWireDesc logo;
+} xkbDoodadWireDesc;
+#define sz_xkbDoodadWireDesc 20
+
+typedef struct _xkbGetGeometry {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetGeometry */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad B16;
+ Atom name B32;
+} xkbGetGeometryReq;
+#define sz_xkbGetGeometryReq 12
+
+typedef struct _xkbGetGeometryReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom name B32;
+ BOOL found;
+ CARD8 pad;
+ CARD16 widthMM B16;
+ CARD16 heightMM B16;
+ CARD16 nProperties B16;
+ CARD16 nColors B16;
+ CARD16 nShapes B16;
+ CARD16 nSections B16;
+ CARD16 nDoodads B16;
+ CARD16 nKeyAliases B16;
+ CARD8 baseColorNdx;
+ CARD8 labelColorNdx;
+} xkbGetGeometryReply;
+#define sz_xkbGetGeometryReply 32
+
+typedef struct _xkbSetGeometry {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetGeometry */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 nShapes;
+ CARD8 nSections;
+ Atom name B32;
+ CARD16 widthMM B16;
+ CARD16 heightMM B16;
+ CARD16 nProperties B16;
+ CARD16 nColors B16;
+ CARD16 nDoodads B16;
+ CARD16 nKeyAliases B16;
+ CARD8 baseColorNdx;
+ CARD8 labelColorNdx;
+ CARD16 pad B16;
+} xkbSetGeometryReq;
+#define sz_xkbSetGeometryReq 28
+
+typedef struct _xkbPerClientFlags {
+ CARD8 reqType;
+ CARD8 xkbReqType;/* always X_KBPerClientFlags */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 pad1 B16;
+ CARD32 change B32;
+ CARD32 value B32;
+ CARD32 ctrlsToChange B32;
+ CARD32 autoCtrls B32;
+ CARD32 autoCtrlValues B32;
+} xkbPerClientFlagsReq;
+#define sz_xkbPerClientFlagsReq 28
+
+typedef struct _xkbPerClientFlagsReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 supported B32;
+ CARD32 value B32;
+ CARD32 autoCtrls B32;
+ CARD32 autoCtrlValues B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xkbPerClientFlagsReply;
+#define sz_xkbPerClientFlagsReply 32
+
+typedef struct _xkbListComponents {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBListComponents */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 maxNames B16;
+} xkbListComponentsReq;
+#define sz_xkbListComponentsReq 8
+
+typedef struct _xkbListComponentsReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nKeymaps B16;
+ CARD16 nKeycodes B16;
+ CARD16 nTypes B16;
+ CARD16 nCompatMaps B16;
+ CARD16 nSymbols B16;
+ CARD16 nGeometries B16;
+ CARD16 extra B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xkbListComponentsReply;
+#define sz_xkbListComponentsReply 32
+
+typedef struct _xkbGetKbdByName {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetKbdByName */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 need B16; /* combination of XkbGBN_* */
+ CARD16 want B16; /* combination of XkbGBN_* */
+ BOOL load;
+ CARD8 pad;
+} xkbGetKbdByNameReq;
+#define sz_xkbGetKbdByNameReq 12
+
+typedef struct _xkbGetKbdByNameReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ BOOL loaded;
+ BOOL newKeyboard;
+ CARD16 found B16; /* combination of XkbGBN_* */
+ CARD16 reported B16; /* combination of XkbAllComponents */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbGetKbdByNameReply;
+#define sz_xkbGetKbdByNameReply 32
+
+typedef struct _xkbDeviceLedsWireDesc {
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD32 namesPresent B32;
+ CARD32 mapsPresent B32;
+ CARD32 physIndicators B32;
+ CARD32 state B32;
+} xkbDeviceLedsWireDesc;
+#define sz_xkbDeviceLedsWireDesc 20
+
+typedef struct _xkbGetDeviceInfo {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBGetDeviceInfo */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD16 wanted B16;
+ BOOL allBtns;
+ CARD8 firstBtn;
+ CARD8 nBtns;
+ CARD8 pad;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+} xkbGetDeviceInfoReq;
+#define sz_xkbGetDeviceInfoReq 16
+
+typedef struct _xkbGetDeviceInfoReply {
+ CARD8 type; /* always X_Reply */
+ CARD8 deviceID;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 present B16;
+ CARD16 supported B16;
+ CARD16 unsupported B16;
+ CARD16 nDeviceLedFBs B16;
+ CARD8 firstBtnWanted;
+ CARD8 nBtnsWanted;
+ CARD8 firstBtnRtrn;
+ CARD8 nBtnsRtrn;
+ CARD8 totalBtns;
+ BOOL hasOwnState;
+ CARD16 dfltKbdFB B16;
+ CARD16 dfltLedFB B16;
+ CARD16 pad B16;
+ Atom devType B32;
+} xkbGetDeviceInfoReply;
+#define sz_xkbGetDeviceInfoReply 32
+
+typedef struct _xkbSetDeviceInfo {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetDeviceInfo */
+ CARD16 length B16;
+ CARD16 deviceSpec B16;
+ CARD8 firstBtn;
+ CARD8 nBtns;
+ CARD16 change B16;
+ CARD16 nDeviceLedFBs B16;
+} xkbSetDeviceInfoReq;
+#define sz_xkbSetDeviceInfoReq 12
+
+typedef struct _xkbSetDebuggingFlags {
+ CARD8 reqType;
+ CARD8 xkbReqType; /* always X_KBSetDebuggingFlags */
+ CARD16 length B16;
+ CARD16 msgLength B16;
+ CARD16 pad B16;
+ CARD32 affectFlags B32;
+ CARD32 flags B32;
+ CARD32 affectCtrls B32;
+ CARD32 ctrls B32;
+} xkbSetDebuggingFlagsReq;
+#define sz_xkbSetDebuggingFlagsReq 24
+
+typedef struct _xkbSetDebuggingFlagsReply {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 currentFlags B32;
+ CARD32 currentCtrls B32;
+ CARD32 supportedFlags B32;
+ CARD32 supportedCtrls B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xkbSetDebuggingFlagsReply;
+#define sz_xkbSetDebuggingFlagsReply 32
+
+ /*
+ * X KEYBOARD EXTENSION EVENT STRUCTURES
+ */
+
+typedef struct _xkbAnyEvent {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xkbAnyEvent;
+#define sz_xkbAnyEvent 32
+
+typedef struct _xkbNewKeyboardNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 oldDeviceID;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ KeyCode oldMinKeyCode;
+ KeyCode oldMaxKeyCode;
+ CARD8 requestMajor;
+ CARD8 requestMinor;
+ CARD16 changed B16;
+ CARD8 detail;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbNewKeyboardNotify;
+#define sz_xkbNewKeyboardNotify 32
+
+typedef struct _xkbMapNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 ptrBtnActions;
+ CARD16 changed B16;
+ KeyCode minKeyCode;
+ KeyCode maxKeyCode;
+ CARD8 firstType;
+ CARD8 nTypes;
+ KeyCode firstKeySym;
+ CARD8 nKeySyms;
+ KeyCode firstKeyAct;
+ CARD8 nKeyActs;
+ KeyCode firstKeyBehavior;
+ CARD8 nKeyBehaviors;
+ KeyCode firstKeyExplicit;
+ CARD8 nKeyExplicit;
+ KeyCode firstModMapKey;
+ CARD8 nModMapKeys;
+ KeyCode firstVModMapKey;
+ CARD8 nVModMapKeys;
+ CARD16 virtualMods B16;
+ CARD16 pad1 B16;
+} xkbMapNotify;
+#define sz_xkbMapNotify 32
+
+typedef struct _xkbStateNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 mods;
+ CARD8 baseMods;
+ CARD8 latchedMods;
+ CARD8 lockedMods;
+ CARD8 group;
+ INT16 baseGroup B16;
+ INT16 latchedGroup B16;
+ CARD8 lockedGroup;
+ CARD8 compatState;
+ CARD8 grabMods;
+ CARD8 compatGrabMods;
+ CARD8 lookupMods;
+ CARD8 compatLookupMods;
+ CARD16 ptrBtnState B16;
+ CARD16 changed B16;
+ KeyCode keycode;
+ CARD8 eventType;
+ CARD8 requestMajor;
+ CARD8 requestMinor;
+} xkbStateNotify;
+#define sz_xkbStateNotify 32
+
+typedef struct _xkbControlsNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 numGroups;
+ CARD16 pad1 B16;
+ CARD32 changedControls B32;
+ CARD32 enabledControls B32;
+ CARD32 enabledControlChanges B32;
+ KeyCode keycode;
+ CARD8 eventType;
+ CARD8 requestMajor;
+ CARD8 requestMinor;
+ CARD32 pad2 B32;
+} xkbControlsNotify;
+#define sz_xkbControlsNotify 32
+
+typedef struct _xkbIndicatorNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 state B32;
+ CARD32 changed B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xkbIndicatorNotify;
+#define sz_xkbIndicatorNotify 32
+
+typedef struct _xkbNamesNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 changed B16;
+ CARD8 firstType;
+ CARD8 nTypes;
+ CARD8 firstLevelName;
+ CARD8 nLevelNames;
+ CARD8 pad2;
+ CARD8 nRadioGroups;
+ CARD8 nAliases;
+ CARD8 changedGroupNames;
+ CARD16 changedVirtualMods B16;
+ CARD8 firstKey;
+ CARD8 nKeys;
+ CARD32 changedIndicators B32;
+ CARD32 pad3 B32;
+} xkbNamesNotify;
+#define sz_xkbNamesNotify 32
+
+typedef struct _xkbCompatMapNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 changedGroups;
+ CARD16 firstSI B16;
+ CARD16 nSI B16;
+ CARD16 nTotalSI B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbCompatMapNotify;
+#define sz_xkbCompatMapNotify 32
+
+typedef struct _xkbBellNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 bellClass;
+ CARD8 bellID;
+ CARD8 percent;
+ CARD16 pitch B16;
+ CARD16 duration B16;
+ Atom name B32;
+ Window window B32;
+ BOOL eventOnly;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+} xkbBellNotify;
+#define sz_xkbBellNotify 32
+
+typedef struct _xkbActionMessage {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ KeyCode keycode;
+ BOOL press;
+ BOOL keyEventFollows;
+ CARD8 mods;
+ CARD8 group;
+ CARD8 message[8];
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xkbActionMessage;
+#define sz_xkbActionMessage 32
+
+typedef struct _xkbAccessXNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ KeyCode keycode;
+ CARD16 detail B16;
+ CARD16 slowKeysDelay B16;
+ CARD16 debounceDelay B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xkbAccessXNotify;
+#define sz_xkbAccessXNotify 32
+
+typedef struct _xkbExtensionDeviceNotify {
+ BYTE type;
+ BYTE xkbType;
+ CARD16 sequenceNumber B16;
+ Time time B32;
+ CARD8 deviceID;
+ CARD8 pad1;
+ CARD16 reason B16;
+ CARD16 ledClass B16;
+ CARD16 ledID B16;
+ CARD32 ledsDefined B32;
+ CARD32 ledState B32;
+ CARD8 firstBtn;
+ CARD8 nBtns;
+ CARD16 supported B16;
+ CARD16 unsupported B16;
+ CARD16 pad3 B16;
+} xkbExtensionDeviceNotify;
+#define sz_xkbExtensionDeviceNotify 32
+
+typedef struct _xkbEvent {
+ union {
+ xkbAnyEvent any;
+ xkbNewKeyboardNotify new_kbd;
+ xkbMapNotify map;
+ xkbStateNotify state;
+ xkbControlsNotify ctrls;
+ xkbIndicatorNotify indicators;
+ xkbNamesNotify names;
+ xkbCompatMapNotify compat;
+ xkbBellNotify bell;
+ xkbActionMessage message;
+ xkbAccessXNotify accessx;
+ xkbExtensionDeviceNotify device;
+ } u;
+} xkbEvent;
+#define sz_xkbEvent 32
+
+#undef Window
+#undef Atom
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _XKBPROTO_H_ */
diff --git a/XKBsrv.h b/XKBsrv.h
new file mode 100644
index 0000000..be7e978
--- /dev/null
+++ b/XKBsrv.h
@@ -0,0 +1,1184 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSRV_H_
+#define _XKBSRV_H_
+
+#ifdef XKB_IN_SERVER
+#define XkbAllocClientMap SrvXkbAllocClientMap
+#define XkbAllocServerMap SrvXkbAllocServerMap
+#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
+#define XkbAddKeyType SrvXkbAddKeyType
+#define XkbCopyKeyType SrvXkbCopyKeyType
+#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
+#define XkbFreeClientMap SrvXkbFreeClientMap
+#define XkbFreeServerMap SrvXkbFreeServerMap
+#define XkbInitCanonicalKeyTypes SrvXkbInitCanonicalKeyTypes
+#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
+#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
+#define XkbUpdateMapFromCore SrvXkbUpdateMapFromCore
+#define XkbResizeKeyActions SrvXkbResizeKeyActions
+#define XkbResizeKeySyms SrvXkbResizeKeySyms
+#define XkbResizeKeyType SrvXkbResizeKeyType
+#define XkbAllocCompatMap SrvXkbAllocCompatMap
+#define XkbAllocControls SrvXkbAllocControls
+#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
+#define XkbAllocKeyboard SrvXkbAllocKeyboard
+#define XkbAllocNames SrvXkbAllocNames
+#define XkbFreeCompatMap SrvXkbFreeCompatMap
+#define XkbFreeControls SrvXkbFreeControls
+#define XkbFreeIndicatorMaps SrvXkbFreeIndicatorMaps
+#define XkbFreeKeyboard SrvXkbFreeKeyboard
+#define XkbFreeNames SrvXkbFreeNames
+#define XkbAddDeviceLedInfo SrvXkbAddDeviceLedInfo
+#define XkbAllocDeviceInfo SrvXkbAllocDeviceInfo
+#define XkbFreeDeviceInfo SrvXkbFreeDeviceInfo
+#define XkbResizeDeviceButtonActions SrvXkbResizeDeviceButtonActions
+#define XkbLatchModifiers SrvXkbLatchModifiers
+#define XkbLatchGroup SrvXkbLatchGroup
+#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
+#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
+#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
+#define XkbUpdateActionVirtualMods SrvXkbUpdateActionVirtualMods
+#define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods
+#endif
+
+#include <X11/extensions/XKBstr.h>
+#include <X11/extensions/XKBproto.h>
+#include "inputstr.h"
+
+typedef struct _XkbInterest {
+ DeviceIntPtr dev;
+ ClientPtr client;
+ XID resource;
+ struct _XkbInterest * next;
+ CARD16 extDevNotifyMask;
+ CARD16 stateNotifyMask;
+ CARD16 namesNotifyMask;
+ CARD32 ctrlsNotifyMask;
+ CARD8 compatNotifyMask;
+ BOOL bellNotifyMask;
+ BOOL actionMessageMask;
+ CARD16 accessXNotifyMask;
+ CARD32 iStateNotifyMask;
+ CARD32 iMapNotifyMask;
+ CARD16 altSymsNotifyMask;
+ CARD32 autoCtrls;
+ CARD32 autoCtrlValues;
+} XkbInterestRec,*XkbInterestPtr;
+
+typedef struct _XkbRadioGroup {
+ CARD8 flags;
+ CARD8 nMembers;
+ CARD8 dfltDown;
+ CARD8 currentDown;
+ CARD8 members[XkbRGMaxMembers];
+} XkbRadioGroupRec, *XkbRadioGroupPtr;
+
+typedef struct _XkbEventCause {
+ CARD8 kc;
+ CARD8 event;
+ CARD8 mjr;
+ CARD8 mnr;
+ ClientPtr client;
+} XkbEventCauseRec,*XkbEventCausePtr;
+#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
+ (c)->mjr= (c)->mnr= 0; \
+ (c)->client= NULL; }
+#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
+ (c)->mjr= (j),(c)->mnr= (n);\
+ (c)->client= (cl); }
+#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
+#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
+#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
+
+#define _OFF_TIMER 0
+#define _KRG_WARN_TIMER 1
+#define _KRG_TIMER 2
+#define _SK_TIMEOUT_TIMER 3
+#define _ALL_TIMEOUT_TIMER 4
+
+#define _BEEP_NONE 0
+#define _BEEP_FEATURE_ON 1
+#define _BEEP_FEATURE_OFF 2
+#define _BEEP_FEATURE_CHANGE 3
+#define _BEEP_SLOW_WARN 4
+#define _BEEP_SLOW_PRESS 5
+#define _BEEP_SLOW_ACCEPT 6
+#define _BEEP_SLOW_REJECT 7
+#define _BEEP_SLOW_RELEASE 8
+#define _BEEP_STICKY_LATCH 9
+#define _BEEP_STICKY_LOCK 10
+#define _BEEP_STICKY_UNLOCK 11
+#define _BEEP_LED_ON 12
+#define _BEEP_LED_OFF 13
+#define _BEEP_LED_CHANGE 14
+#define _BEEP_BOUNCE_REJECT 15
+
+typedef struct _XkbSrvInfo {
+ XkbStateRec prev_state;
+ XkbStateRec state;
+ XkbDescPtr desc;
+
+ DeviceIntPtr device;
+ KbdCtrlProcPtr kbdProc;
+
+ XkbRadioGroupPtr radioGroups;
+ CARD8 nRadioGroups;
+ CARD8 clearMods;
+ CARD8 setMods;
+ INT16 groupChange;
+
+ CARD16 dfltPtrDelta;
+
+ double mouseKeysCurve;
+ double mouseKeysCurveFactor;
+ INT16 mouseKeysDX;
+ INT16 mouseKeysDY;
+ CARD8 mouseKeysFlags;
+ Bool mouseKeysAccel;
+ CARD8 mouseKeysCounter;
+
+ CARD8 lockedPtrButtons;
+ CARD8 shiftKeyCount;
+ KeyCode mouseKey;
+ KeyCode inactiveKey;
+ KeyCode slowKey;
+ KeyCode repeatKey;
+ CARD8 krgTimerActive;
+ CARD8 beepType;
+ CARD8 beepCount;
+
+ CARD32 flags;
+ CARD32 lastPtrEventTime;
+ CARD32 lastShiftEventTime;
+ OsTimerPtr beepTimer;
+ OsTimerPtr mouseKeyTimer;
+ OsTimerPtr slowKeysTimer;
+ OsTimerPtr bounceKeysTimer;
+ OsTimerPtr repeatKeyTimer;
+ OsTimerPtr krgTimer;
+} XkbSrvInfoRec, *XkbSrvInfoPtr;
+
+#define XkbSLI_IsDefault (1L<<0)
+#define XkbSLI_HasOwnState (1L<<1)
+
+typedef struct _XkbSrvLedInfo {
+ CARD16 flags;
+ CARD16 class;
+ CARD16 id;
+ union {
+ KbdFeedbackPtr kf;
+ LedFeedbackPtr lf;
+ } fb;
+
+ CARD32 physIndicators;
+ CARD32 autoState;
+ CARD32 explicitState;
+ CARD32 effectiveState;
+
+ CARD32 mapsPresent;
+ CARD32 namesPresent;
+ XkbIndicatorMapPtr maps;
+ Atom * names;
+
+ CARD32 usesBase;
+ CARD32 usesLatched;
+ CARD32 usesLocked;
+ CARD32 usesEffective;
+ CARD32 usesCompat;
+ CARD32 usesControls;
+
+ CARD32 usedComponents;
+} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
+
+/*
+ * Settings for xkbClientFlags field (used by DIX)
+ * These flags _must_ not overlap with XkbPCF_*
+ */
+#define _XkbClientInitialized (1<<15)
+
+#define _XkbWantsDetectableAutoRepeat(c)\
+ ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
+
+/*
+ * Settings for flags field
+ */
+#define _XkbStateNotifyInProgress (1<<0)
+
+typedef struct
+{
+ ProcessInputProc processInputProc;
+ ProcessInputProc realInputProc;
+ DeviceUnwrapProc unwrapProc;
+} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
+
+#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \
+ device->public.processInputProc = oldprocs->processInputProc; \
+ device->public.realInputProc = oldprocs->realInputProc; \
+ device->unwrapProc = oldprocs->unwrapProc;
+
+#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr)
+
+/***====================================================================***/
+
+
+/***====================================================================***/
+
+#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
+#define XkbAllFilteredEventsMask \
+ (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
+
+/***====================================================================***/
+
+extern int XkbReqCode;
+extern int XkbEventBase;
+extern int XkbKeyboardErrorCode;
+extern int XkbDisableLockActions;
+extern char * XkbBaseDirectory;
+extern char * XkbBinDirectory;
+extern char * XkbInitialMap;
+extern int _XkbClientMajor;
+extern int _XkbClientMinor;
+extern unsigned int XkbXIUnsupported;
+
+extern char * XkbModelUsed,*XkbLayoutUsed,*XkbVariantUsed,*XkbOptionsUsed;
+extern Bool noXkbExtension;
+extern Bool XkbWantRulesProp;
+
+extern pointer XkbLastRepeatEvent;
+
+extern CARD32 xkbDebugFlags;
+extern CARD32 xkbDebugCtrls;
+
+#define _XkbAlloc(s) xalloc((s))
+#define _XkbCalloc(n,s) Xcalloc((n)*(s))
+#define _XkbRealloc(o,s) Xrealloc((o),(s))
+#define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t)))
+#define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t)))
+#define _XkbTypedRealloc(o,n,t) \
+ ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
+#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
+#define _XkbFree(p) Xfree(p)
+
+#define _XkbLibError(c,l,d) \
+ { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
+#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
+#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
+#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
+
+extern int DeviceKeyPress,DeviceKeyRelease;
+extern int DeviceButtonPress,DeviceButtonRelease;
+
+#ifdef XINPUT
+#define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress))
+#define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease))
+#else
+#define _XkbIsPressEvent(t) ((t)==KeyPress)
+#define _XkbIsReleaseEvent(t) ((t)==KeyRelease)
+#endif
+
+#define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\
+ ((k)<=(c)->curKeySyms.maxKeyCode))
+#define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\
+ (c)->curKeySyms.minKeyCode+1)
+
+#define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
+#undef IsKeypadKey
+#define IsKeypadKey(s) XkbKSIsKeypad(s)
+
+typedef int Status;
+typedef pointer XPointer;
+typedef struct _XDisplay Display;
+
+#ifndef True
+#define True 1
+#define False 0
+#endif
+
+#ifndef PATH_MAX
+#ifdef MAXPATHLEN
+#define PATH_MAX MAXPATHLEN
+#else
+#define PATH_MAX 1024
+#endif
+#endif
+
+_XFUNCPROTOBEGIN
+
+extern void XkbUseMsg(
+ void
+);
+
+extern int XkbProcessArguments(
+ int /* argc */,
+ char ** /* argv */,
+ int /* i */
+);
+
+extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc);
+
+extern void XkbFreeCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern DeviceIntPtr _XkbLookupAnyDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupKeyboard(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupBellDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupLedDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern DeviceIntPtr _XkbLookupButtonDevice(
+ int /* id */,
+ int * /* why_rtrn */
+);
+
+extern XkbDescPtr XkbAllocKeyboard(
+ void
+);
+
+extern Status XkbAllocClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nTypes */
+);
+
+extern Status XkbAllocServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nNewActions */
+);
+
+extern void XkbFreeClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern Status XkbAllocIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbAllocCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nInterpret */
+);
+
+extern Status XkbAllocNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* nTotalRG */,
+ int /* nTotalAliases */
+);
+
+extern Status XkbAllocControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which*/
+);
+
+extern Status XkbCopyKeyType(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */
+);
+
+extern Status XkbCopyKeyTypes(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */,
+ int /* num_types */
+);
+
+extern Status XkbResizeKeyType(
+ XkbDescPtr /* xkb */,
+ int /* type_ndx */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* new_num_lvls */
+);
+
+extern void XkbFreeKeyboard(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeDesc */
+);
+
+extern void XkbSetActionKeyMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* mods */
+);
+
+extern Bool XkbCheckActionVMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* changed */
+);
+
+extern Bool XkbApplyVModChanges(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* pChanges */,
+ unsigned int * /* needChecksRtrn */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbApplyVModChangesToAllDevices(
+ DeviceIntPtr /* dev */,
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbEventCausePtr /* cause */
+);
+
+extern unsigned int XkbMaskForVMask(
+ XkbDescPtr /* xkb */,
+ unsigned int /* vmask */
+);
+
+extern Bool XkbVirtualModsToReal(
+ XkbDescPtr /* xkb */,
+ unsigned int /* virtua_mask */,
+ unsigned int * /* mask_rtrn */
+);
+
+extern unsigned int XkbAdjustGroup(
+ int /* group */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern KeySym *XkbResizeKeySyms(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern XkbAction *XkbResizeKeyActions(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* needed */
+);
+
+extern void XkbUpdateKeyTypesFromCore(
+ DeviceIntPtr /* pXDev */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */
+);
+
+extern void XkbUpdateDescActions(
+ XkbDescPtr /* xkb */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* changes */
+);
+
+extern void XkbUpdateActions(
+ DeviceIntPtr /* pXDev */,
+ KeyCode /* first */,
+ CARD8 /* num */,
+ XkbChangesPtr /* pChanges */,
+ unsigned int * /* needChecksRtrn */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateCoreDescription(
+ DeviceIntPtr /* keybd */,
+ Bool /* resize */
+);
+
+extern void XkbApplyMappingChange(
+ DeviceIntPtr /* pXDev */,
+ CARD8 /* request */,
+ KeyCode /* firstKey */,
+ CARD8 /* num */,
+ ClientPtr /* client */
+);
+
+extern void XkbSetIndicators(
+ DeviceIntPtr /* pXDev */,
+ CARD32 /* affect */,
+ CARD32 /* values */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateIndicators(
+ DeviceIntPtr /* keybd */,
+ CARD32 /* changed */,
+ Bool /* check_edevs */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ KbdFeedbackPtr /* kf */,
+ LedFeedbackPtr /* lf */,
+ unsigned int /* needed_parts */
+);
+
+extern XkbSrvLedInfoPtr XkbFindSrvLedInfo(
+ DeviceIntPtr /* dev */,
+ unsigned int /* class */,
+ unsigned int /* id */,
+ unsigned int /* needed_parts */
+);
+
+extern void XkbApplyLedNameChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_names */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbApplyLedMapChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_maps */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbApplyLedStateChanges(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* changed_leds */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateLedAutoState(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* maps_to_check */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbFlushLedEvents(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ XkbSrvLedInfoPtr /* sli */,
+ xkbExtensionDeviceNotify * /* ed */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbUpdateAllDeviceIndicators(
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern unsigned int XkbIndicatorsToUpdate(
+ DeviceIntPtr /* dev */,
+ unsigned long /* state_changes */,
+ Bool /* enabled_ctrl_changes */
+);
+
+extern void XkbComputeDerivedState(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern void XkbCheckSecondaryEffects(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned int /* which */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbCheckIndicatorMaps(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ unsigned int /* which */
+);
+
+extern unsigned int XkbStateChangedFlags(
+ XkbStatePtr /* old */,
+ XkbStatePtr /* new */
+);
+
+extern void XkbSendStateNotify(
+ DeviceIntPtr /* kbd */,
+ xkbStateNotify * /* pSN */
+);
+
+extern void XkbSendMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbMapNotify * /* ev */
+);
+
+extern int XkbComputeControlsNotify(
+ DeviceIntPtr /* kbd */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */,
+ xkbControlsNotify * /* pCN */,
+ Bool /* forceCtrlProc */
+);
+
+extern void XkbSendControlsNotify(
+ DeviceIntPtr /* kbd */,
+ xkbControlsNotify * /* ev */
+);
+
+extern void XkbSendCompatMapNotify(
+ DeviceIntPtr /* kbd */,
+ xkbCompatMapNotify * /* ev */
+);
+
+extern void XkbSendIndicatorNotify(
+ DeviceIntPtr /* kbd */,
+ int /* xkbType */,
+ xkbIndicatorNotify * /* ev */
+);
+
+extern void XkbHandleBell(
+ BOOL /* force */,
+ BOOL /* eventOnly */,
+ DeviceIntPtr /* kbd */,
+ CARD8 /* percent */,
+ pointer /* ctrl */,
+ CARD8 /* class */,
+ Atom /* name */,
+ WindowPtr /* pWin */,
+ ClientPtr /* pClient */
+);
+
+extern void XkbSendAccessXNotify(
+ DeviceIntPtr /* kbd */,
+ xkbAccessXNotify * /* pEv */
+);
+
+extern void XkbSendNamesNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNamesNotify * /* ev */
+);
+
+extern void XkbSendCompatNotify(
+ DeviceIntPtr /* kbd */,
+ xkbCompatMapNotify * /* ev */
+);
+
+extern void XkbSendActionMessage(
+ DeviceIntPtr /* kbd */,
+ xkbActionMessage * /* ev */
+);
+
+extern void XkbSendExtensionDeviceNotify(
+ DeviceIntPtr /* kbd */,
+ ClientPtr /* client */,
+ xkbExtensionDeviceNotify * /* ev */
+);
+
+extern void XkbSendNotification(
+ DeviceIntPtr /* kbd */,
+ XkbChangesPtr /* pChanges */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbProcessKeyboardEvent(
+ struct _xEvent * /* xE */,
+ DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern void XkbProcessOtherEvent(
+ struct _xEvent * /* xE */,
+ DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern void XkbHandleActions(
+ DeviceIntPtr /* dev */,
+ DeviceIntPtr /* kbd */,
+ struct _xEvent * /* xE */,
+ int /* count */
+);
+
+extern Bool XkbEnableDisableControls(
+ XkbSrvInfoPtr /* xkbi */,
+ unsigned long /* change */,
+ unsigned long /* newValues */,
+ XkbChangesPtr /* changes */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void AccessXInit(
+ DeviceIntPtr /* dev */
+);
+
+extern Bool AccessXFilterPressEvent(
+ register struct _xEvent * /* xE */,
+ register DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern Bool AccessXFilterReleaseEvent(
+ register struct _xEvent * /* xE */,
+ register DeviceIntPtr /* keybd */,
+ int /* count */
+);
+
+extern void AccessXCancelRepeatKey(
+ XkbSrvInfoPtr /* xkbi */,
+ KeyCode /* key */
+);
+
+extern void AccessXComputeCurveFactor(
+ XkbSrvInfoPtr /* xkbi */,
+ XkbControlsPtr /* ctrls */
+);
+
+extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledId */
+);
+
+extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
+ unsigned int /* deviceSpec */,
+ unsigned int /* nButtons */,
+ unsigned int /* szLeds */
+);
+
+extern void XkbFreeDeviceInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* which */,
+ Bool /* freeDevI */
+);
+
+extern Status XkbResizeDeviceButtonActions(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* newTotal */
+);
+
+extern XkbInterestPtr XkbFindClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */
+);
+
+extern XkbInterestPtr XkbAddClientResource(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */,
+ XID /* id */
+);
+
+extern int XkbRemoveClient(
+ DevicePtr /* inDev */,
+ ClientPtr /* client */
+);
+
+extern int XkbRemoveResourceClient(
+ DevicePtr /* inDev */,
+ XID /* id */
+);
+
+extern int XkbDDXInitDevice(
+ DeviceIntPtr /* dev */
+);
+
+extern int XkbDDXAccessXBeep(
+ DeviceIntPtr /* dev */,
+ unsigned int /* what */,
+ unsigned int /* which */
+);
+
+extern void XkbDDXKeyClick(
+ DeviceIntPtr /* dev */,
+ int /* keycode */,
+ int /* synthetic */
+);
+
+extern int XkbDDXUsesSoftRepeat(
+ DeviceIntPtr /* dev */
+);
+
+extern void XkbDDXKeybdCtrlProc(
+ DeviceIntPtr /* dev */,
+ KeybdCtrl * /* ctrl */
+);
+
+extern void XkbDDXChangeControls(
+ DeviceIntPtr /* dev */,
+ XkbControlsPtr /* old */,
+ XkbControlsPtr /* new */
+);
+
+extern void XkbDDXUpdateIndicators(
+ DeviceIntPtr /* keybd */,
+ CARD32 /* newState */
+);
+
+extern void XkbDDXUpdateDeviceIndicators(
+ DeviceIntPtr /* dev */,
+ XkbSrvLedInfoPtr /* sli */,
+ CARD32 /* newState */
+);
+
+extern void XkbDDXFakePointerButton(
+ int /* event */,
+ int /* button */
+);
+
+extern void XkbDDXFakePointerMotion(
+ unsigned int /* flags */,
+ int /* x */,
+ int /* y */
+);
+
+extern void XkbDDXFakeDeviceButton(
+ DeviceIntPtr /* dev */,
+ Bool /* press */,
+ int /* button */
+);
+
+extern int XkbDDXTerminateServer(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern int XkbDDXSwitchScreen(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern int XkbDDXPrivate(
+ DeviceIntPtr /* dev */,
+ KeyCode /* key */,
+ XkbAction * /* act */
+);
+
+extern void XkbDisableComputedAutoRepeats(
+ DeviceIntPtr /* pXDev */,
+ unsigned int /* key */
+);
+
+extern void XkbSetRepeatKeys(
+ DeviceIntPtr /* pXDev */,
+ int /* key */,
+ int /* onoff */
+);
+
+extern int XkbLatchModifiers(
+ DeviceIntPtr /* pXDev */,
+ CARD8 /* mask */,
+ CARD8 /* latches */
+);
+
+extern int XkbLatchGroup(
+ DeviceIntPtr /* pXDev */,
+ int /* group */
+);
+
+extern void XkbClearAllLatchesAndLocks(
+ DeviceIntPtr /* dev */,
+ XkbSrvInfoPtr /* xkbi */,
+ Bool /* genEv */,
+ XkbEventCausePtr /* cause */
+);
+
+extern void XkbSetRulesDflts(
+ char * /* rulesFile */,
+ char * /* model */,
+ char * /* layout */,
+ char * /* variant */,
+ char * /* options */
+);
+
+extern void XkbInitDevice(
+ DeviceIntPtr /* pXDev */
+);
+
+extern Bool XkbInitKeyboardDeviceStruct(
+ DeviceIntPtr /* pXDev */,
+ XkbComponentNamesPtr /* pNames */,
+ KeySymsPtr /* pSyms */,
+ CARD8 /* pMods */[],
+ BellProcPtr /* bellProc */,
+ KbdCtrlProcPtr /* ctrlProc */
+);
+
+extern int SProcXkbDispatch(
+ ClientPtr /* client */
+);
+
+extern XkbGeometryPtr XkbLookupNamedGeometry(
+ DeviceIntPtr /* dev */,
+ Atom /* name */,
+ Bool * /* shouldFree */
+);
+
+extern char * _XkbDupString(
+ char * /* str */
+);
+
+extern void XkbConvertCase(
+ KeySym /* sym */,
+ KeySym * /* lower */,
+ KeySym * /* upper */
+);
+
+extern Status XkbChangeKeycodeRange(
+ XkbDescPtr /* xkb */,
+ int /* minKC */,
+ int /* maxKC */,
+ XkbChangesPtr /* changes */
+);
+
+extern int XkbFinishDeviceInit(
+ DeviceIntPtr /* pXDev */
+);
+
+extern void XkbFreeSrvLedInfo(
+ XkbSrvLedInfoPtr /* sli */
+);
+
+extern void XkbFreeInfo(
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern Status XkbChangeTypesOfKey(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* nGroups */,
+ unsigned int /* groups */,
+ int * /* newTypesIn */,
+ XkbMapChangesPtr /* changes */
+);
+
+extern XkbKeyTypePtr XkbAddKeyType(
+ XkbDescPtr /* xkb */,
+ Atom /* name */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* num_lvls */
+);
+
+extern Status XkbInitCanonicalKeyTypes(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* keypadVMod */
+);
+
+extern int XkbKeyTypesForCoreSymbols(
+ XkbDescPtr /* xkb */,
+ int /* map_width */,
+ KeySym * /* core_syms */,
+ unsigned int /* protected */,
+ int * /* types_inout */,
+ KeySym * /* xkb_syms_rtrn */
+);
+
+extern Bool XkbApplyCompatMapToKey(
+ XkbDescPtr /* xkb */,
+ KeyCode /* key */,
+ XkbChangesPtr /* changes */
+);
+
+extern Bool XkbUpdateMapFromCore(
+ XkbDescPtr /* xkb */,
+ KeyCode /* first_key */,
+ int /* num_keys */,
+ int /* map_width */,
+ KeySym * /* core_keysyms */,
+ XkbChangesPtr /* changes */
+);
+
+extern void XkbFreeControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern Bool XkbApplyVirtualModChanges(
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern Bool XkbUpdateActionVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* changed */
+);
+
+extern void XkbUpdateKeyTypeVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbKeyTypePtr /* type */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern void XkbSendNewKeyboardNotify(
+ DeviceIntPtr /* kbd */,
+ xkbNewKeyboardNotify * /* pNKN */
+);
+
+#ifdef XKBSRV_NEED_FILE_FUNCS
+
+#include <X11/extensions/XKMformat.h>
+#include <X11/extensions/XKBfile.h>
+#include <X11/extensions/XKBrules.h>
+
+#define _XkbListKeymaps 0
+#define _XkbListKeycodes 1
+#define _XkbListTypes 2
+#define _XkbListCompat 3
+#define _XkbListSymbols 4
+#define _XkbListGeometry 5
+#define _XkbListNumComponents 6
+
+typedef struct _XkbSrvListInfo {
+ int szPool;
+ int nPool;
+ char * pool;
+
+ int maxRtrn;
+ int nTotal;
+
+ char * pattern[_XkbListNumComponents];
+ int nFound[_XkbListNumComponents];
+} XkbSrvListInfoRec,*XkbSrvListInfoPtr;
+
+char *
+XkbGetRulesDflts(
+ XkbRF_VarDefsPtr /* defs */
+);
+
+extern void XkbSetRulesUsed(
+ XkbRF_VarDefsPtr /* defs */
+);
+
+
+extern Status XkbDDXList(
+ DeviceIntPtr /* dev */,
+ XkbSrvListInfoPtr /* listing */,
+ ClientPtr /* client */
+);
+
+extern unsigned int XkbDDXLoadKeymapByNames(
+ DeviceIntPtr /* keybd */,
+ XkbComponentNamesPtr /* names */,
+ unsigned int /* want */,
+ unsigned int /* need */,
+ XkbFileInfoPtr /* finfoRtrn */,
+ char * /* keymapNameRtrn */,
+ int /* keymapNameRtrnLen */
+);
+
+extern Bool XkbDDXNamesFromRules(
+ DeviceIntPtr /* keybd */,
+ char * /* rules */,
+ XkbRF_VarDefsPtr /* defs */,
+ XkbComponentNamesPtr /* names */
+);
+
+extern FILE *XkbDDXOpenConfigFile(
+ char * /* mapName */,
+ char * /* fileNameRtrn */,
+ int /* fileNameRtrnLen */
+);
+
+extern Bool XkbDDXApplyConfig(
+ XPointer /* cfg_in */,
+ XkbSrvInfoPtr /* xkbi */
+);
+
+extern XPointer XkbDDXPreloadConfig(
+ char ** /* rulesFileRtrn */,
+ XkbRF_VarDefsPtr /* defs */,
+ XkbComponentNamesPtr /* names */,
+ DeviceIntPtr /* dev */
+);
+
+extern int _XkbStrCaseCmp(
+ char * /* str1 */,
+ char * /* str2 */
+);
+
+#endif /* XKBSRV_NEED_FILE_FUNCS */
+
+
+_XFUNCPROTOEND
+
+#define XkbAtomGetString(d,s) NameForAtom(s)
+
+#endif /* _XKBSRV_H_ */
+
+
diff --git a/XKBstr.h b/XKBstr.h
new file mode 100644
index 0000000..893a04b
--- /dev/null
+++ b/XKBstr.h
@@ -0,0 +1,642 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSTR_H_
+#define _XKBSTR_H_
+
+#include <X11/extensions/XKB.h>
+
+#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
+#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
+#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
+
+/*
+ * The Xkb structs are full of implicit padding to properly align members.
+ * We can't clean that up without breaking ABI, so tell clang not to bother
+ * complaining about it.
+ */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpadded"
+#endif
+
+ /*
+ * Common data structures and access macros
+ */
+
+typedef struct _XkbStateRec {
+ unsigned char group;
+ unsigned char locked_group;
+ unsigned short base_group;
+ unsigned short latched_group;
+ unsigned char mods;
+ unsigned char base_mods;
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+ unsigned char compat_state;
+ unsigned char grab_mods;
+ unsigned char compat_grab_mods;
+ unsigned char lookup_mods;
+ unsigned char compat_lookup_mods;
+ unsigned short ptr_buttons;
+} XkbStateRec,*XkbStatePtr;
+#define XkbModLocks(s) ((s)->locked_mods)
+#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
+#define XkbGroupLock(s) ((s)->locked_group)
+#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
+#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
+#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
+
+typedef struct _XkbMods {
+ unsigned char mask; /* effective mods */
+ unsigned char real_mods;
+ unsigned short vmods;
+} XkbModsRec,*XkbModsPtr;
+
+typedef struct _XkbKTMapEntry {
+ Bool active;
+ unsigned char level;
+ XkbModsRec mods;
+} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
+
+typedef struct _XkbKeyType {
+ XkbModsRec mods;
+ unsigned char num_levels;
+ unsigned char map_count;
+ /* map is an array of map_count XkbKTMapEntryRec structs */
+ XkbKTMapEntryPtr map;
+ /* preserve is an array of map_count XkbModsRec structs */
+ XkbModsPtr preserve;
+ Atom name;
+ /* level_names is an array of num_levels Atoms */
+ Atom * level_names;
+} XkbKeyTypeRec, *XkbKeyTypePtr;
+
+#define XkbNumGroups(g) ((g)&0x0f)
+#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
+#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
+#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
+#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
+#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
+
+ /*
+ * Structures and access macros used primarily by the server
+ */
+
+typedef struct _XkbBehavior {
+ unsigned char type;
+ unsigned char data;
+} XkbBehavior;
+
+#define XkbAnyActionDataSize 7
+typedef struct _XkbAnyAction {
+ unsigned char type;
+ unsigned char data[XkbAnyActionDataSize];
+} XkbAnyAction;
+
+typedef struct _XkbModAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbModAction;
+#define XkbModActionVMods(a) \
+ ((short)(((a)->vmods1<<8)|((a)->vmods2)))
+#define XkbSetModActionVMods(a,v) \
+ (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
+
+typedef struct _XkbGroupAction {
+ unsigned char type;
+ unsigned char flags;
+ char group_XXX;
+} XkbGroupAction;
+#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
+#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
+
+typedef struct _XkbISOAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ char group_XXX;
+ unsigned char affect;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbISOAction;
+
+typedef struct _XkbPtrAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char high_XXX;
+ unsigned char low_XXX;
+ unsigned char high_YYY;
+ unsigned char low_YYY;
+} XkbPtrAction;
+#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
+#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
+#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
+#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
+
+typedef struct _XkbPtrBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+} XkbPtrBtnAction;
+
+typedef struct _XkbPtrDfltAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char affect;
+ char valueXXX;
+} XkbPtrDfltAction;
+#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
+#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
+
+typedef struct _XkbSwitchScreenAction {
+ unsigned char type;
+ unsigned char flags;
+ char screenXXX;
+} XkbSwitchScreenAction;
+#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
+#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
+
+typedef struct _XkbCtrlsAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char ctrls3;
+ unsigned char ctrls2;
+ unsigned char ctrls1;
+ unsigned char ctrls0;
+} XkbCtrlsAction;
+#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\
+ ((a)->ctrls2=(((c)>>16)&0xff)),\
+ ((a)->ctrls1=(((c)>>8)&0xff)),\
+ ((a)->ctrls0=((c)&0xff)))
+#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
+ (((unsigned int)(a)->ctrls2)<<16)|\
+ (((unsigned int)(a)->ctrls1)<<8)|\
+ ((unsigned int)((a)->ctrls0)))
+
+typedef struct _XkbMessageAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char message[6];
+} XkbMessageAction;
+
+typedef struct _XkbRedirectKeyAction {
+ unsigned char type;
+ unsigned char new_key;
+ unsigned char mods_mask;
+ unsigned char mods;
+ unsigned char vmods_mask0;
+ unsigned char vmods_mask1;
+ unsigned char vmods0;
+ unsigned char vmods1;
+} XkbRedirectKeyAction;
+
+#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
+ ((unsigned int)(a)->vmods0))
+#define XkbSARedirectSetVMods(a,m) (((a)->vmods1=(((m)>>8)&0xff)),\
+ ((a)->vmods0=((m)&0xff)))
+#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
+ ((unsigned int)(a)->vmods_mask0))
+#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+
+typedef struct _XkbDeviceBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+ unsigned char device;
+} XkbDeviceBtnAction;
+
+typedef struct _XkbDeviceValuatorAction {
+ unsigned char type;
+ unsigned char device;
+ unsigned char v1_what;
+ unsigned char v1_ndx;
+ unsigned char v1_value;
+ unsigned char v2_what;
+ unsigned char v2_ndx;
+ unsigned char v2_value;
+} XkbDeviceValuatorAction;
+
+typedef union _XkbAction {
+ XkbAnyAction any;
+ XkbModAction mods;
+ XkbGroupAction group;
+ XkbISOAction iso;
+ XkbPtrAction ptr;
+ XkbPtrBtnAction btn;
+ XkbPtrDfltAction dflt;
+ XkbSwitchScreenAction screen;
+ XkbCtrlsAction ctrls;
+ XkbMessageAction msg;
+ XkbRedirectKeyAction redirect;
+ XkbDeviceBtnAction devbtn;
+ XkbDeviceValuatorAction devval;
+ unsigned char type;
+} XkbAction;
+
+typedef struct _XkbControls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ XkbModsRec internal;
+ XkbModsRec ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+} XkbControlsRec, *XkbControlsPtr;
+
+#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
+#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
+#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
+
+typedef struct _XkbServerMapRec {
+ /* acts is an array of XkbActions structs, with size_acts entries
+ allocated, and num_acts entries used. */
+ unsigned short num_acts;
+ unsigned short size_acts;
+ XkbAction *acts;
+
+ /* behaviors, key_acts, explicit, & vmodmap are all arrays with
+ (xkb->max_key_code + 1) entries allocated for each. */
+ XkbBehavior *behaviors;
+ unsigned short *key_acts;
+#if defined(__cplusplus) || defined(c_plusplus)
+ /* explicit is a C++ reserved word */
+ unsigned char *c_explicit;
+#else
+ unsigned char *explicit;
+#endif
+ unsigned char vmods[XkbNumVirtualMods];
+ unsigned short *vmodmap;
+} XkbServerMapRec, *XkbServerMapPtr;
+
+#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
+
+ /*
+ * Structures and access macros used primarily by clients
+ */
+
+typedef struct _XkbSymMapRec {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
+} XkbSymMapRec, *XkbSymMapPtr;
+
+typedef struct _XkbClientMapRec {
+ /* types is an array of XkbKeyTypeRec structs, with size_types entries
+ allocated, and num_types entries used. */
+ unsigned char size_types;
+ unsigned char num_types;
+ XkbKeyTypePtr types;
+
+ /* syms is an array of size_syms KeySyms, in which num_syms are used */
+ unsigned short size_syms;
+ unsigned short num_syms;
+ KeySym *syms;
+ /* key_sym_map is an array of (max_key_code + 1) XkbSymMapRec structs */
+ XkbSymMapPtr key_sym_map;
+
+ /* modmap is an array of (max_key_code + 1) unsigned chars */
+ unsigned char *modmap;
+} XkbClientMapRec, *XkbClientMapPtr;
+
+#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
+#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
+#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
+#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
+#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
+#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
+#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
+#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
+#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
+
+ /*
+ * Compatibility structures and access macros
+ */
+
+typedef struct _XkbSymInterpretRec {
+ KeySym sym;
+ unsigned char flags;
+ unsigned char match;
+ unsigned char mods;
+ unsigned char virtual_mod;
+ XkbAnyAction act;
+} XkbSymInterpretRec,*XkbSymInterpretPtr;
+
+typedef struct _XkbCompatMapRec {
+ /* sym_interpret is an array of XkbSymInterpretRec structs,
+ in which size_si are allocated & num_si are used. */
+ XkbSymInterpretPtr sym_interpret;
+ XkbModsRec groups[XkbNumKbdGroups];
+ unsigned short num_si;
+ unsigned short size_si;
+} XkbCompatMapRec, *XkbCompatMapPtr;
+
+typedef struct _XkbIndicatorMapRec {
+ unsigned char flags;
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ XkbModsRec mods;
+ unsigned int ctrls;
+} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
+
+#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\
+ (((i)->which_groups&&(i)->groups)||\
+ ((i)->which_mods&&(i)->mods.mask)||\
+ ((i)->ctrls)))
+#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\
+ ((i)->which_mods)||((i)->ctrls))
+
+
+typedef struct _XkbIndicatorRec {
+ unsigned long phys_indicators;
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbIndicatorRec,*XkbIndicatorPtr;
+
+typedef struct _XkbKeyNameRec {
+ char name[XkbKeyNameLength];
+} XkbKeyNameRec,*XkbKeyNamePtr;
+
+typedef struct _XkbKeyAliasRec {
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+} XkbKeyAliasRec,*XkbKeyAliasPtr;
+
+ /*
+ * Names for everything
+ */
+typedef struct _XkbNamesRec {
+ Atom keycodes;
+ Atom geometry;
+ Atom symbols;
+ Atom types;
+ Atom compat;
+ Atom vmods[XkbNumVirtualMods];
+ Atom indicators[XkbNumIndicators];
+ Atom groups[XkbNumKbdGroups];
+ /* keys is an array of (xkb->max_key_code + 1) XkbKeyNameRec entries */
+ XkbKeyNamePtr keys;
+ /* key_aliases is an array of num_key_aliases XkbKeyAliasRec entries */
+ XkbKeyAliasPtr key_aliases;
+ /* radio_groups is an array of num_rg Atoms */
+ Atom *radio_groups;
+ Atom phys_symbols;
+
+ /* num_keys seems to be unused in libX11 */
+ unsigned char num_keys;
+ unsigned char num_key_aliases;
+ unsigned short num_rg;
+} XkbNamesRec,*XkbNamesPtr;
+
+typedef struct _XkbGeometry *XkbGeometryPtr;
+ /*
+ * Tie it all together into one big keyboard description
+ */
+typedef struct _XkbDesc {
+ struct _XDisplay * dpy;
+ unsigned short flags;
+ unsigned short device_spec;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+
+ XkbControlsPtr ctrls;
+ XkbServerMapPtr server;
+ XkbClientMapPtr map;
+ XkbIndicatorPtr indicators;
+ XkbNamesPtr names;
+ XkbCompatMapPtr compat;
+ XkbGeometryPtr geom;
+} XkbDescRec, *XkbDescPtr;
+#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
+#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
+#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
+#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
+#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
+#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
+#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
+#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
+#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
+#define XkbKeySymEntry(d,k,sl,g) \
+ (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+#define XkbKeyAction(d,k,n) \
+ (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
+#define XkbKeyActionEntry(d,k,sl,g) \
+ (XkbKeyHasActions(d,k)?\
+ XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
+
+#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
+#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
+#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
+#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\
+ ((k)<=(d)->max_key_code))
+#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
+
+
+ /*
+ * The following structures can be used to track changes
+ * to a keyboard device
+ */
+typedef struct _XkbMapChanges {
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+} XkbMapChangesRec,*XkbMapChangesPtr;
+
+typedef struct _XkbControlsChanges {
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+} XkbControlsChangesRec,*XkbControlsChangesPtr;
+
+typedef struct _XkbIndicatorChanges {
+ unsigned int state_changes;
+ unsigned int map_changes;
+} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
+
+typedef struct _XkbNameChanges {
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+} XkbNameChangesRec,*XkbNameChangesPtr;
+
+typedef struct _XkbCompatChanges {
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+} XkbCompatChangesRec,*XkbCompatChangesPtr;
+
+typedef struct _XkbChanges {
+ unsigned short device_spec;
+ unsigned short state_changes;
+ XkbMapChangesRec map;
+ XkbControlsChangesRec ctrls;
+ XkbIndicatorChangesRec indicators;
+ XkbNameChangesRec names;
+ XkbCompatChangesRec compat;
+} XkbChangesRec, *XkbChangesPtr;
+
+ /*
+ * These data structures are used to construct a keymap from
+ * a set of components or to list components in the server
+ * database.
+ */
+typedef struct _XkbComponentNames {
+ char * keymap;
+ char * keycodes;
+ char * types;
+ char * compat;
+ char * symbols;
+ char * geometry;
+} XkbComponentNamesRec, *XkbComponentNamesPtr;
+
+typedef struct _XkbComponentName {
+ unsigned short flags;
+ char * name;
+} XkbComponentNameRec,*XkbComponentNamePtr;
+
+typedef struct _XkbComponentList {
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ XkbComponentNamePtr keymaps;
+ XkbComponentNamePtr keycodes;
+ XkbComponentNamePtr types;
+ XkbComponentNamePtr compat;
+ XkbComponentNamePtr symbols;
+ XkbComponentNamePtr geometry;
+} XkbComponentListRec, *XkbComponentListPtr;
+
+ /*
+ * The following data structures describe and track changes to a
+ * non-keyboard extension device
+ */
+typedef struct _XkbDeviceLedInfo {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int phys_indicators;
+ unsigned int maps_present;
+ unsigned int names_present;
+ unsigned int state;
+ Atom names[XkbNumIndicators];
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
+
+typedef struct _XkbDeviceInfo {
+ char * name;
+ Atom type;
+ unsigned short device_spec;
+ Bool has_own_state;
+ unsigned short supported;
+ unsigned short unsupported;
+
+ /* btn_acts is an array of num_btn XkbAction entries */
+ unsigned short num_btns;
+ XkbAction * btn_acts;
+
+ unsigned short sz_leds;
+ unsigned short num_leds;
+ unsigned short dflt_kbd_fb;
+ unsigned short dflt_led_fb;
+ /* leds is an array of XkbDeviceLedInfoRec in which
+ sz_leds entries are allocated and num_leds entries are used */
+ XkbDeviceLedInfoPtr leds;
+} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
+
+#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
+#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
+#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
+
+typedef struct _XkbDeviceLedChanges {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int defined; /* names or maps changed */
+ struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
+
+typedef struct _XkbDeviceChanges {
+ unsigned int changed;
+ unsigned short first_btn;
+ unsigned short num_btns;
+ XkbDeviceLedChangesRec leds;
+} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
+#endif /* _XKBSTR_H_ */
diff --git a/XWDFile.h b/XWDFile.h
new file mode 100644
index 0000000..50e17df
--- /dev/null
+++ b/XWDFile.h
@@ -0,0 +1,113 @@
+/*
+
+Copyright 1985, 1986, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/*
+ * XWDFile.h MIT Project Athena, X Window system window raster
+ * image dumper, dump file format header file.
+ *
+ * Author: Tony Della Fera, DEC
+ * 27-Jun-85
+ *
+ * Modifier: William F. Wyatt, SAO
+ * 18-Nov-86 - version 6 for saving/restoring color maps
+ */
+
+#ifndef XWDFILE_H
+#define XWDFILE_H
+
+#include <X11/Xmd.h>
+
+#define XWD_FILE_VERSION 7
+#define sz_XWDheader 100
+#define sz_XWDColor 12
+
+typedef CARD32 xwdval; /* for old broken programs */
+
+/* Values in the file are most significant byte first. */
+
+typedef struct _xwd_file_header {
+ /* header_size = SIZEOF(XWDheader) + length of null-terminated
+ * window name. */
+ CARD32 header_size B32;
+
+ CARD32 file_version B32; /* = XWD_FILE_VERSION above */
+ CARD32 pixmap_format B32; /* ZPixmap or XYPixmap */
+ CARD32 pixmap_depth B32; /* Pixmap depth */
+ CARD32 pixmap_width B32; /* Pixmap width */
+ CARD32 pixmap_height B32; /* Pixmap height */
+ CARD32 xoffset B32; /* Bitmap x offset, normally 0 */
+ CARD32 byte_order B32; /* of image data: MSBFirst, LSBFirst */
+
+ /* bitmap_unit applies to bitmaps (depth 1 format XY) only.
+ * It is the number of bits that each scanline is padded to. */
+ CARD32 bitmap_unit B32;
+
+ CARD32 bitmap_bit_order B32; /* bitmaps only: MSBFirst, LSBFirst */
+
+ /* bitmap_pad applies to pixmaps (non-bitmaps) only.
+ * It is the number of bits that each scanline is padded to. */
+ CARD32 bitmap_pad B32;
+
+ CARD32 bits_per_pixel B32; /* Bits per pixel */
+
+ /* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps)
+ * or bitmap_pad (pixmaps). It is the delta (in bytes) to get
+ * to the same x position on an adjacent row. */
+ CARD32 bytes_per_line B32;
+ CARD32 visual_class B32; /* Class of colormap */
+ CARD32 red_mask B32; /* Z red mask */
+ CARD32 green_mask B32; /* Z green mask */
+ CARD32 blue_mask B32; /* Z blue mask */
+ CARD32 bits_per_rgb B32; /* Log2 of distinct color values */
+ CARD32 colormap_entries B32; /* Number of entries in colormap; not used? */
+ CARD32 ncolors B32; /* Number of XWDColor structures */
+ CARD32 window_width B32; /* Window width */
+ CARD32 window_height B32; /* Window height */
+ CARD32 window_x B32; /* Window upper left X coordinate */
+ CARD32 window_y B32; /* Window upper left Y coordinate */
+ CARD32 window_bdrwidth B32; /* Window border width */
+} XWDFileHeader;
+
+/* Null-terminated window name follows the above structure. */
+
+/* Next comes XWDColor structures, at offset XWDFileHeader.header_size in
+ * the file. XWDFileHeader.ncolors tells how many XWDColor structures
+ * there are.
+ */
+
+typedef struct {
+ CARD32 pixel B32;
+ CARD16 red B16;
+ CARD16 green B16;
+ CARD16 blue B16;
+ CARD8 flags;
+ CARD8 pad;
+} XWDColor;
+
+/* Last comes the image data in the format described by XWDFileHeader. */
+
+#endif /* XWDFILE_H */
+
diff --git a/Xalloca.h b/Xalloca.h
new file mode 100644
index 0000000..1919884
--- /dev/null
+++ b/Xalloca.h
@@ -0,0 +1,121 @@
+/*
+
+Copyright 1995, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/*
+ * The purpose of this header is to define the macros ALLOCATE_LOCAL and
+ * DEALLOCATE_LOCAL appropriately for the platform being compiled on.
+ * These macros are used to make fast, function-local memory allocations.
+ * Their characteristics are as follows:
+ *
+ * void *ALLOCATE_LOCAL(int size)
+ * Returns a pointer to size bytes of memory, or NULL if the allocation
+ * failed. The memory must be freed with DEALLOCATE_LOCAL before the
+ * function that made the allocation returns. You should not ask for
+ * large blocks of memory with this function, since on many platforms
+ * the memory comes from the stack, which may have limited size.
+ *
+ * void DEALLOCATE_LOCAL(void *)
+ * Frees the memory allocated by ALLOCATE_LOCAL. Omission of this
+ * step may be harmless on some platforms, but will result in
+ * memory leaks or worse on others.
+ *
+ * Before including this file, you should define two macros,
+ * ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the
+ * same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The
+ * header uses the fallbacks if it doesn't know a "better" way to define
+ * ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be:
+ *
+ * #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size)
+ * #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr)
+ * #include "Xalloca.h"
+ */
+
+#ifndef XALLOCA_H
+#define XALLOCA_H 1
+
+#ifndef INCLUDE_ALLOCA_H
+/* Need to add more here to match Imake *.cf's */
+# if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+# define INCLUDE_ALLOCA_H
+# endif
+#endif
+
+#ifdef INCLUDE_ALLOCA_H
+# include <alloca.h>
+#endif
+
+#ifndef NO_ALLOCA
+/*
+ * os-dependent definition of local allocation and deallocation
+ * If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK
+ * for ALLOCATE/DEALLOCATE_LOCAL then you add that in here.
+ */
+
+
+# ifdef __GNUC__
+# ifndef alloca
+# define alloca __builtin_alloca
+# endif /* !alloca */
+# define ALLOCATE_LOCAL(size) alloca((int)(size))
+# else /* ! __GNUC__ */
+
+/*
+ * warning: old mips alloca (pre 2.10) is unusable, new one is built in
+ * Test is easy, the new one is named __builtin_alloca and comes
+ * from alloca.h which #defines alloca.
+ */
+# if defined(__sun) || defined(alloca)
+/*
+ * Some System V boxes extract alloca.o from /lib/libPW.a; if you
+ * decide that you don't want to use alloca, you might want to fix it here.
+ */
+/* alloca might be a macro taking one arg (hi, Sun!), so give it one. */
+# if !defined(__cplusplus)
+# define __Xnullarg /* as nothing */
+ extern void *alloca(__Xnullarg);
+# endif
+# define ALLOCATE_LOCAL(size) alloca((int)(size))
+# endif /* who does alloca */
+# endif /* __GNUC__ */
+
+#endif /* NO_ALLOCA */
+
+#if !defined(ALLOCATE_LOCAL)
+# if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK)
+# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size)
+# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr)
+# else /* no fallbacks supplied; error */
+# define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined!
+# define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined!
+# endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */
+#else
+# if !defined(DEALLOCATE_LOCAL)
+# define DEALLOCATE_LOCAL(_ptr) do {} while(0)
+# endif
+#endif /* defined(ALLOCATE_LOCAL) */
+
+#endif /* XALLOCA_H */
diff --git a/Xarch.h b/Xarch.h
new file mode 100644
index 0000000..f80c580
--- /dev/null
+++ b/Xarch.h
@@ -0,0 +1,94 @@
+#ifndef _XARCH_H_
+# define _XARCH_H_
+
+/*
+ * Copyright 1997 Metro Link Incorporated
+ *
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holder(s)
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission. The above listed
+ * copyright holder(s) make(s) no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+/*
+ * Determine the machine's byte order.
+ */
+
+/* See if it is set in the imake config first */
+# ifdef X_BYTE_ORDER
+
+# define X_BIG_ENDIAN 4321
+# define X_LITTLE_ENDIAN 1234
+
+# else
+
+# if defined(SVR4) || defined(__SVR4)
+# include <sys/types.h>
+# include <sys/byteorder.h>
+# elif defined(CSRG_BASED)
+# if defined(__NetBSD__) || defined(__OpenBSD__)
+# include <sys/types.h>
+# endif
+# include <machine/endian.h>
+# elif defined(linux)
+# if defined __STRICT_ANSI__
+# undef __STRICT_ANSI__
+# include <endian.h>
+# define __STRICT_ANSI__
+# else
+# include <endian.h>
+# endif
+/* 'endian.h' might have been included before 'Xarch.h' */
+# if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN)
+# define LITTLE_ENDIAN __LITTLE_ENDIAN
+# endif
+# if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN)
+# define BIG_ENDIAN __BIG_ENDIAN
+# endif
+# if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN)
+# define PDP_ENDIAN __PDP_ENDIAN
+# endif
+# if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
+# define BYTE_ORDER __BYTE_ORDER
+# endif
+# endif
+
+# ifndef BYTE_ORDER
+# define LITTLE_ENDIAN 1234
+# define BIG_ENDIAN 4321
+
+# if defined(__sun) && defined(__SVR4)
+# include <sys/isa_defs.h>
+# ifdef _LITTLE_ENDIAN
+# define BYTE_ORDER LITTLE_ENDIAN
+# endif
+# ifdef _BIG_ENDIAN
+# define BYTE_ORDER BIG_ENDIAN
+# endif
+# endif /* sun */
+# endif /* BYTE_ORDER */
+
+# define X_BYTE_ORDER BYTE_ORDER
+# define X_BIG_ENDIAN BIG_ENDIAN
+# define X_LITTLE_ENDIAN LITTLE_ENDIAN
+
+# endif /* not in imake config */
+
+#endif /* _XARCH_H_ */
diff --git a/Xatom.h b/Xatom.h
new file mode 100644
index 0000000..485a423
--- /dev/null
+++ b/Xatom.h
@@ -0,0 +1,79 @@
+#ifndef XATOM_H
+#define XATOM_H 1
+
+/* THIS IS A GENERATED FILE
+ *
+ * Do not change! Changing this file implies a protocol change!
+ */
+
+#define XA_PRIMARY ((Atom) 1)
+#define XA_SECONDARY ((Atom) 2)
+#define XA_ARC ((Atom) 3)
+#define XA_ATOM ((Atom) 4)
+#define XA_BITMAP ((Atom) 5)
+#define XA_CARDINAL ((Atom) 6)
+#define XA_COLORMAP ((Atom) 7)
+#define XA_CURSOR ((Atom) 8)
+#define XA_CUT_BUFFER0 ((Atom) 9)
+#define XA_CUT_BUFFER1 ((Atom) 10)
+#define XA_CUT_BUFFER2 ((Atom) 11)
+#define XA_CUT_BUFFER3 ((Atom) 12)
+#define XA_CUT_BUFFER4 ((Atom) 13)
+#define XA_CUT_BUFFER5 ((Atom) 14)
+#define XA_CUT_BUFFER6 ((Atom) 15)
+#define XA_CUT_BUFFER7 ((Atom) 16)
+#define XA_DRAWABLE ((Atom) 17)
+#define XA_FONT ((Atom) 18)
+#define XA_INTEGER ((Atom) 19)
+#define XA_PIXMAP ((Atom) 20)
+#define XA_POINT ((Atom) 21)
+#define XA_RECTANGLE ((Atom) 22)
+#define XA_RESOURCE_MANAGER ((Atom) 23)
+#define XA_RGB_COLOR_MAP ((Atom) 24)
+#define XA_RGB_BEST_MAP ((Atom) 25)
+#define XA_RGB_BLUE_MAP ((Atom) 26)
+#define XA_RGB_DEFAULT_MAP ((Atom) 27)
+#define XA_RGB_GRAY_MAP ((Atom) 28)
+#define XA_RGB_GREEN_MAP ((Atom) 29)
+#define XA_RGB_RED_MAP ((Atom) 30)
+#define XA_STRING ((Atom) 31)
+#define XA_VISUALID ((Atom) 32)
+#define XA_WINDOW ((Atom) 33)
+#define XA_WM_COMMAND ((Atom) 34)
+#define XA_WM_HINTS ((Atom) 35)
+#define XA_WM_CLIENT_MACHINE ((Atom) 36)
+#define XA_WM_ICON_NAME ((Atom) 37)
+#define XA_WM_ICON_SIZE ((Atom) 38)
+#define XA_WM_NAME ((Atom) 39)
+#define XA_WM_NORMAL_HINTS ((Atom) 40)
+#define XA_WM_SIZE_HINTS ((Atom) 41)
+#define XA_WM_ZOOM_HINTS ((Atom) 42)
+#define XA_MIN_SPACE ((Atom) 43)
+#define XA_NORM_SPACE ((Atom) 44)
+#define XA_MAX_SPACE ((Atom) 45)
+#define XA_END_SPACE ((Atom) 46)
+#define XA_SUPERSCRIPT_X ((Atom) 47)
+#define XA_SUPERSCRIPT_Y ((Atom) 48)
+#define XA_SUBSCRIPT_X ((Atom) 49)
+#define XA_SUBSCRIPT_Y ((Atom) 50)
+#define XA_UNDERLINE_POSITION ((Atom) 51)
+#define XA_UNDERLINE_THICKNESS ((Atom) 52)
+#define XA_STRIKEOUT_ASCENT ((Atom) 53)
+#define XA_STRIKEOUT_DESCENT ((Atom) 54)
+#define XA_ITALIC_ANGLE ((Atom) 55)
+#define XA_X_HEIGHT ((Atom) 56)
+#define XA_QUAD_WIDTH ((Atom) 57)
+#define XA_WEIGHT ((Atom) 58)
+#define XA_POINT_SIZE ((Atom) 59)
+#define XA_RESOLUTION ((Atom) 60)
+#define XA_COPYRIGHT ((Atom) 61)
+#define XA_NOTICE ((Atom) 62)
+#define XA_FONT_NAME ((Atom) 63)
+#define XA_FAMILY_NAME ((Atom) 64)
+#define XA_FULL_NAME ((Atom) 65)
+#define XA_CAP_HEIGHT ((Atom) 66)
+#define XA_WM_CLASS ((Atom) 67)
+#define XA_WM_TRANSIENT_FOR ((Atom) 68)
+
+#define XA_LAST_PREDEFINED ((Atom) 68)
+#endif /* XATOM_H */
diff --git a/Xdefs.h b/Xdefs.h
new file mode 100644
index 0000000..e25a208
--- /dev/null
+++ b/Xdefs.h
@@ -0,0 +1,108 @@
+/***********************************************************
+
+Copyright (c) 1999 The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc..
+
+*/
+
+/**
+ ** Types definitions shared between server and clients
+ **/
+
+#ifndef _XDEFS_H
+#define _XDEFS_H
+
+#ifdef _XSERVER64
+#include <X11/Xmd.h>
+#endif
+
+#ifndef _XTYPEDEF_ATOM
+# define _XTYPEDEF_ATOM
+# ifndef _XSERVER64
+typedef unsigned long Atom;
+# else
+typedef CARD32 Atom;
+# endif
+#endif
+
+#ifndef Bool
+# ifndef _XTYPEDEF_BOOL
+# define _XTYPEDEF_BOOL
+typedef int Bool;
+# endif
+#endif
+
+#ifndef _XTYPEDEF_POINTER
+# define _XTYPEDEF_POINTER
+typedef void *pointer;
+#endif
+
+#ifndef _XTYPEDEF_CLIENTPTR
+typedef struct _Client *ClientPtr;
+# define _XTYPEDEF_CLIENTPTR
+#endif
+
+#ifndef _XTYPEDEF_XID
+# define _XTYPEDEF_XID
+# ifndef _XSERVER64
+typedef unsigned long XID;
+# else
+typedef CARD32 XID;
+# endif
+#endif
+
+#ifndef _XTYPEDEF_MASK
+# define _XTYPEDEF_MASK
+# ifndef _XSERVER64
+typedef unsigned long Mask;
+# else
+typedef CARD32 Mask;
+# endif
+#endif
+
+#ifndef _XTYPEDEF_FONTPTR
+# define _XTYPEDEF_FONTPTR
+typedef struct _Font *FontPtr; /* also in fonts/include/font.h */
+#endif
+
+#ifndef _XTYPEDEF_FONT
+# define _XTYPEDEF_FONT
+typedef XID Font;
+#endif
+
+#ifndef _XTYPEDEF_FSID
+# ifndef _XSERVER64
+typedef unsigned long FSID;
+# else
+typedef CARD32 FSID;
+# endif
+#endif
+
+typedef FSID AccContext;
+
+/* OS independent time value
+ XXX Should probably go in Xos.h */
+typedef struct timeval **OSTimePtr;
+
+
+typedef void (* BlockHandlerProcPtr)(void * /* blockData */,
+ OSTimePtr /* pTimeout */,
+ void * /* pReadmask */);
+
+#endif
diff --git a/Xeviestr.h b/Xeviestr.h
new file mode 100644
index 0000000..78871f1
--- /dev/null
+++ b/Xeviestr.h
@@ -0,0 +1,3 @@
+#warning "Xeviestr.h is obsolete and may be removed in the future."
+#warning "include <X11/extensions/evieproto.h> for the protocol defines."
+#include <X11/extensions/evieproto.h>
diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
new file mode 100644
index 0000000..b88493d
--- /dev/null
+++ b/Xfuncproto.h.in
@@ -0,0 +1,220 @@
+/*
+ *
+Copyright 1989, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ */
+
+/* Definitions to make function prototypes manageable */
+
+#ifndef _XFUNCPROTO_H_
+#define _XFUNCPROTO_H_
+
+#ifndef NeedFunctionPrototypes
+#define NeedFunctionPrototypes 1
+#endif /* NeedFunctionPrototypes */
+
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes 1
+#endif /* NeedVarargsPrototypes */
+
+#if NeedFunctionPrototypes
+
+#ifndef NeedNestedPrototypes
+#define NeedNestedPrototypes 1
+#endif /* NeedNestedPrototypes */
+
+#ifndef _Xconst
+#define _Xconst const
+#endif /* _Xconst */
+
+/* Function prototype configuration (see configure for more info) */
+#ifndef NARROWPROTO
+#undef NARROWPROTO
+#endif
+#ifndef FUNCPROTO
+#undef FUNCPROTO
+#endif
+
+#ifndef NeedWidePrototypes
+#ifdef NARROWPROTO
+#define NeedWidePrototypes 0
+#else
+#define NeedWidePrototypes 1 /* default to make interropt. easier */
+#endif
+#endif /* NeedWidePrototypes */
+
+#endif /* NeedFunctionPrototypes */
+
+#ifndef _XFUNCPROTOBEGIN
+#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
+#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
+#define _XFUNCPROTOEND }
+#else
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#endif
+#endif /* _XFUNCPROTOBEGIN */
+
+/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+#ifndef __has_feature
+# define __has_feature(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+#ifndef __has_extension
+# define __has_extension(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4))
+# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
+#else
+# define _X_SENTINEL(x)
+#endif /* GNUC >= 4 */
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \
+ && !defined(__CYGWIN__) && !defined(__MINGW32__)
+# define _X_EXPORT __attribute__((visibility("default")))
+# define _X_HIDDEN __attribute__((visibility("hidden")))
+# define _X_INTERNAL __attribute__((visibility("internal")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define _X_EXPORT __global
+# define _X_HIDDEN __hidden
+# define _X_INTERNAL __hidden
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+# define _X_EXPORT
+# define _X_HIDDEN
+# define _X_INTERNAL
+#endif /* GNUC >= 4 */
+
+/* Branch prediction hints for individual conditionals */
+/* requires xproto >= 7.0.9 */
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
+# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
+#else /* not gcc >= 3.3 */
+# define _X_LIKELY(x) (x)
+# define _X_UNLIKELY(x) (x)
+#endif
+
+/* Bulk branch prediction hints via marking error path functions as "cold" */
+/* requires xproto >= 7.0.25 */
+#if __has_attribute(__cold__) || \
+ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */
+# define _X_COLD __attribute__((__cold__))
+#else
+# define _X_COLD /* nothing */
+#endif
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if __has_attribute(deprecated) \
+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \
+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130))
+# define _X_DEPRECATED __attribute__((deprecated))
+#else /* not gcc >= 3.1 */
+# define _X_DEPRECATED
+#endif
+
+/* requires xproto >= 7.0.30 */
+#if __has_extension(attribute_deprecated_with_message) || \
+ (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
+# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg)))
+#else
+# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED
+#endif
+
+/* requires xproto >= 7.0.17 */
+#if __has_attribute(noreturn) \
+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define _X_NORETURN __attribute((noreturn))
+#else
+# define _X_NORETURN
+#endif /* GNUC */
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if __has_attribute(__format__) \
+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
+#else /* not gcc >= 2.3 */
+# define _X_ATTRIBUTE_PRINTF(x,y)
+#endif
+
+/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
+ argument macros, must be only used inside #ifdef _X_NONNULL guards, as
+ many legacy X clients are compiled in C89 mode still. */
+#if __has_attribute(nonnull) \
+ && defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
+#define _X_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
+#elif __has_attribute(nonnull) \
+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+#define _X_NONNULL(args...) __attribute__((nonnull(args)))
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
+#define _X_NONNULL(...) /* */
+#endif
+
+/* requires xproto >= 7.0.22 */
+#if __has_attribute(__unused__) \
+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
+#define _X_UNUSED __attribute__((__unused__))
+#else
+#define _X_UNUSED /* */
+#endif
+
+/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
+/* requires xproto >= 7.0.9
+ (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */
+#if defined(inline) /* assume autoconf set it correctly */ || \
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \
+ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
+# define _X_INLINE inline
+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
+# define _X_INLINE __inline__
+#else
+# define _X_INLINE
+#endif
+
+/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
+/* requires xproto >= 7.0.21 */
+#ifndef _X_RESTRICT_KYWD
+# if defined(restrict) /* assume autoconf set it correctly */ || \
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \
+ && !defined(__cplusplus)) /* Workaround g++ issue on Solaris */
+# define _X_RESTRICT_KYWD restrict
+# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
+# define _X_RESTRICT_KYWD __restrict__
+# else
+# define _X_RESTRICT_KYWD
+# endif
+#endif
+
+/* requires xproto >= 7.0.30 */
+#if __has_attribute(no_sanitize_thread)
+# define _X_NOTSAN __attribute__((no_sanitize_thread))
+#else
+# define _X_NOTSAN
+#endif
+
+#endif /* _XFUNCPROTO_H_ */
diff --git a/Xfuncs.h b/Xfuncs.h
new file mode 100644
index 0000000..b7c4029
--- /dev/null
+++ b/Xfuncs.h
@@ -0,0 +1,69 @@
+/*
+ *
+Copyright 1990, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ */
+
+#ifndef _XFUNCS_H_
+# define _XFUNCS_H_
+
+# include <X11/Xosdefs.h>
+
+/* the old Xfuncs.h, for pre-R6 */
+# if !(defined(XFree86LOADER) && defined(IN_MODULE))
+
+# ifdef X_USEBFUNCS
+void bcopy();
+void bzero();
+int bcmp();
+# else
+# if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__) && !defined(_AIX)
+# include <memory.h>
+void bcopy();
+# define bzero(b,len) memset(b, 0, len)
+# define bcmp(b1,b2,len) memcmp(b1, b2, len)
+# else
+# include <string.h>
+# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
+# include <strings.h>
+# endif
+# define _XFUNCS_H_INCLUDED_STRING_H
+# endif
+# endif /* X_USEBFUNCS */
+
+/* the new Xfuncs.h */
+
+/* the ANSI C way */
+# ifndef _XFUNCS_H_INCLUDED_STRING_H
+# include <string.h>
+# endif
+# undef bzero
+# define bzero(b,len) memset(b,0,len)
+
+# if defined WIN32 && defined __MINGW32__
+# define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
+# endif
+
+# endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
+
+#endif /* _XFUNCS_H_ */
diff --git a/Xmd.h b/Xmd.h
new file mode 100644
index 0000000..492465e
--- /dev/null
+++ b/Xmd.h
@@ -0,0 +1,142 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+#ifndef XMD_H
+# define XMD_H 1
+/*
+ * Xmd.h: MACHINE DEPENDENT DECLARATIONS.
+ */
+
+/*
+ * Special per-machine configuration flags.
+ */
+# if defined(__sun) && defined(__SVR4)
+# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
+# endif
+
+# if defined (_LP64) || defined(__LP64__) || \
+ defined(__alpha) || defined(__alpha__) || \
+ defined(__ia64__) || defined(ia64) || \
+ defined(__sparc64__) || \
+ defined(__s390x__) || \
+ defined(__amd64__) || defined(amd64) || \
+ defined(__powerpc64__)
+# if !defined(__ILP32__) /* amd64-x32 is 32bit */
+# define LONG64 /* 32/64-bit architecture */
+# endif /* !__ILP32__ */
+# endif
+
+/*
+ * Definition of macro used to set constants for size of network structures;
+ * machines with preprocessors that can't handle all of the sz_ symbols
+ * can define this macro to be sizeof(x) if and only if their compiler doesn't
+ * pad out structures (esp. the xTextElt structure which contains only two
+ * one-byte fields). Network structures should always define sz_symbols.
+ *
+ * The sz_ prefix is used instead of something more descriptive so that the
+ * symbols are no more than 32 characters long (which causes problems for some
+ * compilers and preprocessors).
+ *
+ * The extra indirection is to get macro arguments to expand correctly before
+ * the concatenation, rather than afterward.
+ */
+# define _SIZEOF(x) sz_##x
+# define SIZEOF(x) _SIZEOF(x)
+
+/*
+ * Bitfield suffixes for the protocol structure elements, if you
+ * need them. Note that bitfields are not guaranteed to be signed
+ * (or even unsigned) according to ANSI C.
+ */
+# define B32 /* bitfield not needed on architectures with native 32-bit type */
+# define B16 /* bitfield not needed on architectures with native 16-bit type */
+# ifdef LONG64
+typedef long INT64;
+typedef int INT32;
+# else
+typedef long INT32;
+# endif
+typedef short INT16;
+
+typedef signed char INT8;
+
+# ifdef LONG64
+typedef unsigned long CARD64;
+typedef unsigned int CARD32;
+# else
+typedef unsigned long long CARD64;
+typedef unsigned long CARD32;
+# endif
+typedef unsigned short CARD16;
+typedef unsigned char CARD8;
+
+typedef CARD32 BITS32;
+typedef CARD16 BITS16;
+
+typedef CARD8 BYTE;
+typedef CARD8 BOOL;
+
+/*
+ * was definitions for sign-extending bitfields on architectures without
+ * native types smaller than 64-bit, now just backwards compatibility
+ */
+# define cvtINT8toInt(val) (val)
+# define cvtINT16toInt(val) (val)
+# define cvtINT32toInt(val) (val)
+# define cvtINT8toShort(val) (val)
+# define cvtINT16toShort(val) (val)
+# define cvtINT32toShort(val) (val)
+# define cvtINT8toLong(val) (val)
+# define cvtINT16toLong(val) (val)
+# define cvtINT32toLong(val) (val)
+
+/*
+ * this version should leave result of type (t *), but that should only be
+ * used when not in MUSTCOPY
+ */
+# define NEXTPTR(p,t) (((t *)(p)) + 1)
+
+#endif /* XMD_H */
diff --git a/Xos.h b/Xos.h
new file mode 100644
index 0000000..28dfc67
--- /dev/null
+++ b/Xos.h
@@ -0,0 +1,148 @@
+/*
+ *
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * The X Window System is a Trademark of The Open Group.
+ *
+ */
+
+/* This is a collection of things to try and minimize system dependencies
+ * in a "significant" number of source files.
+ */
+
+#ifndef _XOS_H_
+# define _XOS_H_
+
+# include <X11/Xosdefs.h>
+
+/*
+ * Get major data types (esp. caddr_t)
+ */
+
+# include <sys/types.h>
+
+# if defined(__SCO__) || defined(__UNIXWARE__)
+# include <stdint.h>
+# endif
+
+
+/*
+ * Just about everyone needs the strings routines. We provide both forms here,
+ * index/rindex and strchr/strrchr, so any systems that don't provide them all
+ * need to have #defines here.
+ *
+ * These macros are defined this way, rather than, e.g.:
+ * #defined index(s,c) strchr(s,c)
+ * because someone might be using them as function pointers, and such
+ * a change would break compatibility for anyone who's relying on them
+ * being the way they currently are. So we're stuck with them this way,
+ * which can be really inconvenient. :-(
+ */
+
+# include <string.h>
+# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__)
+# include <strings.h>
+# else
+# ifndef index
+# define index(s,c) (strchr((s),(c)))
+# endif
+# ifndef rindex
+# define rindex(s,c) (strrchr((s),(c)))
+# endif
+# endif
+
+/*
+ * Get open(2) constants
+ */
+# if defined(X_NOT_POSIX)
+# include <fcntl.h>
+# if defined(USL) || defined(__i386__) && (defined(SYSV) || defined(SVR4))
+# include <unistd.h>
+# endif
+# ifdef WIN32
+# include <X11/Xw32defs.h>
+# else
+# include <sys/file.h>
+# endif
+# else /* X_NOT_POSIX */
+# include <fcntl.h>
+# include <unistd.h>
+# endif /* X_NOT_POSIX else */
+
+/*
+ * Get struct timeval and struct tm
+ */
+
+# if defined(_POSIX_SOURCE) && defined(SVR4)
+/* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */
+# undef _POSIX_SOURCE
+# include <sys/time.h>
+# define _POSIX_SOURCE
+# elif defined(WIN32)
+# include <time.h>
+# if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL)
+struct timeval {
+ long tv_sec; /* seconds */
+ long tv_usec; /* and microseconds */
+};
+# define _TIMEVAL_DEFINED
+# endif
+# include <sys/timeb.h>
+# define gettimeofday(t) \
+{ \
+ struct _timeb _gtodtmp; \
+ _ftime (&_gtodtmp); \
+ (t)->tv_sec = _gtodtmp.time; \
+ (t)->tv_usec = _gtodtmp.millitm * 1000; \
+}
+# else
+# include <sys/time.h>
+# include <time.h>
+# endif /* defined(_POSIX_SOURCE) && defined(SVR4) */
+
+/* define X_GETTIMEOFDAY macro, a portable gettimeofday() */
+# if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
+# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
+# else
+# if defined(SVR4) || defined(__SVR4) || defined(WIN32)
+# define X_GETTIMEOFDAY(t) gettimeofday(t)
+# else
+# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
+# endif
+# endif /* XPG4 else */
+
+
+# ifdef __GNU__
+# define PATH_MAX 4096
+# define MAXPATHLEN 4096
+# define OPEN_MAX 256 /* We define a reasonable limit. */
+# endif
+
+/* use POSIX name for signal */
+# if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD)
+# define SIGCHLD SIGCLD
+# endif
+
+# include <X11/Xarch.h>
+
+#endif /* _XOS_H_ */
diff --git a/Xos_r.h b/Xos_r.h
new file mode 100644
index 0000000..f963b64
--- /dev/null
+++ b/Xos_r.h
@@ -0,0 +1,1095 @@
+/*
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+/*
+ * Various and sundry Thread-Safe functions used by X11, Motif, and CDE.
+ *
+ * Use this file in MT-safe code where you would have included
+ * <dirent.h> for readdir()
+ * <grp.h> for getgrgid() or getgrnam()
+ * <netdb.h> for gethostbyname(), gethostbyaddr(), or getservbyname()
+ * <pwd.h> for getpwnam() or getpwuid()
+ * <string.h> for strtok()
+ * <time.h> for asctime(), ctime(), localtime(), or gmtime()
+ * <unistd.h> for getlogin() or ttyname()
+ * or their thread-safe analogs.
+ *
+ * If you are on a platform that defines XTHREADS but does not have
+ * MT-safe system API (e.g. UnixWare) you must define _Xos_processLock
+ * and _Xos_processUnlock macros before including this header.
+ *
+ * For convenience XOS_USE_XLIB_LOCKING or XOS_USE_XT_LOCKING may be defined
+ * to obtain either Xlib-only or Xt-based versions of these macros. These
+ * macros won't result in truly thread-safe calls, but they are better than
+ * nothing. If you do not want locking in this situation define
+ * XOS_USE_NO_LOCKING.
+ *
+ * NOTE: On systems lacking appropriate _r functions Gethostbyname(),
+ * Gethostbyaddr(), and Getservbyname() do NOT copy the host or
+ * protocol lists!
+ *
+ * NOTE: On systems lacking appropriate _r functions Getgrgid() and
+ * Getgrnam() do NOT copy the list of group members!
+ *
+ * This header is nominally intended to simplify porting X11, Motif, and
+ * CDE; it may be useful to other people too. The structure below is
+ * complicated, mostly because P1003.1c (the IEEE POSIX Threads spec)
+ * went through lots of drafts, and some vendors shipped systems based
+ * on draft API that were changed later. Unfortunately POSIX did not
+ * provide a feature-test macro for distinguishing each of the drafts.
+ */
+
+/*
+ * This header has several parts. Search for "Effective prototypes"
+ * to locate the beginning of a section.
+ */
+
+/* This header can be included multiple times with different defines! */
+#ifndef _XOS_R_H_
+# define _XOS_R_H_
+
+# include <X11/Xos.h>
+# include <X11/Xfuncs.h>
+
+# ifndef X_NOT_POSIX
+# ifdef _POSIX_SOURCE
+# include <limits.h>
+# else
+# define _POSIX_SOURCE
+# include <limits.h>
+# undef _POSIX_SOURCE
+# endif
+# ifndef LINE_MAX
+# define X_LINE_MAX 2048
+# else
+# define X_LINE_MAX LINE_MAX
+# endif
+# endif
+#endif /* _XOS_R_H */
+
+#ifndef WIN32
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+# if defined(XOS_USE_XLIB_LOCKING)
+# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */
+typedef struct _LockInfoRec *LockInfoPtr;
+extern LockInfoPtr _Xglobal_lock;
+# endif
+# ifndef _Xos_isThreadInitialized
+# define _Xos_isThreadInitialized (_Xglobal_lock)
+# endif
+# if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */
+# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */
+extern void (*_XLockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */, char * /* file */, int /* line */
+# endif
+);
+extern void (*_XUnlockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */, char * /* file */, int /* line */
+# endif
+);
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock \
+ (_XLockMutex_fn ? (*_XLockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0)
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock \
+ (_XUnlockMutex_fn ? (*_XUnlockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0)
+# endif
+# else
+# ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */
+# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */
+extern void (*_XLockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+# endif
+);
+extern void (*_XUnlockMutex_fn)(
+# if NeedFunctionPrototypes
+ LockInfoPtr /* lock */
+# endif
+);
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock \
+ (_XLockMutex_fn ? ((*_XLockMutex_fn)(_Xglobal_lock), 0) : 0)
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock \
+ (_XUnlockMutex_fn ? ((*_XUnlockMutex_fn)(_Xglobal_lock), 0) : 0)
+# endif
+# endif
+# elif defined(XOS_USE_XT_LOCKING)
+# ifndef _XtThreadsI_h
+extern void (*_XtProcessLock)(void);
+# endif
+# ifndef _XtintrinsicP_h
+# include <X11/Xfuncproto.h> /* for NeedFunctionPrototypes */
+extern void XtProcessLock(
+# if NeedFunctionPrototypes
+ void
+# endif
+);
+extern void XtProcessUnlock(
+# if NeedFunctionPrototypes
+ void
+# endif
+);
+# endif
+# ifndef _Xos_isThreadInitialized
+# define _Xos_isThreadInitialized _XtProcessLock
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock XtProcessLock()
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock XtProcessUnlock()
+# endif
+# elif defined(XOS_USE_NO_LOCKING)
+# ifndef _Xos_isThreadInitialized
+# define _Xos_isThreadInitialized 0
+# endif
+# ifndef _Xos_processLock
+# define _Xos_processLock 0
+# endif
+# ifndef _Xos_processUnlock
+# define _Xos_processUnlock 0
+# endif
+# endif
+
+#endif /* !defined WIN32 */
+
+/*
+ * Solaris defines the POSIX thread-safe feature test macro, but
+ * uses the older SVR4 thread-safe functions unless the POSIX ones
+ * are specifically requested. Fix the feature test macro.
+ */
+#if defined(__sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \
+ (_POSIX_C_SOURCE - 0 < 199506L) && !defined(_POSIX_PTHREAD_SEMANTICS)
+# undef _POSIX_THREAD_SAFE_FUNCTIONS
+#endif
+
+/***** <pwd.h> wrappers *****/
+
+/*
+ * Effective prototypes for <pwd.h> wrappers:
+ *
+ * #define X_INCLUDE_PWD_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgetpwparams;
+ *
+ * struct passwd* _XGetpwnam(const char *name, _Xgetpwparams);
+ * struct passwd* _XGetpwuid(uid_t uid, _Xgetpwparams);
+ */
+
+#if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H)
+# include <pwd.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_PWDAPI)
+# define XOS_USE_MTSAFE_PWDAPI 1
+# endif
+#endif
+
+#undef X_NEEDS_PWPARAMS
+#if !defined(X_INCLUDE_PWD_H) || defined(_XOS_INCLUDED_PWD_H)
+/* Do nothing */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+# if defined(X_NOT_POSIX) && !defined(__i386__) && !defined(SYSV)
+extern struct passwd *getpwuid(), *getpwnam();
+# endif
+typedef int _Xgetpwparams; /* dummy */
+# define _XGetpwuid(u,p) getpwuid((u))
+# define _XGetpwnam(u,p) getpwnam((u))
+
+#elif !defined(XOS_USE_MTSAFE_PWDAPI) || defined(XNO_MTSAFE_PWDAPI)
+/* UnixWare 2.0, or other systems with thread support but no _r API. */
+# define X_NEEDS_PWPARAMS
+typedef struct {
+ struct passwd pws;
+ char pwbuf[1024];
+ struct passwd* pwp;
+ size_t len;
+} _Xgetpwparams;
+
+/*
+ * NetBSD and FreeBSD, at least, are missing several of the unixware passwd
+ * fields.
+ */
+
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
+ defined(__APPLE__) || defined(__DragonFly__)
+static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
+{
+ memcpy(&(p).pws, (p).pwp, sizeof(struct passwd));
+
+ (p).pws.pw_name = (p).pwbuf;
+ (p).len = strlen((p).pwp->pw_name);
+ strcpy((p).pws.pw_name, (p).pwp->pw_name);
+
+ (p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_passwd);
+ strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd);
+
+ (p).pws.pw_class = (p).pws.pw_passwd + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_class);
+ strcpy((p).pws.pw_class, (p).pwp->pw_class);
+
+ (p).pws.pw_gecos = (p).pws.pw_class + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_gecos);
+ strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos);
+
+ (p).pws.pw_dir = (p).pws.pw_gecos + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_dir);
+ strcpy((p).pws.pw_dir, (p).pwp->pw_dir);
+
+ (p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1;
+ (p).len = strlen((p).pwp->pw_shell);
+ strcpy((p).pws.pw_shell, (p).pwp->pw_shell);
+
+ (p).pwp = &(p).pws;
+}
+
+#else
+# define _Xpw_copyPasswd(p) \
+ (memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)), \
+ ((p).pws.pw_name = (p).pwbuf), \
+ ((p).len = strlen((p).pwp->pw_name)), \
+ strcpy((p).pws.pw_name, (p).pwp->pw_name), \
+ ((p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_passwd)), \
+ strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd), \
+ ((p).pws.pw_age = (p).pws.pw_passwd + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_age)), \
+ strcpy((p).pws.pw_age, (p).pwp->pw_age), \
+ ((p).pws.pw_comment = (p).pws.pw_age + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_comment)), \
+ strcpy((p).pws.pw_comment, (p).pwp->pw_comment), \
+ ((p).pws.pw_gecos = (p).pws.pw_comment + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_gecos)), \
+ strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos), \
+ ((p).pws.pw_dir = (p).pws.pw_comment + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_dir)), \
+ strcpy((p).pws.pw_dir, (p).pwp->pw_dir), \
+ ((p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1), \
+ ((p).len = strlen((p).pwp->pw_shell)), \
+ strcpy((p).pws.pw_shell, (p).pwp->pw_shell), \
+ ((p).pwp = &(p).pws), \
+ 0 )
+#endif
+# define _XGetpwuid(u,p) \
+( (_Xos_processLock), \
+ (((p).pwp = getpwuid((u))) ? _Xpw_copyPasswd(p), 0 : 0), \
+ (_Xos_processUnlock), \
+ (p).pwp )
+# define _XGetpwnam(u,p) \
+( (_Xos_processLock), \
+ (((p).pwp = getpwnam((u))) ? _Xpw_copyPasswd(p), 0 : 0), \
+ (_Xos_processUnlock), \
+ (p).pwp )
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__)
+# define X_NEEDS_PWPARAMS
+typedef struct {
+ struct passwd pws;
+ char pwbuf[X_LINE_MAX];
+} _Xgetpwparams;
+# if defined(_POSIX_REENTRANT_FUNCTIONS) || !defined(SVR4)
+# define _XGetpwuid(u,p) \
+((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)
+# define _XGetpwnam(u,p) \
+((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws)
+# else /* SVR4 */
+# define _XGetpwuid(u,p) \
+((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws)
+# define _XGetpwnam(u,p) \
+((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws)
+# endif /* SVR4 */
+
+#else /* _POSIX_THREAD_SAFE_FUNCTIONS */
+# define X_NEEDS_PWPARAMS
+typedef struct {
+ struct passwd pws;
+ char pwbuf[X_LINE_MAX];
+ struct passwd* pwp;
+} _Xgetpwparams;
+typedef int _Xgetpwret;
+# define _XGetpwuid(u,p) \
+((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \
+ (p).pwp : NULL)
+# define _XGetpwnam(u,p) \
+((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \
+ (p).pwp : NULL)
+#endif /* X_INCLUDE_PWD_H */
+
+#if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H)
+# define _XOS_INCLUDED_PWD_H
+#endif
+
+
+/***** <netdb.h> wrappers *****/
+
+/*
+ * Effective prototypes for <netdb.h> wrappers:
+ *
+ * NOTE: On systems lacking the appropriate _r functions Gethostbyname(),
+ * Gethostbyaddr(), and Getservbyname() do NOT copy the host or
+ * protocol lists!
+ *
+ * #define X_INCLUDE_NETDB_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgethostbynameparams;
+ * typedef ... _Xgetservbynameparams;
+ *
+ * struct hostent* _XGethostbyname(const char* name,_Xgethostbynameparams);
+ * struct hostent* _XGethostbyaddr(const char* addr, int len, int type,
+ * _Xgethostbynameparams);
+ * struct servent* _XGetservbyname(const char* name, const char* proto,
+ * _Xgetservbynameparams);
+ */
+
+#undef XTHREADS_NEEDS_BYNAMEPARAMS
+#if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H) \
+ && !defined(WIN32)
+# include <netdb.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_NETDBAPI)
+# define XOS_USE_MTSAFE_NETDBAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_NETDB_H) || defined(_XOS_INCLUDED_NETDB_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xgethostbynameparams; /* dummy */
+typedef int _Xgetservbynameparams; /* dummy */
+# define _XGethostbyname(h,hp) gethostbyname((h))
+# define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t))
+# define _XGetservbyname(s,p,sp) getservbyname((s),(p))
+
+#elif !defined(XOS_USE_MTSAFE_NETDBAPI) || defined(XNO_MTSAFE_NETDBAPI)
+/* WARNING: The h_addr_list and s_aliases values are *not* copied! */
+
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/param.h>
+#endif
+
+typedef struct {
+ struct hostent hent;
+ char h_name[MAXHOSTNAMELEN];
+ struct hostent *hptr;
+} _Xgethostbynameparams;
+typedef struct {
+ struct servent sent;
+ char s_name[255];
+ char s_proto[255];
+ struct servent *sptr;
+} _Xgetservbynameparams;
+
+# define XTHREADS_NEEDS_BYNAMEPARAMS
+
+# define _Xg_copyHostent(hp) \
+ (memcpy(&(hp).hent, (hp).hptr, sizeof(struct hostent)), \
+ strcpy((hp).h_name, (hp).hptr->h_name), \
+ ((hp).hent.h_name = (hp).h_name), \
+ ((hp).hptr = &(hp).hent), \
+ 0 )
+# define _Xg_copyServent(sp) \
+ (memcpy(&(sp).sent, (sp).sptr, sizeof(struct servent)), \
+ strcpy((sp).s_name, (sp).sptr->s_name), \
+ ((sp).sent.s_name = (sp).s_name), \
+ strcpy((sp).s_proto, (sp).sptr->s_proto), \
+ ((sp).sent.s_proto = (sp).s_proto), \
+ ((sp).sptr = &(sp).sent), \
+ 0 )
+# define _XGethostbyname(h,hp) \
+ ((_Xos_processLock), \
+ (((hp).hptr = gethostbyname((h))) ? _Xg_copyHostent(hp) : 0), \
+ (_Xos_processUnlock), \
+ (hp).hptr )
+# define _XGethostbyaddr(a,al,t,hp) \
+ ((_Xos_processLock), \
+ (((hp).hptr = gethostbyaddr((a),(al),(t))) ? _Xg_copyHostent(hp) : 0), \
+ (_Xos_processUnlock), \
+ (hp).hptr )
+# define _XGetservbyname(s,p,sp) \
+ ((_Xos_processLock), \
+ (((sp).sptr = getservbyname((s),(p))) ? _Xg_copyServent(sp) : 0), \
+ (_Xos_processUnlock), \
+ (sp).sptr )
+
+#elif defined(XUSE_NETDB_R_API)
+/*
+ * POSIX does not specify _r equivalents for <netdb.h> API, but some
+ * vendors provide them anyway. Use them only when explicitly asked.
+ */
+# ifdef _POSIX_REENTRANT_FUNCTIONS
+# ifndef _POSIX_THREAD_SAFE_FUNCTIONS
+# endif
+# endif
+# ifdef _POSIX_THREAD_SAFE_FUNCTIONS
+# define X_POSIX_THREAD_SAFE_FUNCTIONS 1
+# endif
+
+# define XTHREADS_NEEDS_BYNAMEPARAMS
+
+# ifndef X_POSIX_THREAD_SAFE_FUNCTIONS
+typedef struct {
+ struct hostent hent;
+ char hbuf[X_LINE_MAX];
+ int herr;
+} _Xgethostbynameparams;
+typedef struct {
+ struct servent sent;
+ char sbuf[X_LINE_MAX];
+} _Xgetservbynameparams;
+# define _XGethostbyname(h,hp) \
+ gethostbyname_r((h),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr)
+# define _XGethostbyaddr(a,al,t,hp) \
+ gethostbyaddr_r((a),(al),(t),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr)
+# define _XGetservbyname(s,p,sp) \
+ getservbyname_r((s),(p),&(sp).sent,(sp).sbuf,sizeof((sp).sbuf))
+# else
+typedef struct {
+ struct hostent hent;
+ struct hostent_data hdata;
+} _Xgethostbynameparams;
+typedef struct {
+ struct servent sent;
+ struct servent_data sdata;
+} _Xgetservbynameparams;
+# define _XGethostbyname(h,hp) \
+ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \
+ ((gethostbyname_r((h),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))
+# define _XGethostbyaddr(a,al,t,hp) \
+ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \
+ ((gethostbyaddr_r((a),(al),(t),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))
+# define _XGetservbyname(s,p,sp) \
+ (bzero((char*)&(sp).sdata,sizeof((sp).sdata)), \
+ ((getservbyname_r((s),(p),&(sp).sent,&(sp).sdata) == -1) ? NULL : &(sp).sent) )
+# endif
+# ifdef X_POSIX_THREAD_SAFE_FUNCTIONS
+# undef X_POSIX_THREAD_SAFE_FUNCTIONS
+# endif
+
+#else
+/* The regular API is assumed to be MT-safe under POSIX. */
+typedef int _Xgethostbynameparams; /* dummy */
+typedef int _Xgetservbynameparams; /* dummy */
+# define _XGethostbyname(h,hp) gethostbyname((h))
+# define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t))
+# define _XGetservbyname(s,p,sp) getservbyname((s),(p))
+#endif /* X_INCLUDE_NETDB_H */
+
+#if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H)
+# define _XOS_INCLUDED_NETDB_H
+#endif
+
+
+/***** <dirent.h> wrappers *****/
+
+/*
+ * Effective prototypes for <dirent.h> wrappers:
+ *
+ * #define X_INCLUDE_DIRENT_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xreaddirparams;
+ *
+ * struct dirent *_XReaddir(DIR *dir_pointer, _Xreaddirparams);
+ */
+
+#if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H)
+# include <sys/types.h>
+# if !defined(X_NOT_POSIX) || defined(SYSV)
+# include <dirent.h>
+# else
+# include <sys/dir.h>
+# ifndef dirent
+# define dirent direct
+# endif
+# endif
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_DIRENTAPI)
+# define XOS_USE_MTSAFE_DIRENTAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_DIRENT_H) || defined(_XOS_INCLUDED_DIRENT_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xreaddirparams; /* dummy */
+# define _XReaddir(d,p) readdir(d)
+
+#elif !defined(XOS_USE_MTSAFE_DIRENTAPI) || defined(XNO_MTSAFE_DIRENTAPI)
+/* Systems with thread support but no _r API. */
+typedef struct {
+ struct dirent *result;
+ struct dirent dir_entry;
+# ifdef _POSIX_PATH_MAX
+ char buf[_POSIX_PATH_MAX];
+# elif defined(NAME_MAX)
+ char buf[NAME_MAX];
+# else
+ char buf[255];
+# endif
+} _Xreaddirparams;
+
+# define _XReaddir(d,p) \
+ ( (_Xos_processLock), \
+ (((p).result = readdir((d))) ? \
+ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \
+ ((p).result = &(p).dir_entry), 0) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+
+#else
+typedef struct {
+ struct dirent *result;
+ struct dirent dir_entry;
+# ifdef _POSIX_PATH_MAX
+ char buf[_POSIX_PATH_MAX];
+# elif defined(NAME_MAX)
+ char buf[NAME_MAX];
+# else
+ char buf[255];
+# endif
+} _Xreaddirparams;
+
+# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(__APPLE__)
+/* POSIX final API, returns (int)0 on success. */
+# define _XReaddir(d,p) \
+ (readdir_r((d), &((p).dir_entry), &((p).result)) ? NULL : (p).result)
+# elif defined(_POSIX_REENTRANT_FUNCTIONS)
+/* POSIX draft API, returns (int)0 on success. */
+# define _XReaddir(d,p) \
+ (readdir_r((d),&((p).dir_entry)) ? NULL : &((p).dir_entry))
+# elif defined(SVR4)
+/* Pre-POSIX API, returns non-NULL on success. */
+# define _XReaddir(d,p) (readdir_r((d), &(p).dir_entry))
+# else
+/* We have no idea what is going on. Fake it all using process locks. */
+# define _XReaddir(d,p) \
+ ( (_Xos_processLock), \
+ (((p).result = readdir((d))) ? \
+ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \
+ ((p).result = &(p).dir_entry), 0) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# endif
+#endif /* X_INCLUDE_DIRENT_H */
+
+#if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H)
+# define _XOS_INCLUDED_DIRENT_H
+#endif
+
+
+/***** <unistd.h> wrappers *****/
+
+/*
+ * Effective prototypes for <unistd.h> wrappers:
+ *
+ * #define X_INCLUDE_UNISTD_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgetloginparams;
+ * typedef ... _Xttynameparams;
+ *
+ * char *_XGetlogin(_Xgetloginparams);
+ * char *_XTtyname(int, _Xttynameparams);
+ */
+
+#if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H)
+/* <unistd.h> already included by <X11/Xos.h> */
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_UNISTDAPI)
+# define XOS_USE_MTSAFE_UNISTDAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_UNISTD_H) || defined(_XOS_INCLUDED_UNISTD_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xgetloginparams; /* dummy */
+typedef int _Xttynameparams; /* dummy */
+# define _XGetlogin(p) getlogin()
+# define _XTtyname(f) ttyname((f))
+
+#elif !defined(XOS_USE_MTSAFE_UNISTDAPI) || defined(XNO_MTSAFE_UNISTDAPI)
+/* Systems with thread support but no _r API. */
+typedef struct {
+ char *result;
+# if defined(MAXLOGNAME)
+ char buf[MAXLOGNAME];
+# elif defined(LOGIN_NAME_MAX)
+ char buf[LOGIN_NAME_MAX];
+# else
+ char buf[64];
+# endif
+} _Xgetloginparams;
+typedef struct {
+ char *result;
+# ifdef TTY_NAME_MAX
+ char buf[TTY_NAME_MAX];
+# elif defined(_POSIX_TTY_NAME_MAX)
+ char buf[_POSIX_TTY_NAME_MAX];
+# elif defined(_POSIX_PATH_MAX)
+ char buf[_POSIX_PATH_MAX];
+# else
+ char buf[256];
+# endif
+} _Xttynameparams;
+
+# define _XGetlogin(p) \
+ ( (_Xos_processLock), \
+ (((p).result = getlogin()) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), \
+ ((p).buf[sizeof((p).buf)-1] = '\0'), \
+ ((p).result = (p).buf), 0) : 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+#define _XTtyname(f,p) \
+ ( (_Xos_processLock), \
+ (((p).result = ttyname(f)) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), \
+ ((p).buf[sizeof((p).buf)-1] = '\0'), \
+ ((p).result = (p).buf), 0) : 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+
+#elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_POSIX_REENTRANT_FUNCTIONS)
+/* POSIX API.
+ *
+ * extern int getlogin_r(char *, size_t);
+ * extern int ttyname_r(int, char *, size_t);
+ */
+typedef struct {
+# if defined(MAXLOGNAME)
+ char buf[MAXLOGNAME];
+# elif defined(LOGIN_NAME_MAX)
+ char buf[LOGIN_NAME_MAX];
+# else
+ char buf[64];
+# endif
+} _Xgetloginparams;
+typedef struct {
+# ifdef TTY_NAME_MAX
+ char buf[TTY_NAME_MAX];
+# elif defined(_POSIX_TTY_NAME_MAX)
+ char buf[_POSIX_TTY_NAME_MAX];
+# elif defined(_POSIX_PATH_MAX)
+ char buf[_POSIX_PATH_MAX];
+# else
+ char buf[256];
+# endif
+} _Xttynameparams;
+
+# define _XGetlogin(p) (getlogin_r((p).buf, sizeof((p).buf)) ? NULL : (p).buf)
+# define _XTtyname(f,p) \
+ (ttyname_r((f), (p).buf, sizeof((p).buf)) ? NULL : (p).buf)
+
+#else
+/* Pre-POSIX API.
+ *
+ * extern char *getlogin_r(char *, size_t);
+ * extern char *ttyname_r(int, char *, size_t);
+ */
+typedef struct {
+# if defined(MAXLOGNAME)
+ char buf[MAXLOGNAME];
+# elif defined(LOGIN_NAME_MAX)
+ char buf[LOGIN_NAME_MAX];
+# else
+ char buf[64];
+# endif
+} _Xgetloginparams;
+typedef struct {
+# ifdef TTY_NAME_MAX
+ char buf[TTY_NAME_MAX];
+# elif defined(_POSIX_TTY_NAME_MAX)
+ char buf[_POSIX_TTY_NAME_MAX];
+# elif defined(_POSIX_PATH_MAX)
+ char buf[_POSIX_PATH_MAX];
+# else
+ char buf[256];
+# endif
+} _Xttynameparams;
+
+# define _XGetlogin(p) getlogin_r((p).buf, sizeof((p).buf))
+# define _XTtyname(f,p) ttyname_r((f), (p).buf, sizeof((p).buf))
+#endif /* X_INCLUDE_UNISTD_H */
+
+#if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H)
+# define _XOS_INCLUDED_UNISTD_H
+#endif
+
+
+/***** <string.h> wrappers *****/
+
+/*
+ * Effective prototypes for <string.h> wrappers:
+ *
+ * #define X_INCLUDE_STRING_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xstrtokparams;
+ *
+ * char *_XStrtok(char *, const char*, _Xstrtokparams);
+ */
+
+#if defined(X_INCLUDE_STRING_H) && !defined(_XOS_INCLUDED_STRING_H)
+/* <string.h> has already been included by <X11/Xos.h> */
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_STRINGAPI)
+# define XOS_USE_MTSAFE_STRINGAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_STRING_H) || defined(_XOS_INCLUDED_STRING_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xstrtokparams; /* dummy */
+# define _XStrtok(s1,s2,p) \
+ ( p = 0, (void)p, strtok((s1),(s2)) )
+
+#elif !defined(XOS_USE_MTSAFE_STRINGAPI) || defined(XNO_MTSAFE_STRINGAPI)
+/* Systems with thread support but no _r API. */
+typedef char *_Xstrtokparams;
+# define _XStrtok(s1,s2,p) \
+ ( (_Xos_processLock), \
+ ((p) = strtok((s1),(s2))), \
+ (_Xos_processUnlock), \
+ (p) )
+
+#else
+/* POSIX or pre-POSIX API. */
+typedef char * _Xstrtokparams;
+# define _XStrtok(s1,s2,p) strtok_r((s1),(s2),&(p))
+#endif /* X_INCLUDE_STRING_H */
+
+
+/***** <time.h> wrappers *****/
+
+/*
+ * Effective prototypes for <time.h> wrappers:
+ *
+ * #define X_INCLUDE_TIME_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xatimeparams;
+ * typedef ... _Xctimeparams;
+ * typedef ... _Xgtimeparams;
+ * typedef ... _Xltimeparams;
+ *
+ * char *_XAsctime(const struct tm *, _Xatimeparams);
+ * char *_XCtime(const time_t *, _Xctimeparams);
+ * struct tm *_XGmtime(const time_t *, _Xgtimeparams);
+ * struct tm *_XLocaltime(const time_t *, _Xltimeparams);
+ */
+
+#if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H)
+# include <time.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_TIMEAPI)
+# define XOS_USE_MTSAFE_TIMEAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_TIME_H) || defined(_XOS_INCLUDED_TIME_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xatimeparams; /* dummy */
+# define _XAsctime(t,p) asctime((t))
+typedef int _Xctimeparams; /* dummy */
+# define _XCtime(t,p) ctime((t))
+typedef int _Xgtimeparams; /* dummy */
+# define _XGmtime(t,p) gmtime((t))
+typedef int _Xltimeparams; /* dummy */
+# define _XLocaltime(t,p) localtime((t))
+
+#elif !defined(XOS_USE_MTSAFE_TIMEAPI) || defined(XNO_MTSAFE_TIMEAPI)
+/* Systems with thread support but no _r API. */
+typedef struct {
+# ifdef TIMELEN
+ char buf[TIMELEN];
+# else
+ char buf[26];
+# endif
+ char *result;
+} _Xctimeparams, _Xatimeparams;
+typedef struct {
+ struct tm buf;
+ struct tm *result;
+} _Xgtimeparams, _Xltimeparams;
+# define _XAsctime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = asctime((t))) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# define _XCtime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = ctime((t))) ? \
+ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# define _XGmtime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = gmtime(t)) ? \
+ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+# define _XLocaltime(t,p) \
+ ( (_Xos_processLock), \
+ (((p).result = localtime(t)) ? \
+ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \
+ 0), \
+ (_Xos_processUnlock), \
+ (p).result )
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(hpV4)
+/* Returns (int)0 on success.
+ *
+ * extern int asctime_r(const struct tm *timeptr, char *buffer, int buflen);
+ * extern int ctime_r(const time_t *timer, char *buffer, int buflen);
+ * extern int gmtime_r(const time_t *timer, struct tm *result);
+ * extern int localtime_r(const time_t *timer, struct tm *result);
+ */
+# ifdef TIMELEN
+typedef char _Xatimeparams[TIMELEN];
+typedef char _Xctimeparams[TIMELEN];
+# else
+typedef char _Xatimeparams[26];
+typedef char _Xctimeparams[26];
+# endif
+typedef struct tm _Xgtimeparams;
+typedef struct tm _Xltimeparams;
+# define _XAsctime(t,p) (asctime_r((t),(p),sizeof((p))) ? NULL : (p))
+# define _XCtime(t,p) (ctime_r((t),(p),sizeof((p))) ? NULL : (p))
+# define _XGmtime(t,p) (gmtime_r((t),&(p)) ? NULL : &(p))
+# define _XLocaltime(t,p) (localtime_r((t),&(p)) ? NULL : &(p))
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun)
+/* Returns NULL on failure. Solaris 2.5
+ *
+ * extern char *asctime_r(const struct tm *tm,char *buf, int buflen);
+ * extern char *ctime_r(const time_t *clock, char *buf, int buflen);
+ * extern struct tm *gmtime_r(const time_t *clock, struct tm *res);
+ * extern struct tm *localtime_r(const time_t *clock, struct tm *res);
+ */
+# ifdef TIMELEN
+typedef char _Xatimeparams[TIMELEN];
+typedef char _Xctimeparams[TIMELEN];
+# else
+typedef char _Xatimeparams[26];
+typedef char _Xctimeparams[26];
+# endif
+typedef struct tm _Xgtimeparams;
+typedef struct tm _Xltimeparams;
+# define _XAsctime(t,p) asctime_r((t),(p),sizeof((p)))
+# define _XCtime(t,p) ctime_r((t),(p),sizeof((p)))
+# define _XGmtime(t,p) gmtime_r((t),&(p))
+# define _XLocaltime(t,p) localtime_r((t),&(p))
+
+#else /* defined(_POSIX_THREAD_SAFE_FUNCTIONS) */
+/* POSIX final API.
+ * extern char *asctime_r(const struct tm *timeptr, char *buffer);
+ * extern char *ctime_r(const time_t *timer, char *buffer);
+ * extern struct tm *gmtime_r(const time_t *timer, struct tm *result);
+ * extern struct tm *localtime_r(const time_t *timer, struct tm *result);
+ */
+# ifdef TIMELEN
+typedef char _Xatimeparams[TIMELEN];
+typedef char _Xctimeparams[TIMELEN];
+# else
+typedef char _Xatimeparams[26];
+typedef char _Xctimeparams[26];
+# endif
+typedef struct tm _Xgtimeparams;
+typedef struct tm _Xltimeparams;
+# define _XAsctime(t,p) asctime_r((t),(p))
+# define _XCtime(t,p) ctime_r((t),(p))
+# define _XGmtime(t,p) gmtime_r((t),&(p))
+# define _XLocaltime(t,p) localtime_r((t),&(p))
+#endif /* X_INCLUDE_TIME_H */
+
+#if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H)
+# define _XOS_INCLUDED_TIME_H
+#endif
+
+
+/***** <grp.h> wrappers *****/
+
+/*
+ * Effective prototypes for <grp.h> wrappers:
+ *
+ * NOTE: On systems lacking appropriate _r functions Getgrgid() and
+ * Getgrnam() do NOT copy the list of group members!
+ *
+ * Remember that fgetgrent(), setgrent(), getgrent(), and endgrent()
+ * are not included in POSIX.
+ *
+ * #define X_INCLUDE_GRP_H
+ * #define XOS_USE_..._LOCKING
+ * #include <X11/Xos_r.h>
+ *
+ * typedef ... _Xgetgrparams;
+ *
+ * struct group *_XGetgrgid(gid_t, _Xgetgrparams);
+ * struct group *_XGetgrnam(const char *, _Xgetgrparams);
+ */
+
+#if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H)
+# include <grp.h>
+# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_GRPAPI)
+# define XOS_USE_MTSAFE_GRPAPI 1
+# endif
+#endif
+
+#if !defined(X_INCLUDE_GRP_H) || defined(_XOS_INCLUDED_GRP_H)
+/* Do nothing. */
+
+#elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API)
+/* Use regular, unsafe API. */
+typedef int _Xgetgrparams; /* dummy */
+#define _XGetgrgid(g,p) getgrgid((g))
+#define _XGetgrnam(n,p) getgrnam((n))
+
+#elif !defined(XOS_USE_MTSAFE_GRPAPI) || defined(XNO_MTSAFE_GRPAPI)
+/* Systems with thread support but no _r API. UnixWare 2.0. */
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+ struct group *pgrp;
+ size_t len;
+} _Xgetgrparams;
+#ifdef SVR4
+/* Copy the gr_passwd field too. */
+# define _Xgrp_copyGroup(p) \
+ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \
+ ((p).grp.gr_name = (p).buf), \
+ ((p).len = strlen((p).pgrp->gr_name)), \
+ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \
+ ((p).grp.gr_passwd = (p).grp.gr_name + (p).len + 1), \
+ ((p).pgrp = &(p).grp), \
+ 0 )
+#else
+# define _Xgrp_copyGroup(p) \
+ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \
+ ((p).grp.gr_name = (p).buf), \
+ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \
+ ((p).pgrp = &(p).grp), \
+ 0 )
+#endif
+#define _XGetgrgid(g,p) \
+ ( (_Xos_processLock), \
+ (((p).pgrp = getgrgid((g))) ? _Xgrp_copyGroup(p) : 0), \
+ (_Xos_processUnlock), \
+ (p).pgrp )
+#define _XGetgrnam(n,p) \
+ ( (_Xos_processLock), \
+ (((p).pgrp = getgrnam((n))) ? _Xgrp_copyGroup(p) : 0), \
+ (_Xos_processUnlock), \
+ (p).pgrp )
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun)
+/* Non-POSIX API. Solaris.
+ *
+ * extern struct group *getgrgid_r(gid_t, struct group *, char *, int);
+ * extern struct group *getgrnam_r(const char *, struct group *, char *, int);
+ */
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+} _Xgetgrparams;
+#define _XGetgrgid(g,p) getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf))
+#define _XGetgrnam(n,p) getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf))
+
+#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+/* Non-POSIX API.
+ * extern int getgrgid_r(gid_t, struct group *, char *, int);
+ * extern int getgrnam_r(const char *, struct group *, char *, int);
+ */
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+} _Xgetgrparams;
+#define _XGetgrgid(g,p) \
+ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp))
+#define _XGetgrnam(n,p) \
+ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp))
+
+#else
+/* POSIX final API.
+ *
+ * int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
+ * int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
+ */
+typedef struct {
+ struct group grp;
+ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
+ struct group *result;
+} _Xgetgrparams;
+
+#define _XGetgrgid(g,p) \
+ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \
+ NULL : (p).result))
+#define _XGetgrnam(n,p) \
+ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \
+ NULL : (p).result))
+#endif
+
+#if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H)
+# define _XOS_INCLUDED_GRP_H
+#endif
+
+
+#ifdef __cplusplus
+} /* Close scope of 'extern "C"' declaration which encloses file. */
+#endif
diff --git a/Xosdefs.h b/Xosdefs.h
new file mode 100644
index 0000000..33eaee4
--- /dev/null
+++ b/Xosdefs.h
@@ -0,0 +1,116 @@
+/*
+ * O/S-dependent (mis)feature macro definitions
+ *
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ */
+
+#ifndef _XOSDEFS_H_
+# define _XOSDEFS_H_
+
+/*
+ * X_NOT_POSIX means does not have POSIX header files. Lack of this
+ * symbol does NOT mean that the POSIX environment is the default.
+ * You may still have to define _POSIX_SOURCE to get it.
+ */
+
+
+# ifdef _SCO_DS
+# ifndef __SCO__
+# define __SCO__
+# endif
+# endif
+
+# ifdef __i386__
+# ifdef SYSV
+# if !defined(__SCO__) && \
+ !defined(__UNIXWARE__) && !defined(__sun)
+# if !defined(_POSIX_SOURCE)
+# define X_NOT_POSIX
+# endif
+# endif
+# endif
+# endif
+
+# ifdef __sun
+/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
+ * This check allows non-Imake configured programs to build correctly.
+ */
+# if defined(__SVR4) && !defined(SVR4)
+# define SVR4 1
+# endif
+# ifdef SVR4
+/* define this to whatever it needs to be */
+# define X_POSIX_C_SOURCE 199300L
+# endif
+# endif
+
+# ifdef WIN32
+# ifndef _POSIX_
+# define X_NOT_POSIX
+# endif
+# endif
+
+
+# ifdef __APPLE__
+# define NULL_NOT_ZERO
+
+/* Defining any of these will sanitize the namespace to JUST want is defined by
+ * that particular standard. If that happens, we don't get some expected
+ * prototypes, typedefs, etc (like fd_mask). We can define _DARWIN_C_SOURCE to
+ * loosen our belts a tad.
+ */
+# if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)
+# ifndef _DARWIN_C_SOURCE
+# define _DARWIN_C_SOURCE
+# endif
+# endif
+
+# endif
+
+# ifdef __GNU__
+# ifndef PATH_MAX
+# define PATH_MAX 4096
+# endif
+# ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+# endif
+# endif
+
+# if defined(__SCO__) || defined(__UNIXWARE__)
+# ifndef PATH_MAX
+# define PATH_MAX 1024
+# endif
+# ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+# endif
+# endif
+
+# if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \
+ || defined(__APPLE__) || defined(__DragonFly__)
+# ifndef CSRG_BASED
+# define CSRG_BASED
+# endif
+# endif
+
+#endif /* _XOSDEFS_H_ */
+
diff --git a/Xpoll.h.in b/Xpoll.h.in
new file mode 100644
index 0000000..9f127e1
--- /dev/null
+++ b/Xpoll.h.in
@@ -0,0 +1,230 @@
+/*
+
+Copyright 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+/*
+ * Copyright © 2005 Daniel Stone
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Daniel Stone not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. Daniel Stone makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * DANIEL STONE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DANIEL STONE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+
+#ifndef _XPOLL_H_
+#define _XPOLL_H_
+
+#if !defined(WIN32) || defined(__CYGWIN__)
+
+#ifndef USE_POLL
+
+#include <X11/Xos.h>
+
+#include <sys/select.h> /* Get the FD_* macros. */
+
+#include <X11/Xmd.h>
+
+#ifdef CSRG_BASED
+#include <sys/param.h>
+# if BSD < 199103
+typedef long fd_mask;
+# endif
+#endif
+
+#if defined(FD_SETSIZE) && FD_SETSIZE < 512
+# define XFD_SETSIZE FD_SETSIZE
+#else
+# define XFD_SETSIZE 512
+# ifndef FD_SETSIZE
+# define FD_SETSIZE XFD_SETSIZE
+# endif
+#endif
+
+#ifndef NBBY
+#define NBBY 8 /* number of bits in a byte */
+#endif
+
+#ifndef NFDBITS
+#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
+#endif
+
+#ifndef howmany
+#define howmany(x,y) (((x)+((y)-1))/(y))
+#endif
+
+#if defined(BSD) && BSD < 198911
+typedef struct fd_set {
+ fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
+} fd_set;
+#endif
+
+# define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
+
+#define __X_FDS_BITS @USE_FDS_BITS@
+
+#ifndef __FDS_BITS
+# define __FDS_BITS(p) ((p)->__X_FDS_BITS)
+#endif
+
+#define __XFDS_BITS(p, n) (__FDS_BITS(p))[n]
+
+#ifndef FD_SET
+#define FD_SET(n, p) (__XFDS_BITS(p, ((n)/NFDBITS)) |= ((fd_mask)1 << ((n) % NFDBITS)))
+#endif
+#ifndef FD_CLR
+#define FD_CLR(n, p) (__XFDS_BITS((p), ((n)/NFDBITS)) &= ~((fd_mask)1 << ((n) % NFDBITS)))
+#endif
+#ifndef FD_ISSET
+#define FD_ISSET(n, p) ((__XFDS_BITS((p), ((n)/NFDBITS))) & ((fd_mask)1 << ((n) % NFDBITS)))
+#endif
+#ifndef FD_ZERO
+#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
+#endif
+
+/*
+ * The howmany(FD_SETSIZE, NFDBITS) computes the number of elements in the
+ * array. before accessing an element in the array we check it exists.
+ * If it does not exist then the compiler discards the code to access it.
+ */
+#define XFD_ANYSET(p) \
+ ((howmany(FD_SETSIZE, NFDBITS) > 0 && (__XFDS_BITS(p, 0))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 1 && (__XFDS_BITS(p, 1))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 2 && (__XFDS_BITS(p, 2))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 3 && (__XFDS_BITS(p, 3))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 4 && (__XFDS_BITS(p, 4))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 5 && (__XFDS_BITS(p, 5))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 6 && (__XFDS_BITS(p, 6))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 7 && (__XFDS_BITS(p, 7))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 8 && (__XFDS_BITS(p, 8))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 9 && (__XFDS_BITS(p, 9))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 10 && (__XFDS_BITS(p, 10))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 11 && (__XFDS_BITS(p, 11))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 12 && (__XFDS_BITS(p, 12))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 13 && (__XFDS_BITS(p, 13))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 14 && (__XFDS_BITS(p, 14))) || \
+ (howmany(FD_SETSIZE, NFDBITS) > 15 && (__XFDS_BITS(p, 15))))
+
+
+#define XFD_COPYSET(src,dst) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) = __XFDS_BITS((src), __i__); \
+ }
+#define XFD_ANDSET(dst,b1,b2) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) & (__XFDS_BITS((b2), __i__))); \
+ }
+#define XFD_ORSET(dst,b1,b2) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) | (__XFDS_BITS((b2), __i__))); \
+ }
+#define XFD_UNSET(dst,b1) { \
+ int __i__; \
+ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \
+ __XFDS_BITS((dst), __i__) &= ~(__XFDS_BITS((b1), __i__)); \
+ }
+
+#else /* USE_POLL */
+#include <sys/poll.h>
+#endif /* USE_POLL */
+
+#else /* WIN32 */
+
+#define XFD_SETSIZE 512
+#ifndef FD_SETSIZE
+#define FD_SETSIZE XFD_SETSIZE
+#endif
+#include <X11/Xwinsock.h>
+
+#define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t)
+
+#define XFD_SETCOUNT(p) (((fd_set FAR *)(p))->fd_count)
+#define XFD_FD(p,i) (((fd_set FAR *)(p))->fd_array[i])
+#define XFD_ANYSET(p) XFD_SETCOUNT(p)
+
+#define XFD_COPYSET(src,dst) { \
+ u_int __i; \
+ FD_ZERO(dst); \
+ for (__i = 0; __i < XFD_SETCOUNT(src) ; __i++) { \
+ XFD_FD(dst,__i) = XFD_FD(src,__i); \
+ } \
+ XFD_SETCOUNT(dst) = XFD_SETCOUNT(src); \
+}
+
+#define XFD_ANDSET(dst,b1,b2) { \
+ u_int __i; \
+ FD_ZERO(dst); \
+ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
+ if (FD_ISSET(XFD_FD(b1,__i), b2)) \
+ FD_SET(XFD_FD(b1,__i), dst); \
+ } \
+}
+
+#define XFD_ORSET(dst,b1,b2) { \
+ u_int __i; \
+ if (dst != b1) XFD_COPYSET(b1,dst); \
+ for (__i = 0; __i < XFD_SETCOUNT(b2) ; __i++) { \
+ if (!FD_ISSET(XFD_FD(b2,__i), dst)) \
+ FD_SET(XFD_FD(b2,__i), dst); \
+ } \
+}
+
+/* this one is really sub-optimal */
+#define XFD_UNSET(dst,b1) { \
+ u_int __i; \
+ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \
+ FD_CLR(XFD_FD(b1,__i), dst); \
+ } \
+}
+
+/* we have to pay the price of having an array here, unlike with bitmasks
+ calling twice FD_SET with the same fd is not transparent, so be careful */
+#undef FD_SET
+#define FD_SET(fd,set) do { \
+ if (XFD_SETCOUNT(set) < FD_SETSIZE && !FD_ISSET(fd,set)) \
+ XFD_FD(set,XFD_SETCOUNT(set)++)=(fd); \
+} while(0)
+
+#define getdtablesize() FD_SETSIZE
+
+#endif /* WIN32 */
+
+#endif /* _XPOLL_H_ */
diff --git a/Xproto.h b/Xproto.h
new file mode 100644
index 0000000..6cdea89
--- /dev/null
+++ b/Xproto.h
@@ -0,0 +1,2157 @@
+/* Definitions for the X window system used by server and c bindings */
+
+/*
+ * This packet-construction scheme makes the following assumptions:
+ *
+ * 1. The compiler is able
+ * to generate code which addresses one- and two-byte quantities.
+ * In the worst case, this would be done with bit-fields. If bit-fields
+ * are used it may be necessary to reorder the request fields in this file,
+ * depending on the order in which the machine assigns bit fields to
+ * machine words. There may also be a problem with sign extension,
+ * as K+R specify that bitfields are always unsigned.
+ *
+ * 2. 2- and 4-byte fields in packet structures must be ordered by hand
+ * such that they are naturally-aligned, so that no compiler will ever
+ * insert padding bytes.
+ *
+ * 3. All packets are hand-padded to a multiple of 4 bytes, for
+ * the same reason.
+ */
+
+#ifndef XPROTO_H
+#define XPROTO_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#include <X11/Xmd.h>
+#include <X11/Xprotostr.h>
+
+/*
+ * Define constants for the sizes of the network packets. The sz_ prefix is
+ * used instead of something more descriptive so that the symbols are no more
+ * than 32 characters in length (which causes problems for some compilers).
+ */
+#define sz_xSegment 8
+#define sz_xPoint 4
+#define sz_xRectangle 8
+#define sz_xArc 12
+#define sz_xConnClientPrefix 12
+#define sz_xConnSetupPrefix 8
+#define sz_xConnSetup 32
+#define sz_xPixmapFormat 8
+#define sz_xDepth 8
+#define sz_xVisualType 24
+#define sz_xWindowRoot 40
+#define sz_xTimecoord 8
+#define sz_xHostEntry 4
+#define sz_xCharInfo 12
+#define sz_xFontProp 8
+#define sz_xTextElt 2
+#define sz_xColorItem 12
+#define sz_xrgb 8
+#define sz_xGenericReply 32
+#define sz_xGetWindowAttributesReply 44
+#define sz_xGetGeometryReply 32
+#define sz_xQueryTreeReply 32
+#define sz_xInternAtomReply 32
+#define sz_xGetAtomNameReply 32
+#define sz_xGetPropertyReply 32
+#define sz_xListPropertiesReply 32
+#define sz_xGetSelectionOwnerReply 32
+#define sz_xGrabPointerReply 32
+#define sz_xQueryPointerReply 32
+#define sz_xGetMotionEventsReply 32
+#define sz_xTranslateCoordsReply 32
+#define sz_xGetInputFocusReply 32
+#define sz_xQueryKeymapReply 40
+#define sz_xQueryFontReply 60
+#define sz_xQueryTextExtentsReply 32
+#define sz_xListFontsReply 32
+#define sz_xGetFontPathReply 32
+#define sz_xGetImageReply 32
+#define sz_xListInstalledColormapsReply 32
+#define sz_xAllocColorReply 32
+#define sz_xAllocNamedColorReply 32
+#define sz_xAllocColorCellsReply 32
+#define sz_xAllocColorPlanesReply 32
+#define sz_xQueryColorsReply 32
+#define sz_xLookupColorReply 32
+#define sz_xQueryBestSizeReply 32
+#define sz_xQueryExtensionReply 32
+#define sz_xListExtensionsReply 32
+#define sz_xSetMappingReply 32
+#define sz_xGetKeyboardControlReply 52
+#define sz_xGetPointerControlReply 32
+#define sz_xGetScreenSaverReply 32
+#define sz_xListHostsReply 32
+#define sz_xSetModifierMappingReply 32
+#define sz_xError 32
+#define sz_xEvent 32
+#define sz_xKeymapEvent 32
+#define sz_xReq 4
+#define sz_xResourceReq 8
+#define sz_xCreateWindowReq 32
+#define sz_xChangeWindowAttributesReq 12
+#define sz_xChangeSaveSetReq 8
+#define sz_xReparentWindowReq 16
+#define sz_xConfigureWindowReq 12
+#define sz_xCirculateWindowReq 8
+#define sz_xInternAtomReq 8
+#define sz_xChangePropertyReq 24
+#define sz_xDeletePropertyReq 12
+#define sz_xGetPropertyReq 24
+#define sz_xSetSelectionOwnerReq 16
+#define sz_xConvertSelectionReq 24
+#define sz_xSendEventReq 44
+#define sz_xGrabPointerReq 24
+#define sz_xGrabButtonReq 24
+#define sz_xUngrabButtonReq 12
+#define sz_xChangeActivePointerGrabReq 16
+#define sz_xGrabKeyboardReq 16
+#define sz_xGrabKeyReq 16
+#define sz_xUngrabKeyReq 12
+#define sz_xAllowEventsReq 8
+#define sz_xGetMotionEventsReq 16
+#define sz_xTranslateCoordsReq 16
+#define sz_xWarpPointerReq 24
+#define sz_xSetInputFocusReq 12
+#define sz_xOpenFontReq 12
+#define sz_xQueryTextExtentsReq 8
+#define sz_xListFontsReq 8
+#define sz_xSetFontPathReq 8
+#define sz_xCreatePixmapReq 16
+#define sz_xCreateGCReq 16
+#define sz_xChangeGCReq 12
+#define sz_xCopyGCReq 16
+#define sz_xSetDashesReq 12
+#define sz_xSetClipRectanglesReq 12
+#define sz_xCopyAreaReq 28
+#define sz_xCopyPlaneReq 32
+#define sz_xPolyPointReq 12
+#define sz_xPolySegmentReq 12
+#define sz_xFillPolyReq 16
+#define sz_xPutImageReq 24
+#define sz_xGetImageReq 20
+#define sz_xPolyTextReq 16
+#define sz_xImageTextReq 16
+#define sz_xCreateColormapReq 16
+#define sz_xCopyColormapAndFreeReq 12
+#define sz_xAllocColorReq 16
+#define sz_xAllocNamedColorReq 12
+#define sz_xAllocColorCellsReq 12
+#define sz_xAllocColorPlanesReq 16
+#define sz_xFreeColorsReq 12
+#define sz_xStoreColorsReq 8
+#define sz_xStoreNamedColorReq 16
+#define sz_xQueryColorsReq 8
+#define sz_xLookupColorReq 12
+#define sz_xCreateCursorReq 32
+#define sz_xCreateGlyphCursorReq 32
+#define sz_xRecolorCursorReq 20
+#define sz_xQueryBestSizeReq 12
+#define sz_xQueryExtensionReq 8
+#define sz_xChangeKeyboardControlReq 8
+#define sz_xBellReq 4
+#define sz_xChangePointerControlReq 12
+#define sz_xSetScreenSaverReq 12
+#define sz_xChangeHostsReq 8
+#define sz_xListHostsReq 4
+#define sz_xChangeModeReq 4
+#define sz_xRotatePropertiesReq 12
+#define sz_xReply 32
+#define sz_xGrabKeyboardReply 32
+#define sz_xListFontsWithInfoReply 60
+#define sz_xSetPointerMappingReply 32
+#define sz_xGetKeyboardMappingReply 32
+#define sz_xGetPointerMappingReply 32
+#define sz_xGetModifierMappingReply 32
+#define sz_xListFontsWithInfoReq 8
+#define sz_xPolyLineReq 12
+#define sz_xPolyArcReq 12
+#define sz_xPolyRectangleReq 12
+#define sz_xPolyFillRectangleReq 12
+#define sz_xPolyFillArcReq 12
+#define sz_xPolyText8Req 16
+#define sz_xPolyText16Req 16
+#define sz_xImageText8Req 16
+#define sz_xImageText16Req 16
+#define sz_xSetPointerMappingReq 4
+#define sz_xForceScreenSaverReq 4
+#define sz_xSetCloseDownModeReq 4
+#define sz_xClearAreaReq 16
+#define sz_xSetAccessControlReq 4
+#define sz_xGetKeyboardMappingReq 8
+#define sz_xSetModifierMappingReq 4
+#define sz_xPropIconSize 24
+#define sz_xChangeKeyboardMappingReq 8
+
+
+/* For the purpose of the structure definitions in this file,
+we must redefine the following types in terms of Xmd.h's types, which may
+include bit fields. All of these are #undef'd at the end of this file,
+restoring the definitions in X.h. */
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+#define X_TCP_PORT 6000 /* add display number */
+
+#define xTrue 1
+#define xFalse 0
+
+
+typedef CARD16 KeyButMask;
+
+/*****************
+ Connection setup structures. See Chapter 8: Connection Setup
+ of the X Window System Protocol specification for details.
+*****************/
+
+/* Client initiates handshake with this data, followed by the strings
+ * for the auth protocol & data.
+ */
+typedef struct {
+ CARD8 byteOrder;
+ BYTE pad;
+ CARD16 majorVersion B16, minorVersion B16;
+ CARD16 nbytesAuthProto B16; /* Authorization protocol */
+ CARD16 nbytesAuthString B16; /* Authorization string */
+ CARD16 pad2 B16;
+} xConnClientPrefix;
+
+/* Server response to xConnClientPrefix.
+ *
+ * If success == Success, this is followed by xConnSetup and
+ * numRoots xWindowRoot structs.
+ *
+ * If success == Failure, this is followed by a reason string.
+ *
+ * The protocol also defines a case of success == Authenticate, but
+ * that doesn't seem to have ever been implemented by the X Consortium.
+ */
+typedef struct {
+ CARD8 success;
+ BYTE lengthReason; /*num bytes in string following if failure */
+ CARD16 majorVersion B16,
+ minorVersion B16;
+ CARD16 length B16; /* 1/4 additional bytes in setup info */
+} xConnSetupPrefix;
+
+
+typedef struct {
+ CARD32 release B32;
+ CARD32 ridBase B32,
+ ridMask B32;
+ CARD32 motionBufferSize B32;
+ CARD16 nbytesVendor B16; /* number of bytes in vendor string */
+ CARD16 maxRequestSize B16;
+ CARD8 numRoots; /* number of roots structs to follow */
+ CARD8 numFormats; /* number of pixmap formats */
+ CARD8 imageByteOrder; /* LSBFirst, MSBFirst */
+ CARD8 bitmapBitOrder; /* LeastSignificant, MostSign...*/
+ CARD8 bitmapScanlineUnit, /* 8, 16, 32 */
+ bitmapScanlinePad; /* 8, 16, 32 */
+ KeyCode minKeyCode, maxKeyCode;
+ CARD32 pad2 B32;
+} xConnSetup;
+
+typedef struct {
+ CARD8 depth;
+ CARD8 bitsPerPixel;
+ CARD8 scanLinePad;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+} xPixmapFormat;
+
+/* window root */
+
+typedef struct {
+ CARD8 depth;
+ CARD8 pad1;
+ CARD16 nVisuals B16; /* number of xVisualType structures following */
+ CARD32 pad2 B32;
+ } xDepth;
+
+typedef struct {
+ VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD8 bitsPerRGB;
+ CARD16 colormapEntries B16;
+ CARD32 redMask B32, greenMask B32, blueMask B32;
+ CARD32 pad B32;
+ } xVisualType;
+
+typedef struct {
+ Window windowId B32;
+ Colormap defaultColormap B32;
+ CARD32 whitePixel B32, blackPixel B32;
+ CARD32 currentInputMask B32;
+ CARD16 pixWidth B16, pixHeight B16;
+ CARD16 mmWidth B16, mmHeight B16;
+ CARD16 minInstalledMaps B16, maxInstalledMaps B16;
+ VisualID rootVisualID B32;
+ CARD8 backingStore;
+ BOOL saveUnders;
+ CARD8 rootDepth;
+ CARD8 nDepths; /* number of xDepth structures following */
+} xWindowRoot;
+
+
+/*****************************************************************
+ * Structure Defns
+ * Structures needed for replies
+ *****************************************************************/
+
+/* Used in GetMotionEvents */
+
+typedef struct {
+ CARD32 time B32;
+ INT16 x B16, y B16;
+} xTimecoord;
+
+typedef struct {
+ CARD8 family;
+ BYTE pad;
+ CARD16 length B16;
+} xHostEntry;
+
+typedef struct {
+ INT16 leftSideBearing B16,
+ rightSideBearing B16,
+ characterWidth B16,
+ ascent B16,
+ descent B16;
+ CARD16 attributes B16;
+} xCharInfo;
+
+typedef struct {
+ Atom name B32;
+ CARD32 value B32;
+} xFontProp;
+
+/*
+ * non-aligned big-endian font ID follows this struct
+ */
+typedef struct { /* followed by string */
+ CARD8 len; /* number of *characters* in string, or FontChange (255)
+ for font change, or 0 if just delta given */
+ INT8 delta;
+} xTextElt;
+
+
+typedef struct {
+ CARD32 pixel B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD8 flags; /* DoRed, DoGreen, DoBlue booleans */
+ CARD8 pad;
+} xColorItem;
+
+
+typedef struct {
+ CARD16 red B16, green B16, blue B16, pad B16;
+} xrgb;
+
+typedef CARD8 KEYCODE;
+
+
+/*****************
+ * XRep:
+ * meant to be 32 byte quantity
+ *****************/
+
+/* GenericReply is the common format of all replies. The "data" items
+ are specific to each individual reply type. */
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE data1; /* depends on reply type */
+ CARD16 sequenceNumber B16; /* of last request received by server */
+ CARD32 length B32; /* 4 byte quantities beyond size of GenericReply */
+ CARD32 data00 B32;
+ CARD32 data01 B32;
+ CARD32 data02 B32;
+ CARD32 data03 B32;
+ CARD32 data04 B32;
+ CARD32 data05 B32;
+ } xGenericReply;
+
+/* Individual reply formats. */
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 backingStore;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* NOT 0; this is an extra-large reply */
+ VisualID visualID B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ CARD8 bitGravity;
+ CARD8 winGravity;
+ CARD32 backingBitPlanes B32;
+ CARD32 backingPixel B32;
+ BOOL saveUnder;
+ BOOL mapInstalled;
+ CARD8 mapState;
+ BOOL override;
+ Colormap colormap B32;
+ CARD32 allEventMasks B32;
+ CARD32 yourEventMask B32;
+ CARD16 doNotPropagateMask B16;
+ CARD16 pad B16;
+ } xGetWindowAttributesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window root B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD16 borderWidth B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xGetGeometryReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window root B32, parent B32;
+ CARD16 nChildren B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xQueryTreeReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Atom atom B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xInternAtomReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* of additional bytes */
+ CARD16 nameLength B16; /* # of characters in name */
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetAtomNameReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 format;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* of additional bytes */
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32; /* # of 8, 16, or 32-bit entities in reply */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xGetPropertyReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nProperties B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListPropertiesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window owner B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetSelectionOwnerReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGrabPointerReply;
+
+typedef xGrabPointerReply xGrabKeyboardReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sameScreen;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window root B32, child B32;
+ INT16 rootX B16, rootY B16, winX B16, winY B16;
+ CARD16 mask B16;
+ CARD16 pad1 B16;
+ CARD32 pad B32;
+ } xQueryPointerReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 nEvents B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetMotionEventsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sameScreen;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window child B32;
+ INT16 dstX B16, dstY B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xTranslateCoordsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 revertTo;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ Window focus B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xGetInputFocusReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 2, NOT 0; this is an extra-large reply */
+ BYTE map[32];
+ } xQueryKeymapReply;
+
+/* Warning: this MUST match (up to component renaming) xListFontsWithInfoReply */
+typedef struct _xQueryFontReply {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* definitely > 0, even if "nCharInfos" is 0 */
+ xCharInfo minBounds;
+ CARD32 walign1 B32;
+ xCharInfo maxBounds;
+ CARD32 walign2 B32;
+ CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+ CARD16 defaultChar B16;
+ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
+ CARD8 drawDirection;
+ CARD8 minByte1, maxByte1;
+ BOOL allCharsExist;
+ INT16 fontAscent B16, fontDescent B16;
+ CARD32 nCharInfos B32; /* followed by this many xCharInfo structures */
+} xQueryFontReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 drawDirection;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ INT16 fontAscent B16, fontDescent B16;
+ INT16 overallAscent B16, overallDescent B16;
+ INT32 overallWidth B32, overallLeft B32, overallRight B32;
+ CARD32 pad B32;
+ } xQueryTextExtentsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nFonts B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListFontsReply;
+
+/* Warning: this MUST match (up to component renaming) xQueryFontReply */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nameLength; /* 0 indicates end-of-reply-sequence */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* definitely > 0, even if "nameLength" is 0 */
+ xCharInfo minBounds;
+ CARD32 walign1 B32;
+ xCharInfo maxBounds;
+ CARD32 walign2 B32;
+ CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
+ CARD16 defaultChar B16;
+ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
+ CARD8 drawDirection;
+ CARD8 minByte1, maxByte1;
+ BOOL allCharsExist;
+ INT16 fontAscent B16, fontDescent B16;
+ CARD32 nReplies B32; /* hint as to how many more replies might be coming */
+} xListFontsWithInfoReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPaths B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetFontPathReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ VisualID visual B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetImageReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nColormaps B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListInstalledColormapsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad2 B16;
+ CARD32 pixel B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xAllocColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pixel B32;
+ CARD16 exactRed B16, exactGreen B16, exactBlue B16;
+ CARD16 screenRed B16, screenGreen B16, screenBlue B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ } xAllocNamedColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPixels B16, nMasks B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xAllocColorCellsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nPixels B16;
+ CARD16 pad2 B16;
+ CARD32 redMask B32, greenMask B32, blueMask B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ } xAllocColorPlanesReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nColors B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryColorsReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 exactRed B16, exactGreen B16, exactBlue B16;
+ CARD16 screenRed B16, screenGreen B16, screenBlue B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xLookupColorReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 width B16, height B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryBestSizeReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ BOOL present;
+ CARD8 major_opcode;
+ CARD8 first_event;
+ CARD8 first_error;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xQueryExtensionReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nExtensions;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListExtensionsReply;
+
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 success;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xSetMappingReply;
+typedef xSetMappingReply xSetPointerMappingReply;
+typedef xSetMappingReply xSetModifierMappingReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nElts; /* how many elements does the map have */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xGetPointerMappingReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 keySymsPerKeyCode;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xGetKeyboardMappingReply;
+
+typedef struct {
+ BYTE type;
+ CARD8 numKeyPerModifier;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGetModifierMappingReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL globalAutoRepeat;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 5 */
+ CARD32 ledMask B32;
+ CARD8 keyClickPercent, bellPercent;
+ CARD16 bellPitch B16, bellDuration B16;
+ CARD16 pad B16;
+ BYTE map[32]; /* bit masks start here */
+ } xGetKeyboardControlReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 accelNumerator B16, accelDenominator B16;
+ CARD16 threshold B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetPointerControlReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD16 timeout B16, interval B16;
+ BOOL preferBlanking;
+ BOOL allowExposures;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ } xGetScreenSaverReply;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL enabled;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nHosts B16;
+ CARD16 pad1 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+ } xListHostsReply;
+
+
+
+
+/*****************************************************************
+ * Xerror
+ * All errors are 32 bytes
+ *****************************************************************/
+
+typedef struct {
+ BYTE type; /* X_Error */
+ BYTE errorCode;
+ CARD16 sequenceNumber B16; /* the nth request from this client */
+ CARD32 resourceID B32;
+ CARD16 minorCode B16;
+ CARD8 majorCode;
+ BYTE pad1;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xError;
+
+/*****************************************************************
+ * xEvent
+ * All events are 32 bytes
+ *****************************************************************/
+
+typedef struct _xEvent {
+ union {
+ struct {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ } u;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window root B32, event B32, child B32;
+ INT16 rootX B16, rootY B16, eventX B16, eventY B16;
+ KeyButMask state B16;
+ BOOL sameScreen;
+ BYTE pad1;
+ } keyButtonPointer;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window root B32, event B32, child B32;
+ INT16 rootX B16, rootY B16, eventX B16, eventY B16;
+ KeyButMask state B16;
+ BYTE mode; /* really XMode */
+ BYTE flags; /* sameScreen and focus booleans, packed together */
+#define ELFlagFocus (1<<0)
+#define ELFlagSameScreen (1<<1)
+ } enterLeave;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ BYTE mode; /* really XMode */
+ BYTE pad1, pad2, pad3;
+ } focus;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD16 x B16, y B16, width B16, height B16;
+ CARD16 count B16;
+ CARD16 pad2 B16;
+ } expose;
+ struct {
+ CARD32 pad00 B32;
+ Drawable drawable B32;
+ CARD16 x B16, y B16, width B16, height B16;
+ CARD16 minorEvent B16;
+ CARD16 count B16;
+ BYTE majorEvent;
+ BYTE pad1, pad2, pad3;
+ } graphicsExposure;
+ struct {
+ CARD32 pad00 B32;
+ Drawable drawable B32;
+ CARD16 minorEvent B16;
+ BYTE majorEvent;
+ BYTE bpad;
+ } noExposure;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD8 state;
+ BYTE pad1, pad2, pad3;
+ } visibility;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BOOL override;
+ BYTE bpad;
+ } createNotify;
+/*
+ * The event fields in the structures for DestroyNotify, UnmapNotify,
+ * MapNotify, ReparentNotify, ConfigureNotify, CirculateNotify, GravityNotify,
+ * must be at the same offset because server internal code is depending upon
+ * this to patch up the events before they are delivered.
+ * Also note that MapRequest, ConfigureRequest and CirculateRequest have
+ * the same offset for the event window.
+ */
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ } destroyNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ BOOL fromConfigure;
+ BYTE pad1, pad2, pad3;
+ } unmapNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ BOOL override;
+ BYTE pad1, pad2, pad3;
+ } mapNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32;
+ } mapRequest;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32, parent B32;
+ INT16 x B16, y B16;
+ BOOL override;
+ BYTE pad1, pad2, pad3;
+ } reparent;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32, aboveSibling B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ BOOL override;
+ BYTE bpad;
+ } configureNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window parent B32, window B32, sibling B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+ CARD16 valueMask B16;
+ CARD32 pad1 B32;
+ } configureRequest;
+ struct {
+ CARD32 pad00 B32;
+ Window event B32, window B32;
+ INT16 x B16, y B16;
+ CARD32 pad1 B32, pad2 B32, pad3 B32, pad4 B32;
+ } gravity;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ CARD16 width B16, height B16;
+ } resizeRequest;
+ struct {
+/* The event field in the circulate record is really the parent when this
+ is used as a CirculateRequest instead of a CirculateNotify */
+ CARD32 pad00 B32;
+ Window event B32, window B32, parent B32;
+ BYTE place; /* Top or Bottom */
+ BYTE pad1, pad2, pad3;
+ } circulate;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ Atom atom B32;
+ Time time B32;
+ BYTE state; /* NewValue or Deleted */
+ BYTE pad1;
+ CARD16 pad2 B16;
+ } property;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window window B32;
+ Atom atom B32;
+ } selectionClear;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window owner B32, requestor B32;
+ Atom selection B32, target B32, property B32;
+ } selectionRequest;
+ struct {
+ CARD32 pad00 B32;
+ Time time B32;
+ Window requestor B32;
+ Atom selection B32, target B32, property B32;
+ } selectionNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ Colormap colormap B32;
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_new;
+#else
+ BOOL new;
+#endif
+ BYTE state; /* Installed or UnInstalled */
+ BYTE pad1, pad2;
+ } colormap;
+ struct {
+ CARD32 pad00 B32;
+ CARD8 request;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ BYTE pad1;
+ } mappingNotify;
+ struct {
+ CARD32 pad00 B32;
+ Window window B32;
+ union {
+ struct {
+ Atom type B32;
+ INT32 longs0 B32;
+ INT32 longs1 B32;
+ INT32 longs2 B32;
+ INT32 longs3 B32;
+ INT32 longs4 B32;
+ } l;
+ struct {
+ Atom type B32;
+ INT16 shorts0 B16;
+ INT16 shorts1 B16;
+ INT16 shorts2 B16;
+ INT16 shorts3 B16;
+ INT16 shorts4 B16;
+ INT16 shorts5 B16;
+ INT16 shorts6 B16;
+ INT16 shorts7 B16;
+ INT16 shorts8 B16;
+ INT16 shorts9 B16;
+ } s;
+ struct {
+ Atom type B32;
+ INT8 bytes[20];
+ } b;
+ } u;
+ } clientMessage;
+ } u;
+} xEvent;
+
+/*********************************************************
+ *
+ * Generic event
+ *
+ * Those events are not part of the core protocol spec and can be used by
+ * various extensions.
+ * type is always GenericEvent
+ * extension is the minor opcode of the extension the event belongs to.
+ * evtype is the actual event type, unique __per extension__.
+ *
+ * GenericEvents can be longer than 32 bytes, with the length field
+ * specifying the number of 4 byte blocks after the first 32 bytes.
+ *
+ *
+ */
+typedef struct
+{
+ BYTE type;
+ CARD8 extension;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 evtype B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xGenericEvent;
+
+
+
+/* KeymapNotify events are not included in the above union because they
+ are different from all other events: they do not have a "detail"
+ or "sequenceNumber", so there is room for a 248-bit key mask. */
+
+typedef struct {
+ BYTE type;
+ BYTE map[31];
+ } xKeymapEvent;
+
+#define XEventSize (sizeof(xEvent))
+
+/* XReply is the union of all the replies above whose "fixed part"
+fits in 32 bytes. It does NOT include GetWindowAttributesReply,
+QueryFontReply, QueryKeymapReply, or GetKeyboardControlReply
+ListFontsWithInfoReply */
+
+typedef union {
+ xGenericReply generic;
+ xGetGeometryReply geom;
+ xQueryTreeReply tree;
+ xInternAtomReply atom;
+ xGetAtomNameReply atomName;
+ xGetPropertyReply property;
+ xListPropertiesReply listProperties;
+ xGetSelectionOwnerReply selection;
+ xGrabPointerReply grabPointer;
+ xGrabKeyboardReply grabKeyboard;
+ xQueryPointerReply pointer;
+ xGetMotionEventsReply motionEvents;
+ xTranslateCoordsReply coords;
+ xGetInputFocusReply inputFocus;
+ xQueryTextExtentsReply textExtents;
+ xListFontsReply fonts;
+ xGetFontPathReply fontPath;
+ xGetImageReply image;
+ xListInstalledColormapsReply colormaps;
+ xAllocColorReply allocColor;
+ xAllocNamedColorReply allocNamedColor;
+ xAllocColorCellsReply colorCells;
+ xAllocColorPlanesReply colorPlanes;
+ xQueryColorsReply colors;
+ xLookupColorReply lookupColor;
+ xQueryBestSizeReply bestSize;
+ xQueryExtensionReply extension;
+ xListExtensionsReply extensions;
+ xSetModifierMappingReply setModifierMapping;
+ xGetModifierMappingReply getModifierMapping;
+ xSetPointerMappingReply setPointerMapping;
+ xGetKeyboardMappingReply getKeyboardMapping;
+ xGetPointerMappingReply getPointerMapping;
+ xGetPointerControlReply pointerControl;
+ xGetScreenSaverReply screenSaver;
+ xListHostsReply hosts;
+ xError error;
+ xEvent event;
+} xReply;
+
+
+
+/*****************************************************************
+ * REQUESTS
+ *****************************************************************/
+
+
+/* Request structure */
+
+typedef struct _xReq {
+ CARD8 reqType;
+ CARD8 data; /* meaning depends on request type */
+ CARD16 length B16; /* length in 4 bytes quantities
+ of whole request, including this header */
+} xReq;
+
+/*****************************************************************
+ * structures that follow request.
+ *****************************************************************/
+
+/* ResourceReq is used for any request which has a resource ID
+ (or Atom or Time) as its one and only argument. */
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 id B32; /* a Window, Drawable, Font, GContext, Pixmap, etc. */
+ } xResourceReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 depth;
+ CARD16 length B16;
+ Window wid B32, parent B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16, borderWidth B16;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ VisualID visual B32;
+ CARD32 mask B32;
+} xCreateWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD32 valueMask B32;
+} xChangeWindowAttributesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ Window window B32;
+} xChangeSaveSetReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32, parent B32;
+ INT16 x B16, y B16;
+} xReparentWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 mask B16;
+ CARD16 pad2 B16;
+} xConfigureWindowReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 direction;
+ CARD16 length B16;
+ Window window B32;
+} xCirculateWindowReq;
+
+typedef struct { /* followed by padded string */
+ CARD8 reqType;
+ BOOL onlyIfExists;
+ CARD16 length B16;
+ CARD16 nbytes B16; /* number of bytes in string */
+ CARD16 pad B16;
+} xInternAtomReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 mode;
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32, type B32;
+ CARD8 format;
+ BYTE pad[3];
+ CARD32 nUnits B32; /* length of stuff following, depends on format */
+} xChangePropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32;
+} xDeletePropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+#if defined(__cplusplus) || defined(c_plusplus)
+ BOOL c_delete;
+#else
+ BOOL delete;
+#endif
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32, type B32;
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+} xGetPropertyReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Atom selection B32;
+ Time time B32;
+} xSetSelectionOwnerReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window requestor B32;
+ Atom selection B32, target B32, property B32;
+ Time time B32;
+ } xConvertSelectionReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL propagate;
+ CARD16 length B16;
+ Window destination B32;
+ CARD32 eventMask B32;
+ xEvent event;
+} xSendEventReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 eventMask B16;
+ BYTE pointerMode, keyboardMode;
+ Window confineTo B32;
+ Cursor cursor B32;
+ Time time B32;
+} xGrabPointerReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 eventMask B16;
+ BYTE pointerMode, keyboardMode;
+ Window confineTo B32;
+ Cursor cursor B32;
+ CARD8 button;
+ BYTE pad;
+ CARD16 modifiers B16;
+} xGrabButtonReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 button;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD16 pad B16;
+} xUngrabButtonReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cursor B32;
+ Time time B32;
+ CARD16 eventMask B16;
+ CARD16 pad2 B16;
+} xChangeActivePointerGrabReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ Time time B32;
+ BYTE pointerMode, keyboardMode;
+ CARD16 pad B16;
+} xGrabKeyboardReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL ownerEvents;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD8 key;
+ BYTE pointerMode, keyboardMode;
+ BYTE pad1, pad2, pad3;
+} xGrabKeyReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 key;
+ CARD16 length B16;
+ Window grabWindow B32;
+ CARD16 modifiers B16;
+ CARD16 pad B16;
+} xUngrabKeyReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 mode;
+ CARD16 length B16;
+ Time time B32;
+} xAllowEventsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ Time start B32, stop B32;
+} xGetMotionEventsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window srcWid B32, dstWid B32;
+ INT16 srcX B16, srcY B16;
+} xTranslateCoordsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window srcWid B32, dstWid B32;
+ INT16 srcX B16, srcY B16;
+ CARD16 srcWidth B16, srcHeight B16;
+ INT16 dstX B16, dstY B16;
+} xWarpPointerReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 revertTo;
+ CARD16 length B16;
+ Window focus B32;
+ Time time B32;
+} xSetInputFocusReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Font fid B32;
+ CARD16 nbytes B16;
+ BYTE pad1, pad2; /* string follows on word boundary */
+} xOpenFontReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL oddLength;
+ CARD16 length B16;
+ Font fid B32;
+ } xQueryTextExtentsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 maxNames B16;
+ CARD16 nbytes B16; /* followed immediately by string bytes */
+} xListFontsReq;
+
+typedef xListFontsReq xListFontsWithInfoReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 nFonts B16;
+ BYTE pad1, pad2; /* LISTofSTRING8 follows on word boundary */
+} xSetFontPathReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 depth;
+ CARD16 length B16;
+ Pixmap pid B32;
+ Drawable drawable B32;
+ CARD16 width B16, height B16;
+} xCreatePixmapReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ Drawable drawable B32;
+ CARD32 mask B32;
+} xCreateGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ CARD32 mask B32;
+} xChangeGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext srcGC B32, dstGC B32;
+ CARD32 mask B32;
+} xCopyGCReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ GContext gc B32;
+ CARD16 dashOffset B16;
+ CARD16 nDashes B16; /* length LISTofCARD8 of values following */
+} xSetDashesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE ordering;
+ CARD16 length B16;
+ GContext gc B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xSetClipRectanglesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL exposures;
+ CARD16 length B16;
+ Window window B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+} xClearAreaReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable srcDrawable B32, dstDrawable B32;
+ GContext gc B32;
+ INT16 srcX B16, srcY B16, dstX B16, dstY B16;
+ CARD16 width B16, height B16;
+} xCopyAreaReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable srcDrawable B32, dstDrawable B32;
+ GContext gc B32;
+ INT16 srcX B16, srcY B16, dstX B16, dstY B16;
+ CARD16 width B16, height B16;
+ CARD32 bitPlane B32;
+} xCopyPlaneReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE coordMode;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+} xPolyPointReq;
+
+typedef xPolyPointReq xPolyLineReq; /* same request structure */
+
+/* The following used for PolySegment, PolyRectangle, PolyArc, PolyFillRectangle, PolyFillArc */
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+} xPolySegmentReq;
+
+typedef xPolySegmentReq xPolyArcReq;
+typedef xPolySegmentReq xPolyRectangleReq;
+typedef xPolySegmentReq xPolyFillRectangleReq;
+typedef xPolySegmentReq xPolyFillArcReq;
+
+typedef struct _FillPolyReq {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ BYTE shape;
+ BYTE coordMode;
+ CARD16 pad1 B16;
+} xFillPolyReq;
+
+
+typedef struct _PutImageReq {
+ CARD8 reqType;
+ CARD8 format;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ CARD16 width B16, height B16;
+ INT16 dstX B16, dstY B16;
+ CARD8 leftPad;
+ CARD8 depth;
+ CARD16 pad B16;
+} xPutImageReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 format;
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 planeMask B32;
+} xGetImageReq;
+
+/* the following used by PolyText8 and PolyText16 */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 pad;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ INT16 x B16, y B16; /* items (xTextElt) start after struct */
+} xPolyTextReq;
+
+typedef xPolyTextReq xPolyText8Req;
+typedef xPolyTextReq xPolyText16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE nChars;
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ INT16 x B16, y B16;
+} xImageTextReq;
+
+typedef xImageTextReq xImageText8Req;
+typedef xImageTextReq xImageText16Req;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE alloc;
+ CARD16 length B16;
+ Colormap mid B32;
+ Window window B32;
+ VisualID visual B32;
+} xCreateColormapReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap mid B32;
+ Colormap srcCmap B32;
+} xCopyColormapAndFreeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad2 B16;
+} xAllocColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 nbytes B16; /* followed by structure */
+ BYTE pad1, pad2;
+} xAllocNamedColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL contiguous;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 colors B16, planes B16;
+} xAllocColorCellsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BOOL contiguous;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 colors B16, red B16, green B16, blue B16;
+} xAllocColorPlanesReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 planeMask B32;
+} xFreeColorsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+} xStoreColorsReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 flags; /* DoRed, DoGreen, DoBlue, as in xColorItem */
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 pixel B32;
+ CARD16 nbytes B16; /* number of name string bytes following structure */
+ BYTE pad1, pad2;
+ } xStoreNamedColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+} xQueryColorsReq;
+
+typedef struct { /* followed by string of length len */
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD16 nbytes B16; /* number of string bytes following structure*/
+ BYTE pad1, pad2;
+} xLookupColorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cid B32;
+ Pixmap source B32, mask B32;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+ CARD16 x B16, y B16;
+} xCreateCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cid B32;
+ Font source B32, mask B32;
+ CARD16 sourceChar B16, maskChar B16;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+} xCreateGlyphCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Cursor cursor B32;
+ CARD16 foreRed B16, foreGreen B16, foreBlue B16;
+ CARD16 backRed B16, backGreen B16, backBlue B16;
+} xRecolorCursorReq;
+
+typedef struct {
+ CARD8 reqType;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD8 c_class;
+#else
+ CARD8 class;
+#endif
+ CARD16 length B16;
+ Drawable drawable B32;
+ CARD16 width B16, height B16;
+} xQueryBestSizeReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD16 nbytes B16; /* number of string bytes following structure */
+ BYTE pad1, pad2;
+} xQueryExtensionReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 numKeyPerModifier;
+ CARD16 length B16;
+} xSetModifierMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 nElts; /* how many elements in the map */
+ CARD16 length B16;
+} xSetPointerMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ CARD16 pad1 B16;
+} xGetKeyboardMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 keyCodes;
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 keySymsPerKeyCode;
+ CARD16 pad1 B16;
+} xChangeKeyboardMappingReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ CARD32 mask B32;
+} xChangeKeyboardControlReq;
+
+typedef struct {
+ CARD8 reqType;
+ INT8 percent; /* -100 to 100 */
+ CARD16 length B16;
+} xBellReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ INT16 accelNum B16, accelDenum B16;
+ INT16 threshold B16;
+ BOOL doAccel, doThresh;
+} xChangePointerControlReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ INT16 timeout B16, interval B16;
+ BYTE preferBlank, allowExpose;
+ CARD16 pad2 B16;
+} xSetScreenSaverReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ CARD8 hostFamily;
+ BYTE pad;
+ CARD16 hostLength B16;
+} xChangeHostsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ } xListHostsReq;
+
+typedef struct {
+ CARD8 reqType;
+ BYTE mode;
+ CARD16 length B16;
+ } xChangeModeReq;
+
+typedef xChangeModeReq xSetAccessControlReq;
+typedef xChangeModeReq xSetCloseDownModeReq;
+typedef xChangeModeReq xForceScreenSaverReq;
+
+typedef struct { /* followed by LIST of ATOM */
+ CARD8 reqType;
+ BYTE pad;
+ CARD16 length B16;
+ Window window B32;
+ CARD16 nAtoms B16;
+ INT16 nPositions B16;
+ } xRotatePropertiesReq;
+
+
+
+/* Reply codes */
+
+#define X_Reply 1 /* Normal reply */
+#define X_Error 0 /* Error */
+
+/* Request codes */
+
+#define X_CreateWindow 1
+#define X_ChangeWindowAttributes 2
+#define X_GetWindowAttributes 3
+#define X_DestroyWindow 4
+#define X_DestroySubwindows 5
+#define X_ChangeSaveSet 6
+#define X_ReparentWindow 7
+#define X_MapWindow 8
+#define X_MapSubwindows 9
+#define X_UnmapWindow 10
+#define X_UnmapSubwindows 11
+#define X_ConfigureWindow 12
+#define X_CirculateWindow 13
+#define X_GetGeometry 14
+#define X_QueryTree 15
+#define X_InternAtom 16
+#define X_GetAtomName 17
+#define X_ChangeProperty 18
+#define X_DeleteProperty 19
+#define X_GetProperty 20
+#define X_ListProperties 21
+#define X_SetSelectionOwner 22
+#define X_GetSelectionOwner 23
+#define X_ConvertSelection 24
+#define X_SendEvent 25
+#define X_GrabPointer 26
+#define X_UngrabPointer 27
+#define X_GrabButton 28
+#define X_UngrabButton 29
+#define X_ChangeActivePointerGrab 30
+#define X_GrabKeyboard 31
+#define X_UngrabKeyboard 32
+#define X_GrabKey 33
+#define X_UngrabKey 34
+#define X_AllowEvents 35
+#define X_GrabServer 36
+#define X_UngrabServer 37
+#define X_QueryPointer 38
+#define X_GetMotionEvents 39
+#define X_TranslateCoords 40
+#define X_WarpPointer 41
+#define X_SetInputFocus 42
+#define X_GetInputFocus 43
+#define X_QueryKeymap 44
+#define X_OpenFont 45
+#define X_CloseFont 46
+#define X_QueryFont 47
+#define X_QueryTextExtents 48
+#define X_ListFonts 49
+#define X_ListFontsWithInfo 50
+#define X_SetFontPath 51
+#define X_GetFontPath 52
+#define X_CreatePixmap 53
+#define X_FreePixmap 54
+#define X_CreateGC 55
+#define X_ChangeGC 56
+#define X_CopyGC 57
+#define X_SetDashes 58
+#define X_SetClipRectangles 59
+#define X_FreeGC 60
+#define X_ClearArea 61
+#define X_CopyArea 62
+#define X_CopyPlane 63
+#define X_PolyPoint 64
+#define X_PolyLine 65
+#define X_PolySegment 66
+#define X_PolyRectangle 67
+#define X_PolyArc 68
+#define X_FillPoly 69
+#define X_PolyFillRectangle 70
+#define X_PolyFillArc 71
+#define X_PutImage 72
+#define X_GetImage 73
+#define X_PolyText8 74
+#define X_PolyText16 75
+#define X_ImageText8 76
+#define X_ImageText16 77
+#define X_CreateColormap 78
+#define X_FreeColormap 79
+#define X_CopyColormapAndFree 80
+#define X_InstallColormap 81
+#define X_UninstallColormap 82
+#define X_ListInstalledColormaps 83
+#define X_AllocColor 84
+#define X_AllocNamedColor 85
+#define X_AllocColorCells 86
+#define X_AllocColorPlanes 87
+#define X_FreeColors 88
+#define X_StoreColors 89
+#define X_StoreNamedColor 90
+#define X_QueryColors 91
+#define X_LookupColor 92
+#define X_CreateCursor 93
+#define X_CreateGlyphCursor 94
+#define X_FreeCursor 95
+#define X_RecolorCursor 96
+#define X_QueryBestSize 97
+#define X_QueryExtension 98
+#define X_ListExtensions 99
+#define X_ChangeKeyboardMapping 100
+#define X_GetKeyboardMapping 101
+#define X_ChangeKeyboardControl 102
+#define X_GetKeyboardControl 103
+#define X_Bell 104
+#define X_ChangePointerControl 105
+#define X_GetPointerControl 106
+#define X_SetScreenSaver 107
+#define X_GetScreenSaver 108
+#define X_ChangeHosts 109
+#define X_ListHosts 110
+#define X_SetAccessControl 111
+#define X_SetCloseDownMode 112
+#define X_KillClient 113
+#define X_RotateProperties 114
+#define X_ForceScreenSaver 115
+#define X_SetPointerMapping 116
+#define X_GetPointerMapping 117
+#define X_SetModifierMapping 118
+#define X_GetModifierMapping 119
+#define X_NoOperation 127
+
+/* restore these definitions back to the typedefs in X.h */
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* XPROTO_H */
diff --git a/Xprotostr.h b/Xprotostr.h
new file mode 100644
index 0000000..a9e854d
--- /dev/null
+++ b/Xprotostr.h
@@ -0,0 +1,77 @@
+#ifndef XPROTOSTRUCTS_H
+#define XPROTOSTRUCTS_H
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+#include <X11/Xmd.h>
+
+/* Used by PolySegment */
+
+typedef struct _xSegment {
+ INT16 x1 B16, y1 B16, x2 B16, y2 B16;
+} xSegment;
+
+/* POINT */
+
+typedef struct _xPoint {
+ INT16 x B16, y B16;
+} xPoint;
+
+typedef struct _xRectangle {
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+} xRectangle;
+
+/* ARC */
+
+typedef struct _xArc {
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ INT16 angle1 B16, angle2 B16;
+} xArc;
+
+#endif /* XPROTOSTRUCTS_H */
diff --git a/Xthreads.h b/Xthreads.h
new file mode 100644
index 0000000..2027127
--- /dev/null
+++ b/Xthreads.h
@@ -0,0 +1,314 @@
+/*
+ *
+Copyright 1993, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ * *
+ */
+
+#ifndef _XTHREADS_H_
+# define _XTHREADS_H_
+
+/* Redefine these to XtMalloc/XtFree or whatever you want before including
+ * this header file.
+ */
+# ifndef xmalloc
+# define xmalloc malloc
+# endif
+# ifndef xfree
+# define xfree free
+# endif
+
+# ifdef CTHREADS
+# include <cthreads.h>
+typedef cthread_t xthread_t;
+typedef struct condition xcondition_rec;
+typedef struct mutex xmutex_rec;
+# define xthread_init() cthread_init()
+# define xthread_self cthread_self
+# define xthread_fork(func,closure) cthread_fork(func,closure)
+# define xthread_yield() cthread_yield()
+# define xthread_exit(v) cthread_exit(v)
+# define xthread_set_name(t,str) cthread_set_name(t,str)
+# define xmutex_init(m) mutex_init(m)
+# define xmutex_clear(m) mutex_clear(m)
+# define xmutex_lock(m) mutex_lock(m)
+# define xmutex_unlock(m) mutex_unlock(m)
+# define xmutex_set_name(m,str) mutex_set_name(m,str)
+# define xcondition_init(cv) condition_init(cv)
+# define xcondition_clear(cv) condition_clear(cv)
+# define xcondition_wait(cv,m) condition_wait(cv,m)
+# define xcondition_signal(cv) condition_signal(cv)
+# define xcondition_broadcast(cv) condition_broadcast(cv)
+# define xcondition_set_name(cv,str) condition_set_name(cv,str)
+# else /* !CTHREADS */
+# if defined(SVR4)
+# include <thread.h>
+# include <synch.h>
+typedef thread_t xthread_t;
+typedef thread_key_t xthread_key_t;
+typedef cond_t xcondition_rec;
+typedef mutex_t xmutex_rec;
+# if defined(__UNIXWARE__)
+extern xthread_t (*_x11_thr_self)();
+# define xthread_self (_x11_thr_self)
+# else
+# define xthread_self thr_self
+# endif
+# define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL)
+# define xthread_yield() thr_yield()
+# define xthread_exit(v) thr_exit(v)
+# define xthread_key_create(kp,d) thr_keycreate(kp,d)
+# ifdef __sun
+# define xthread_key_delete(k) 0
+# else
+# define xthread_key_delete(k) thr_keydelete(k)
+# endif
+# define xthread_set_specific(k,v) thr_setspecific(k,v)
+# define xthread_get_specific(k,vp) thr_getspecific(k,vp)
+# define xmutex_init(m) mutex_init(m,USYNC_THREAD,0)
+# define xmutex_clear(m) mutex_destroy(m)
+# define xmutex_lock(m) mutex_lock(m)
+# define xmutex_unlock(m) mutex_unlock(m)
+# define xcondition_init(cv) cond_init(cv,USYNC_THREAD,0)
+# define xcondition_clear(cv) cond_destroy(cv)
+# define xcondition_wait(cv,m) cond_wait(cv,m)
+# define xcondition_signal(cv) cond_signal(cv)
+# define xcondition_broadcast(cv) cond_broadcast(cv)
+# else /* !SVR4 */
+# ifdef WIN32
+# include <X11/Xwindows.h>
+typedef DWORD xthread_t;
+typedef DWORD xthread_key_t;
+struct _xthread_waiter {
+ HANDLE sem;
+ struct _xthread_waiter *next;
+};
+typedef struct {
+ CRITICAL_SECTION cs;
+ struct _xthread_waiter *waiters;
+} xcondition_rec;
+typedef CRITICAL_SECTION xmutex_rec;
+extern void _Xthread_init(void);
+# define xthread_init() _Xthread_init()
+# define xthread_self GetCurrentThreadId
+# define xthread_fork(func,closure) { \
+ DWORD _tmptid; \
+ CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, (LPVOID)closure, 0, \
+ &_tmptid); \
+}
+# define xthread_yield() Sleep(0)
+# define xthread_exit(v) ExitThread((DWORD)(v))
+# define xthread_key_create(kp,d) *(kp) = TlsAlloc()
+# define xthread_key_delete(k) TlsFree(k)
+# define xthread_set_specific(k,v) TlsSetValue(k,v)
+# define xthread_get_specific(k,vp) TlsGetValue(k)
+# define xmutex_init(m) InitializeCriticalSection(m)
+# define xmutex_clear(m) DeleteCriticalSection(m)
+# define _XMUTEX_NESTS
+# define xmutex_lock(m) EnterCriticalSection(m)
+# define xmutex_unlock(m) LeaveCriticalSection(m)
+# define xcondition_init(cv) { \
+ InitializeCriticalSection(&(cv)->cs); \
+ (cv)->waiters = NULL; \
+}
+# define xcondition_clear(cv) DeleteCriticalSection(&(cv)->cs)
+extern struct _xthread_waiter *_Xthread_waiter();
+# define xcondition_wait(cv,m) { \
+ struct _xthread_waiter *_tmpthr = _Xthread_waiter(); \
+ EnterCriticalSection(&(cv)->cs); \
+ _tmpthr->next = (cv)->waiters; \
+ (cv)->waiters = _tmpthr; \
+ LeaveCriticalSection(&(cv)->cs); \
+ LeaveCriticalSection(m); \
+ WaitForSingleObject(_tmpthr->sem, INFINITE); \
+ EnterCriticalSection(m); \
+}
+# define xcondition_signal(cv) { \
+ EnterCriticalSection(&(cv)->cs); \
+ if ((cv)->waiters) { \
+ ReleaseSemaphore((cv)->waiters->sem, 1, NULL); \
+ (cv)->waiters = (cv)->waiters->next; \
+ } \
+ LeaveCriticalSection(&(cv)->cs); \
+}
+# define xcondition_broadcast(cv) { \
+ struct _xthread_waiter *_tmpthr; \
+ EnterCriticalSection(&(cv)->cs); \
+ for (_tmpthr = (cv)->waiters; _tmpthr; _tmpthr = _tmpthr->next) \
+ ReleaseSemaphore(_tmpthr->sem, 1, NULL); \
+ (cv)->waiters = NULL; \
+ LeaveCriticalSection(&(cv)->cs); \
+}
+# else /* !WIN32 */
+# ifdef USE_TIS_SUPPORT
+/*
+ * TIS support is intended for thread safe libraries.
+ * This should not be used for general client programming.
+ */
+# include <tis.h>
+typedef pthread_t xthread_t;
+typedef pthread_key_t xthread_key_t;
+typedef pthread_cond_t xcondition_rec;
+typedef pthread_mutex_t xmutex_rec;
+# define xthread_self tis_self
+# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,NULL,func,closure); }
+# define xthread_yield() pthread_yield_np()
+# define xthread_exit(v) pthread_exit(v)
+# define xthread_key_create(kp,d) tis_key_create(kp,d)
+# define xthread_key_delete(k) tis_key_delete(k)
+# define xthread_set_specific(k,v) tis_setspecific(k,v)
+# define xthread_get_specific(k,vp) *(vp) = tis_getspecific(k)
+# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+# define xmutex_init(m) tis_mutex_init(m)
+# define xmutex_clear(m) tis_mutex_destroy(m)
+# define xmutex_lock(m) tis_mutex_lock(m)
+# define xmutex_unlock(m) tis_mutex_unlock(m)
+# define xcondition_init(c) tis_cond_init(c)
+# define xcondition_clear(c) tis_cond_destroy(c)
+# define xcondition_wait(c,m) tis_cond_wait(c,m)
+# define xcondition_signal(c) tis_cond_signal(c)
+# define xcondition_broadcast(c) tis_cond_broadcast(c)
+# else
+# ifdef USE_NBSD_THREADLIB
+/*
+ * NetBSD threadlib support is intended for thread safe libraries.
+ * This should not be used for general client programming.
+ */
+# include <threadlib.h>
+typedef thr_t xthread_t;
+typedef thread_key_t xthread_key_t;
+typedef cond_t xcondition_rec;
+typedef mutex_t xmutex_rec;
+# define xthread_self thr_self
+# define xthread_fork(func,closure) { thr_t _tmpxthr; \
+ /* XXX Create it detached? --thorpej */ \
+ thr_create(&_tmpxthr,NULL,func,closure); }
+# define xthread_yield() thr_yield()
+# define xthread_exit(v) thr_exit(v)
+# define xthread_key_create(kp,d) thr_keycreate(kp,d)
+# define xthread_key_delete(k) thr_keydelete(k)
+# define xthread_set_specific(k,v) thr_setspecific(k,v)
+# define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k)
+# define XMUTEX_INITIALIZER MUTEX_INITIALIZER
+# define xmutex_init(m) mutex_init(m, 0)
+# define xmutex_clear(m) mutex_destroy(m)
+# define xmutex_lock(m) mutex_lock(m)
+# define xmutex_unlock(m) mutex_unlock(m)
+# define xcondition_init(c) cond_init(c, 0, 0)
+# define xcondition_clear(c) cond_destroy(c)
+# define xcondition_wait(c,m) cond_wait(c,m)
+# define xcondition_signal(c) cond_signal(c)
+# define xcondition_broadcast(c) cond_broadcast(c)
+# else
+# include <pthread.h>
+typedef pthread_t xthread_t;
+typedef pthread_key_t xthread_key_t;
+typedef pthread_cond_t xcondition_rec;
+typedef pthread_mutex_t xmutex_rec;
+# define xthread_self pthread_self
+# define xthread_yield() pthread_yield()
+# define xthread_exit(v) pthread_exit(v)
+# define xthread_set_specific(k,v) pthread_setspecific(k,v)
+# define xmutex_clear(m) pthread_mutex_destroy(m)
+# define xmutex_lock(m) pthread_mutex_lock(m)
+# define xmutex_unlock(m) pthread_mutex_unlock(m)
+# ifndef XPRE_STANDARD_API
+# define xthread_key_create(kp,d) pthread_key_create(kp,d)
+# define xthread_key_delete(k) pthread_key_delete(k)
+# define xthread_get_specific(k,vp) *(vp) = pthread_getspecific(k)
+# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,NULL,func,closure); }
+# define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+# define xmutex_init(m) pthread_mutex_init(m, NULL)
+# define xcondition_init(c) pthread_cond_init(c, NULL)
+# else /* XPRE_STANDARD_API */
+# define xthread_key_create(kp,d) pthread_keycreate(kp,d)
+# define xthread_key_delete(k) 0
+# define xthread_get_specific(k,vp) pthread_getspecific(k,vp)
+# define xthread_fork(func,closure) { pthread_t _tmpxthr; \
+ pthread_create(&_tmpxthr,pthread_attr_default,func,closure); }
+# define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default)
+# define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default)
+# endif /* XPRE_STANDARD_API */
+# define xcondition_clear(c) pthread_cond_destroy(c)
+# define xcondition_wait(c,m) pthread_cond_wait(c,m)
+# define xcondition_signal(c) pthread_cond_signal(c)
+# define xcondition_broadcast(c) pthread_cond_broadcast(c)
+# if defined(_DECTHREADS_)
+static xthread_t _X_no_thread_id;
+# define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id)
+# define xthread_clear_id(id) id = _X_no_thread_id
+# define xthread_equal(id1,id2) pthread_equal(id1, id2)
+# endif /* _DECTHREADS_ */
+# if defined(__linux__)
+# define xthread_have_id(id) !pthread_equal(id, 0)
+# define xthread_clear_id(id) id = 0
+# define xthread_equal(id1,id2) pthread_equal(id1, id2)
+# endif /* linux */
+# if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM)
+# ifdef DEBUG /* too much of a hack to enable normally */
+/* see also cma__obj_set_name() */
+# define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str)
+# define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str)
+# endif /* DEBUG */
+# endif /* _CMA_VENDOR_ == _CMA__IBM */
+# endif /* USE_NBSD_THREADLIB */
+# endif /* USE_TIS_SUPPORT */
+# endif /* WIN32 */
+# endif /* SVR4 */
+# endif /* CTHREADS */
+typedef xcondition_rec *xcondition_t;
+typedef xmutex_rec *xmutex_t;
+# ifndef xcondition_malloc
+# define xcondition_malloc() (xcondition_t)xmalloc(sizeof(xcondition_rec))
+# endif
+# ifndef xcondition_free
+# define xcondition_free(c) xfree((char *)c)
+# endif
+# ifndef xmutex_malloc
+# define xmutex_malloc() (xmutex_t)xmalloc(sizeof(xmutex_rec))
+# endif
+# ifndef xmutex_free
+# define xmutex_free(m) xfree((char *)m)
+# endif
+# ifndef xthread_have_id
+# define xthread_have_id(id) id
+# endif
+# ifndef xthread_clear_id
+# define xthread_clear_id(id) id = 0
+# endif
+# ifndef xthread_equal
+# define xthread_equal(id1,id2) ((id1) == (id2))
+# endif
+/* aids understood by some debuggers */
+# ifndef xthread_set_name
+# define xthread_set_name(t,str)
+# endif
+# ifndef xmutex_set_name
+# define xmutex_set_name(m,str)
+# endif
+# ifndef xcondition_set_name
+# define xcondition_set_name(cv,str)
+# endif
+
+#endif /* _XTHREADS_H_ */
diff --git a/Xw32defs.h b/Xw32defs.h
new file mode 100644
index 0000000..b2e4b33
--- /dev/null
+++ b/Xw32defs.h
@@ -0,0 +1,79 @@
+#ifndef _XW32DEFS_H
+# define _XW32DEFS_H
+
+# ifdef __GNUC__ /* mingw is more close to unix than msvc */
+# if !defined(__daddr_t_defined)
+typedef char *caddr_t;
+# endif
+# define lstat stat
+
+# else
+typedef char *caddr_t;
+
+# define access _access
+# define alloca _alloca
+# define chdir _chdir
+# define chmod _chmod
+# define close _close
+# define creat _creat
+# define dup _dup
+# define dup2 _dup2
+# define environ _environ
+# define execl _execl
+# define execle _execle
+# define execlp _execlp
+# define execlpe _execlpe
+# define execv _execv
+# define execve _execve
+# define execvp _execvp
+# define execvpe _execvpe
+# define fdopen _fdopen
+# define fileno _fileno
+# define fstat _fstat
+# define getcwd _getcwd
+# define getpid _getpid
+# define hypot _hypot
+# define isascii __isascii
+# define isatty _isatty
+# define lseek _lseek
+# define mkdir _mkdir
+# define mktemp _mktemp
+# define open _open
+# define putenv _putenv
+# define read _read
+# define rmdir _rmdir
+# define sleep(x) Sleep((x) * 1000)
+# define stat _stat
+# define sys_errlist _sys_errlist
+# define sys_nerr _sys_nerr
+# define umask _umask
+# define unlink _unlink
+# define write _write
+# define random rand
+# define srandom srand
+
+# define O_RDONLY _O_RDONLY
+# define O_WRONLY _O_WRONLY
+# define O_RDWR _O_RDWR
+# define O_APPEND _O_APPEND
+# define O_CREAT _O_CREAT
+# define O_TRUNC _O_TRUNC
+# define O_EXCL _O_EXCL
+# define O_TEXT _O_TEXT
+# define O_BINARY _O_BINARY
+# define O_RAW _O_BINARY
+
+# define S_IFMT _S_IFMT
+# define S_IFDIR _S_IFDIR
+# define S_IFCHR _S_IFCHR
+# define S_IFREG _S_IFREG
+# define S_IREAD _S_IREAD
+# define S_IWRITE _S_IWRITE
+# define S_IEXEC _S_IEXEC
+
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+# endif /* __GNUC__ */
+#endif
diff --git a/Xwindows.h b/Xwindows.h
new file mode 100644
index 0000000..70e1deb
--- /dev/null
+++ b/Xwindows.h
@@ -0,0 +1,114 @@
+/*
+
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
+ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from
+The Open Group.
+
+*/
+
+/*
+ * This header file has the sole purpose of allowing the inclusion of
+ * windows.h without getting any name conflicts with X headers code, by
+ * renaming or disabling the conflicting definitions from windows.h
+ */
+
+/*
+ * Mingw.org versions of the Windows API headers actually avoid
+ * making the conflicting definitions if XFree86Server is defined, so we
+ * need to remember if that was defined and undefine it during including
+ * windows.h (so the conflicting definitions get wrapped correctly), and
+ * then redefine it afterwards. (This was never the correct thing to
+ * do as it's no help at all to X11 clients which also need to use the
+ * Win32 API)
+ */
+#undef _XFree86Server
+#ifdef XFree86Server
+# define _XFree86Server
+# undef XFree86Server
+#endif
+
+/*
+ * There doesn't seem to be a good way to wrap the min/max macros from
+ * windows.h, so we simply avoid defining them completely, allowing any
+ * pre-existing definition to stand.
+ *
+ */
+#define NOMINMAX
+
+/*
+ * mingw-w64 headers define BOOL as a typedef, protecting against macros
+ * mingw.org headers define BOOL in terms of WINBOOL
+ * ... so try to come up with something which works with both :-)
+ */
+#define _NO_BOOL_TYPEDEF
+#define BOOL WINBOOL
+#define INT32 wINT32
+#ifdef __x86_64__
+#define INT64 wINT64
+#define LONG64 wLONG64
+#endif
+#undef Status
+#define Status wStatus
+#define ATOM wATOM
+#define BYTE wBYTE
+#define FreeResource wFreeResource
+#include <windows.h>
+#undef NOMINMAX
+#undef Status
+#define Status int
+#undef BYTE
+#undef BOOL
+#undef INT32
+#undef INT64
+#undef LONG64
+#undef ATOM
+#undef FreeResource
+#undef CreateWindowA
+
+/*
+ * Older version of this header used to name the windows API bool type wBOOL,
+ * rather than more standard name WINBOOL
+ */
+#define wBOOL WINBOOL
+
+#ifdef RESOURCE_H
+# undef RT_FONT
+# undef RT_CURSOR
+# define RT_FONT ((RESTYPE)4)
+# define RT_CURSOR ((RESTYPE)5)
+#endif
+
+#ifndef __CYGWIN__
+#define sleep(x) Sleep((x) * 1000)
+#endif
+
+#if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024)
+# undef PATH_MAX
+# define PATH_MAX 1024
+#endif
+
+#ifdef _XFree86Server
+# define XFree86Server
+# undef _XFree86Server
+#endif
+
diff --git a/Xwinsock.h b/Xwinsock.h
new file mode 100644
index 0000000..a81dd7a
--- /dev/null
+++ b/Xwinsock.h
@@ -0,0 +1,77 @@
+/*
+
+Copyright 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
+ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from
+The Open Group.
+
+*/
+
+/*
+ * This header file has for sole purpose to allow to include winsock.h
+ * without getting any name conflicts with our code.
+ * Conflicts come from the fact that including winsock.h actually pulls
+ * in the whole Windows API...
+ */
+
+#undef _XFree86Server
+#ifdef XFree86Server
+# define _XFree86Server
+# undef XFree86Server
+#endif
+
+/*
+ * mingw-w64 headers define BOOL as a typedef, protecting against macros
+ * mingw.org headers define BOOL in terms of WINBOOL
+ * ... so try to come up with something which works with both :-)
+ */
+#define _NO_BOOL_TYPEDEF
+#define BOOL WINBOOL
+#define INT32 wINT32
+#undef Status
+#define Status wStatus
+#define ATOM wATOM
+#define BYTE wBYTE
+#define FreeResource wFreeResource
+#include <winsock2.h>
+#undef Status
+#define Status int
+#undef BYTE
+#undef BOOL
+#undef INT32
+#undef ATOM
+#undef FreeResource
+#undef CreateWindowA
+#undef RT_FONT
+#undef RT_CURSOR
+
+/*
+ * Older version of this header used to name the windows API bool type wBOOL,
+ * rather than more standard name WINBOOL
+ */
+#define wBOOL WINBOOL
+
+#ifdef _XFree86Server
+# define XFree86Server
+# undef _XFree86Server
+#endif
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..c47ab9c
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,585 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.9.6])])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XORG_RELEASE_VERSION
+# --------------------
+# Adds --with/without-release-string and changes the PACKAGE and
+# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
+# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
+
+AC_DEFUN([XORG_RELEASE_VERSION],[
+ AC_ARG_WITH(release-version,
+ AC_HELP_STRING([--with-release-version=STRING],
+ [Use release version string in package name]),
+ [RELEASE_VERSION="$withval"],
+ [RELEASE_VERSION=""])
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ AC_MSG_NOTICE([Building with package name set to $PACKAGE])
+ fi
+])
+
diff --git a/ap_keysym.h b/ap_keysym.h
new file mode 100644
index 0000000..9a11971
--- /dev/null
+++ b/ap_keysym.h
@@ -0,0 +1,51 @@
+/******************************************************************
+Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.
+Copyright 1989 by Hewlett-Packard Company.
+
+ All Rights Reserved
+
+Permission to use, duplicate, change, and distribute this software and
+its documentation for any purpose and without fee is granted, provided
+that the above copyright notice appear in such copy and that this
+copyright notice appear in all supporting documentation, and that the
+names of Apollo Computer Inc., the Hewlett-Packard Company, or the X
+Consortium not be used in advertising or publicity pertaining to
+distribution of the software without written prior permission.
+
+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
+TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. Hewlett-Packard shall not be liable for errors
+contained herein or direct, indirect, special, incidental or
+consequential damages in connection with the furnishing,
+performance, or use of this material.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
+******************************************************************/
+
+#define apXK_LineDel 0x1000FF00
+#define apXK_CharDel 0x1000FF01
+#define apXK_Copy 0x1000FF02
+#define apXK_Cut 0x1000FF03
+#define apXK_Paste 0x1000FF04
+#define apXK_Move 0x1000FF05
+#define apXK_Grow 0x1000FF06
+#define apXK_Cmd 0x1000FF07
+#define apXK_Shell 0x1000FF08
+#define apXK_LeftBar 0x1000FF09
+#define apXK_RightBar 0x1000FF0A
+#define apXK_LeftBox 0x1000FF0B
+#define apXK_RightBox 0x1000FF0C
+#define apXK_UpBox 0x1000FF0D
+#define apXK_DownBox 0x1000FF0E
+#define apXK_Pop 0x1000FF0F
+#define apXK_Read 0x1000FF10
+#define apXK_Edit 0x1000FF11
+#define apXK_Save 0x1000FF12
+#define apXK_Exit 0x1000FF13
+#define apXK_Repeat 0x1000FF14
+
+#define apXK_KP_parenleft 0x1000FFA8
+#define apXK_KP_parenright 0x1000FFA9
diff --git a/applewmconst.h b/applewmconst.h
new file mode 100644
index 0000000..4877c34
--- /dev/null
+++ b/applewmconst.h
@@ -0,0 +1,84 @@
+/**************************************************************************
+
+Copyright (c) 2002 Apple Computer, Inc.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#ifndef _APPLEWMCONST_H_
+#define _APPLEWMCONST_H_
+
+/* Events */
+#define AppleWMControllerNotify 0
+#define AppleWMActivationNotify 1
+#define AppleWMPasteboardNotify 2
+#define AppleWMNumberEvents 3
+
+#define AppleWMControllerNotifyMask (1L << 0)
+#define AppleWMActivationNotifyMask (1L << 1)
+#define AppleWMPasteboardNotifyMask (1L << 2)
+
+/* "Kinds" of ControllerNotify events */
+#define AppleWMMinimizeWindow 0
+#define AppleWMZoomWindow 1
+#define AppleWMCloseWindow 2
+#define AppleWMBringAllToFront 3
+#define AppleWMHideWindow 4
+#define AppleWMHideAll 5
+#define AppleWMShowAll 6
+#define AppleWMWindowMenuItem 9
+#define AppleWMWindowMenuNotify 10
+#define AppleWMNextWindow 11
+#define AppleWMPreviousWindow 12
+
+/* "Kinds" of ActivationNotify events */
+#define AppleWMIsActive 0
+#define AppleWMIsInactive 1
+#define AppleWMReloadPreferences 2
+
+/* "Kinds" of PasteboardNotify events */
+#define AppleWMCopyToPasteboard 0
+
+/* Errors */
+#define AppleWMClientNotLocal 0
+#define AppleWMOperationNotSupported 1
+#define AppleWMNumberErrors (AppleWMOperationNotSupported + 1)
+
+/* Window level ids */
+#define AppleWMWindowLevelNormal 0
+#define AppleWMWindowLevelFloating 1
+#define AppleWMWindowLevelTornOff 2
+#define AppleWMWindowLevelDock 3
+#define AppleWMWindowLevelDesktop 4
+#define AppleWMNumWindowLevels 5
+
+/* Possible value for frame_rect argument to XAppleWMFrameGetRect() */
+/* Use xp_frame_rect_enum from <Xplugin.h> */
+
+/* Window frame classes */
+/* Use xp_frame_class_enum from <Xplugin.h> */
+
+/* Window frame attributes */
+/* Use xp_frame_attr_enum from <Xplugin.h> */
+
+#endif /* _APPLEWMCONST_H_ */
diff --git a/applewmproto.h b/applewmproto.h
new file mode 100644
index 0000000..d8be4e6
--- /dev/null
+++ b/applewmproto.h
@@ -0,0 +1,293 @@
+/**************************************************************************
+
+Copyright (c) 2002 Apple Computer, Inc.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#ifndef _APPLEWMPROTO_H_
+#define _APPLEWMPROTO_H_
+
+#include <X11/extensions/applewmconst.h>
+#include <X11/X.h>
+#include <X11/Xmd.h>
+
+#define APPLEWMNAME "Apple-WM"
+
+#define APPLE_WM_MAJOR_VERSION 1 /* current version numbers */
+#define APPLE_WM_MINOR_VERSION 3
+#define APPLE_WM_PATCH_VERSION 0
+
+#define X_AppleWMQueryVersion 0
+#define X_AppleWMFrameGetRect 1
+#define X_AppleWMFrameHitTest 2
+#define X_AppleWMFrameDraw 3
+#define X_AppleWMDisableUpdate 4
+#define X_AppleWMReenableUpdate 5
+#define X_AppleWMSelectInput 6
+#define X_AppleWMSetWindowMenuCheck 7
+#define X_AppleWMSetFrontProcess 8
+#define X_AppleWMSetWindowLevel 9
+#define X_AppleWMSetCanQuit 10
+#define X_AppleWMSetWindowMenu 11
+#define X_AppleWMSendPSN 12
+#define X_AppleWMAttachTransient 13
+
+/* For the purpose of the structure definitions in this file,
+we must redefine the following types in terms of Xmd.h's types, which may
+include bit fields. All of these are #undef'd at the end of this file,
+restoring the definitions in X.h. */
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+
+typedef struct _AppleWMQueryVersion {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMQueryVersion */
+ CARD16 length B16;
+} xAppleWMQueryVersionReq;
+#define sz_xAppleWMQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of WM protocol */
+ CARD16 minorVersion B16; /* minor version of WM protocol */
+ CARD32 patchVersion B32; /* patch version of WM protocol */
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xAppleWMQueryVersionReply;
+#define sz_xAppleWMQueryVersionReply 32
+
+typedef struct _AppleWMDisableUpdate {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMDisableUpdate */
+ CARD16 length B16;
+ CARD32 screen B32;
+} xAppleWMDisableUpdateReq;
+#define sz_xAppleWMDisableUpdateReq 8
+
+typedef struct _AppleWMReenableUpdate {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMReenableUpdate */
+ CARD16 length B16;
+ CARD32 screen B32;
+} xAppleWMReenableUpdateReq;
+#define sz_xAppleWMReenableUpdateReq 8
+
+typedef struct _AppleWMSelectInput {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMSelectInput */
+ CARD16 length B16;
+ CARD32 mask B32;
+} xAppleWMSelectInputReq;
+#define sz_xAppleWMSelectInputReq 8
+
+typedef struct _AppleWMNotify {
+ BYTE type; /* always eventBase + event type */
+ BYTE kind;
+ CARD16 sequenceNumber B16;
+ Time time B32; /* time of change */
+ CARD16 pad1 B16;
+ CARD32 arg B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xAppleWMNotifyEvent;
+#define sz_xAppleWMNotifyEvent 32
+
+typedef struct _AppleWMSetWindowMenu {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMSetWindowMenu */
+ CARD16 length B16;
+ CARD16 nitems B16;
+ CARD16 pad1 B16;
+} xAppleWMSetWindowMenuReq;
+#define sz_xAppleWMSetWindowMenuReq 8
+
+typedef struct _AppleWMSetWindowMenuCheck {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMSetWindowMenuCheck */
+ CARD16 length B16;
+ CARD32 index;
+} xAppleWMSetWindowMenuCheckReq;
+#define sz_xAppleWMSetWindowMenuCheckReq 8
+
+typedef struct _AppleWMSetFrontProcess {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMSetFrontProcess */
+ CARD16 length B16;
+} xAppleWMSetFrontProcessReq;
+#define sz_xAppleWMSetFrontProcessReq 4
+
+typedef struct _AppleWMSetWindowLevel {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMSetWindowLevel */
+ CARD16 length B16;
+ CARD32 window;
+ CARD32 level;
+} xAppleWMSetWindowLevelReq;
+#define sz_xAppleWMSetWindowLevelReq 12
+
+typedef struct _AppleWMSendPSN {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMSendPSN */
+ CARD16 length B16;
+ CARD32 psn_hi;
+ CARD32 psn_lo;
+} xAppleWMSendPSNReq;
+#define sz_xAppleWMSendPSNReq 12
+
+typedef struct _AppleWMAttachTransient {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMAttachTransient */
+ CARD16 length B16;
+ CARD32 child;
+ CARD32 parent;
+} xAppleWMAttachTransientReq;
+#define sz_xAppleWMAttachTransientReq 12
+
+typedef struct _AppleWMSetCanQuit {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMSetCanQuit */
+ CARD16 length B16;
+ CARD32 state;
+} xAppleWMSetCanQuitReq;
+#define sz_xAppleWMSetCanQuitReq 8
+
+typedef struct _AppleWMFrameGetRect {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMFrameGetRect */
+ CARD16 length B16;
+ CARD16 frame_class B16;
+ CARD16 frame_rect B16;
+ CARD16 ix B16;
+ CARD16 iy B16;
+ CARD16 iw B16;
+ CARD16 ih B16;
+ CARD16 ox B16;
+ CARD16 oy B16;
+ CARD16 ow B16;
+ CARD16 oh B16;
+} xAppleWMFrameGetRectReq;
+#define sz_xAppleWMFrameGetRectReq 24
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 x B16;
+ CARD16 y B16;
+ CARD16 w B16;
+ CARD16 h B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xAppleWMFrameGetRectReply;
+#define sz_xAppleWMFrameGetRectReply 32
+
+typedef struct _AppleWMFrameHitTest {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMFrameHitTest */
+ CARD16 length B16;
+ CARD16 frame_class B16;
+ CARD16 pad1 B16;
+ CARD16 px B16;
+ CARD16 py B16;
+ CARD16 ix B16;
+ CARD16 iy B16;
+ CARD16 iw B16;
+ CARD16 ih B16;
+ CARD16 ox B16;
+ CARD16 oy B16;
+ CARD16 ow B16;
+ CARD16 oh B16;
+} xAppleWMFrameHitTestReq;
+#define sz_xAppleWMFrameHitTestReq 28
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 ret B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xAppleWMFrameHitTestReply;
+#define sz_xAppleWMFrameHitTestReply 32
+
+typedef struct _AppleWMFrameDraw {
+ CARD8 reqType; /* always WMReqCode */
+ CARD8 wmReqType; /* always X_AppleWMFrameDraw */
+ CARD16 length B16;
+ CARD32 screen B32;
+ CARD32 window B32;
+ CARD16 frame_class B16;
+ CARD16 frame_attr B16;
+ CARD16 ix B16;
+ CARD16 iy B16;
+ CARD16 iw B16;
+ CARD16 ih B16;
+ CARD16 ox B16;
+ CARD16 oy B16;
+ CARD16 ow B16;
+ CARD16 oh B16;
+ CARD32 title_length B32;
+} xAppleWMFrameDrawReq;
+#define sz_xAppleWMFrameDrawReq 36
+
+/* restore these definitions back to the typedefs in X.h */
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _APPLEWMPROTO_H_ */
diff --git a/applewmproto.pc.in b/applewmproto.pc.in
new file mode 100644
index 0000000..6ec1c48
--- /dev/null
+++ b/applewmproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: AppleWMProto
+Description: AppleWM extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/applewmproto/.gitignore b/applewmproto/.gitignore
new file mode 100644
index 0000000..f18e437
--- /dev/null
+++ b/applewmproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for applewmproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/applewmproto/COPYING b/applewmproto/COPYING
new file mode 100644
index 0000000..be403fd
--- /dev/null
+++ b/applewmproto/COPYING
@@ -0,0 +1,27 @@
+/**************************************************************************
+
+Copyright (c) 2002-2009 Apple, Inc.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
diff --git a/applewmproto/Makefile.am b/applewmproto/Makefile.am
new file mode 100644
index 0000000..63db4c7
--- /dev/null
+++ b/applewmproto/Makefile.am
@@ -0,0 +1,19 @@
+applewmdir = $(includedir)/X11/extensions
+applewm_HEADERS = \
+ applewmconst.h \
+ applewmproto.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = applewmproto.pc
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+INSTALL:
+ $(INSTALL_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/applewmproto/README b/applewmproto/README
new file mode 100644
index 0000000..78e3c08
--- /dev/null
+++ b/applewmproto/README
@@ -0,0 +1,31 @@
+ Apple Rootless Window Management Extension
+
+This extension defines a protcol that allows X window managers
+to better interact with the Mac OS X Aqua user interface when
+running X11 in a rootless mode.
+
+Extension name: Apple-WM
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/applewmproto
+
+ http://cgit.freedesktop.org/xorg/proto/applewmproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/applewmproto/autogen.sh b/applewmproto/autogen.sh
new file mode 100755
index 0000000..fc34bd5
--- /dev/null
+++ b/applewmproto/autogen.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure "$@"
+fi
diff --git a/applewmproto/configure.ac b/applewmproto/configure.ac
new file mode 100644
index 0000000..89dc2dc
--- /dev/null
+++ b/applewmproto/configure.ac
@@ -0,0 +1,13 @@
+AC_PREREQ([2.60])
+AC_INIT([AppleWMProto], [1.4.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ applewmproto.pc])
+AC_OUTPUT
diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0
new file mode 100644
index 0000000..fc4cac3
--- /dev/null
+++ b/autom4te.cache/output.0
@@ -0,0 +1,2612 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.59 for Lg3dProto 5.0.
+@%:@
+@%:@ Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+@%:@
+@%:@ Copyright (C) 2003 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Lg3dProto'
+PACKAGE_TARNAME='lg3dproto'
+PACKAGE_VERSION='5.0'
+PACKAGE_STRING='Lg3dProto 5.0'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot LIB@&t@OBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures Lg3dProto 5.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Lg3dProto 5.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+Lg3dProto configure 5.0
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+@%:@@%:@ ------------- @%:@@%:@
+@%:@@%:@ Output files. @%:@@%:@
+@%:@@%:@ ------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.8"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # Keeping the `.' argument allows $(mkdir_p) to be used without
+ # argument. Indeed, we sometimes output rules like
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined.
+ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+ # expensive solution, as it forces Make to start a sub-shell.)
+ mkdir_p='mkdir -p -- .'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='lg3dproto'
+ VERSION='5.0'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+
+
+# Check whether --with-release-version or --without-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval="$with_release_version"
+ RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi;
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+
+ ac_config_files="$ac_config_files Makefile lg3dproto.pc"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Lg3dProto config.status 5.0
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "lg3dproto.pc" ) CONFIG_FILES="$CONFIG_FILES lg3dproto.pc" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/autom4te.cache/output.1 b/autom4te.cache/output.1
new file mode 100644
index 0000000..4fc58a0
--- /dev/null
+++ b/autom4te.cache/output.1
@@ -0,0 +1,2626 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.59 for Lg3dProto 5.0.
+@%:@
+@%:@ Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+@%:@
+@%:@ Copyright (C) 2003 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Lg3dProto'
+PACKAGE_TARNAME='lg3dproto'
+PACKAGE_VERSION='5.0'
+PACKAGE_STRING='Lg3dProto 5.0'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar LIB@&t@OBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures Lg3dProto 5.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Lg3dProto 5.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+Lg3dProto configure 5.0
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+@%:@@%:@ ------------- @%:@@%:@
+@%:@@%:@ Output files. @%:@@%:@
+@%:@@%:@ ------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.9"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='lg3dproto'
+ VERSION='5.0'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+
+# Check whether --with-release-version or --without-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval="$with_release_version"
+ RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi;
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+
+ ac_config_files="$ac_config_files Makefile lg3dproto.pc"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Lg3dProto config.status 5.0
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "lg3dproto.pc" ) CONFIG_FILES="$CONFIG_FILES lg3dproto.pc" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/autom4te.cache/output.2 b/autom4te.cache/output.2
new file mode 100644
index 0000000..4fc58a0
--- /dev/null
+++ b/autom4te.cache/output.2
@@ -0,0 +1,2626 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.59 for Lg3dProto 5.0.
+@%:@
+@%:@ Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+@%:@
+@%:@ Copyright (C) 2003 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Lg3dProto'
+PACKAGE_TARNAME='lg3dproto'
+PACKAGE_VERSION='5.0'
+PACKAGE_STRING='Lg3dProto 5.0'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar LIB@&t@OBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures Lg3dProto 5.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Lg3dProto 5.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+Lg3dProto configure 5.0
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+@%:@@%:@ ------------- @%:@@%:@
+@%:@@%:@ Output files. @%:@@%:@
+@%:@@%:@ ------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.9"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='lg3dproto'
+ VERSION='5.0'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+
+# Check whether --with-release-version or --without-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval="$with_release_version"
+ RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi;
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+
+ ac_config_files="$ac_config_files Makefile lg3dproto.pc"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Lg3dProto config.status 5.0
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "lg3dproto.pc" ) CONFIG_FILES="$CONFIG_FILES lg3dproto.pc" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/autom4te.cache/requests b/autom4te.cache/requests
new file mode 100644
index 0000000..afce260
--- /dev/null
+++ b/autom4te.cache/requests
@@ -0,0 +1,418 @@
+# This file was generated.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+@request = (
+ bless( [
+ '0',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ '/usr/share/aclocal-1.8/amversion.m4',
+ '/usr/share/aclocal-1.8/auxdir.m4',
+ '/usr/share/aclocal-1.8/cond.m4',
+ '/usr/share/aclocal-1.8/depend.m4',
+ '/usr/share/aclocal-1.8/depout.m4',
+ '/usr/share/aclocal-1.8/init.m4',
+ '/usr/share/aclocal-1.8/install-sh.m4',
+ '/usr/share/aclocal-1.8/lead-dot.m4',
+ '/usr/share/aclocal-1.8/make.m4',
+ '/usr/share/aclocal-1.8/missing.m4',
+ '/usr/share/aclocal-1.8/mkdirp.m4',
+ '/usr/share/aclocal-1.8/options.m4',
+ '/usr/share/aclocal-1.8/sanity.m4',
+ '/usr/share/aclocal-1.8/strip.m4',
+ '/home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal/xorgversion.m4',
+ 'configure.ac'
+ ],
+ {
+ 'm4_pattern_forbid' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AC_C_VOLATILE' => 1,
+ 'AC_TYPE_OFF_T' => 1,
+ 'AC_FUNC_CLOSEDIR_VOID' => 1,
+ 'AC_REPLACE_FNMATCH' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AM_PROG_MKDIR_P' => 1,
+ 'AC_FUNC_STAT' => 1,
+ 'AC_FUNC_WAIT3' => 1,
+ 'AC_HEADER_TIME' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_STRUCT_TM' => 1,
+ 'AM_MISSING_HAS_RUN' => 1,
+ 'AC_FUNC_GETMNTENT' => 1,
+ 'AC_TYPE_MODE_T' => 1,
+ 'AC_CHECK_HEADERS' => 1,
+ 'AC_FUNC_STRTOD' => 1,
+ 'AM_MISSING_PROG' => 1,
+ 'AC_FUNC_STRNLEN' => 1,
+ 'm4_sinclude' => 1,
+ 'AC_PROG_CXX' => 1,
+ 'AC_PATH_X' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'AM_PROG_INSTALL_STRIP' => 1,
+ 'AC_PROG_AWK' => 1,
+ '_m4_warn' => 1,
+ 'XORG_RELEASE_VERSION' => 1,
+ 'AC_HEADER_STDC' => 1,
+ 'AC_HEADER_MAJOR' => 1,
+ 'AM_SANITY_CHECK' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'AC_PROG_GCC_TRADITIONAL' => 1,
+ 'AM_DEP_TRACK' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
+ 'AC_TYPE_SIGNAL' => 1,
+ '_AM_IF_OPTION' => 1,
+ 'AC_TYPE_UID_T' => 1,
+ 'AC_PROG_MAKE_SET' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'm4_pattern_allow' => 1,
+ 'sinclude' => 1,
+ 'AM_SET_LEADING_DOT' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ '_AM_DEPENDENCIES' => 1,
+ 'AC_FUNC_STRERROR_R' => 1,
+ 'AC_PROG_CC' => 1,
+ 'AC_DECL_SYS_SIGLIST' => 1,
+ 'AC_FUNC_FORK' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AC_PROG_YACC' => 1,
+ 'AC_INIT' => 1,
+ 'AC_STRUCT_TIMEZONE' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_FUNC_ALLOCA' => 1,
+ '_AM_SET_OPTION' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_FUNC_GETPGRP' => 1,
+ 'AC_PROG_RANLIB' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AC_FUNC_MMAP' => 1,
+ 'AC_FUNC_REALLOC' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'AC_CHECK_TYPES' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_CHECK_MEMBERS' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
+ 'AC_HEADER_STAT' => 1,
+ 'AC_C_INLINE' => 1,
+ 'AC_PROG_CPP' => 1,
+ 'AC_C_CONST' => 1,
+ 'AC_PROG_LEX' => 1,
+ 'AC_TYPE_PID_T' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'include' => 1,
+ 'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
+ 'AC_PROG_INSTALL' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_FUNC_OBSTACK' => 1,
+ 'AC_CHECK_LIB' => 1,
+ 'AC_FUNC_MALLOC' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_FUNC_GETLOADAVG' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_FUNC_FSEEKO' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ '_AM_MANGLE_OPTION' => 1,
+ 'AC_FUNC_MKTIME' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ 'AC_HEADER_SYS_WAIT' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'AC_PROG_LN_S' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ 'm4_include' => 1,
+ 'AC_HEADER_DIRENT' => 1,
+ '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+ 'AC_CHECK_FUNCS' => 1,
+ 'AM_MAKE_INCLUDE' => 1
+ }
+ ], 'Autom4te::Request' ),
+ bless( [
+ '1',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ 'aclocal.m4',
+ 'configure.ac'
+ ],
+ {
+ '_LT_AC_TAGCONFIG' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AC_TYPE_OFF_T' => 1,
+ 'AC_C_VOLATILE' => 1,
+ 'AC_FUNC_CLOSEDIR_VOID' => 1,
+ 'AC_REPLACE_FNMATCH' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_FUNC_STAT' => 1,
+ 'AC_HEADER_TIME' => 1,
+ 'AC_FUNC_WAIT3' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_STRUCT_TM' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_TYPE_MODE_T' => 1,
+ 'AC_FUNC_GETMNTENT' => 1,
+ 'AC_FUNC_STRTOD' => 1,
+ 'AC_CHECK_HEADERS' => 1,
+ 'AC_FUNC_STRNLEN' => 1,
+ 'm4_sinclude' => 1,
+ 'AC_PROG_CXX' => 1,
+ 'AC_PATH_X' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'AC_PROG_AWK' => 1,
+ '_m4_warn' => 1,
+ 'AC_HEADER_STDC' => 1,
+ 'AC_HEADER_MAJOR' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'AC_PROG_GCC_TRADITIONAL' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
+ 'AC_CANONICAL_BUILD' => 1,
+ 'AC_TYPE_SIGNAL' => 1,
+ 'AC_TYPE_UID_T' => 1,
+ 'AC_PROG_MAKE_SET' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'sinclude' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'AC_FUNC_STRERROR_R' => 1,
+ 'AC_PROG_CC' => 1,
+ 'AC_DECL_SYS_SIGLIST' => 1,
+ 'AC_FUNC_FORK' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'AC_PROG_YACC' => 1,
+ 'AC_LIBLTDL_CONVENIENCE' => 1,
+ 'AC_STRUCT_TIMEZONE' => 1,
+ 'AC_INIT' => 1,
+ 'AC_LIBLTDL_INSTALLABLE' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_FUNC_ALLOCA' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_FUNC_GETPGRP' => 1,
+ 'AC_PROG_RANLIB' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AC_FUNC_MMAP' => 1,
+ 'AC_FUNC_REALLOC' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AC_CHECK_TYPES' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'AC_CHECK_MEMBERS' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
+ 'AC_HEADER_STAT' => 1,
+ 'AC_C_INLINE' => 1,
+ 'AC_PROG_CPP' => 1,
+ 'AM_ENABLE_MULTILIB' => 1,
+ 'AC_TYPE_PID_T' => 1,
+ 'AC_PROG_LEX' => 1,
+ 'AC_C_CONST' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'include' => 1,
+ 'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AC_PROG_INSTALL' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_CHECK_LIB' => 1,
+ 'AC_FUNC_OBSTACK' => 1,
+ 'AC_FUNC_MALLOC' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
+ 'AC_FUNC_GETLOADAVG' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_FUNC_FSEEKO' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_FUNC_MKTIME' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_HEADER_SYS_WAIT' => 1,
+ 'AC_PROG_LN_S' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'm4_include' => 1,
+ 'AC_HEADER_DIRENT' => 1,
+ 'AC_CHECK_FUNCS' => 1
+ }
+ ], 'Autom4te::Request' ),
+ bless( [
+ '2',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ '/usr/share/aclocal-1.9/amversion.m4',
+ '/usr/share/aclocal-1.9/auxdir.m4',
+ '/usr/share/aclocal-1.9/cond.m4',
+ '/usr/share/aclocal-1.9/depend.m4',
+ '/usr/share/aclocal-1.9/depout.m4',
+ '/usr/share/aclocal-1.9/init.m4',
+ '/usr/share/aclocal-1.9/install-sh.m4',
+ '/usr/share/aclocal-1.9/lead-dot.m4',
+ '/usr/share/aclocal-1.9/make.m4',
+ '/usr/share/aclocal-1.9/missing.m4',
+ '/usr/share/aclocal-1.9/mkdirp.m4',
+ '/usr/share/aclocal-1.9/options.m4',
+ '/usr/share/aclocal-1.9/runlog.m4',
+ '/usr/share/aclocal-1.9/sanity.m4',
+ '/usr/share/aclocal-1.9/strip.m4',
+ '/usr/share/aclocal-1.9/tar.m4',
+ '/home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal/xorgversion.m4',
+ 'configure.ac'
+ ],
+ {
+ 'm4_pattern_forbid' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AC_C_VOLATILE' => 1,
+ 'AC_TYPE_OFF_T' => 1,
+ 'AC_FUNC_CLOSEDIR_VOID' => 1,
+ 'AC_REPLACE_FNMATCH' => 1,
+ 'AC_DEFUN' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AM_PROG_MKDIR_P' => 1,
+ 'AC_FUNC_STAT' => 1,
+ 'AC_FUNC_WAIT3' => 1,
+ 'AC_HEADER_TIME' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_STRUCT_TM' => 1,
+ 'AM_MISSING_HAS_RUN' => 1,
+ 'AC_FUNC_GETMNTENT' => 1,
+ 'AC_TYPE_MODE_T' => 1,
+ 'AC_CHECK_HEADERS' => 1,
+ 'AC_FUNC_STRTOD' => 1,
+ 'AM_MISSING_PROG' => 1,
+ 'AC_FUNC_STRNLEN' => 1,
+ 'm4_sinclude' => 1,
+ 'AC_PROG_CXX' => 1,
+ 'AC_PATH_X' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'AM_PROG_INSTALL_STRIP' => 1,
+ 'AC_PROG_AWK' => 1,
+ '_m4_warn' => 1,
+ 'XORG_RELEASE_VERSION' => 1,
+ 'AC_HEADER_STDC' => 1,
+ 'AC_HEADER_MAJOR' => 1,
+ 'AM_SANITY_CHECK' => 1,
+ '_AM_PROG_TAR' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'AC_PROG_GCC_TRADITIONAL' => 1,
+ 'AM_DEP_TRACK' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
+ 'AC_TYPE_SIGNAL' => 1,
+ '_AM_IF_OPTION' => 1,
+ 'AC_TYPE_UID_T' => 1,
+ 'AC_PROG_MAKE_SET' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'm4_pattern_allow' => 1,
+ 'sinclude' => 1,
+ 'AM_SET_LEADING_DOT' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ '_AM_DEPENDENCIES' => 1,
+ 'AC_FUNC_STRERROR_R' => 1,
+ 'AC_PROG_CC' => 1,
+ 'AC_DECL_SYS_SIGLIST' => 1,
+ 'AC_FUNC_FORK' => 1,
+ 'AU_DEFUN' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AC_PROG_YACC' => 1,
+ 'AC_INIT' => 1,
+ 'AC_STRUCT_TIMEZONE' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_FUNC_ALLOCA' => 1,
+ '_AM_SET_OPTION' => 1,
+ 'AC_FUNC_GETPGRP' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_PROG_RANLIB' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AC_FUNC_MMAP' => 1,
+ 'AC_FUNC_REALLOC' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'AC_CHECK_TYPES' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_CHECK_MEMBERS' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
+ 'AC_HEADER_STAT' => 1,
+ 'AC_C_INLINE' => 1,
+ 'AC_PROG_CPP' => 1,
+ 'AC_C_CONST' => 1,
+ 'AC_PROG_LEX' => 1,
+ 'AC_TYPE_PID_T' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'include' => 1,
+ 'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
+ 'AC_PROG_INSTALL' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_FUNC_OBSTACK' => 1,
+ 'AC_CHECK_LIB' => 1,
+ 'AC_FUNC_MALLOC' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
+ 'AM_RUN_LOG' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_FUNC_GETLOADAVG' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_FUNC_FSEEKO' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ '_AM_MANGLE_OPTION' => 1,
+ 'AC_FUNC_MKTIME' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ 'AC_HEADER_SYS_WAIT' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'AC_PROG_LN_S' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ 'm4_include' => 1,
+ 'AC_HEADER_DIRENT' => 1,
+ '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+ 'AC_CHECK_FUNCS' => 1,
+ 'AM_MAKE_INCLUDE' => 1
+ }
+ ], 'Autom4te::Request' )
+ );
+
diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0
new file mode 100644
index 0000000..24a0b33
--- /dev/null
+++ b/autom4te.cache/traces.0
@@ -0,0 +1,128 @@
+m4trace:configure.ac:2: -1- AC_INIT([Lg3dProto], [5.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:2: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.ac:2: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:2: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:2: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:2: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:2: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:2: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.ac:2: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:2: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:2: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:2: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:2: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:2: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:2: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.ac:2: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:2: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:3: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2])
+m4trace:configure.ac:3: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:3: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
+m4trace:configure.ac:3: -1- AM_AUTOMAKE_VERSION([1.8.3])
+m4trace:configure.ac:3: -1- AC_PROG_INSTALL
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:3: -1- AC_SUBST([CYGPATH_W])
+m4trace:configure.ac:3: -1- _AM_SET_OPTIONS([foreign dist-bzip2])
+m4trace:configure.ac:3: -1- _AM_SET_OPTION([foreign])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([foreign])
+m4trace:configure.ac:3: -1- _AM_SET_OPTION([dist-bzip2])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([dist-bzip2])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
+m4trace:configure.ac:3: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
+m4trace:configure.ac:3: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([no-define])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
+#undef PACKAGE])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
+m4trace:configure.ac:3: -1- AH_OUTPUT([VERSION], [/* Version number of package */
+#undef VERSION])
+m4trace:configure.ac:3: -1- AM_SANITY_CHECK
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+m4trace:configure.ac:3: -1- AM_MISSING_HAS_RUN
+m4trace:configure.ac:3: -1- AM_AUX_DIR_EXPAND
+m4trace:configure.ac:3: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
+m4trace:configure.ac:3: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AMTAR], [tar])
+m4trace:configure.ac:3: -1- AC_SUBST([AMTAR])
+m4trace:configure.ac:3: -1- AM_PROG_INSTALL_SH
+m4trace:configure.ac:3: -1- AC_SUBST([install_sh])
+m4trace:configure.ac:3: -1- AM_PROG_INSTALL_STRIP
+m4trace:configure.ac:3: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:3: -1- AC_SUBST([ac_ct_STRIP])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:3: -1- AM_PROG_MKDIR_P
+m4trace:configure.ac:3: -1- AC_SUBST([mkdir_p])
+m4trace:configure.ac:3: -1- AC_PROG_AWK
+m4trace:configure.ac:3: -1- AC_SUBST([AWK])
+m4trace:configure.ac:3: -1- AC_PROG_MAKE_SET
+m4trace:configure.ac:3: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.ac:3: -1- AM_SET_LEADING_DOT
+m4trace:configure.ac:3: -1- AC_SUBST([am__leading_dot])
+m4trace:configure.ac:3: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:5: -1- XORG_RELEASE_VERSION
+m4trace:configure.ac:5: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [/usr/src/packages/BUILD/autoconf-2.59/tests/../lib/autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+/home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal/xorgversion.m4:43: XORG_RELEASE_VERSION is expanded from...
+configure.ac:5: the top level])
+m4trace:configure.ac:8: -1- AC_CONFIG_FILES([Makefile
+ lg3dproto.pc])
+m4trace:configure.ac:8: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.ac:8: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.ac:8: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
diff --git a/autom4te.cache/traces.1 b/autom4te.cache/traces.1
new file mode 100644
index 0000000..b0bdd1c
--- /dev/null
+++ b/autom4te.cache/traces.1
@@ -0,0 +1,97 @@
+m4trace:configure.ac:2: -1- AC_INIT([Lg3dProto], [5.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:2: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.ac:2: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:2: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:2: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:2: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:2: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:2: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.ac:2: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:2: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:2: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:2: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:2: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:2: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:2: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.ac:2: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:2: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:3: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2])
+m4trace:configure.ac:3: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:3: -1- AM_AUTOMAKE_VERSION([1.9.6])
+m4trace:configure.ac:3: -1- AC_PROG_INSTALL
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:3: -1- AC_SUBST([CYGPATH_W])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
+m4trace:configure.ac:3: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
+#undef PACKAGE])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
+m4trace:configure.ac:3: -1- AH_OUTPUT([VERSION], [/* Version number of package */
+#undef VERSION])
+m4trace:configure.ac:3: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.ac:3: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.ac:3: -1- AC_SUBST([install_sh])
+m4trace:configure.ac:3: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:3: -1- AC_SUBST([ac_ct_STRIP])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:3: -1- AC_SUBST([mkdir_p])
+m4trace:configure.ac:3: -1- AC_PROG_AWK
+m4trace:configure.ac:3: -1- AC_SUBST([AWK])
+m4trace:configure.ac:3: -1- AC_PROG_MAKE_SET
+m4trace:configure.ac:3: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.ac:3: -1- AC_SUBST([am__leading_dot])
+m4trace:configure.ac:3: -1- AC_SUBST([AMTAR])
+m4trace:configure.ac:3: -1- AC_SUBST([am__tar])
+m4trace:configure.ac:3: -1- AC_SUBST([am__untar])
+m4trace:configure.ac:5: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+aclocal.m4:584: XORG_RELEASE_VERSION is expanded from...
+configure.ac:5: the top level])
+m4trace:configure.ac:8: -1- AC_CONFIG_FILES([Makefile
+ lg3dproto.pc])
+m4trace:configure.ac:8: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.ac:8: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.ac:8: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
diff --git a/autom4te.cache/traces.2 b/autom4te.cache/traces.2
new file mode 100644
index 0000000..d88ce08
--- /dev/null
+++ b/autom4te.cache/traces.2
@@ -0,0 +1,630 @@
+m4trace:/usr/share/aclocal-1.9/amversion.m4:13: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+m4trace:/usr/share/aclocal-1.9/amversion.m4:20: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])])
+m4trace:/usr/share/aclocal-1.9/auxdir.m4:52: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+m4trace:/usr/share/aclocal-1.9/cond.m4:32: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+m4trace:/usr/share/aclocal-1.9/depend.m4:131: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+m4trace:/usr/share/aclocal-1.9/depend.m4:141: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+m4trace:/usr/share/aclocal-1.9/depend.m4:156: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+m4trace:/usr/share/aclocal-1.9/depout.m4:53: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])
+m4trace:/usr/share/aclocal-1.9/depout.m4:67: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+m4trace:/usr/share/aclocal-1.9/init.m4:92: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+m4trace:/usr/share/aclocal-1.9/init.m4:113: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+m4trace:/usr/share/aclocal-1.9/install-sh.m4:14: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+m4trace:/usr/share/aclocal-1.9/lead-dot.m4:21: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+m4trace:/usr/share/aclocal-1.9/make.m4:51: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+m4trace:/usr/share/aclocal-1.9/missing.m4:17: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+m4trace:/usr/share/aclocal-1.9/missing.m4:34: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+m4trace:/usr/share/aclocal-1.9/mkdirp.m4:63: -1- AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+m4trace:/usr/share/aclocal-1.9/options.m4:14: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+m4trace:/usr/share/aclocal-1.9/options.m4:20: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+m4trace:/usr/share/aclocal-1.9/options.m4:26: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+m4trace:/usr/share/aclocal-1.9/options.m4:32: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+m4trace:/usr/share/aclocal-1.9/runlog.m4:17: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+m4trace:/usr/share/aclocal-1.9/sanity.m4:51: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+m4trace:/usr/share/aclocal-1.9/strip.m4:28: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+m4trace:/usr/share/aclocal-1.9/tar.m4:95: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+])
+m4trace:/home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal/xorgversion.m4:43: -1- AC_DEFUN([XORG_RELEASE_VERSION], [
+ AC_ARG_WITH(release-version,
+ AC_HELP_STRING([--with-release-version=STRING],
+ [Use release version string in package name]),
+ [RELEASE_VERSION="$withval"],
+ [RELEASE_VERSION=""])
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ AC_MSG_NOTICE([Building with package name set to $PACKAGE])
+ fi
+])
+m4trace:configure.ac:2: -1- AC_INIT([Lg3dProto], [5.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:2: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.ac:2: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:2: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:2: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:2: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:2: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:2: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.ac:2: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:2: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:2: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:2: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:2: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:2: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:2: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.ac:2: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:2: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:2: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:3: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2])
+m4trace:configure.ac:3: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:3: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
+m4trace:configure.ac:3: -1- AM_AUTOMAKE_VERSION([1.9.6])
+m4trace:configure.ac:3: -1- AC_PROG_INSTALL
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:3: -1- AC_SUBST([CYGPATH_W])
+m4trace:configure.ac:3: -1- _AM_SET_OPTIONS([foreign dist-bzip2])
+m4trace:configure.ac:3: -1- _AM_SET_OPTION([foreign])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([foreign])
+m4trace:configure.ac:3: -1- _AM_SET_OPTION([dist-bzip2])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([dist-bzip2])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
+m4trace:configure.ac:3: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
+m4trace:configure.ac:3: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([no-define])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
+#undef PACKAGE])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
+m4trace:configure.ac:3: -1- AH_OUTPUT([VERSION], [/* Version number of package */
+#undef VERSION])
+m4trace:configure.ac:3: -1- AM_SANITY_CHECK
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+m4trace:configure.ac:3: -1- AM_MISSING_HAS_RUN
+m4trace:configure.ac:3: -1- AM_AUX_DIR_EXPAND
+m4trace:configure.ac:3: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
+m4trace:configure.ac:3: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
+m4trace:configure.ac:3: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.ac:3: -1- AM_PROG_INSTALL_SH
+m4trace:configure.ac:3: -1- AC_SUBST([install_sh])
+m4trace:configure.ac:3: -1- AM_PROG_INSTALL_STRIP
+m4trace:configure.ac:3: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:3: -1- AC_SUBST([ac_ct_STRIP])
+m4trace:configure.ac:3: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:3: -1- AM_PROG_MKDIR_P
+m4trace:configure.ac:3: -1- AC_SUBST([mkdir_p])
+m4trace:configure.ac:3: -1- AC_PROG_AWK
+m4trace:configure.ac:3: -1- AC_SUBST([AWK])
+m4trace:configure.ac:3: -1- AC_PROG_MAKE_SET
+m4trace:configure.ac:3: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.ac:3: -1- AM_SET_LEADING_DOT
+m4trace:configure.ac:3: -1- AC_SUBST([am__leading_dot])
+m4trace:configure.ac:3: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([tar-ustar])
+m4trace:configure.ac:3: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([tar-pax])
+m4trace:configure.ac:3: -1- _AM_PROG_TAR([v7])
+m4trace:configure.ac:3: -1- AM_MISSING_PROG([AMTAR], [tar])
+m4trace:configure.ac:3: -1- AC_SUBST([AMTAR])
+m4trace:configure.ac:3: -1- AC_SUBST([am__tar])
+m4trace:configure.ac:3: -1- AC_SUBST([am__untar])
+m4trace:configure.ac:3: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+m4trace:configure.ac:3: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:5: -1- XORG_RELEASE_VERSION
+m4trace:configure.ac:5: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
+/home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal/xorgversion.m4:43: XORG_RELEASE_VERSION is expanded from...
+configure.ac:5: the top level])
+m4trace:configure.ac:8: -1- AC_CONFIG_FILES([Makefile
+ lg3dproto.pc])
+m4trace:configure.ac:8: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.ac:8: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.ac:8: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
diff --git a/bigreqsproto.h b/bigreqsproto.h
new file mode 100644
index 0000000..bd0f8e5
--- /dev/null
+++ b/bigreqsproto.h
@@ -0,0 +1,67 @@
+/*
+
+Copyright 1992, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+#ifndef _BIGREQSPROTO_H_
+#define _BIGREQSPROTO_H_
+
+#define X_BigReqEnable 0
+
+#define XBigReqNumberEvents 0
+
+#define XBigReqNumberErrors 0
+
+#define XBigReqExtensionName "BIG-REQUESTS"
+
+typedef struct {
+ CARD8 reqType; /* always XBigReqCode */
+ CARD8 brReqType; /* always X_BigReqEnable */
+ CARD16 length B16;
+} xBigReqEnableReq;
+#define sz_xBigReqEnableReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 max_request_size B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xBigReqEnableReply;
+#define sz_xBigReqEnableReply 32
+
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 data;
+ CARD16 zero B16;
+ CARD32 length B32;
+} xBigReq;
+
+#endif /* _BIGREQSPROTO_H_ */
diff --git a/bigreqsproto.pc.in b/bigreqsproto.pc.in
new file mode 100644
index 0000000..e3adbfd
--- /dev/null
+++ b/bigreqsproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: BigReqsProto
+Description: BigReqs extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/bigreqsproto/.gitignore b/bigreqsproto/.gitignore
new file mode 100644
index 0000000..9edb463
--- /dev/null
+++ b/bigreqsproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for bigreqsproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/bigreqsproto/COPYING b/bigreqsproto/COPYING
new file mode 100644
index 0000000..142f2fa
--- /dev/null
+++ b/bigreqsproto/COPYING
@@ -0,0 +1,21 @@
+Copyright 1992, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
diff --git a/bigreqsproto/Makefile.am b/bigreqsproto/Makefile.am
new file mode 100644
index 0000000..d39cc1e
--- /dev/null
+++ b/bigreqsproto/Makefile.am
@@ -0,0 +1,22 @@
+SUBDIRS=specs
+
+bigreqsdir = $(includedir)/X11/extensions
+bigreqs_HEADERS = \
+ bigreqsproto.h \
+ bigreqstr.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bigreqsproto.pc
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/bigreqsproto/README b/bigreqsproto/README
new file mode 100644
index 0000000..f8b14de
--- /dev/null
+++ b/bigreqsproto/README
@@ -0,0 +1,30 @@
+ Big Requests Extension
+
+This extension defines a protocol to enable the use of requests
+that exceed 262140 bytes in length.
+
+Extension name: BIG-REQUESTS
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/bigreqsproto
+
+ http://cgit.freedesktop.org/xorg/proto/bigreqsproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/bigreqsproto/autogen.sh b/bigreqsproto/autogen.sh
new file mode 100755
index 0000000..00747fd
--- /dev/null
+++ b/bigreqsproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH bigreqsproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/bigreqsproto/configure.ac b/bigreqsproto/configure.ac
new file mode 100644
index 0000000..79da47d
--- /dev/null
+++ b/bigreqsproto/configure.ac
@@ -0,0 +1,20 @@
+AC_PREREQ([2.60])
+AC_INIT([BigReqsProto], [1.1.2],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros minimum of 1.12 for DocBook external references
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.12)
+XORG_DEFAULT_OPTIONS
+XORG_ENABLE_SPECS
+XORG_WITH_XMLTO(0.0.22)
+XORG_WITH_FOP
+XORG_WITH_XSLTPROC
+XORG_CHECK_SGML_DOCTOOLS(1.8)
+
+AC_CONFIG_FILES([Makefile
+ specs/Makefile
+ bigreqsproto.pc])
+AC_OUTPUT
diff --git a/bigreqsproto/docbook.am b/bigreqsproto/docbook.am
new file mode 100644
index 0000000..bba4d54
--- /dev/null
+++ b/bigreqsproto/docbook.am
@@ -0,0 +1,105 @@
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# Variables set by the calling Makefile:
+# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
+# docbook: the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Users Documentation and Functional Specifications.
+# Do not use for Developer Documentation which is not installed and does not require olink.
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# DocBook/XML generated output formats to be installed
+shelf_DATA =
+
+# DocBook/XML file with chapters, appendix and images it includes
+dist_shelf_DATA = $(docbook) $(chapters)
+
+if HAVE_XMLTO
+if HAVE_STYLESHEETS
+
+XMLTO_SEARCHPATH_FLAGS = \
+ --searchpath "$(XORG_SGML_PATH)/X11" \
+ --searchpath "$(abs_top_builddir)"
+XMLTO_HTML_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XMLTO_HTML_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_HTML_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.html)
+%.html: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
+
+if HAVE_XMLTO_TEXT
+
+shelf_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+if HAVE_FOP
+XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
+XMLTO_PDF_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+XMLTO_FO_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_FO_STYLESHEET_FLAGS) \
+ $(XMLTO_FO_IMAGEPATH_FLAGS) \
+ $(XMLTO_PDF_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.pdf)
+%.pdf: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+
+shelf_DATA += $(docbook:.xml=.ps)
+%.ps: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+
+# Generate documents cross-reference target databases
+if HAVE_XSLTPROC
+
+XSLT_SEARCHPATH_FLAGS = \
+ --path "$(XORG_SGML_PATH)/X11" \
+ --path "$(abs_top_builddir)"
+XSLT_OLINK_FLAGS = \
+ --stringparam targets.filename "$@" \
+ --stringparam collect.xref.targets "only" \
+ --stringparam olink.base.uri "$(@:.db=)"
+
+XSLT_HTML_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XSLT_PDF_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+shelf_DATA += $(docbook:.xml=.html.db)
+%.html.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
+
+shelf_DATA += $(docbook:.xml=.pdf.db)
+%.pdf.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
+
+endif HAVE_XSLTPROC
+endif HAVE_STYLESHEETS
+endif HAVE_XMLTO
+
+CLEANFILES = $(shelf_DATA)
diff --git a/bigreqsproto/specs/.gitignore b/bigreqsproto/specs/.gitignore
new file mode 100644
index 0000000..92946c9
--- /dev/null
+++ b/bigreqsproto/specs/.gitignore
@@ -0,0 +1,5 @@
+*.html
+*.ps
+*.pdf
+*.txt
+*.db
diff --git a/bigreqsproto/specs/Makefile.am b/bigreqsproto/specs/Makefile.am
new file mode 100644
index 0000000..5917b8f
--- /dev/null
+++ b/bigreqsproto/specs/Makefile.am
@@ -0,0 +1,13 @@
+
+if ENABLE_SPECS
+
+# Main DocBook/XML files (DOCTYPE book)
+docbook = bigreq.xml
+
+# The location where the DocBook/XML files and their generated formats are installed
+shelfdir = $(docdir)
+
+# Generate DocBook/XML output formats with or without stylesheets
+include $(top_srcdir)/docbook.am
+
+endif ENABLE_SPECS
diff --git a/bigreqstr.h b/bigreqstr.h
new file mode 100644
index 0000000..0a023db
--- /dev/null
+++ b/bigreqstr.h
@@ -0,0 +1,3 @@
+#warning "bigreqstr.h is obsolete and may be removed in the future."
+#warning "include <X11/extensions/bigreqsproto.h> for the protocol defines."
+#include <X11/extensions/bigreqsproto.h>
diff --git a/calibrateproto/Makefile.am b/calibrateproto/Makefile.am
new file mode 100644
index 0000000..2e7dee2
--- /dev/null
+++ b/calibrateproto/Makefile.am
@@ -0,0 +1,39 @@
+#
+# Copyright © 2003 Philip Blundell
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Philip Blundell not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Philip Blundell makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+#
+
+XCalibrateincludedir = $(includedir)/X11/extensions
+XCalibrateinclude_HEADERS = xcalibrateproto.h xcalibratewire.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xcalibrateproto.pc
+
+EXTRA_DIST = autogen.sh xcalibrateproto.pc.in
+
+EXTRA_DIST += ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
diff --git a/calibrateproto/autogen.sh b/calibrateproto/autogen.sh
new file mode 100755
index 0000000..904cd67
--- /dev/null
+++ b/calibrateproto/autogen.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/calibrateproto/configure.ac b/calibrateproto/configure.ac
new file mode 100644
index 0000000..eb41072
--- /dev/null
+++ b/calibrateproto/configure.ac
@@ -0,0 +1,6 @@
+AC_PREREQ([2.59])
+AC_INIT([xcalibrateproto], [0.1.0], [pb@nexus.co.uk])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+AC_OUTPUT([Makefile
+ xcalibrateproto.pc])
diff --git a/composite.h b/composite.h
new file mode 100644
index 0000000..e460118
--- /dev/null
+++ b/composite.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _COMPOSITE_H_
+#define _COMPOSITE_H_
+
+#include <X11/extensions/xfixeswire.h>
+
+#define COMPOSITE_NAME "Composite"
+#define COMPOSITE_MAJOR 0
+#define COMPOSITE_MINOR 4
+
+#define CompositeRedirectAutomatic 0
+#define CompositeRedirectManual 1
+
+#define X_CompositeQueryVersion 0
+#define X_CompositeRedirectWindow 1
+#define X_CompositeRedirectSubwindows 2
+#define X_CompositeUnredirectWindow 3
+#define X_CompositeUnredirectSubwindows 4
+#define X_CompositeCreateRegionFromBorderClip 5
+#define X_CompositeNameWindowPixmap 6
+#define X_CompositeGetOverlayWindow 7
+#define X_CompositeReleaseOverlayWindow 8
+
+#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1)
+
+#define CompositeNumberEvents 0
+
+#endif /* _COMPOSITE_H_ */
diff --git a/compositeproto.h b/compositeproto.h
new file mode 100644
index 0000000..0417f2c
--- /dev/null
+++ b/compositeproto.h
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _COMPOSITEPROTO_H_
+#define _COMPOSITEPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/composite.h>
+
+#define Window CARD32
+#define Region CARD32
+#define Pixmap CARD32
+
+/*
+ * requests and replies
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xCompositeQueryVersionReq;
+
+#define sz_xCompositeQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xCompositeQueryVersionReply;
+
+#define sz_xCompositeQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeRedirectWindowReq;
+
+#define sz_xCompositeRedirectWindowReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeRedirectSubwindowsReq;
+
+#define sz_xCompositeRedirectSubwindowsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeUnredirectWindowReq;
+
+#define sz_xCompositeUnredirectWindowReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD8 update;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xCompositeUnredirectSubwindowsReq;
+
+#define sz_xCompositeUnredirectSubwindowsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Region region B32;
+ Window window B32;
+} xCompositeCreateRegionFromBorderClipReq;
+
+#define sz_xCompositeCreateRegionFromBorderClipReq 12
+
+/* Version 0.2 additions */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length;
+ Window window B32;
+ Pixmap pixmap B32;
+} xCompositeNameWindowPixmapReq;
+
+#define sz_xCompositeNameWindowPixmapReq 12
+
+/* Version 0.3 additions */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+} xCompositeGetOverlayWindowReq;
+
+#define sz_xCompositeGetOverlayWindowReq sizeof(xCompositeGetOverlayWindowReq)
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Window overlayWin B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xCompositeGetOverlayWindowReply;
+
+#define sz_xCompositeGetOverlayWindowReply sizeof(xCompositeGetOverlayWindowReply)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 compositeReqType;
+ CARD16 length B16;
+ Window window B32;
+} xCompositeReleaseOverlayWindowReq;
+
+#define sz_xCompositeReleaseOverlayWindowReq sizeof(xCompositeReleaseOverlayWindowReq)
+
+#undef Window
+#undef Region
+#undef Pixmap
+
+#endif /* _COMPOSITEPROTO_H_ */
diff --git a/compositeproto.pc.in b/compositeproto.pc.in
new file mode 100644
index 0000000..6348022
--- /dev/null
+++ b/compositeproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: CompositeExt
+Description: Composite extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/compositeproto.txt b/compositeproto.txt
new file mode 100644
index 0000000..c1d099c
--- /dev/null
+++ b/compositeproto.txt
@@ -0,0 +1,299 @@
+ Composite Extension
+ Version 0.4
+ 2007-7-3
+ Keith Packard
+ keithp@keithp.com
+ Deron Johnson
+ deron.johnson@sun.com
+
+1. Introduction
+
+Many user interface operations would benefit from having pixel contents of
+window hierarchies available without respect to sibling and antecedent
+clipping. In addition, placing control over the composition of these pixel
+contents into a final screen image in an external application will enable
+a flexible system for dynamic application content presentation.
+
+2. Acknowledgements
+
+This small extension has been brewing for several years, contributors to
+both early prototypes and the final design include:
+
+ + Bill Haneman for motivating the ability to magnify occluded windows
+ with his work on accessibility
+
+ + Carsten Haitzler for Enlightenment, the original eye-candy window
+ manager which demonstrated that clever hacks are an awfully
+ close substitute for changes in the underlying system.
+
+ + Jim Gettys for key insights into the relationship between damage
+ events and per-window pixmap usage
+
+ + Mike Harris and Owen Taylor for figuring out what to call it.
+
+ + Deron Johnson for the Looking Glass implementation and
+ a prototype of the coordinate transformation mechanism.
+
+ + Ryan Lortie for helping figure out reasonable parent clipping
+ semantics in the presense of manual redirected children.
+
+3. Architecture
+
+The composite extension provides three related mechanisms:
+
+ 1. Per-hierarchy storage. The rendering of an entire hierarchy of windows
+ is redirected to off-screen storage. The pixels of that hierarchy
+ are available whenever it is viewable. Storage is automatically
+ reallocated when the top level window changes size. Contents beyond
+ the geometry of the top window are not preserved.
+
+ 2. Automatic shadow update. When a hierarchy is rendered off-screen,
+ the X server provides an automatic mechanism for presenting those
+ contents within the parent window. The implementation is free to
+ make this update lag behind actual rendering operations by an
+ unspecified amount of time. This automatic update mechanism may
+ be disabled so that the parent window contents can be completely
+ determined by an external application.
+
+ 3. External parent - child pointer coordinate transformation.
+ When a hierarchy is under manual compositing, the relationship
+ of coordinates within the parent to those in the child may
+ not be known within the X server. This mechanism provides
+ for redirection of these transformations through a client.
+
+Per-hierarchy storage may be created for individual windows or for all
+children of a window. Manual shadow update may be selected by only a single
+application for each window; manual update may also be selected on a
+per-window basis or for each child of a window. Detecting when to update
+may be done with the Damage extension.
+
+The off-screen storage includes the window contents, its borders and the
+contents of all descendants.
+
+3.1 NameWindowPixmap
+
+Version 0.2 of the protocol introduces a mechanism for associating an XID
+with the off-screen pixmap used to store these contents. This can be used
+to hold onto window contents after the window is unmapped (and hence animate
+it's disappearance), and also to access the border of the window, which is
+not reachable through the Window ID itself. A new pixmap is created each
+time the window is mapped or resized; as these events are nicely signalled
+with existing events, no additional notification is needed. The old pixmap
+will remain allocated as long as the Pixmap ID is left valid, it is
+important that the client use the FreePixmap request when it is done with
+the contents and to create a new name for the newly allocated pixmap.
+
+In automatic update mode, the X server is itself responsible for presenting
+the child window contents within the parent. It seems reasonable, then, for
+rendering to the parent window to be clipped so as not to interfere with any
+child window content. In an environment with a mixure of manual and
+automatic updating windows, rendering to the parent in the area nominally
+occupied by a manual update window should be able to affect parent pixel
+values in those areas, but such rendering should be clipped to automatic
+update windows, and presumably to other manual update windows managed by
+other applications. In any of these cases, it should be easy to ensure that
+rendering has no effect on any non-redirected windows.
+
+Instead of attempting to define new clipping modes for rendering, the
+Composite extension instead defines ClipByChildren rendering to the parent
+to exclude regions occupied by redirected windows (either automatic or
+manual). The CreateRegionFromBorderClip request can be used along with
+IncludeInferiors clipping modes to restrict manual shadow updates to the
+apporpriate region of the screen. Bracketing operations with
+GrabServer/UngrabServer will permit atomic sequences that can update the
+screen without artifact. As all of these operations are asynchronous,
+network latency should not adversely affect update latency.
+
+3.2 Composite Overlay Window
+
+Version 0.3 of the protocol adds the Composite Overlay Window, which
+provides compositing managers with a surface on which to draw without
+interference. This window is always above normal windows and is always
+below the screen saver window. It is an InputOutput window whose width
+and height are the screen dimensions. Its visual is the root visual
+and its border width is zero. Attempts to redirect it using the
+composite extension are ignored. This window does not appear in the
+reply of the QueryTree request. It is also an override redirect window.
+These last two features make it invisible to window managers and other X11
+clients. The only way to access the XID of this window is via the
+CompositeGetOverlayWindow request. Initially, the Composite Overlay
+Window is unmapped.
+
+CompositeGetOverlayWindow returns the XID of the Composite Overlay
+Window. If the window has not yet been mapped, it is mapped by this
+request. When all clients who have called this request have terminated
+their X11 connections the window is unmapped.
+
+Composite managers may render directly to the Composite Overlay
+Window, or they may reparent other windows to be children of this
+window and render to these. Multiple clients may render to the
+Composite Overlay Window, create child windows of it, reshape it, and
+redefine its input region, but the specific arbitration rules followed
+by these clients is not defined by this specification; these policies
+should be defined by the clients themselves.
+
+3.3 Clipping semantics redefined
+
+Version 0.4 of the protocol changes the semantics of clipping in the
+presense of manual redirect children. In version 0.3, a parent was always
+clipped to child windows, independent of the kind of redirection going on.
+With version 0.4, the parent is no longer clipped to child windows which are
+manually redirected. This means the parent can draw in the child region without using
+IncludeInferiors mode, and (perhaps more importantly), it will receive
+expose events in those regions caused by other actions. This new behaviour
+is not selectable.
+
+4. Errors
+
+The composite extension does not define any new errors.
+
+5. Types
+
+ UPDATETYPE { Automatic, Manual }
+
+ CompositeCoordinate
+ child: Window
+ x, y: CARD16
+
+7. Extension Initialization
+
+The client must negotiate the version of the extension before executing
+extension requests. Otherwise, the server will return BadRequest for any
+operations other than QueryVersion.
+
+ QueryVersion
+
+ client-major-version: CARD32
+ client-minor-version: CARD32
+
+ ->
+
+ major-version: CARD32
+ minor-version: CARD32
+
+ The client sends the highest supported version to the server and
+ the server sends the highest version it supports, but no higher than
+ the requested version. Major versions changes can introduce
+ incompatibilities in existing functionality, minor version
+ changes introduce only backward compatible changes. It is
+ the client's responsibility to ensure that the server supports
+ a version which is compatible with its expectations. Servers
+ are encouraged to support multiple versions of the extension.
+
+8. Hierarchy Redirection
+
+ RedirectWindow
+
+ window: Window
+ update: UPDATETYPE
+
+ errors: Window, Access, Match
+
+ The hierarchy starting at 'window' is directed to off-screen
+ storage. 'update' specifies whether the contents are mirrored to
+ the parent window automatically or not. Only one client may specify
+ an update type of Manual, another attempt will result in an
+ Access error. When all clients enabling redirection terminate,
+ the redirection will automatically be disabled.
+
+ The root window may not be redirected. Doing so results in a Match
+ error.
+
+ RedirectSubwindows
+
+ window: Window
+ update UPDATETYPE
+
+ errors: Window, Access
+
+ Hierarchies starting at all current and future children of window
+ will be redirected as in RedirectWindow. If update is Manual,
+ then painting of the window background during window manipulation
+ and ClearArea requests is inhibited.
+
+ UnredirectWindow:
+
+ window: Window
+
+ errors: Window, Value
+
+ Redirection of the specified window will be terminated. If
+ the specified window was not selected for redirection by the
+ current client, a 'Value' error results.
+
+ UnredirectWindows:
+
+ window: Window
+
+ errors: Window, Value
+
+ Redirection of all children of window will be terminated. If
+ the specified window was not selected for sub-redirection by the
+ current client, a 'Value' error results.
+
+9. Clip lists
+
+ CreateRegionFromBorderClip
+
+ region: Region
+ window: Window
+
+ errors: Window, IDChoice
+
+ This request creates a region containing the "usual" border clip
+ value; that is the area of the window clipped against siblings and
+ the parent. This region can be used to restrict rendering to
+ suitable areas while updating only a single window. The region
+ is copied at the moment the request is executed; future changes
+ to the window hierarchy will not be reflected in this region.
+
+10. Associating a Pixmap ID with the off-screen storage (0.2 and later)
+
+ NameWindowPixmap
+
+ window: Window
+ pixmap: Pixmap
+
+ errors: Window, Match, IDChoice
+
+ This request makes 'pixmap' a reference to the off-screen storage
+ for 'window'. This pixmap will remain allocated until freed, even
+ if 'window' is unmapped, reconfigured or destroyed. However,
+ 'window' will get a new pixmap allocated each time it is
+ mapped or resized, so this request will need to be reinvoked for
+ the client to continue to refer to the storage holding the current
+ window contents. Generates a 'Match' error if 'window' is not
+ redirected or is not visible.
+
+11. Composite Overlay Window (0.3 and later)
+
+ CompositeGetOverlayWindow
+
+ window: Window
+
+ ->
+
+ overlayWin: Window
+
+ This request returns the XID of the Composite Overlay Window for
+ the screen specified by the argument 'window'. This request
+ indicates that the client wishes to use the Composite Overlay
+ Window of this screen. If this Composite Overlay Window has not
+ yet been mapped, it is mapped by this request.
+
+ The Composite Overlay Window for a particular screen will be
+ unmapped when all clients who have invoked this request have
+ also invoked CompositeReleaseOverlayWindow for that screen. Also,
+ CompositeReleaseOverlayWindow for a screen will be implicitly
+ called when a client using the Composite Overlay Window on that
+ screen terminates its X11 connection.
+
+
+ CompositeReleaseOverlayWindow
+
+ window: Window
+
+ This request specifies that the client is no longer using the
+ Composite Overlay Window on the screen specified by the
+ argument 'window'. A screen's Composite Overlay Window is
+ unmapped when there are no longer any clients using it.
diff --git a/compositeproto/.gitignore b/compositeproto/.gitignore
new file mode 100644
index 0000000..896b3f5
--- /dev/null
+++ b/compositeproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for compositeproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/compositeproto/AUTHORS b/compositeproto/AUTHORS
new file mode 100644
index 0000000..8e18f9b
--- /dev/null
+++ b/compositeproto/AUTHORS
@@ -0,0 +1 @@
+Keith Packard, HP
diff --git a/compositeproto/COPYING b/compositeproto/COPYING
new file mode 100644
index 0000000..b541db8
--- /dev/null
+++ b/compositeproto/COPYING
@@ -0,0 +1,41 @@
+Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+Copyright © 2003 Keith Packard
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Keith Packard not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Keith Packard makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/compositeproto/Makefile.am b/compositeproto/Makefile.am
new file mode 100644
index 0000000..5a14884
--- /dev/null
+++ b/compositeproto/Makefile.am
@@ -0,0 +1,43 @@
+#
+# Copyright © 2003 Keith Packard, Noah Levitt
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Keith Packard makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+compositedir = $(includedir)/X11/extensions
+composite_HEADERS = \
+ composite.h \
+ compositeproto.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = compositeproto.pc
+
+dist_doc_DATA = compositeproto.txt
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/compositeproto/README b/compositeproto/README
new file mode 100644
index 0000000..66b40a4
--- /dev/null
+++ b/compositeproto/README
@@ -0,0 +1,33 @@
+ Composite Extension
+ Version 0.1
+ 2003-11-04
+
+This package contains header files and documentation for the composite
+extension. Library and server implementations are separate.
+
+Keith Packard
+keithp@keithp.com
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/compositeproto
+
+ http://cgit.freedesktop.org/xorg/proto/compositeproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/compositeproto/autogen.sh b/compositeproto/autogen.sh
new file mode 100755
index 0000000..a0ffe9f
--- /dev/null
+++ b/compositeproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH compositeproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/compositeproto/configure.ac b/compositeproto/configure.ac
new file mode 100644
index 0000000..b55e3da
--- /dev/null
+++ b/compositeproto/configure.ac
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright © 2003 Keith Packard, Noah Levitt
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Keith Packard not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Keith Packard makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+AC_INIT([CompositeProto], [0.4.2],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ compositeproto.pc])
+
+AC_OUTPUT
diff --git a/config.log b/config.log
new file mode 100644
index 0000000..753e3e3
--- /dev/null
+++ b/config.log
@@ -0,0 +1,169 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Lg3dProto configure 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ ./configure --enable-maintainer-mode --prefix=/home/dj4236/lgn/x/xorg/cvs/head/modular
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = d-nwk12-125-124
+uname -m = x86_64
+uname -r = 2.6.17-1.2145_FC5
+uname -s = Linux
+uname -v = #1 SMP Sat Jul 1 13:05:01 EDT 2006
+
+/usr/bin/uname -p = unknown
+/bin/uname -X = unknown
+
+/bin/arch = x86_64
+/usr/bin/arch -k = unknown
+/usr/convex/getsysinfo = unknown
+hostinfo = unknown
+/bin/machine = unknown
+/usr/bin/oslevel = unknown
+/bin/universe = unknown
+
+PATH: /home/dj4236/lgn/x/xorg/cvs/head/modular/bin
+PATH: /home/dj4236/lgn/x/xorg/cvs/head/modular/bin
+PATH: /usr/staroffice7/program
+PATH: .
+PATH: /home/dj4236/jdks/amd64/jdk1.6.0/bin
+PATH: /home/dj4236/bin/i386
+PATH: /home/dj4236/bin
+PATH: /home/dj4236/ant/bin
+PATH: /home/dj4236/firefox
+PATH: /usr/local/bin
+PATH: /bin
+PATH: /usr/bin
+PATH: /etc
+PATH: /usr/local/Acrobat5/bin
+PATH: /usr/X11R6/bin
+PATH: /opt/gnome/bin
+PATH: /opt/OpenOffice.org/program
+PATH: /home/dj4236/thunderbird
+PATH: /home/dj4236/git
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:1282: checking for a BSD-compatible install
+configure:1337: result: /usr/bin/install -c
+configure:1348: checking whether build environment is sane
+configure:1391: result: yes
+configure:1456: checking for gawk
+configure:1472: found /bin/gawk
+configure:1482: result: gawk
+configure:1492: checking whether make sets $(MAKE)
+configure:1512: result: yes
+configure:1825: creating ./config.status
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by Lg3dProto config.status 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES =
+ CONFIG_HEADERS =
+ CONFIG_LINKS =
+ CONFIG_COMMANDS =
+ $ ./config.status
+
+on d-nwk12-125-124
+
+config.status:652: creating Makefile
+config.status:652: creating lg3dproto.pc
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_env_build_alias_set=
+ac_cv_env_build_alias_value=
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_path_install='/usr/bin/install -c'
+ac_cv_prog_AWK=gawk
+ac_cv_prog_make_make_set=yes
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+ACLOCAL='aclocal -I /home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal'
+AMTAR='${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run tar'
+AUTOCONF='${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run autoconf'
+AUTOHEADER='${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run autoheader'
+AUTOMAKE='${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run automake-1.9'
+AWK='gawk'
+CYGPATH_W='echo'
+DEFS='-DPACKAGE_NAME=\"Lg3dProto\" -DPACKAGE_TARNAME=\"lg3dproto\" -DPACKAGE_VERSION=\"5.0\" -DPACKAGE_STRING=\"Lg3dProto\ 5.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=xorg\" -DPACKAGE=\"lg3dproto\" -DVERSION=\"5.0\" '
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+INSTALL_DATA='${INSTALL} -m 644'
+INSTALL_PROGRAM='${INSTALL}'
+INSTALL_SCRIPT='${INSTALL}'
+INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
+LIBOBJS=''
+LIBS=''
+LTLIBOBJS=''
+MAKEINFO='${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run makeinfo'
+PACKAGE='lg3dproto'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_NAME='Lg3dProto'
+PACKAGE_STRING='Lg3dProto 5.0'
+PACKAGE_TARNAME='lg3dproto'
+PACKAGE_VERSION='5.0'
+PATH_SEPARATOR=':'
+SET_MAKE=''
+SHELL='/bin/sh'
+STRIP=''
+VERSION='5.0'
+ac_ct_STRIP=''
+am__leading_dot='.'
+am__tar='${AMTAR} chof - "$$tardir"'
+am__untar='${AMTAR} xf -'
+bindir='${exec_prefix}/bin'
+build_alias=''
+datadir='${prefix}/share'
+exec_prefix='${prefix}'
+host_alias=''
+includedir='${prefix}/include'
+infodir='${prefix}/info'
+install_sh='/home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/install-sh'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localstatedir='${prefix}/var'
+mandir='${prefix}/man'
+mkdir_p='mkdir -p --'
+oldincludedir='/usr/include'
+prefix='/home/dj4236/lgn/x/xorg/cvs/head/modular'
+program_transform_name='s,x,x,'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='${prefix}/etc'
+target_alias=''
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+#define PACKAGE "lg3dproto"
+#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
+#define PACKAGE_NAME "Lg3dProto"
+#define PACKAGE_STRING "Lg3dProto 5.0"
+#define PACKAGE_TARNAME "lg3dproto"
+#define PACKAGE_VERSION "5.0"
+#define VERSION "5.0"
+
+configure: exit 0
diff --git a/config.status b/config.status
new file mode 100755
index 0000000..34bacaf
--- /dev/null
+++ b/config.status
@@ -0,0 +1,726 @@
+#! /bin/sh
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=${CONFIG_SHELL-/bin/sh}
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+config_files=" Makefile lg3dproto.pc"
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+ac_cs_version="\
+Lg3dProto config.status 5.0
+configured by ./configure, generated by GNU Autoconf 2.59,
+ with options \"'--enable-maintainer-mode' '--prefix=/home/dj4236/lgn/x/xorg/cvs/head/modular'\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=.
+INSTALL="/usr/bin/install -c"
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+if $ac_cs_recheck; then
+ echo "running /bin/sh ./configure " '--enable-maintainer-mode' '--prefix=/home/dj4236/lgn/x/xorg/cvs/head/modular' $ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec /bin/sh ./configure '--enable-maintainer-mode' '--prefix=/home/dj4236/lgn/x/xorg/cvs/head/modular' $ac_configure_extra_args --no-create --no-recursion
+fi
+
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "lg3dproto.pc" ) CONFIG_FILES="$CONFIG_FILES lg3dproto.pc" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
+s,@SHELL@,/bin/sh,;t t
+s,@PATH_SEPARATOR@,:,;t t
+s,@PACKAGE_NAME@,Lg3dProto,;t t
+s,@PACKAGE_TARNAME@,lg3dproto,;t t
+s,@PACKAGE_VERSION@,5.0,;t t
+s,@PACKAGE_STRING@,Lg3dProto 5.0,;t t
+s,@PACKAGE_BUGREPORT@,https://bugs.freedesktop.org/enter_bug.cgi?product=xorg,;t t
+s,@exec_prefix@,${prefix},;t t
+s,@prefix@,/home/dj4236/lgn/x/xorg/cvs/head/modular,;t t
+s,@program_transform_name@,s,x,x,,;t t
+s,@bindir@,${exec_prefix}/bin,;t t
+s,@sbindir@,${exec_prefix}/sbin,;t t
+s,@libexecdir@,${exec_prefix}/libexec,;t t
+s,@datadir@,${prefix}/share,;t t
+s,@sysconfdir@,${prefix}/etc,;t t
+s,@sharedstatedir@,${prefix}/com,;t t
+s,@localstatedir@,${prefix}/var,;t t
+s,@libdir@,${exec_prefix}/lib,;t t
+s,@includedir@,${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,${prefix}/info,;t t
+s,@mandir@,${prefix}/man,;t t
+s,@build_alias@,,;t t
+s,@host_alias@,,;t t
+s,@target_alias@,,;t t
+s,@DEFS@,-DPACKAGE_NAME=\"Lg3dProto\" -DPACKAGE_TARNAME=\"lg3dproto\" -DPACKAGE_VERSION=\"5.0\" -DPACKAGE_STRING=\"Lg3dProto\ 5.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=xorg\" -DPACKAGE=\"lg3dproto\" -DVERSION=\"5.0\" ,;t t
+s,@ECHO_C@,,;t t
+s,@ECHO_N@,-n,;t t
+s,@ECHO_T@,,;t t
+s,@LIBS@,,;t t
+s,@INSTALL_PROGRAM@,${INSTALL},;t t
+s,@INSTALL_SCRIPT@,${INSTALL},;t t
+s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
+s,@CYGPATH_W@,echo,;t t
+s,@PACKAGE@,lg3dproto,;t t
+s,@VERSION@,5.0,;t t
+s,@ACLOCAL@,aclocal -I /home/dj4236/lgn/x/xorg/cvs/head/modular/share/aclocal,;t t
+s,@AUTOCONF@,${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run autoconf,;t t
+s,@AUTOMAKE@,${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run automake-1.9,;t t
+s,@AUTOHEADER@,${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run autoheader,;t t
+s,@MAKEINFO@,${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run makeinfo,;t t
+s,@install_sh@,/home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/install-sh,;t t
+s,@STRIP@,,;t t
+s,@ac_ct_STRIP@,,;t t
+s,@INSTALL_STRIP_PROGRAM@,${SHELL} $(install_sh) -c -s,;t t
+s,@mkdir_p@,mkdir -p --,;t t
+s,@AWK@,gawk,;t t
+s,@SET_MAKE@,,;t t
+s,@am__leading_dot@,.,;t t
+s,@AMTAR@,${SHELL} /home/dj4236/lgn/x/xorg/cvs/head/proto/Lg3d/missing --run tar,;t t
+s,@am__tar@,${AMTAR} chof - "$$tardir",;t t
+s,@am__untar@,${AMTAR} xf -,;t t
+s,@LIBOBJS@,,;t t
+s,@LTLIBOBJS@,,;t t
+CEOF
+
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ sed "/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}
+
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+
+{ (exit 0); exit 0; }
diff --git a/configure b/configure
new file mode 100755
index 0000000..02d67c0
--- /dev/null
+++ b/configure
@@ -0,0 +1,2626 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for Lg3dProto 5.0.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Lg3dProto'
+PACKAGE_TARNAME='lg3dproto'
+PACKAGE_VERSION='5.0'
+PACKAGE_STRING='Lg3dProto 5.0'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures Lg3dProto 5.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Lg3dProto 5.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-release-version=STRING
+ Use release version string in package name
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+Lg3dProto configure 5.0
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.9"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='lg3dproto'
+ VERSION='5.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+
+# Check whether --with-release-version or --without-release-version was given.
+if test "${with_release_version+set}" = set; then
+ withval="$with_release_version"
+ RELEASE_VERSION="$withval"
+else
+ RELEASE_VERSION=""
+fi;
+ if test "x$RELEASE_VERSION" != "x"; then
+ PACKAGE="$PACKAGE-$RELEASE_VERSION"
+ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+ { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
+echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+ fi
+
+
+ ac_config_files="$ac_config_files Makefile lg3dproto.pc"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Lg3dProto $as_me 5.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Lg3dProto config.status 5.0
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "lg3dproto.pc" ) CONFIG_FILES="$CONFIG_FILES lg3dproto.pc" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/damageproto.h b/damageproto.h
new file mode 100644
index 0000000..107e192
--- /dev/null
+++ b/damageproto.h
@@ -0,0 +1,158 @@
+/*
+ * Copyright © 2003 Keith Packard
+ * Copyright © 2007 Eric Anholt
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DAMAGEPROTO_H_
+#define _DAMAGEPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/xfixesproto.h>
+#include <X11/extensions/damagewire.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+#define Picture CARD32
+#define Region CARD32
+#define Damage CARD32
+
+/************** Version 0 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+} xDamageReq;
+
+/*
+ * requests and replies
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xDamageQueryVersionReq;
+
+#define sz_xDamageQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDamageQueryVersionReply;
+
+#define sz_xDamageQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+ Drawable drawable B32;
+ CARD8 level;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xDamageCreateReq;
+
+#define sz_xDamageCreateReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+} xDamageDestroyReq;
+
+#define sz_xDamageDestroyReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+ Region repair B32;
+ Region parts B32;
+} xDamageSubtractReq;
+
+#define sz_xDamageSubtractReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Drawable drawable B32;
+ Region region B32;
+} xDamageAddReq;
+
+#define sz_xDamageAddReq 12
+
+/* Events */
+
+#define DamageNotifyMore 0x80
+
+typedef struct {
+ CARD8 type;
+ CARD8 level;
+ CARD16 sequenceNumber B16;
+ Drawable drawable B32;
+ Damage damage B32;
+ Time timestamp B32;
+ xRectangle area;
+ xRectangle geometry;
+} xDamageNotifyEvent;
+
+#undef Damage
+#undef Region
+#undef Picture
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _DAMAGEPROTO_H_ */
diff --git a/damageproto.pc.in b/damageproto.pc.in
new file mode 100644
index 0000000..25476b9
--- /dev/null
+++ b/damageproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: DamageProto
+Description: Damage extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/damageproto.txt b/damageproto.txt
new file mode 100644
index 0000000..cea2322
--- /dev/null
+++ b/damageproto.txt
@@ -0,0 +1,222 @@
+ The DAMAGE Extension
+ Protocol Version 1.1
+ Document Revision 1
+ 2007-01-08
+
+ Keith Packard
+ keithp@keithp.com
+
+ Eric Anholt
+ eric@anholt.net
+ Open Source Technology Center
+ Intel Corporation
+1. Introduction
+
+Monitoring the regions affected by rendering has wide-spread use, from
+VNC-like systems scraping the screen to screen magnifying applications
+designed to aid users with limited visual acuity. The DAMAGE extension is
+designed to make such applications reasonably efficient in the face of
+server-client latency.
+
+2. Acknowledgements
+
+As usual, the author had significant input from many people, in particular:
+
+ + Havoc Pennington who designed and implemented a Damage extension
+ last year which was then lost to the mists of time.
+
+ + Bill Haneman whose work on accessibility in the Gnome environment
+ is legendary.
+
+ + Jim Gettys who found a way to avoid streaming damage rectangles
+ to the client in many cases.
+
+ + Owen Taylor who suggested that streaming damage rectangles may
+ be warranted in some cases after all.
+
+3. Damage Model
+
+We call changes made to pixel contents of windows and pixmaps 'damage'
+throughout this extension. Another notion of 'damage' are drawable regions
+which are in need of redisplay to repair the effects of window manipulation
+or other data loss. This extension doesn't deal with this second notion at
+all; suggestions on a better term which isn't easily conflated with existing
+notions are eagerly solicited.
+
+Damage accumulates as drawing occurs in the drawable. Each drawing operation
+'damages' one or more rectangular areas within the drawable. The rectangles
+are guaranteed to include the set of pixels modified by each operation, but
+may include significantly more than just those pixels. The desire is for
+the damage to strike a balance between the number of rectangles reported and
+the extraneous area included. A reasonable goal is for each primitive
+object drawn (line, string, rectangle) to be represented as a single
+rectangle and for the damage area of the operation to be the union of these
+rectangles.
+
+The DAMAGE extension allows applications to either receive the raw
+rectangles as a stream of events, or to have them partially processed within
+the X server to reduce the amount of data transmitted as well as reduce the
+processing latency once the repaint operation has started.
+
+Damage to a window reflects both drawing within the window itself as well as
+drawing within any inferior window that affects pixels seen by
+IncludeInferiors rendering operations. To reduce the computational
+complexity of this, the DAMAGE extension allows the server to monitor all
+rendering operations within the physical target pixel storage that fall
+within the bounds of the window. In a system with a single frame buffer
+holding all windows, this means that damage will accumulate for all
+rendering operations that lie within the visible part of the window.
+
+The precise reason for this architecture is to enable the Composite
+extension which provides multiple pixel storage areas for the screen
+contents.
+
+3.1 Additions in the 1.1 version of the protocol
+
+Damage is automatically computed by the X Server for X rendering operations,
+but direct rendering extensions have allowed clients to perform rendering
+outside of the control of the X Server. The 1.1 version of the protocol
+added a request to allow direct rendering clients to report damage to a
+drawable. Some direct rendering clients, due to architectural limitations,
+always perform rendering to the root window, even in when it should be
+performed to the backing pixmap in the Composite case. To provide
+less-incorrect rendering in this cases, the direct rendering client should
+translate its damage region to screen coordinates and report the damage against
+the root window rather than the drawable.
+
+4. Data types
+
+The "Damage" object holds any accumulated damage region and reflects the
+relationship between the drawable selected for damage notification and the
+drawable for which damage is tracked.
+
+5. Errors
+
+Damage
+ A value for a DAMAGE argument does not name a defined DAMAGE.
+
+6. Types
+
+ DAMAGE 32-bit value (top three bits guaranteed to be zero)
+
+ DamageReportLevel { DamageReportRawRectangles,
+ DamageReportDeltaRectangles,
+ DamageReportBoundingBox,
+ DamageReportNonEmpty }
+
+ DamageReportRawRectangles
+
+ Delivers DamageNotify events each time the screen
+ is modified with rectangular bounds that circumscribe
+ the damaged area. No attempt to compress out overlapping
+ rectangles is made.
+
+ DamageReportDeltaRectangles
+
+ Delivers DamageNotify events each time damage occurs
+ which is not included in the damage region. The
+ reported rectangles include only the changes to that
+ area, not the raw damage data.
+
+ DamageReportBoundingBox
+
+ Delivers DamageNotify events each time the bounding
+ box enclosing the damage region increases in size.
+ The reported rectangle encloses the entire damage region,
+ not just the changes to that size.
+
+ DamageReportNonEmpty
+
+ Delivers a single DamageNotify event each time the
+ damage rectangle changes from empty to non-empty, and
+ also whenever the result of a DamageSubtract request
+ results in a non-empty region.
+
+7. Events
+
+DamageNotify
+
+ level: DamageReportLevel
+ drawable: Drawable
+ damage: DAMAGE
+ more: Bool
+ timestamp: Timestamp
+ area: Rectangle
+ drawable-geometry: Rectangle
+
+ 'more' indicates whether there are subsequent damage events
+ being delivered immediately as part of a larger damage region
+
+8. Extension Initialization
+
+The client must negotiate the version of the extension before executing
+extension requests. Otherwise, the server will return BadRequest for any
+operations other than QueryVersion.
+
+QueryVersion
+
+ client-major-version: CARD32
+ client-minor-version: CARD32
+
+ ->
+
+ major-version: CARD32
+ minor-version: CARD32
+
+ The client sends the highest supported version to the server and
+ the server sends the highest version it supports, but no higher than
+ the requested version. Major versions changes can introduce
+ incompatibilities in existing functionality, minor version
+ changes introduce only backward compatible changes. It is
+ the clients responsibility to ensure that the server supports
+ a version which is compatible with its expectations. Servers
+ are encouraged to support multiple versions of the extension.
+
+9. Enable Monitoring
+
+DamageCreate
+
+ damage: DAMAGE
+ drawable: Drawable
+ level: DamageReportLevel
+
+ Creates a damage object to monitor changes to Drawable
+
+DamageDestroy
+ damage: DAMAGE
+
+ Destroys damage.
+
+DamageSubtract
+
+ damage: DAMAGE
+ repair: Region or None
+ parts: Region or None
+
+ Synchronously modifies the regions in the following manner:
+
+ If repair is None:
+
+ 1) if parts is not None, parts = damage
+ 2) damage = <empty>
+
+ Otherwise:
+
+ 1) tmp = damage INTERSECT repair
+ 2) damage = damage - tmp
+ 3) if parts is not None, parts = tmp
+ 4) Generate DamageNotify for remaining damage areas
+
+DamageAdd
+
+ drawable: Drawable
+ region: Region
+
+ Reports damage of the region within the given drawable. This may be
+ used by direct rendering clients to report damage that the server would
+ otherwise be unaware of. The damage region is relative to the origin
+ of the drawable.
+
+ Damage posted in this way will appear in DamageNotify events as normal,
+ and also in server internal damage tracking (for shadow framebuffer
+ updates, pixmap damage, and other uses).
diff --git a/damageproto/.gitignore b/damageproto/.gitignore
new file mode 100644
index 0000000..cd9ffab
--- /dev/null
+++ b/damageproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for damageproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/damageproto/AUTHORS b/damageproto/AUTHORS
new file mode 100644
index 0000000..78b329f
--- /dev/null
+++ b/damageproto/AUTHORS
@@ -0,0 +1,2 @@
+Keith Packard, HP
+Eric Anholt, Intel
diff --git a/damageproto/COPYING b/damageproto/COPYING
new file mode 100644
index 0000000..d14c75a
--- /dev/null
+++ b/damageproto/COPYING
@@ -0,0 +1,21 @@
+Copyright © 2001,2003 Keith Packard
+Copyright © 2007 Eric Anholt
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Keith Packard not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Keith Packard makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/damageproto/Makefile.am b/damageproto/Makefile.am
new file mode 100644
index 0000000..7c9b757
--- /dev/null
+++ b/damageproto/Makefile.am
@@ -0,0 +1,43 @@
+#
+# Copyright © 2003 Keith Packard, Noah Levitt
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Keith Packard makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+damagedir = $(includedir)/X11/extensions
+damage_HEADERS = \
+ damageproto.h \
+ damagewire.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = damageproto.pc
+
+dist_doc_DATA = damageproto.txt
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/damageproto/README b/damageproto/README
new file mode 100644
index 0000000..a8a4e78
--- /dev/null
+++ b/damageproto/README
@@ -0,0 +1,34 @@
+ Damage
+ X Damage Extension
+ Version 1.1
+ 2007-01-08
+
+This package contains header files and documentation for the X Damage
+extension. Library and server implementations are separate.
+
+Keith Packard
+keithp@keithp.com
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/damageproto
+
+ http://cgit.freedesktop.org/xorg/proto/damageproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/damageproto/autogen.sh b/damageproto/autogen.sh
new file mode 100755
index 0000000..f01dd58
--- /dev/null
+++ b/damageproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH damageproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/damageproto/configure.ac b/damageproto/configure.ac
new file mode 100644
index 0000000..6a10f34
--- /dev/null
+++ b/damageproto/configure.ac
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright © 2003 Keith Packard, Noah Levitt
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Keith Packard not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Keith Packard makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+AC_INIT([DamageProto], [1.2.1],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ damageproto.pc])
+
+AC_OUTPUT
diff --git a/damagewire.h b/damagewire.h
new file mode 100644
index 0000000..d90a0dd
--- /dev/null
+++ b/damagewire.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DAMAGEWIRE_H_
+#define _DAMAGEWIRE_H_
+
+#define DAMAGE_NAME "DAMAGE"
+#define DAMAGE_MAJOR 1
+#define DAMAGE_MINOR 1
+
+/************* Version 1 ****************/
+
+/* Constants */
+#define XDamageReportRawRectangles 0
+#define XDamageReportDeltaRectangles 1
+#define XDamageReportBoundingBox 2
+#define XDamageReportNonEmpty 3
+
+/* Requests */
+#define X_DamageQueryVersion 0
+#define X_DamageCreate 1
+#define X_DamageDestroy 2
+#define X_DamageSubtract 3
+#define X_DamageAdd 4
+
+#define XDamageNumberRequests (X_DamageAdd + 1)
+
+/* Events */
+#define XDamageNotify 0
+
+#define XDamageNumberEvents (XDamageNotify + 1)
+
+/* Errors */
+#define BadDamage 0
+#define XDamageNumberErrors (BadDamage + 1)
+
+#endif /* _DAMAGEWIRE_H_ */
diff --git a/dmx.h b/dmx.h
new file mode 100644
index 0000000..8cbd4d3
--- /dev/null
+++ b/dmx.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@redhat.com>
+ *
+ */
+
+/** \file
+ * This file describes the interface to the client-side libdmx.a
+ * library. All DMX-aware client-side applications should include this
+ * file. */
+
+#ifndef _DMX_H_
+#define _DMX_H_
+
+/* These values must be larger than LastExtensionError.
+ The values in dmxext.h and dmxproto.h *MUST* match. */
+#define DmxBadXinerama 1001
+#define DmxBadValue 1002
+#define DmxBadReply 1003
+
+#define DMXScreenWindowWidth (1L<<0)
+#define DMXScreenWindowHeight (1L<<1)
+#define DMXScreenWindowXoffset (1L<<2)
+#define DMXScreenWindowYoffset (1L<<3)
+#define DMXRootWindowWidth (1L<<4)
+#define DMXRootWindowHeight (1L<<5)
+#define DMXRootWindowXoffset (1L<<6)
+#define DMXRootWindowYoffset (1L<<7)
+#define DMXRootWindowXorigin (1L<<8)
+#define DMXRootWindowYorigin (1L<<9)
+
+#define DMXDesktopWidth (1L<<0)
+#define DMXDesktopHeight (1L<<1)
+#define DMXDesktopShiftX (1L<<2)
+#define DMXDesktopShiftY (1L<<3)
+
+#define DMXInputType (1L<<0)
+#define DMXInputPhysicalScreen (1L<<1)
+#define DMXInputSendsCore (1L<<2)
+
+#endif
diff --git a/dmxproto.h b/dmxproto.h
new file mode 100644
index 0000000..4bb160e
--- /dev/null
+++ b/dmxproto.h
@@ -0,0 +1,445 @@
+/*
+ * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@redhat.com>
+ *
+ */
+
+/** \file
+ * This file describes the structures necessary to implement the wire
+ * protocol for the DMX protocol extension. It should be included only
+ * in files that implement the client-side (or server-side) part of the
+ * protocol (i.e., client-side applications should \b not include this
+ * file). */
+
+#ifndef _DMXSTR_H_
+#define _DMXSTR_H_
+
+#define DMX_EXTENSION_NAME "DMX"
+#define DMX_EXTENSION_MAJOR 2
+#define DMX_EXTENSION_MINOR 2
+#define DMX_EXTENSION_PATCH 20040604
+
+/* These values must be larger than LastExtensionError.
+ The values in dmxext.h and dmxproto.h *MUST* match. */
+#define DMX_BAD_XINERAMA 1001
+#define DMX_BAD_VALUE 1002
+
+#define X_DMXQueryVersion 0
+#define X_DMXGetScreenCount 1
+#define X_DMXGetScreenInformationDEPRECATED 2
+#define X_DMXGetWindowAttributes 3
+#define X_DMXGetInputCount 4
+#define X_DMXGetInputAttributes 5
+#define X_DMXForceWindowCreationDEPRECATED 6
+#define X_DMXReconfigureScreenDEPRECATED 7
+#define X_DMXSync 8
+#define X_DMXForceWindowCreation 9
+#define X_DMXGetScreenAttributes 10
+#define X_DMXChangeScreensAttributes 11
+#define X_DMXAddScreen 12
+#define X_DMXRemoveScreen 13
+#define X_DMXGetDesktopAttributes 14
+#define X_DMXChangeDesktopAttributes 15
+#define X_DMXAddInput 16
+#define X_DMXRemoveInput 17
+
+/** Wire-level description of DMXQueryVersion protocol request. */
+typedef struct {
+ CARD8 reqType; /* dmxcode */
+ CARD8 dmxReqType; /* X_DMXQueryVersion */
+ CARD16 length B16;
+} xDMXQueryVersionReq;
+#define sz_xDMXQueryVersionReq 4
+
+/** Wire-level description of DMXQueryVersion protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 ununsed;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 patchVersion B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xDMXQueryVersionReply;
+#define sz_xDMXQueryVersionReply 32
+
+/** Wire-level description of DMXSync protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXSync */
+ CARD16 length B16;
+} xDMXSyncReq;
+#define sz_xDMXSyncReq 4
+
+/** Wire-level description of DMXSync protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXSyncReply;
+#define sz_xDMXSyncReply 32
+
+/** Wire-level description of DMXForceWindowCreation protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXForceWindowCreation */
+ CARD16 length B16;
+ CARD32 window B32;
+} xDMXForceWindowCreationReq;
+#define sz_xDMXForceWindowCreationReq 8
+
+/** Wire-level description of DMXForceWindowCreation protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXForceWindowCreationReply;
+#define sz_xDMXForceWindowCreationReply 32
+
+/** Wire-level description of DMXGetScreenCount protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXGetScreenCount */
+ CARD16 length B16;
+} xDMXGetScreenCountReq;
+#define sz_xDMXGetScreenCountReq 4
+
+/** Wire-level description of DMXGetScreenCount protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 screenCount B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXGetScreenCountReply;
+#define sz_xDMXGetScreenCountReply 32
+
+/** Wire-level description of DMXGetScreenAttributes protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXGetScreenAttributes */
+ CARD16 length B16;
+ CARD32 physicalScreen B32;
+} xDMXGetScreenAttributesReq;
+#define sz_xDMXGetScreenAttributesReq 8
+
+/** Wire-level description of DMXGetScreenAttributes protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 displayNameLength B32;
+ CARD32 logicalScreen B32;
+
+ CARD16 screenWindowWidth B16;
+ CARD16 screenWindowHeight B16;
+ INT16 screenWindowXoffset B16;
+ INT16 screenWindowYoffset B16;
+
+ CARD16 rootWindowWidth B16;
+ CARD16 rootWindowHeight B16;
+ INT16 rootWindowXoffset B16;
+ INT16 rootWindowYoffset B16;
+ INT16 rootWindowXorigin B16;
+ INT16 rootWindowYorigin B16;
+} xDMXGetScreenAttributesReply;
+#define sz_xDMXGetScreenAttributesReply 36
+
+/** Wire-level description of DMXChangeScreensAttributes protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */
+ CARD16 length B16;
+ CARD32 screenCount B32;
+ CARD32 maskCount B32;
+} xDMXChangeScreensAttributesReq;
+#define sz_xDMXChangeScreensAttributesReq 12
+
+/** Wire-level description of DMXChangeScreensAttributes protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 errorScreen B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xDMXChangeScreensAttributesReply;
+#define sz_xDMXChangeScreensAttributesReply 32
+
+/** Wire-level description of DMXAddScreen protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXAddScreen */
+ CARD16 length B16;
+ CARD32 displayNameLength B32;
+ CARD32 physicalScreen B32;
+ CARD32 valueMask B32;
+} xDMXAddScreenReq;
+#define sz_xDMXAddScreenReq 16
+
+/** Wire-level description of DMXAddScreen protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 physicalScreen B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xDMXAddScreenReply;
+#define sz_xDMXAddScreenReply 32
+
+/** Wire-level description of DMXRemoveScreen protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXRemoveScreen */
+ CARD16 length B16;
+ CARD32 physicalScreen B32;
+} xDMXRemoveScreenReq;
+#define sz_xDMXRemoveScreenReq 8
+
+/** Wire-level description of DMXRemoveScreen protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXRemoveScreenReply;
+#define sz_xDMXRemoveScreenReply 32
+
+/** Wire-level description of DMXGetWindowAttributes protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXGetWindowAttributes */
+ CARD16 length B16;
+ CARD32 window B32;
+} xDMXGetWindowAttributesReq;
+#define sz_xDMXGetWindowAttributesReq 8
+
+/** Wire-level description of DMXGetWindowAttributes protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 screenCount B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXGetWindowAttributesReply;
+#define sz_xDMXGetWindowAttributesReply 32
+
+/** Wire-level description of DMXGetDesktopAttributes protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */
+ CARD16 length B16;
+} xDMXGetDesktopAttributesReq;
+#define sz_xDMXGetDesktopAttributesReq 4
+
+/** Wire-level description of DMXGetDesktopAttributes protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 width;
+ INT16 height;
+ INT16 shiftX;
+ INT16 shiftY;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xDMXGetDesktopAttributesReply;
+#define sz_xDMXGetDesktopAttributesReply 32
+
+/** Wire-level description of DMXChangeDesktopAttributes protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */
+ CARD16 length B16;
+ CARD32 valueMask B32;
+} xDMXChangeDesktopAttributesReq;
+#define sz_xDMXChangeDesktopAttributesReq 8
+
+/** Wire-level description of DMXChangeDesktopAttributes protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXChangeDesktopAttributesReply;
+#define sz_xDMXChangeDesktopAttributesReply 32
+
+/** Wire-level description of DMXGetInputCount protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXGetInputCount */
+ CARD16 length B16;
+} xDMXGetInputCountReq;
+#define sz_xDMXGetInputCountReq 4
+
+/** Wire-level description of DMXGetInputCount protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 inputCount B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXGetInputCountReply;
+#define sz_xDMXGetInputCountReply 32
+
+/** Wire-level description of DMXGetInputAttributes protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXGetInputAttributes */
+ CARD16 length B16;
+ CARD32 deviceId B32;
+} xDMXGetInputAttributesReq;
+#define sz_xDMXGetInputAttributesReq 8
+
+/** Wire-level description of DMXGetInputAttributes protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 inputType B32;
+ CARD32 physicalScreen B32;
+ CARD32 physicalId B32;
+ CARD32 nameLength B32;
+ BOOL isCore;
+ BOOL sendsCore;
+ BOOL detached;
+ CARD8 pad0;
+ CARD32 pad1 B32;
+} xDMXGetInputAttributesReply;
+#define sz_xDMXGetInputAttributesReply 32
+
+/** Wire-level description of DMXAddInput protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXAddInput */
+ CARD16 length B16;
+ CARD32 displayNameLength B32;
+ CARD32 valueMask;
+} xDMXAddInputReq;
+#define sz_xDMXAddInputReq 12
+
+/** Wire-level description of DMXAddInput protocol reply. */
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 physicalId B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xDMXAddInputReply;
+#define sz_xDMXAddInputReply 32
+
+/** Wire-level description of DMXRemoveInput protocol request. */
+typedef struct {
+ CARD8 reqType; /* DMXCode */
+ CARD8 dmxReqType; /* X_DMXRemoveInput */
+ CARD16 length B16;
+ CARD32 physicalId B32;
+} xDMXRemoveInputReq;
+#define sz_xDMXRemoveInputReq 8
+
+/** Wire-level description of DMXRemoveInput protocol reply. */
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 status B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDMXRemoveInputReply;
+#define sz_xDMXRemoveInputReply 32
+
+#endif
diff --git a/dmxproto.pc.in b/dmxproto.pc.in
new file mode 100644
index 0000000..97cd1b8
--- /dev/null
+++ b/dmxproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: DMXProto
+Description: DMX extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/dmxproto/.gitignore b/dmxproto/.gitignore
new file mode 100644
index 0000000..71417e4
--- /dev/null
+++ b/dmxproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for dmxproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/dmxproto/COPYING b/dmxproto/COPYING
new file mode 100644
index 0000000..7ea03ea
--- /dev/null
+++ b/dmxproto/COPYING
@@ -0,0 +1,24 @@
+Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation on the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/dmxproto/Makefile.am b/dmxproto/Makefile.am
new file mode 100644
index 0000000..6883b29
--- /dev/null
+++ b/dmxproto/Makefile.am
@@ -0,0 +1,20 @@
+dmxdir = $(includedir)/X11/extensions
+dmx_HEADERS = \
+ dmx.h \
+ dmxproto.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = dmxproto.pc
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/dmxproto/README b/dmxproto/README
new file mode 100644
index 0000000..d549e99
--- /dev/null
+++ b/dmxproto/README
@@ -0,0 +1,40 @@
+ Distributed Multihead X (DMX) Extension
+
+This extension defines a protocol for clients to access a front-end proxy
+X server that controls multiple back-end X servers making up a large display.
+
+Extension name: DMX
+
+More information about the DMX software can be found on the original project
+website at:
+ http://dmx.sourceforge.net/
+
+The protocol specification is currently maintained in the xserver git
+repository at hw/dmx/doc/DMXSpec.txt and can be viewed online at:
+
+ http://cgit.freedesktop.org/xorg/xserver/tree/hw/dmx/doc/DMXSpec.txt
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/dmxproto
+
+ http://cgit.freedesktop.org/xorg/proto/dmxproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
+
diff --git a/dmxproto/autogen.sh b/dmxproto/autogen.sh
new file mode 100755
index 0000000..ef382c0
--- /dev/null
+++ b/dmxproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH dmxproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/dmxproto/configure.ac b/dmxproto/configure.ac
new file mode 100644
index 0000000..8061d04
--- /dev/null
+++ b/dmxproto/configure.ac
@@ -0,0 +1,21 @@
+dnl
+dnl Process this file with autoconf to create configure.
+
+# Initialize Autoconf
+AC_PREREQ([2.60])
+AC_INIT([DMXProto], [2.3.1],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ dmxproto.pc])
+AC_OUTPUT
diff --git a/dri2proto.h b/dri2proto.h
new file mode 100644
index 0000000..128b807
--- /dev/null
+++ b/dri2proto.h
@@ -0,0 +1,357 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ * Kristian Høgsberg (krh@redhat.com)
+ */
+
+#ifndef _DRI2_PROTO_H_
+#define _DRI2_PROTO_H_
+
+#define DRI2_NAME "DRI2"
+#define DRI2_MAJOR 1
+#define DRI2_MINOR 4
+
+#define DRI2NumberErrors 0
+#define DRI2NumberEvents 2
+#define DRI2NumberRequests 14
+
+#define X_DRI2QueryVersion 0
+#define X_DRI2Connect 1
+#define X_DRI2Authenticate 2
+#define X_DRI2CreateDrawable 3
+#define X_DRI2DestroyDrawable 4
+#define X_DRI2GetBuffers 5
+#define X_DRI2CopyRegion 6
+#define X_DRI2GetBuffersWithFormat 7
+#define X_DRI2SwapBuffers 8
+#define X_DRI2GetMSC 9
+#define X_DRI2WaitMSC 10
+#define X_DRI2WaitSBC 11
+#define X_DRI2SwapInterval 12
+#define X_DRI2GetParam 13
+
+/*
+ * Events
+ */
+#define DRI2_BufferSwapComplete 0
+#define DRI2_InvalidateBuffers 1
+
+typedef struct {
+ CARD32 attachment B32;
+ CARD32 name B32;
+ CARD32 pitch B32;
+ CARD32 cpp B32;
+ CARD32 flags B32;
+} xDRI2Buffer;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xDRI2QueryVersionReq;
+#define sz_xDRI2QueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDRI2QueryVersionReply;
+#define sz_xDRI2QueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 window B32;
+ CARD32 driverType B32;
+} xDRI2ConnectReq;
+#define sz_xDRI2ConnectReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 driverNameLength B32;
+ CARD32 deviceNameLength B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDRI2ConnectReply;
+#define sz_xDRI2ConnectReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 window B32;
+ CARD32 magic B32;
+} xDRI2AuthenticateReq;
+#define sz_xDRI2AuthenticateReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 authenticated B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xDRI2AuthenticateReply;
+#define sz_xDRI2AuthenticateReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+} xDRI2CreateDrawableReq;
+#define sz_xDRI2CreateDrawableReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+} xDRI2DestroyDrawableReq;
+#define sz_xDRI2DestroyDrawableReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 count B32;
+} xDRI2GetBuffersReq;
+#define sz_xDRI2GetBuffersReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 width B32;
+ CARD32 height B32;
+ CARD32 count B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDRI2GetBuffersReply;
+#define sz_xDRI2GetBuffersReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 region B32;
+ CARD32 dest B32;
+ CARD32 src B32;
+} xDRI2CopyRegionReq;
+#define sz_xDRI2CopyRegionReq 20
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xDRI2CopyRegionReply;
+#define sz_xDRI2CopyRegionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 target_msc_hi B32;
+ CARD32 target_msc_lo B32;
+ CARD32 divisor_hi B32;
+ CARD32 divisor_lo B32;
+ CARD32 remainder_hi B32;
+ CARD32 remainder_lo B32;
+} xDRI2SwapBuffersReq;
+#define sz_xDRI2SwapBuffersReq 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 swap_hi B32;
+ CARD32 swap_lo B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDRI2SwapBuffersReply;
+#define sz_xDRI2SwapBuffersReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+} xDRI2GetMSCReq;
+#define sz_xDRI2GetMSCReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 target_msc_hi B32;
+ CARD32 target_msc_lo B32;
+ CARD32 divisor_hi B32;
+ CARD32 divisor_lo B32;
+ CARD32 remainder_hi B32;
+ CARD32 remainder_lo B32;
+} xDRI2WaitMSCReq;
+#define sz_xDRI2WaitMSCReq 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 target_sbc_hi B32;
+ CARD32 target_sbc_lo B32;
+} xDRI2WaitSBCReq;
+#define sz_xDRI2WaitSBCReq 16
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 ust_hi B32;
+ CARD32 ust_lo B32;
+ CARD32 msc_hi B32;
+ CARD32 msc_lo B32;
+ CARD32 sbc_hi B32;
+ CARD32 sbc_lo B32;
+} xDRI2MSCReply;
+#define sz_xDRI2MSCReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 interval B32;
+} xDRI2SwapIntervalReq;
+#define sz_xDRI2SwapIntervalReq 12
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD16 event_type B16;
+ CARD16 pad2;
+ CARD32 drawable B32;
+ CARD32 ust_hi B32;
+ CARD32 ust_lo B32;
+ CARD32 msc_hi B32;
+ CARD32 msc_lo B32;
+ CARD32 sbc_hi B32;
+ CARD32 sbc_lo B32;
+} xDRI2BufferSwapComplete;
+#define sz_xDRI2BufferSwapComplete 32
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD16 event_type B16;
+ CARD16 pad2;
+ CARD32 drawable B32;
+ CARD32 ust_hi B32;
+ CARD32 ust_lo B32;
+ CARD32 msc_hi B32;
+ CARD32 msc_lo B32;
+ CARD32 sbc B32;
+} xDRI2BufferSwapComplete2;
+#define sz_xDRI2BufferSwapComplete2 32
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 drawable B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xDRI2InvalidateBuffers;
+#define sz_xDRI2InvalidateBuffers 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 param B32;
+} xDRI2GetParamReq;
+#define sz_xDRI2GetParamReq 12
+
+typedef struct {
+ BYTE type; /*X_Reply*/
+ BOOL is_param_recognized;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 value_hi B32;
+ CARD32 value_lo B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xDRI2GetParamReply;
+#define sz_xDRI2GetParamReply 32
+
+#endif
diff --git a/dri2proto.pc.in b/dri2proto.pc.in
new file mode 100644
index 0000000..647416e
--- /dev/null
+++ b/dri2proto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: DRI2Proto
+Description: DRI2 extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/dri2proto.txt b/dri2proto.txt
new file mode 100644
index 0000000..d81b55c
--- /dev/null
+++ b/dri2proto.txt
@@ -0,0 +1,909 @@
+ The DRI2 Extension
+ Version 2.0
+ 2008-09-04
+
+ Kristian Høgsberg
+ krh@redhat.com
+ Red Hat, Inc
+
+
+1. Introduction
+
+The DRI2 extension is designed to associate and access auxillary
+rendering buffers with an X drawable.
+
+DRI2 is a essentially a helper extension to support implementation of
+direct rendering drivers/libraries/technologies.
+
+The main consumer of this extension will be a direct rendering OpenGL
+driver, but the DRI2 extension is not designed to be OpenGL specific.
+Direct rendering implementations of OpenVG, Xv, cairo and other
+graphics APIs should find the functionality exposed by this extension
+helpful and hopefully sufficient.
+
+Relation to XF86DRI
+
+
+1.1. Acknowledgements
+
+Kevin E. Martin <kem@redhat.com>
+Keith Packard <keithp@keithp.com>
+Eric Anholt <eric@anholt.net>
+Keith Whitwell <keith@tungstengraphics.com>
+Jerome Glisse <glisse@freedesktop.org>
+Ian Romanick <ian.d.romanick@intel.com>
+Michel Dänzer <michel@tungstengraphics.com>
+Jesse Barnes <jbarnes@virtuousgeek.org>
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+2. DRI2 Concepts
+
+
+2.1. Attachment points
+
+Stolen from OpenGL FBOs, I guess.
+
+
+2.2. Kernel rendering manager
+
+This specification assumes a rendering architechture, where an
+underlying kernel rendering manager that can provide 32 bit integer
+handles to video memory buffers. These handles can be passed between
+processes, which, through a direct rendering driver, submit rendering
+to the kernel rendering manager, targeting and/or sourcing from these
+buffers. This extension provides a means to communicate about such
+buffers as associated with an X drawable.
+
+The details of how the a direct rendering driver use the buffer names
+and submit the rendering requests is outside the scope of this
+specification. However, Appendix B does discuss implementation of
+this specification on the Graphics Execution Manager (GEM).
+
+
+2.3. Request ordering
+
+No ordering between swap buffers and X rendering. X rendering to src
+buffers will block if they have a vblank pending.
+
+
+2.4 Authentication model
+
+The purpose of the DRM authentication scheme is to grant access to the
+kernel rendering manager buffers created by the X server if, and only
+if, the client has access to the X server. This is achieved in a
+three-step protocol:
+
+ 1) The client gets a token from the kernel rendering manager
+ that uniquely identifies it. The token is a 32 bit integer.
+
+ 2) The client passes the token to the X server in the
+ DRI2Authenticate request. This request is a round trip to
+ make sure the X server has received and processed the
+ authentication before the client starts accessing the DRM.
+
+ 3) The X server authorizes the client by passing the token to
+ the kernel rendering manager.
+
+A kernel rendering manager can choose not to implement any
+authentication and just allow access to all buffers.
+
+
+2.5 Rendering to the X front buffer
+
+OpenGL allows the client to render to the front buffer, either by
+using a single-buffered configuration or but explicitly setting the
+draw buffer to GL_FRONT_LEFT. Not allowed!
+
+The client must ask for a fake front buffer, render to that and then
+use DRI2CopyRegion to copy contents back and forth between the fake
+front buffer and the real front buffer. When X and direct rendering
+to a front buffer is interleaved, it is the responsibility of the
+application to synchronize access using glXWaitGL and glXWaitX. A
+DRI2 implementation of direct rendering GLX, should use these enty
+points to copy contents back and forth to as necessary to ensure
+consistent rendering.
+
+The client may also use the DRI2SwapBuffers function to request a swap
+of the front and back buffers. If the display server supports it, this
+operation may be preferred, since it may be easier and/or more performant
+for the server to perform a simple buffer swap rather than a blit.
+
+2.6 Synchronizing rendering
+
+DRI2 provides several methods for synchronizing drawing with various events.
+The protocol for these methods is based on the SGI_video_sync and
+OML_sync_control GLX extensions. Using the DRI2WaitMSC request, a client
+can wait for a specific frame count or divisor/remainder before continuing
+its processing. With the DRI2WaitSBC request, clients can block until a given
+swap count is reached (as incremented by DRI2SwapBuffers). Finally, using
+DRI2SwapBuffers, clients can limit their frame rate by specifying a swap
+interval using the swap interval call (currently only available through GLX)
+or by using the OML swap buffers routine.
+
+2.7 Events
+
+DRI2 provides an event to indicate when a DRI2SwapBuffers request has
+been completed. This can be used to throttle drawing on the client
+side and tie into application main loops.
+
+Another event is generated when the validity of the requested buffers
+changes.
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+3. Data Types
+
+The server side region support specified in the Xfixes extension
+version 2 is used in the CopyRegion request.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+4. Errors
+
+No errors are defined by the DRI2 extension.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+5. Events
+
+The only events provided by DRI2 are DRI2_BufferSwapComplete
+and DRI2InvalidateBuffers.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+6. Protocol Types
+
+DRI2DRIVER { DRI2DriverDRI
+ DRI2DriverVDPAU }
+
+ These values describe the type of driver the client will want
+ to load. The server sends back the name of the driver to use
+ for the screen in question.
+
+DRI2ATTACHMENT { DRI2BufferFrontLeft
+ DRI2BufferBackLeft
+ DRI2BufferFrontRight
+ DRI2BufferBackRight
+ DRI2BufferDepth
+ DRI2BufferStencil
+ DRI2BufferAccum
+ DRI2BufferFakeFrontLeft
+ DRI2BufferFakeFrontRight
+ DRI2BufferDepthStencil
+ DRI2BufferHiz }
+
+ These values describe various attachment points for DRI2
+ buffers.
+
+DRI2BUFFER { attachment: CARD32
+ name: CARD32
+ pitch: CARD32
+ cpp: CARD32
+ flags: CARD32 }
+
+ The DRI2BUFFER describes an auxillary rendering buffer
+ associated with an X drawable. 'attachment' describes the
+ attachment point for the buffer, 'name' is the name of the
+ underlying kernel buffer,
+
+
+DRI2ATTACH_FORMAT { attachment: CARD32
+ format: CARD32 }
+
+ The DRI2ATTACH_FORMAT describes an attachment and the associated
+ format. 'attachment' describes the attachment point for the buffer,
+ 'format' describes an opaque, device-dependent format for the buffer.
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+7. Extension Initialization
+
+The name of this extension is "DRI2".
+
+┌───
+ DRI2QueryVersion
+ client-major-version: CARD32
+ client-minor-version: CARD32
+ ▶
+ major-version: CARD32
+ minor-version: CARD32
+└───
+
+ The client sends the highest supported version to the server
+ and the server sends the highest version it supports, but no
+ higher than the requested version. Major versions changes can
+ introduce incompatibilities in existing functionality, minor
+ version changes introduce only backward compatible changes.
+ It is the clients responsibility to ensure that the server
+ supports a version which is compatible with its expectations.
+
+ Backwards compatible changes included addition of new
+ requests, but also new value types in the DRI2CopyRegion
+ request. When new values are introduced, the minor version
+ will be increased so the client can know which values the X
+ server understands from the version number.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+8. Extension Requests
+
+┌───
+ DRI2Connect
+ window: WINDOW
+ driverType: DRI2DRIVER
+ ▶
+ driver: STRING
+ device: STRING
+└───
+
+ Returns the driver name and device file to use for the
+ specified driver type for the screen associated with 'window'.
+
+ 'type' identifies the type of driver to query for.
+
+ 'driver' is the name of the driver to load. The client is
+ assumed to know where to look for the drivers and what to do
+ with it.
+
+ 'device' is the filename of the DRM device file.
+
+ If the client is not local, or the request driver type is
+ unknown or not available, 'driver' and 'device' will be empty
+ strings. We are not using an regular X
+ error here to indicate failure, which will allow the client
+ fall back to other options more easily.
+
+ ISSUE: We could add the list of supported attachments and the
+ supported DRI2CopyRegion values here (just the bitmask of all
+ supported values).
+
+┌───
+ DRI2Authenticate
+ window: WINDOW
+ token: CARD32
+ ▶
+ authenticated: CARD32
+└───
+ Errors: Window
+
+ Request that the X server authenticates 'token', allowing the
+ client to access the DRM buffers created by the X server on
+ the screen associated with 'window'.
+
+ Authentication shouldn't fail at this point, except if an
+ invalid token is passed, in which case authenticated is False.
+
+┌───
+ DRI2GetBuffers
+ drawable: DRAWABLE
+ attachments: LISTofDRI2ATTACHMENTS
+ ▶
+ width, height: CARD32
+ buffers: LISTofDRI2BUFFER
+└───
+ Errors: Window
+
+ Get buffers for the provided attachment points for the given
+ drawable.
+
+ If the DDX driver does not support one or more of the
+ specified attachment points, a Value error is generated, with
+ the first unsupported attachment point as the error value.
+
+ 'width' and 'height' describes the dimensions of the drawable.
+
+ 'buffers' is a list of DRI2BUFFER for the given DRI2
+ attachment points.
+
+┌───
+ DRI2CopyRegion
+ drawable: DRAWABLE
+ region: REGION
+ source: DRI2ATTACHMENT
+ destination: DRI2ATTACHMENT
+ ▶
+└───
+ Errors: Window, Value
+
+ Schedule a copy from one DRI2 buffer to another.
+
+ The DRICopyRegion request has a reply but it is empty. The
+ reply is there to let the direct rendering client wait until
+ the server has seen the request before proceeding with
+ rendering the next frame.
+
+┌───
+ DRI2SwapBuffers
+ drawable: DRAWABLE
+ target_msc: two CARD32s
+ divisor: two CARD32s
+ remainder: two CARD32s
+ ▶
+ swap: two CARD32s
+└───
+ Errors: Window
+
+ Schedule a swap of the front and back buffers with the display
+ server.
+
+ Returns the swap count value when the swap will actually occur (e.g.
+ the last queued swap count + (pending swap count * swap interval)).
+
+ This request is only available with protocol version 1.2 or
+ later.
+
+┌───
+ DRI2GetBuffersWithFormat
+ drawable: DRAWABLE
+ attachments: LISTofDRI2ATTACH_FORMAT
+ ▶
+ width, height: CARD32
+ buffers: LISTofDRI2BUFFER
+└───
+ Errors: Window
+
+ Get buffers for the provided attachment points with the specified
+ formats for the given drawable.
+
+ If the DDX driver does not support one or more of the
+ specified attachment points or formats, a Value error is generated,
+ with the first unsupported attachment point as the error value.
+
+ 'width' and 'height' describes the dimensions of the drawable.
+
+ 'buffers' is a list of DRI2BUFFER for the given DRI2
+ attachment points.
+
+ This request is only available with protocol version 1.1 or
+ later.
+
+┌───
+ DRI2GetMSC
+ drawable: DRAWABLE
+ ▶
+ ust, msc, sbc: CARD64
+└───
+ Errors: Window
+
+ Get the current media stamp counter (MSC) and swap buffer count (SBC)
+ along with the unadjusted system time (UST) when the MSC was last
+ incremented.
+
+ This request is only available with protocol version 1.2 or
+ later.
+
+┌───
+ DRI2WaitMSC
+ drawable: DRAWABLE
+ target_msc: two CARD32s
+ divisor: two CARD32s
+ remainder: two CARD32s
+ ▶
+ ust, msc, sbc: CARD64
+└───
+ Errors: Window
+
+ Blocks the client until either the frame count reaches target_msc or,
+ if the frame count is already greater than target_msc when the request
+ is received, until the frame count % divisor = remainder. If divisor
+ is 0, the client will be unblocked if the frame count is greater than
+ or equal to the target_msc.
+
+ Returns the current media stamp counter (MSC) and swap buffer count
+ (SBC) along with the unadjusted system time (UST) when the MSC was last
+ incremented.
+
+ This request is only available with protocol version 1.2 or
+ later.
+
+┌───
+ DRI2WaitSBC
+ drawable: DRAWABLE
+ target_sbc: two CARD32s
+ ▶
+ ust, msc, sbc: CARD64
+└───
+ Errors: Window
+
+ Blocks the client until the swap buffer count reaches target_sbc. If
+ the swap buffer count is already greater than or equal to target_sbc
+ when the request is recieved, this request will return immediately.
+
+ If target_sbc is 0, this request will block the client until all
+ previous DRI2SwapBuffers requests have completed.
+
+ Returns the current media stamp counter (MSC) and swap buffer count
+ (SBC) along with the unadjusted system time (UST) when the MSC was last
+ incremented.
+
+ This request is only available with protocol version 1.2 or
+ later.
+
+┌───
+ DRI2SwapInterval
+ drawable: DRAWABLE
+ interval: CARD32
+ ▶
+└───
+ Errors: Window
+
+ Sets the swap interval for DRAWABLE. This will throttle
+ DRI2SwapBuffers requests to swap at most once per interval frames,
+ which is useful useful for limiting the frame rate.
+
+┌───
+ DRI2GetParam
+ drawable: DRAWABLE
+ param: CARD32
+ ▶
+ is_param_recognized: BOOL
+ value: CARD64
+└───
+ Errors: Drawable
+
+ Get the value of a parameter. The parameter's value is looked up on
+ the screen associated with 'drawable'.
+
+ Parameter names in which the value of the most significant byte is
+ 0 are reserved for the X server. Currently, no such parameter names
+ are defined. (When any such names are defined, they will be defined in
+ this extension specification and its associated headers).
+
+ Parameter names in which the byte's value is 1 are reserved for the
+ DDX. Such names are private to each driver and shall be defined in the
+ respective driver's headers.
+
+ Parameter names in which the byte's value is neither 0 nor 1 are
+ reserved for future use.
+
+ Possible values of 'is_param_recognized' are true (1) and false (0).
+ If false, then 'value' is undefined.
+
+ This request is only available with protocol version 1.4 or later.
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+9. Extension Events
+
+┌───
+ DRI2BufferSwapComplete
+ ▶
+ event_type: CARD16
+ drawable: CARD32
+ ust: CARD64
+ msc: CARD64
+ sbc: CARD64
+└───
+
+ This event reports the status of the last DRI2SwapBuffers event to
+ the client. The event type should be one of DRI2_EXCHANGE_COMPLETE,
+ indicating a successful buffer exchange, DRI2_BLIT_COMPLETE, indicating
+ the swap was performed with a blit, and DRI2_FLIP_COMPLETE, indicating
+ a full page flip was completed.
+
+┌───
+ DRI2InvalidateBuffers
+ ▶
+ drawable: CARD32
+└───
+
+ This event is generated when the buffers the client had
+ requested for 'drawable' (with DRI2GetBuffers or
+ DRI2GetBuffersWithFormat) become inappropriate because they
+ don't match the drawable dimensions anymore, or a buffer swap
+ has been performed.
+
+ Note that the server is only required to warn the client once
+ about this condition, until the client takes care of bringing
+ them back up-to-date with another GetBuffers request.
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+10. Extension Versioning
+
+The DRI2 extension has undergone a number of revisions before
+
+ 1.0: Released, but never used. Relied on a number of
+ constructs from the XF86DRI extension, such as a
+ shared memory area (SAREA) to communicate changes in
+ cliprects and window sizes, and
+
+ 1.99.1: Move the swap buffer functionality into the X server,
+ introduce SwapBuffer request to copy back buffer
+ contents to the X drawable.
+
+ 1.99.2: Rethink the SwapBuffer request as an asynchronous
+ request to copy a region between DRI2 buffers. Drop
+ CreateDrawable and DestroyDrawable, update Connect to
+ support different driver types and to send the
+ authentication group.
+
+ 1.99.3: Drop the bitmask argument intended to indicate
+ presence of optional arguments for CopyRegion.
+
+ 2.0: Awesomeness!
+
+ 2.1: True excellence. Added DRI2GetBuffersWithFormat to allow
+ more flexible object creation.
+
+ 2.2: Approaching perfection. Added requests for swapbuffers,
+ MSC and SBC related requests, and events.
+
+ 2.3: Added the DRI2InvalidateBuffers event.
+
+ 2.6: Enlightenment attained. Added the DRI2BufferHiz attachment.
+
+ 2.7: Added the DRI2GetParam request.
+
+Compatibility up to 2.0 is not preserved, but was also never released.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+11. Relationship with other extensions
+
+As an extension designed to support other extensions, there is
+naturally some interactions with other extensions.
+
+
+11.1 GLX
+
+The GL auxilary buffers map directly to the DRI2 buffers... eh
+
+
+11.2 DBE
+
+The DBE back buffer must correspond to the DRI2_BUFFER_FRONT_LEFT
+DRI2 buffer for servers that support both DBE and DRI2.
+
+
+11.3 XvMC / Xv
+
+We might add a DRI2_BUFFER_YUV to do vsynced colorspace conversion
+blits. Maybe... not really sure.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+Appendix A. Protocol Encoding
+
+Syntactic Conventions
+
+This document uses the same syntactic conventions as the core X
+protocol encoding document.
+
+
+A.1 Common Types
+
+┌───
+ DRI2DRIVER
+ 0x0 DRI2DriverDRI
+ 0x1 DRI2DriverVDPAU
+└───
+
+┌───
+ DRI2ATTACHMENT
+ 0x0 DRI2BufferFrontLeft
+ 0x1 DRI2BufferBackLeft
+ 0x2 DRI2BufferFrontRight
+ 0x3 DRI2BufferBackRight
+ 0x4 DRI2BufferDepth
+ 0x5 DRI2BufferStencil
+ 0x6 DRI2BufferAccum
+ 0x7 DRI2BufferFakeFrontLeft
+ 0x8 DRI2BufferFakeFrontRight
+ 0x9 DRI2BufferDepthStencil
+ 0xa DRI2BufferHiz
+└───
+ Used to encode the possible attachment points. The attachment
+ DRI2BufferDepthStencil is only available with protocol version 1.1 or
+ later.
+
+┌───
+ DRI2BUFFER
+ 4 CARD32 attachment
+ 4 CARD32 name
+ 4 CARD32 pitch
+ 4 CARD32 cpp
+ 4 CARD32 flags
+└───
+ A DRI2 buffer specifies the attachment, the kernel memory
+ manager name, the pitch and chars per pixel for a buffer
+ attached to a given drawable.
+
+┌───
+ DRI2ATTACH_FORMAT
+ 4 CARD32 attachment
+ 4 CARD32 format
+└───
+ Used to describe the attachment and format requested from the server.
+ This data type is only available with protocol version 1.1 or
+ later.
+
+A.2 Protocol Requests
+
+┌───
+ DRI2QueryVersion
+ 1 CARD8 major opcode
+ 1 0 DRI2 opcode
+ 2 3 length
+ 4 CARD32 major version
+ 4 CARD32 minor version
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 major version
+ 4 CARD32 minor version
+ 16 unused
+└───
+
+┌───
+ DRI2Connect
+ 1 CARD8 major opcode
+ 1 1 DRI2 opcode
+ 2 3 length
+ 4 WINDOW window
+ 4 CARD32 driver type
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 (n+m+p+q)/4 reply length
+ 4 n driver name length
+ 4 m device name length
+ 16 unused
+ n CARD8 driver name
+ p unused, p=pad(n)
+ m CARD8 device name
+ q unused, q=pad(m)
+└───
+
+┌───
+ DRI2Authenticate
+ 1 CARD8 major opcode
+ 1 2 DRI2 opcode
+ 2 3 length
+ 4 WINDOW window
+ 4 CARD32 authentication token
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 authenticated
+ 20 unused
+└───
+
+┌───
+ DRI2GetBuffers
+ 1 CARD8 major opcode
+ 1 5 DRI2 opcode
+ 2 3 length
+ 4 DRAWABLE drawable
+ 4 n number of attachments
+ 4n LISTofDRI2ATTACHMENTS attachments
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 width of drawable
+ 4 CARD32 height of drawable
+ 4 CARD32 buffer count
+ 12 unused
+ 5n LISTofDRI2BUFFER buffers
+└───
+
+┌───
+ DRI2CopyRegion
+ 1 CARD8 major opcode
+ 1 6 DRI2 opcode
+ 2 3 length
+ 4 DRAWABLE drawable
+ 4 REGION region
+ 4 DRI2ATTACHMENT source
+ 4 DRI2ATTACHMENT destination
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 24 unused
+└───
+
+┌───
+ DRI2GetBuffersWithFormat
+ 1 CARD8 major opcode
+ 1 7 DRI2 opcode
+ 2 3 length
+ 4 DRAWABLE drawable
+ 4 n number of attachments
+ 8n LISTofDRI2ATTACH_FORMAT attachments and formats
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 width of drawable
+ 4 CARD32 height of drawable
+ 4 CARD32 buffer count
+ 12 unused
+ 5n LISTofDRI2BUFFER buffers
+└───
+
+┌───
+ DRI2SwapBuffers
+ 1 CARD8 major opcode
+ 1 8 DRI2 opcode
+ 2 8 length
+ 4 DRAWABLE drawable
+ 4 CARD32 target_msc_hi
+ 4 CARD32 target_msc_lo
+ 4 CARD32 divisor_hi
+ 4 CARD32 divisor_lo
+ 4 CARD32 remainder_hi
+ 4 CARD32 remainder_lo
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 swap_hi
+ 4 CARD32 swap_lo
+ 20 unused
+└───
+
+┌───
+ DRI2GetMSC
+ 1 CARD8 major opcode
+ 1 9 DRI2 opcode
+ 2 8 length
+ 4 DRAWABLE drawable
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 ust_hi
+ 4 CARD32 ust_lo
+ 4 CARD32 msc_hi
+ 4 CARD32 msc_lo
+ 4 CARD32 sbc_hi
+ 4 CARD32 sbc_lo
+└───
+
+┌───
+ DRI2WaitMSC
+ 1 CARD8 major opcode
+ 1 10 DRI2 opcode
+ 2 8 length
+ 4 DRAWABLE drawable
+ 4 CARD32 target_msc_hi
+ 4 CARD32 target_msc_lo
+ 4 CARD32 divisor_hi
+ 4 CARD32 divisor_lo
+ 4 CARD32 remainder_hi
+ 4 CARD32 remainder_lo
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 ust_hi
+ 4 CARD32 ust_lo
+ 4 CARD32 msc_hi
+ 4 CARD32 msc_lo
+ 4 CARD32 sbc_hi
+ 4 CARD32 sbc_lo
+└───
+
+┌───
+ DRI2WaitSBC
+ 1 CARD8 major opcode
+ 1 11 DRI2 opcode
+ 2 8 length
+ 4 DRAWABLE drawable
+ 4 CARD32 swap_hi
+ 4 CARD32 swap_lo
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 ust_hi
+ 4 CARD32 ust_lo
+ 4 CARD32 msc_hi
+ 4 CARD32 msc_lo
+ 4 CARD32 sbc_hi
+ 4 CARD32 sbc_lo
+└───
+
+┌───
+ DRI2SwapInterval
+ 1 CARD8 major opcode
+ 1 12 DRI2 opcode
+ 2 8 length
+ 4 DRAWABLE drawable
+ 4 CARD32 interval
+ ▶
+└───
+
+┌───
+ DRI2GetParam
+ 1 CARD8 major opcode
+ 1 13 DRI2 opcode
+ 2 8 length
+ 4 DRAWABLE drawable
+ 4 CARD32 param
+ ▶
+ 1 1 Reply
+ 1 BOOL is_param_recognized
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 value_hi
+ 4 CARD32 value_lo
+ 16 unused
+└───
+
+A.3 Protocol Events
+
+The DRI2 extension specifies DRI2_BufferSwapComplete and
+DRI2_InvalidateBuffers events.
+
+┌───
+ DRI2_BufferSwapComplete
+ 1 CARD8 type
+ 1 CARD8 extension
+ 2 CARD16 sequenceNumber
+ 2 CARD16 event_type
+ 4 DRAWABLE drawable
+ 4 CARD32 ust_hi
+ 4 CARD32 ust_lo
+ 4 CARD32 msc_hi
+ 4 CARD32 msc_lo
+ 4 CARD32 sbc_hi
+ 4 CARD32 sbc_lo
+└───
+
+
+┌───
+ DRI2_InvalidateBuffers
+ 1 CARD8 type
+ 1 CARD8 extension
+ 2 CARD16 sequenceNumber
+ 4 DRAWABLE drawable
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+└───
+
+A.4 Protocol Errors
+
+The DRI2 extension specifies no errors.
+
+
+ ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
+
+
+Appendix B. Implementation on GEM
+
+Where to begin...
diff --git a/dri2proto/.gitignore b/dri2proto/.gitignore
new file mode 100644
index 0000000..507f5dd
--- /dev/null
+++ b/dri2proto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for dri2proto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/dri2proto/COPYING b/dri2proto/COPYING
new file mode 100644
index 0000000..a99b75a
--- /dev/null
+++ b/dri2proto/COPYING
@@ -0,0 +1,29 @@
+Copyright © 2007 Red Hat, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Soft-
+ware"), to deal in the Software without restriction, including without
+limitation the rights to use, copy, modify, merge, publish, distribute,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, provided that the above copyright
+notice(s) and this permission notice appear in all copies of the Soft-
+ware and that both the above copyright notice(s) and this permission
+notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
+MANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization of
+the copyright holder.
+
+Authors:
+ Kristian Høgsberg (krh@redhat.com)
diff --git a/dri2proto/Makefile.am b/dri2proto/Makefile.am
new file mode 100644
index 0000000..5990273
--- /dev/null
+++ b/dri2proto/Makefile.am
@@ -0,0 +1,20 @@
+dri2dir = $(includedir)/X11/extensions
+dri2_HEADERS = dri2proto.h dri2tokens.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = dri2proto.pc
+
+dist_doc_DATA = dri2proto.txt
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/dri2proto/README b/dri2proto/README
new file mode 100644
index 0000000..1115e51
--- /dev/null
+++ b/dri2proto/README
@@ -0,0 +1,30 @@
+ Direct Rendering Infrastructure 2 Extension
+
+This extension defines a protocol to securely allow user applications to access
+the video hardware without requiring data to be passed through the X server.
+
+Extension name: DRI2
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/dri2proto
+
+ http://cgit.freedesktop.org/xorg/proto/dri2proto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/dri2proto/autogen.sh b/dri2proto/autogen.sh
new file mode 100755
index 0000000..fc34bd5
--- /dev/null
+++ b/dri2proto/autogen.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure "$@"
+fi
diff --git a/dri2proto/configure.ac b/dri2proto/configure.ac
new file mode 100644
index 0000000..5fadf56
--- /dev/null
+++ b/dri2proto/configure.ac
@@ -0,0 +1,13 @@
+AC_PREREQ([2.60])
+AC_INIT([DRI2Proto], [2.8], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ dri2proto.pc])
+AC_OUTPUT
diff --git a/dri2tokens.h b/dri2tokens.h
new file mode 100644
index 0000000..bdca866
--- /dev/null
+++ b/dri2tokens.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ * Kristian Høgsberg (krh@redhat.com)
+ */
+
+#ifndef _DRI2_TOKENS_H_
+#define _DRI2_TOKENS_H_
+
+#define DRI2BufferFrontLeft 0
+#define DRI2BufferBackLeft 1
+#define DRI2BufferFrontRight 2
+#define DRI2BufferBackRight 3
+#define DRI2BufferDepth 4
+#define DRI2BufferStencil 5
+#define DRI2BufferAccum 6
+#define DRI2BufferFakeFrontLeft 7
+#define DRI2BufferFakeFrontRight 8
+#define DRI2BufferDepthStencil 9
+#define DRI2BufferHiz 10
+
+/* keep bits 16 and above for prime IDs */
+#define DRI2DriverPrimeMask 7 /* 0 - 7 - allows for 6 devices*/
+#define DRI2DriverPrimeShift 16
+#define DRI2DriverPrimeId(x) (((x) >> DRI2DriverPrimeShift) & (DRI2DriverPrimeMask))
+
+#define DRI2DriverDRI 0
+#define DRI2DriverVDPAU 1
+
+/* Event sub-types for the swap complete event */
+#define DRI2_EXCHANGE_COMPLETE 0x1
+#define DRI2_BLIT_COMPLETE 0x2
+#define DRI2_FLIP_COMPLETE 0x3
+
+#endif
diff --git a/dri3proto.h b/dri3proto.h
new file mode 100644
index 0000000..ceddee8
--- /dev/null
+++ b/dri3proto.h
@@ -0,0 +1,167 @@
+/*
+ * Copyright © 2013 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _DRI3_PROTO_H_
+#define _DRI3_PROTO_H_
+
+#define DRI3_NAME "DRI3"
+#define DRI3_MAJOR 1
+#define DRI3_MINOR 0
+
+#define DRI3NumberErrors 0
+#define DRI3NumberEvents 0
+
+#define X_DRI3QueryVersion 0
+#define X_DRI3Open 1
+#define X_DRI3PixmapFromBuffer 2
+#define X_DRI3BufferFromPixmap 3
+#define X_DRI3FenceFromFD 4
+#define X_DRI3FDFromFence 5
+
+#define DRI3NumberRequests 6
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xDRI3QueryVersionReq;
+#define sz_xDRI3QueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDRI3QueryVersionReply;
+#define sz_xDRI3QueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 provider B32;
+} xDRI3OpenReq;
+#define sz_xDRI3OpenReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nfd;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xDRI3OpenReply;
+#define sz_xDRI3OpenReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length B16;
+ CARD32 pixmap B32;
+ CARD32 drawable B32;
+ CARD32 size B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 stride B16;
+ CARD8 depth;
+ CARD8 bpp;
+} xDRI3PixmapFromBufferReq;
+
+#define sz_xDRI3PixmapFromBufferReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length B16;
+ CARD32 pixmap B32;
+} xDRI3BufferFromPixmapReq;
+#define sz_xDRI3BufferFromPixmapReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nfd; /* Number of file descriptors returned (1) */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 size B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 stride B16;
+ CARD8 depth;
+ CARD8 bpp;
+ CARD32 pad20 B32;
+ CARD32 pad24 B32;
+ CARD32 pad28 B32;
+} xDRI3BufferFromPixmapReply;
+#define sz_xDRI3BufferFromPixmapReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 fence B32;
+ BOOL initially_triggered;
+ CARD8 pad13;
+ CARD16 pad14 B16;
+} xDRI3FenceFromFDReq;
+
+#define sz_xDRI3FenceFromFDReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+ CARD32 fence B32;
+} xDRI3FDFromFenceReq;
+
+#define sz_xDRI3FDFromFenceReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nfd; /* Number of file descriptors returned (1) */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad08 B32;
+ CARD32 pad12 B32;
+ CARD32 pad16 B32;
+ CARD32 pad20 B32;
+ CARD32 pad24 B32;
+ CARD32 pad28 B32;
+} xDRI3FDFromFenceReply;
+
+#define sz_xDRI3FDFromFenceReply 32
+
+#endif
diff --git a/dri3proto.pc.in b/dri3proto.pc.in
new file mode 100644
index 0000000..be8c7c6
--- /dev/null
+++ b/dri3proto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: DRI3Proto
+Description: DRI3 extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/dri3proto.txt b/dri3proto.txt
new file mode 100644
index 0000000..dac11d3
--- /dev/null
+++ b/dri3proto.txt
@@ -0,0 +1,378 @@
+ The DRI3 Extension
+ Version 1.0
+ 2013-6-4
+
+ Keith Packard
+ keithp@keithp.com
+ Intel Corporation
+
+1. Introduction
+
+The DRI3 extension provides mechanisms to translate between direct
+rendered buffers and X pixmaps. When combined with the Present extension,
+a complete direct rendering solution for OpenGL is provided.
+
+The direct rendered buffers are passed across the protocol via
+standard POSIX file descriptor passing mechanisms. On Linux, these
+buffers are DMA-BUF objects.
+
+DRI3 also includes a mechanism to translate between Linux Futexes
+and X Sync extension Fences. This provides a synchronization mechanism
+which can be used to serialize access to shared render buffers.
+
+1.1. Acknowledgments
+
+Eric Anholt <eric@anholt.net>
+Dave Airlie <airlied@redhat.com>
+Kristian Høgsberg <krh@bitplanet.net>
+James Jones <janomes@nvidia.com>
+Arthur Huillet <arthur.huillet@free.fr>
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+2. Data Types
+
+The DRI3 extension uses the RandR extension Provider data type to
+select among multiple GPUs on a single screen and the Sync extension
+fence object to provide graphics object synchronization.
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+4. Errors
+
+DRI3 defines no errors.
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+5. Events
+
+DRI3 defines no events.
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+6. Protocol Types
+
+DRI3 defines no new protocol types.
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+7. Extension Initialization
+
+The name of this extension is "DRI3"
+
+┌───
+ DRI3QueryVersion
+ client-major-version: CARD32
+ client-minor-version: CARD32
+ ▶
+ major-version: CARD32
+ minor-version: CARD32
+└───
+
+ The client sends the highest supported version to the server
+ and the server sends the highest version it supports, but no
+ higher than the requested version. Major versions changes can
+ introduce incompatibilities in existing functionality, minor
+ version changes introduce only backward compatible changes.
+ It is the clients responsibility to ensure that the server
+ supports a version which is compatible with its expectations.
+
+ Backwards compatible changes included addition of new
+ requests.
+
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+8. Extension Requests
+
+┌───
+ DRI3Open
+ drawable: DRAWABLE
+ provider: PROVIDER
+ ▶
+ nfd: CARD8
+ device: FD
+└───
+ Errors: Drawable, Value, Match
+
+ This requests that the X server open the direct rendering
+ device associated with drawable and RandR provider. The
+ provider must support SourceOutput or SourceOffload.
+
+ The file descriptor for the device is returned in
+ 'device'. 'nfd' will be set to one (this is strictly a
+ convenience for XCB which otherwise would need
+ request-specific information about how many file descriptors
+ were associated with this reply).
+
+┌───
+ DRI3PixmapFromBuffer
+ pixmap: PIXMAP
+ drawable: DRAWABLE
+ size: CARD32
+ width, height, stride: CARD16
+ depth, bpp: CARD8
+ buffer: FD
+└───
+ Errors: Alloc, Drawable, IDChoice, Value, Match
+
+ Creates a pixmap for the direct rendering object associated
+ with 'buffer'. Changes to pixmap will be visible in that
+ direct rendered object and changes to the direct rendered
+ object will be visible in the pixmap.
+
+ 'size' specifies the total size of the buffer bytes. 'width',
+ 'height' describe the geometry (in pixels) of the underlying
+ buffer. 'stride' specifies the number of bytes per scanline in
+ the buffer. The pixels within the buffer are not required to
+ be arranged in a simple linear fashion, but 'size' will be at
+ least 'height' * 'stride'.
+
+ Precisely how any additional information about the buffer is
+ shared is outside the scope of this extension.
+
+ If buffer cannot be used with the screen associated with
+ drawable, a Match error is returned.
+
+ If depth or bpp are not supported by the screen, a Value error
+ is returned.
+
+┌───
+ DRI3BufferFromPixmap
+ pixmap: PIXMAP
+ ▶
+ nfd: CARD8
+ size: CARD32
+ width, height, stride: CARD16
+ depth, bpp: CARD8
+ buffer: FD
+└───
+ Errors: Pixmap, Match
+
+ Pass back a direct rendering object associated with
+ pixmap. Changes to pixmap will be visible in that
+ direct rendered object and changes to the direct rendered
+ object will be visible in the pixmap.
+
+ 'size' specifies the total size of the buffer bytes. 'width',
+ 'height' describe the geometry (in pixels) of the underlying
+ buffer. 'stride' specifies the number of bytes per scanline in
+ the buffer. The pixels within the buffer are not required to
+ be arranged in a simple linear fashion, but 'size' will be at
+ least 'height' * 'stride'.
+
+ Precisely how any additional information about the buffer is
+ shared is outside the scope of this extension.
+
+ If buffer cannot be used with the screen associated with
+ drawable, a Match error is returned.
+
+┌───
+ DRI3FenceFromFD
+ drawable: DRAWABLE
+ fence: FENCE
+ initially-triggered: BOOL
+ fd: FD
+└───
+ Errors: IDchoice, Drawable
+
+ Creates a Sync extension Fence that provides the regular Sync
+ extension semantics along with a file descriptor that provides
+ a device-specific mechanism to manipulate the fence directly.
+ Details about the mechanism used with this file descriptor are
+ outside the scope of the DRI3 extension.
+
+┌───
+ DRI3FDFromFence
+ drawable: DRAWABLE
+ fence: FENCE
+ ▶
+ fd: FD
+└───
+ Errors: IDchoice, Drawable, Match
+
+ Given a Sync extension Fence that provides the regular Sync
+ extension semantics, returns a file descriptor that provides a
+ device-specific mechanism to manipulate the fence directly.
+ Details about the mechanism used with this file descriptor are
+ outside the scope of the DRI3 extension. 'drawable' must be
+ associated with a direct rendering device that 'fence' can
+ work with, otherwise a Match error results.
+
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+9. Extension Events
+
+DRI3 defines no events.
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+10. Extension Versioning
+
+The DRI3 extension is adapted from the DRI2 extension.
+
+ 1.0: First published version
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+
+11. Relationship with other extensions
+
+As an extension designed to support other extensions, there is
+naturally some interactions with other extensions.
+
+11.1 GLX
+
+GLX is both an application interface and an X extension. OpenGL
+applications using the GLX API will use the GLX extension, DRI3 and
+Present when doing direct rendering.
+
+11.2 Present
+
+The Present extension provides a way to synchronize the display of pixmap
+contents to the screen. When used in conjunction with DRI3, they
+provide a complete direct rendering solution for OpenGL or other APIs.
+
+11.3 DRI2
+
+DRI3 provides similar functionality to the DRI2Connect and
+DRI2GetBuffersWithFormat requests, however DRI3 uses file descriptors
+to refer to the direct rendering device and buffers.
+
+Present and DRI3 are designed in conjunction to replace DRI2
+
+11.2 XvMC / Xv
+
+It might be nice to be able to reference YUV formatted direct rendered
+objects from the X server.
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
+
+Appendix A. Protocol Encoding
+
+Syntactic Conventions
+
+This document uses the same syntactic conventions as the core X
+protocol encoding document.
+
+
+A.1 Common Types
+
+None.
+
+A.2 Protocol Requests
+
+┌───
+ DRI3QueryVersion
+ 1 CARD8 major opcode
+ 1 0 DRI3 opcode
+ 2 3 length
+ 4 CARD32 major version
+ 4 CARD32 minor version
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 major version
+ 4 CARD32 minor version
+ 16 unused
+└───
+
+
+┌───
+ DRI3Open
+ 1 CARD8 major opcode
+ 1 1 DRI3 opcode
+ 2 4 length
+ 4 DRAWABLE drawable
+ 4 PROVIDER provider
+ ▶
+ 1 1 Reply
+ 1 1 nfd
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 24 unused
+
+ 0 FD device
+└───
+
+┌───
+ DRI3PixmapFromBuffer
+ 1 CARD8 major opcode
+ 1 2 DRI3 opcode
+ 2 6 length
+ 4 Pixmap pixmap
+ 4 Drawable drawable
+ 4 CARD32 size
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 stride
+ 1 CARD8 depth
+ 1 CARD8 bpp
+
+ 0 FD buffer
+└───
+
+┌───
+ DRI3BufferFromPixmap
+ 1 CARD8 major opcode
+ 1 3 DRI3 opcode
+ 2 2 length
+ 4 Pixmap pixmap
+ ▶
+ 1 1 Reply
+ 1 1 nfd
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 size
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 stride
+ 1 CARD8 depth
+ 1 CARD8 bpp
+ 12 unused
+
+ 0 FD buffer
+└───
+
+┌───
+ DRI3FenceFromFD
+ 1 CARD8 major opcode
+ 1 4 DRI3 opcode
+ 2 4 length
+ 4 Drawable drawable
+ 4 Fence fence
+ 1 BOOL initially triggered
+ 3 unused
+
+ 0 FD fence fd
+└───
+
+┌───
+ DRI3FDFromFence
+ 1 CARD8 major opcode
+ 1 5 DRI3 opcode
+ 2 3 length
+ 4 Drawable drawable
+ 4 Fence fence
+ ▶
+ 1 1 Reply
+ 1 1 nfd
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 24 unused
+
+ 0 FD fence fd
+└───
+
+A.3 Protocol Events
+
+The DRI3 extension defines no events.
+
+A.4 Protocol Errors
+
+The DRI3 extension defines no errors.
+
+ ❄ ❄ ❄ ❄ ❄ ❄ ❄
diff --git a/dri3proto/.gitignore b/dri3proto/.gitignore
new file mode 100644
index 0000000..2f471ac
--- /dev/null
+++ b/dri3proto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for dri3proto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/dri3proto/COPYING b/dri3proto/COPYING
new file mode 100644
index 0000000..8dcf1d4
--- /dev/null
+++ b/dri3proto/COPYING
@@ -0,0 +1,19 @@
+Copyright © 2013 Keith Packard
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation, and
+that the name of the copyright holders not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission. The copyright holders make no representations
+about the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
diff --git a/dri3proto/Makefile.am b/dri3proto/Makefile.am
new file mode 100644
index 0000000..7a85bf1
--- /dev/null
+++ b/dri3proto/Makefile.am
@@ -0,0 +1,19 @@
+dri3dir = $(includedir)/X11/extensions
+dri3_HEADERS = dri3proto.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = dri3proto.pc
+
+dist_doc_DATA = dri3proto.txt
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/dri3proto/README b/dri3proto/README
new file mode 100644
index 0000000..1dedd46
--- /dev/null
+++ b/dri3proto/README
@@ -0,0 +1,31 @@
+ Direct Rendering Infrastructure 3 Extension
+
+The DRI3 extension provides mechanisms to translate between direct
+rendered buffers and X pixmaps. When combined with the Present extension,
+a complete direct rendering solution for OpenGL is provided.
+
+Extension name: DRI3
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/dri3proto
+
+ http://cgit.freedesktop.org/xorg/proto/dri3proto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/dri3proto/autogen.sh b/dri3proto/autogen.sh
new file mode 100755
index 0000000..7abdaac
--- /dev/null
+++ b/dri3proto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH dri3proto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/dri3proto/configure.ac b/dri3proto/configure.ac
new file mode 100644
index 0000000..d7abd0a
--- /dev/null
+++ b/dri3proto/configure.ac
@@ -0,0 +1,13 @@
+AC_PREREQ([2.60])
+AC_INIT([DRI3Proto], [1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ dri3proto.pc])
+AC_OUTPUT
diff --git a/evieproto.h b/evieproto.h
new file mode 100644
index 0000000..649c91a
--- /dev/null
+++ b/evieproto.h
@@ -0,0 +1,156 @@
+/************************************************************
+
+Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+************************************************************/
+
+#ifndef _XEVIEPROTO_H_
+#define _XEVIEPROTO_H_
+
+#define XEVIENAME "XEVIE"
+
+#define XEVIE_MAJOR_VERSION 1
+#define XEVIE_MINOR_VERSION 0
+
+#define X_XevieQueryVersion 0
+#define X_XevieStart 1
+#define X_XevieEnd 2
+#define X_XevieSend 3
+#define X_XevieSelectInput 4
+
+#define XevieNumberErrors 0
+
+typedef struct _XevieQueryVersion {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD16 client_major_version B16;
+ CARD16 client_minor_version B16;
+} xXevieQueryVersionReq;
+#define sz_xXevieQueryVersionReq 8
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD16 server_major_version B16;
+ CARD16 server_minor_version B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXevieQueryVersionReply;
+#define sz_xXevieQueryVersionReply 32
+
+typedef struct _XevieStart {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD32 screen B32;
+} xXevieStartReq;
+#define sz_xXevieStartReq 8
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieStartReply;
+#define sz_xXevieStartReply 32
+
+typedef struct _XevieEnd {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD32 cmap B32;
+} xXevieEndReq;
+#define sz_xXevieEndReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieEndReply;
+#define sz_xXevieEndReply 32
+
+typedef struct _XevieSend {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ xEvent event;
+ CARD32 dataType B32;
+} xXevieSendReq;
+#define sz_xXevieSendReq 104
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieSendReply;
+#define sz_xXevieSendReply 32
+
+typedef struct _XevieSelectInput {
+ CARD8 reqType;
+ CARD8 xevieReqType;
+ CARD16 length B16;
+ CARD32 event_mask B32;
+} xXevieSelectInputReq;
+#define sz_xXevieSelectInputReq 8
+
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXevieSelectInputReply;
+#define sz_xXevieSelectInputReply 32
+
+#endif /* } _XEVIEPROTO_H_ */
+
diff --git a/evieproto.pc.in b/evieproto.pc.in
new file mode 100644
index 0000000..8585655
--- /dev/null
+++ b/evieproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: EvIEExt
+Description: EvIE extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/evieproto/.gitignore b/evieproto/.gitignore
new file mode 100644
index 0000000..24f0fd9
--- /dev/null
+++ b/evieproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for evieproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/evieproto/COPYING b/evieproto/COPYING
new file mode 100644
index 0000000..316475f
--- /dev/null
+++ b/evieproto/COPYING
@@ -0,0 +1,20 @@
+Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/evieproto/Makefile.am b/evieproto/Makefile.am
new file mode 100644
index 0000000..6de80c3
--- /dev/null
+++ b/evieproto/Makefile.am
@@ -0,0 +1,21 @@
+eviedir = $(includedir)/X11/extensions
+evie_HEADERS = \
+ evieproto.h \
+ Xeviestr.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = evieproto.pc
+
+EXTRA_DIST = evieproto.pc.in
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/evieproto/README b/evieproto/README
new file mode 100644
index 0000000..72b5f54
--- /dev/null
+++ b/evieproto/README
@@ -0,0 +1,44 @@
+XEvIE - X Event Interception Extension
+
+Extension name: XEVIE
+
+XEvIE is a X extension providing functionalities to allow a client to
+intercept keyboard/mouse events, and optionally modify them or consume
+them before delivery through the normal event delivery mechanisms.
+
+It was included in X11R6.8 through Xorg server 1.5, but is no
+longer supported in current X server releases (and didn't actually
+work in the last releases that did include it, nor was it ever enabled
+by default in the releases made by X.Org, though some distros may have
+enabled it in their builds/packages).
+
+No formal specification of the protocol was ever written, but it can
+be mostly determined from the evieproto.h header and the libXevie
+documentation of the functions that directly map to the protocol requests.
+
+A version 1.1 was proposed to solve several issues around security and
+multi-client access, but never implemented.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/evieproto
+
+ http://cgit.freedesktop.org/xorg/proto/evieproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/evieproto/autogen.sh b/evieproto/autogen.sh
new file mode 100755
index 0000000..fc34bd5
--- /dev/null
+++ b/evieproto/autogen.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure "$@"
+fi
diff --git a/evieproto/configure.ac b/evieproto/configure.ac
new file mode 100644
index 0000000..a5f48b1
--- /dev/null
+++ b/evieproto/configure.ac
@@ -0,0 +1,19 @@
+dnl
+dnl Process this file with autoconf to create configure.
+
+# Initialize Autoconf
+AC_PREREQ([2.60])
+AC_INIT([EvIEExt], [1.1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_OUTPUT([Makefile
+ evieproto.pc])
diff --git a/fixesproto.pc.in b/fixesproto.pc.in
new file mode 100644
index 0000000..fabce86
--- /dev/null
+++ b/fixesproto.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FixesProto
+Description: X Fixes extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Requires: xextproto >= 7.0.99.1
diff --git a/fixesproto.txt b/fixesproto.txt
new file mode 100644
index 0000000..1161946
--- /dev/null
+++ b/fixesproto.txt
@@ -0,0 +1,651 @@
+ The XFIXES Extension
+ Version 5.0
+ Document Revision 1
+ 2010-11-15
+ Keith Packard
+ keithp@keithp.com
+
+1. Introduction
+
+X applications have often needed to work around various shortcomings in the
+core X window system. This extension is designed to provide the minimal
+server-side support necessary to eliminate problems caused by these
+workarounds.
+
+2. Acknowledgements
+
+This extension is a direct result of requests made by application
+developers, in particular,
+
+ + Owen Taylor for describing the issues raised with the XEMBED
+ mechanisms and SaveSet processing and his initial extension
+ to handle this issue, and for pointer barriers
+
+ + Bill Haneman for the design for cursor image tracking.
+
+ + Havoc Pennington
+
+ + Fredrik Höglund for cursor names
+
+ + Deron Johnson for cursor visibility
+
+3. Basic Premise
+
+Requests in this extension may seem to wander all over the map of X server
+capabilities, but they are tied by a simple rule -- resolving issues raised
+by application interaction with core protocol mechanisms that cannot be
+adequately worked around on the client side of the wire.
+
+4. Extension initialization
+
+The client must negotiate the version of the extension before executing
+extension requests. Behavior of the server is undefined otherwise.
+
+QueryVersion
+
+ client-major-version: CARD32
+ client-minor-version: CARD32
+
+ ->
+
+ major-version: CARD32
+ minor-version: CARD32
+
+ The client sends the highest supported version to the server and
+ the server sends the highest version it supports, but no higher than
+ the requested version. Major versions changes can introduce
+ new requests, minor version changes introduce only adjustments to
+ existing requests or backward compatible changes. It is
+ the clients responsibility to ensure that the server supports
+ a version which is compatible with its expectations.
+
+************* XFIXES VERSION 1 OR BETTER ***********
+
+5. Save Set processing changes
+
+Embedding one application within another provides a way of unifying
+disparate documents and views within a single framework. From the X
+protocol perspective, this appears similar to nested window managers; the
+embedding application "manages" the embedded windows much as a window
+manager does for top-level windows. To protect the embedded application
+from embedding application failure, it is reasonable to use the core SaveSet
+mechanism so that embedding application failure causes embedded windows to
+be preserved instead of destroyed.
+
+The core save set mechanism defines the target for each save set member
+window as the nearest enclosing window not owned by the terminating client.
+For embedding applications, this nearest window is usually the window
+manager frame. The problem here is that the window manager will not
+generally expect to receive and correctly manage new windows appearing within
+that window by the save set mechanism, and will instead destroy the frame
+window in response to the client window destruction. This causes the
+embedded window to be destroyed.
+
+An easy fix for this problem is to change the target of the save set member
+to a window which won't be affected by the underlying window destruction.
+XFIXES chooses the root window as the target.
+
+Having embedded windows suddenly appear at the top level can confuse users,
+so XFIXES also lets the client select whether the window should end up
+unmapped after the save set processing instead of unconditionally making
+them be mapped.
+
+5.1 Requests
+
+ChangeSaveSet
+
+ window: Window
+ mode: { Insert, Delete }
+ target: { Nearest, Root }
+ map: { Map, Unmap }
+
+ ChangeSaveSet is an extension of the core protocol ChangeSaveSet
+ request. As in that request, mode specifies whether the indicated
+ window is inserted or deleted from the save-set. Target specifies
+ whether the window is reparented to the nearest non-client window as
+ in the core protocol, or reparented to the root window. Map
+ specifies whether the window is mapped as in the core protocol or
+ unmapped.
+
+6. Selection Tracking
+
+Applications wishing to monitor the contents of current selections must
+poll for selection changes. XFIXES improves this by providing an event
+delivered whenever the selection ownership changes.
+
+6.1 Types
+
+ SELECTIONEVENT { SetSelectionOwner,
+ SelectionWindowDestroy,
+ SelectionClientClose }
+
+6.1 Events
+
+SelectionNotify
+
+ subtype: SELECTIONEVENT
+ window: Window
+ owner: Window
+ selection: Atom
+ timestamp: Timestamp
+ selection-timestamp: Timestamp
+
+6.2 Requests
+
+SelectSelectionInput
+
+ window: Window
+ selection: Atom
+ event-mask: SETofSELECTIONEVENT
+
+ Selects for events to be delivered to window when various causes of
+ ownership of selection occur. Subtype indicates the cause of the
+ selection ownership change. Owner is set to the current selection
+ owner, or None. Timestamp indicates the time the event was
+ generated while selection-timestamp indicates the timestamp used to
+ own the selection.
+
+7. Cursor Image Monitoring
+
+Mirroring the screen contents is easily done with the core protocol or VNC
+addons, except for the current cursor image. There is no way using the core
+protocol to discover which cursor image is currently displayed. The
+cursor image often contains significant semantic content about the user
+interface. XFIXES provides a simple mechanism to discover when the cursor
+image changes and to fetch the current cursor image.
+
+As the current cursor may or may not have any XID associated with it, there
+is no stable name available. Instead, XFIXES returns only the image of the
+current cursor and provides a way to identify cursor images to avoid
+refetching the image each time it changes to a previously seen cursor.
+
+7.1 Types
+ CURSOREVENT { DisplayCursor }
+
+7.2 Events
+
+CursorNotify
+
+ subtype: CURSOREVENT
+ window: Window
+ cursor-serial: CARD32
+ timestamp: Timestamp
+ name: Atom (Version 2 only)
+
+7.3 Requests
+
+SelectCursorInput
+
+ window: Window
+ event-mask: SETofCURSOREVENT
+
+ This request directs cursor change events to the named window.
+ Events will be delivered irrespective of the screen on which they
+ occur. Subtype indicates the cause of the cursor image change
+ (there is only one subtype at present). Cursor-serial is a number
+ assigned to the cursor image which identifies the image. Cursors
+ with different serial numbers may have different images. Timestamp
+ is the time of the cursor change.
+
+ Servers supporting the X Input Extension Version 2.0 or higher only
+ notify the clients of cursor change events for the ClientPointer, not
+ of any other master pointer (see Section 4.4. in the XI2 protocol
+ specificiation).
+
+GetCursorImage
+
+ ->
+
+ x: INT16
+ y: INT16
+ width: CARD16
+ height: CARD16
+ x-hot: CARD16
+ y-hot: CARD16
+ cursor-serial: CARD32
+ cursor-image: LISTofCARD32
+
+ GetCursorImage returns the image of the current cursor. X and y are
+ the current cursor position. Width and height are the size of the
+ cursor image. X-hot and y-hot mark the hotspot within the cursor
+ image. Cursor-serial provides the number assigned to this cursor
+ image, this same serial number will be reported in a CursorNotify
+ event if this cursor image is redisplayed in the future.
+
+ The cursor image itself is returned as a single image at 32 bits per
+ pixel with 8 bits of alpha in the most significant 8 bits of the
+ pixel followed by 8 bits each of red, green and finally 8 bits of
+ blue in the least significant 8 bits. The color components are
+ pre-multiplied with the alpha component.
+
+************* XFIXES VERSION 2 OR BETTER ***********
+
+8. Region Objects
+
+The core protocol doesn't expose regions as a primitive object and this
+makes many operations more complicated than they really need to be. Adding
+region objects simplifies expose handling, the Shape extension and other
+operations. These operations are also designed to support a separate
+extension, the X Damage Extension.
+
+8.1 Types
+
+ Region: XID
+ WINDOW_REGION_KIND: { Bounding, Clip }
+
+8.2 Errors
+
+ Region The specified region is invalid
+
+8.3 Requests
+
+CreateRegion
+
+ region: REGION
+ rects: LISTofRECTANGLE
+
+ Creates a region initialized to the specified list of rectangles.
+ The rectangles may be specified in any order, their union becomes
+ the region. The core protocol allows applications to specify an
+ order for the rectangles, but it turns out to be just as hard to
+ verify the rectangles are actually in that order as it is to simply
+ ignore the ordering information and union them together. Hence,
+ this request dispenses with the ordering information.
+
+ Errors: IDChoice
+
+CreateRegionFromBitmap
+
+ region: REGION
+ bitmap: PIXMAP
+
+ Creates a region initialized to the set of 'one' pixels in bitmap
+ (which must be depth 1, else Match error).
+
+ Errors: Pixmap, IDChoice, Match
+
+CreateRegionFromWindow
+
+ window: Window
+ kind: WINDOW_REGION_KIND
+ region: Region
+
+ Creates a region initialized to the specified window region. See the
+ Shape extension for the definition of Bounding and Clip regions.
+
+ Errors: Window, IDChoice, Value
+
+CreateRegionFromGC
+
+ gc: GContext
+ region: Region
+
+ Creates a region initialized from the clip list of the specified
+ GContext.
+
+ Errors: GContext, IDChoice
+
+CreateRegionFromPicture
+
+ picture: Picture
+ region: Region
+
+
+ Creates a region initialized from the clip list of the specified
+ Picture.
+
+ Errors: Picture, IDChoice
+
+DestroyRegion
+
+ region: Region
+
+ Destroys the specified region.
+
+ Errors: Region
+
+SetRegion
+
+ region: Region
+ rects: LISTofRECTANGLE
+
+ This replaces the current contents of region with the region formed
+ by the union of rects.
+
+CopyRegion
+ source: Region
+ destination: Region
+
+ This replaces the contents of destination with the contents of
+ source.
+
+UnionRegion
+IntersectRegion
+SubtractRegion
+
+ source1: Region
+ source2: Region
+ destination: Region
+
+ Combines source1 and source2, placing the result in destination.
+ Destination may be the same as either source1 or source2.
+
+ Errors: Region, Value
+
+InvertRegion
+
+ source: Region
+ bounds: RECTANGLE
+ destination: Region
+
+ The source region is subtracted from the region specified by
+ bounds. The result is placed in destination, replacing its contents.
+
+ Errors: Region
+
+TranslateRegion
+
+ region: Region
+ dx, dy: INT16
+
+ The region is translated by dx, dy in place.
+
+ Errors: Region
+
+RegionExtents
+
+ source: Region
+ destination: Region
+
+ The extents of the source region are placed in the destination
+
+FetchRegion
+
+ region: Region
+ ->
+ extents: RECTANGLE
+ rectangles: LISTofRECTANGLE
+
+ The region is returned as a list of rectangles in YX-banded order.
+
+ Errors: Region
+
+SetGCClipRegion
+
+ gc: GCONTEXT
+ clip-x-origin, clip-y-origin: INT16
+ region: Region or None
+
+ This request changes clip-mask in gc to the specified region and
+ sets the clip origin. Output will be clipped to remain contained
+ within the region. The clip origin is interpreted relative to the
+ origin of whatever destination drawable is specified in a graphics
+ request. The region is interpreted relative to the clip origin.
+ Future changes to region have no effect on the gc clip-mask.
+
+ Errors: GContext, Region
+
+SetWindowShapeRegion
+
+ dest: Window
+ destKind: SHAPE_KIND
+ xOff, yOff: INT16
+ region: Region or None
+
+ This request sets the specified (by destKind) Shape extension region
+ of the window to region, offset by xOff and yOff. Future changes to
+ region have no effect on the window shape.
+
+ Errors: Window, Value, Region
+
+SetPictureClipRegion
+
+ picture: Picture
+ clip-x-origin, clip-y-origin: INT16
+ region: Region or None
+
+ This request changes clip-mask in picture to the specified region
+ and sets the clip origin. Input and output will be clipped to
+ remain contained within the region. The clip origin is interpreted
+ relative to the origin of the drawable associated with picture. The
+ region is interpreted relative to the clip origin. Future changes
+ to region have no effect on the picture clip-mask.
+
+ Errors: Picture, Region
+
+9. Cursor Names
+
+Attaching names to cursors permits some abstract semantic content to be
+associated with specific cursor images. Reflecting those names back to
+applications allows that semantic content to be related to the user through
+non-visual means.
+
+9.1 Events
+
+CursorNotify
+
+ subtype: CURSOREVENT
+ window: Window
+ cursor-serial: CARD32
+ timestamp: Timestamp
+ name: Atom or None
+
+ In Version 2 of the XFIXES protocol, this event adds the atom
+ of any name associated with the current cursor (else None).
+
+9.2 Requests
+
+SetCursorName
+
+ cursor: CURSOR
+ name: LISTofCARD8
+
+ This request interns name as an atom and sets that atom as the name
+ of cursor.
+
+ Errors: Cursor
+
+GetCursorName
+
+ cursor: CURSOR
+ ->
+ atom: ATOM or None
+ name: LISTofCARD8
+
+ This request returns the name and atom of cursor. If no name is
+ set, atom is None and name is empty.
+
+ Errors: Cursor
+
+GetCursorImageAndName
+
+ ->
+
+ x: INT16
+ y: INT16
+ width: CARD16
+ height: CARD16
+ x-hot: CARD16
+ y-hot: CARD16
+ cursor-serial: CARD32
+ cursor-atom: ATOM
+ cursor-image: LISTofCARD32
+ cursor-name: LISTofCARD8
+
+ This is similar to GetCursorImage except for including both
+ the atom and name of the current cursor.
+
+ChangeCursor
+
+ source, destination: CURSOR
+
+ This request replaces all references to the destination with a
+ reference to source. Any existing uses of the destination cursor
+ object will now show the source cursor image.
+
+ChangeCursorByName
+
+ src: CURSOR
+ name: LISTofCARD8
+
+ This request replaces the contents of all cursors with the specified
+ name with the src cursor.
+
+************* XFIXES VERSION 3 OR BETTER ***********
+
+10. Region Expansion
+
+This update provides another operation on the region objects defined in
+Section 8 of this document.
+
+10.1 Requests
+
+ExpandRegion
+ source: REGION
+ destination: REGION
+ left, right, top, bottom: CARD16
+
+ Creates destination region containing the area specified by
+ expanding each rectangle in the source region by the specified
+ number of pixels to the left, right, top and bottom.
+
+************* XFIXES VERSION 4 OR BETTER ***********
+
+11. Cursor Visibility
+
+Composite managers may want to render the cursor themselves instead of
+relying on the X server sprite drawing, this provides a way for them to
+do so without getting a double cursor image.
+
+11.1 Requests
+
+HideCursor
+
+ window: WINDOW
+
+ A client sends this request to indicate that it wants the
+ cursor image to be hidden (i.e. to not be displayed) when
+ the sprite is on the same screen as the specified window.
+ The sprite will be hidden if one or more clients have called
+ HideCursor and not ShowCursor.
+
+ Note that even though cursor hiding causes the cursor image
+ to be invisible, CursorNotify events will still be sent
+ normally, as if the cursor image were visible.
+
+ When a client with outstanding cursor hiding requests
+ terminates its connection these requests will be deleted.
+
+ Servers supporting the X Input Extension Version 2.0 or higher hide
+ all visible cursors in response to a HideCursor request. If a master
+ pointer is created while the cursors are hidden, this master pointer's
+ cursor will be hidden as well.
+
+ShowCursor
+
+ window: WINDOW
+
+ A client sends this request to indicate that it wants the
+ cursor image to be displayed when the sprite is on the same
+ screen as the specified window. The sprite will be hidden
+ if one or more clients have called HideCursor and not ShowCursor.
+
+ If the client has made no outstanding HideCursor requests
+ a BadMatch error is generated.
+
+ Servers supporting the X Input Extension Version 2.0 or higher show
+ all visible cursors in response to a ShowCursor request.
+
+************* XFIXES VERSION 5 OR BETTER ***********
+
+12. Pointer Barriers
+
+Compositing managers and desktop environments may have UI elements in
+particular screen locations such that for a single-headed display they
+correspond to easy targets according to Fitt's Law, for example, the top
+left corner. For a multi-headed environment these corners should still be
+semi-impermeable. Pointer barriers allow the application to define
+additional constraint on cursor motion so that these areas behave as
+expected even in the face of multiple displays.
+
+Absolute positioning devices like touchscreens do not obey pointer barriers.
+There's no advantage to target acquisition to do so, since on a touchscreen
+all points are in some sense equally large, whereas for a relative
+positioning device the edges and corners are infinitely large.
+
+WarpPointer and similar requests do not obey pointer barriers, for
+essentially the same reason.
+
+12.1 Types
+
+ BARRIER: XID
+
+ BarrierDirections
+
+ BarrierPositiveX: 1 << 0
+ BarrierPositiveY: 1 << 1
+ BarrierNegativeX: 1 << 2
+ BarrierNegativeY: 1 << 3
+
+12.2 Errors
+
+ Barrier
+
+12.3 Requests
+
+CreatePointerBarrier
+
+ barrier: BARRIER
+ window: Window
+ x1, y2, x2, y2: INT16
+ directions: CARD32
+ devices: LISTofDEVICEID
+
+ Creates a pointer barrier along the line specified by the given
+ coordinates on the screen associated with the given window. The
+ barrier has no spatial extent; it is simply a line along the left
+ or top edge of the specified pixels. Barrier coordinates are in
+ screen space.
+
+ The coordinates must be axis aligned, either x1 == x2, or
+ y1 == y2, but not both. The varying coordinates may be specified
+ in any order. For x1 == x2, either y1 > y2 or y1 < y2 is valid.
+ If the coordinates are not valid BadValue is generated.
+
+ Motion is allowed through the barrier in the directions specified:
+ setting the BarrierPositiveX bit allows travel through the barrier
+ in the positive X direction, etc. Nonsensical values (forbidding Y
+ axis travel through a vertical barrier, for example) and excess set
+ bits are ignored.
+
+ If the server supports the X Input Extension version 2 or higher,
+ the devices element names a set of master device to apply the
+ barrier to. If XIAllDevices or XIAllMasterDevices are given, the
+ barrier applies to all master devices. If a slave device is named,
+ BadDevice is generated; this does not apply to slave devices named
+ implicitly by XIAllDevices. Naming a device multiple times is
+ legal, and is treated as though it were named only once. If a
+ device is removed, the barrier continues to apply to the remaining
+ devices, but will not apply to any future device with the same ID
+ as the removed device. Nothing special happens when all matching
+ devices are removed; barriers must be explicitly destroyed.
+
+ Errors: IDChoice, Window, Value, Device
+
+DestroyPointerBarrier
+
+ barrier: BARRIER
+
+ Destroys the named barrier.
+
+ Errors: Barrier
+
+99. Future compatibility
+
+This extension is not expected to remain fixed. Future changes will
+strive to remain compatible if at all possible. The X server will always
+support version 1 of the extension protocol if requested by a client.
+
+Additions to the protocol will always by marked by minor version number
+changes so that applications will be able to detect what requests are
+supported.
diff --git a/fixesproto/.gitignore b/fixesproto/.gitignore
new file mode 100644
index 0000000..edc43df
--- /dev/null
+++ b/fixesproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for fixesproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/fixesproto/AUTHORS b/fixesproto/AUTHORS
new file mode 100644
index 0000000..8e18f9b
--- /dev/null
+++ b/fixesproto/AUTHORS
@@ -0,0 +1 @@
+Keith Packard, HP
diff --git a/fixesproto/COPYING b/fixesproto/COPYING
new file mode 100644
index 0000000..c8114fe
--- /dev/null
+++ b/fixesproto/COPYING
@@ -0,0 +1,42 @@
+Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+Copyright 2010 Red Hat, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+Copyright © 2001,2003 Keith Packard
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Keith Packard not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Keith Packard makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/fixesproto/Makefile.am b/fixesproto/Makefile.am
new file mode 100644
index 0000000..f1716b0
--- /dev/null
+++ b/fixesproto/Makefile.am
@@ -0,0 +1,43 @@
+#
+# Copyright © 2003 Keith Packard, Noah Levitt
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Keith Packard makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+fixesdir = $(includedir)/X11/extensions
+fixes_HEADERS = \
+ xfixesproto.h \
+ xfixeswire.h
+
+dist_doc_DATA = fixesproto.txt
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fixesproto.pc
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/fixesproto/README b/fixesproto/README
new file mode 100644
index 0000000..99604e4
--- /dev/null
+++ b/fixesproto/README
@@ -0,0 +1,31 @@
+ X Fixes Extension
+
+The extension makes changes to many areas of the protocol to resolve
+issues raised by application interaction with core protocol mechanisms
+that cannot be adequately worked around on the client side of the wire.
+
+Extension name: XFIXES
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/fixesproto
+
+ http://cgit.freedesktop.org/xorg/proto/fixesproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/fixesproto/autogen.sh b/fixesproto/autogen.sh
new file mode 100755
index 0000000..e009263
--- /dev/null
+++ b/fixesproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH fixesproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/fixesproto/configure.ac b/fixesproto/configure.ac
new file mode 100644
index 0000000..9829a61
--- /dev/null
+++ b/fixesproto/configure.ac
@@ -0,0 +1,38 @@
+dnl
+dnl Copyright © 2003 Keith Packard, Noah Levitt
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Keith Packard not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Keith Packard makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+AC_INIT([FixesProto], [5.0],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ fixesproto.pc])
+
+AC_OUTPUT
diff --git a/font.h b/font.h
new file mode 100644
index 0000000..b596ba2
--- /dev/null
+++ b/font.h
@@ -0,0 +1,168 @@
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef FONT_H
+#define FONT_H
+
+#include <X11/Xfuncproto.h>
+
+#ifndef BitmapFormatByteOrderMask
+#include "fsmasks.h"
+#endif
+
+/* data structures */
+#ifndef _XTYPEDEF_FONTPTR
+typedef struct _Font *FontPtr;
+#define _XTYPEDEF_FONTPTR
+#endif
+
+typedef struct _FontInfo *FontInfoPtr;
+typedef struct _FontProp *FontPropPtr;
+typedef struct _ExtentInfo *ExtentInfoPtr;
+typedef struct _FontPathElement *FontPathElementPtr;
+
+#ifndef _XTYPEDEF_CHARINFOPTR
+typedef struct _CharInfo *CharInfoPtr;
+#define _XTYPEDEF_CHARINFOPTR
+#endif
+
+typedef struct _FontNames *FontNamesPtr;
+typedef struct _FontResolution *FontResolutionPtr;
+
+#define NullCharInfo ((CharInfoPtr) 0)
+#define NullFont ((FontPtr) 0)
+#define NullFontInfo ((FontInfoPtr) 0)
+
+ /* draw direction */
+#define LeftToRight 0
+#define RightToLeft 1
+#define BottomToTop 2
+#define TopToBottom 3
+typedef int DrawDirection;
+
+#define NO_SUCH_CHAR -1
+
+
+#define FontAliasType 0x1000
+
+#define AllocError 80
+#define StillWorking 81
+#define FontNameAlias 82
+#define BadFontName 83
+#define Suspended 84
+#define Successful 85
+#define BadFontPath 86
+#define BadCharRange 87
+#define BadFontFormat 88
+#define FPEResetFailed 89 /* for when an FPE reset won't work */
+
+/* OpenFont flags */
+#define FontLoadInfo 0x0001
+#define FontLoadProps 0x0002
+#define FontLoadMetrics 0x0004
+#define FontLoadBitmaps 0x0008
+#define FontLoadAll 0x000f
+#define FontOpenSync 0x0010
+#define FontReopen 0x0020
+
+/* Query flags */
+#define LoadAll 0x1
+#define FinishRamge 0x2
+#define EightBitFont 0x4
+#define SixteenBitFont 0x8
+
+/* Glyph Caching Modes */
+#define CACHING_OFF 0
+#define CACHE_16_BIT_GLYPHS 1
+#define CACHE_ALL_GLYPHS 2
+#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS
+extern int glyphCachingMode;
+
+struct _Client;
+
+extern int StartListFontsWithInfo(
+ struct _Client * /*client*/,
+ int /*length*/,
+ unsigned char * /*pattern*/,
+ int /*max_names*/
+);
+
+extern FontNamesPtr MakeFontNamesRecord(
+ unsigned /* size */
+);
+
+extern void FreeFontNames(
+ FontNamesPtr /* pFN*/
+);
+
+extern int AddFontNamesName(
+ FontNamesPtr /* names */,
+ char * /* name */,
+ int /* length */
+);
+
+#if 0 /* unused */
+extern int FontToFSError();
+extern FontResolutionPtr GetClientResolution();
+#endif
+
+typedef struct _FontPatternCache *FontPatternCachePtr;
+
+extern FontPatternCachePtr MakeFontPatternCache (
+ void
+);
+
+extern void FreeFontPatternCache (
+ FontPatternCachePtr /* cache */
+);
+
+extern void EmptyFontPatternCache (
+ FontPatternCachePtr /* cache */
+);
+
+extern void CacheFontPattern (
+ FontPatternCachePtr /* cache */,
+ const char * /* pattern */,
+ int /* patlen */,
+ FontPtr /* pFont */
+);
+extern _X_EXPORT FontResolutionPtr GetClientResolutions(
+ int * /* num */
+);
+
+extern FontPtr FindCachedFontPattern (
+ FontPatternCachePtr /* cache */,
+ const char * /* pattern */,
+ int /* patlen */
+);
+
+extern void RemoveCachedFontPattern (
+ FontPatternCachePtr /* cache */,
+ FontPtr /* pFont */
+);
+
+typedef enum {
+ Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit
+} FontEncoding;
+
+#endif /* FONT_H */
diff --git a/fontcache.h b/fontcache.h
new file mode 100644
index 0000000..b767db1
--- /dev/null
+++ b/fontcache.h
@@ -0,0 +1,106 @@
+/*-
+ * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+ * All rights reserved.
+ * Copyright (c) 1998-1999 X-TrueType Server Project, All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Id: fontcache.h,v 1.6 1999/01/31 12:41:32 akiyama Exp $
+ */
+/* $XFree86: xc/include/extensions/fontcache.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD */
+
+#ifndef _EXT_FONTCACHE_H_
+#define _EXT_FONTCACHE_H_
+
+#define X_FontCacheQueryVersion 0
+#define X_FontCacheGetCacheSettings 1
+#define X_FontCacheChangeCacheSettings 2
+#define X_FontCacheGetCacheStatistics 3
+
+#define FontCacheNumberEvents 0
+
+#define FontCacheBadProtocol 0
+#define FontCacheCannotAllocMemory 1
+#define FontCacheNumberErrors (FontCacheCannotAllocMemory + 1)
+
+typedef struct {
+ long himark;
+ long lowmark;
+ long balance;
+} FontCacheSettings, *FontCacheSettingsPtr;
+
+struct cacheinfo {
+ long hits;
+ long misshits;
+ long purged;
+ long usage;
+};
+
+typedef struct {
+ long purge_runs;
+ long purge_stat;
+ long balance;
+ struct cacheinfo f;
+ struct cacheinfo v;
+} FontCacheStatistics, *FontCacheStatisticsPtr;
+
+#ifndef _FONTCACHE_SERVER_
+
+#include <X11/Xlib.h>
+
+_XFUNCPROTOBEGIN
+
+Bool FontCacheQueryVersion(
+ Display* /* dpy */,
+ int* /* majorVersion */,
+ int* /* minorVersion */
+);
+
+Bool FontCacheQueryExtension(
+ Display* /* dpy */,
+ int* /* event_base */,
+ int* /* error_base */
+);
+
+Status FontCacheGetCacheSettings(
+ Display* /* dpy */,
+ FontCacheSettings* /* cache info */
+);
+
+Status FontCacheChangeCacheSettings(
+ Display* /* dpy */,
+ FontCacheSettings* /* cache info */
+);
+
+Status FontCacheGetCacheStatistics(
+ Display* /* dpy */,
+ FontCacheStatistics* /* cache statistics info */
+);
+
+_XFUNCPROTOEND
+
+#endif /* !_FONTCACHE_SERVER_ */
+
+#endif /* _EXT_FONTCACHE_H_ */
diff --git a/fontcacheP.h b/fontcacheP.h
new file mode 100644
index 0000000..75677f3
--- /dev/null
+++ b/fontcacheP.h
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+ * All rights reserved.
+ * Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Id: fontcacheP.h,v 1.6 1999/01/31 12:43:53 akiyama Exp $
+ */
+/* $XFree86: xc/include/extensions/fontcacheP.h,v 1.4 2000/03/01 01:04:21 dawes Exp $ */
+
+#ifndef _FONTCACHEP_H_
+#define _FONTCACHEP_H_
+
+#include <X11/extensions/fontcache.h>
+
+int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */);
+void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */);
+void FontCacheGetStatistics(FontCacheStatisticsPtr /* cstats */);
+
+#endif /* _FONTCACHEP_H_ */
diff --git a/fontcacheproto.pc.in b/fontcacheproto.pc.in
new file mode 100644
index 0000000..afb2127
--- /dev/null
+++ b/fontcacheproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FontcacheProto
+Description: Fontcache extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/fontcacheproto/.gitignore b/fontcacheproto/.gitignore
new file mode 100644
index 0000000..51f6b55
--- /dev/null
+++ b/fontcacheproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for fontcacheproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/fontcacheproto/COPYING b/fontcacheproto/COPYING
new file mode 100644
index 0000000..3e473ad
--- /dev/null
+++ b/fontcacheproto/COPYING
@@ -0,0 +1,24 @@
+Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+All rights reserved.
+Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff --git a/fontcacheproto/Makefile.am b/fontcacheproto/Makefile.am
new file mode 100644
index 0000000..9092f8a
--- /dev/null
+++ b/fontcacheproto/Makefile.am
@@ -0,0 +1,22 @@
+fontcachedir = $(includedir)/X11/extensions
+fontcache_HEADERS = \
+ fontcache.h \
+ fontcacheP.h \
+ fontcachstr.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fontcacheproto.pc
+
+EXTRA_DIST = fontcacheproto.pc.in
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/fontcacheproto/README b/fontcacheproto/README
new file mode 100644
index 0000000..7cce9a7
--- /dev/null
+++ b/fontcacheproto/README
@@ -0,0 +1,30 @@
+ FontCache Extension
+
+This extension defines a protocol to allow client control over the caching
+of server-side core fonts.
+
+Extension name: FontCache
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/fontcacheproto
+
+ http://cgit.freedesktop.org/xorg/proto/fontcacheproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/fontcacheproto/autogen.sh b/fontcacheproto/autogen.sh
new file mode 100755
index 0000000..fc34bd5
--- /dev/null
+++ b/fontcacheproto/autogen.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+if test -z "$NOCONFIGURE"; then
+ $srcdir/configure "$@"
+fi
diff --git a/fontcacheproto/configure.ac b/fontcacheproto/configure.ac
new file mode 100644
index 0000000..a75e981
--- /dev/null
+++ b/fontcacheproto/configure.ac
@@ -0,0 +1,12 @@
+AC_PREREQ([2.57])
+AC_INIT([FontcacheProto], [0.1.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_OUTPUT([Makefile
+ fontcacheproto.pc])
diff --git a/fontcachstr.h b/fontcachstr.h
new file mode 100644
index 0000000..eab704e
--- /dev/null
+++ b/fontcachstr.h
@@ -0,0 +1,130 @@
+/*-
+ * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+ * All rights reserved.
+ * Copyright (c) 1998-1999 X-TrueType Server Project, All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Id: fontcachstr.h,v 1.7 1999/01/31 14:58:40 akiyama Exp $
+ */
+/* $XFree86$ */
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD */
+
+#ifndef _FONTCACHESTR_H_
+#define _FONTCACHESTR_H_
+
+#include <X11/extensions/fontcache.h>
+
+#define FONTCACHENAME "FontCache"
+
+#define FONTCACHE_MAJOR_VERSION 0 /* current version numbers */
+#define FONTCACHE_MINOR_VERSION 1
+
+typedef struct _FontCacheQueryVersion {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheQueryVersion */
+ CARD16 length B16;
+} xFontCacheQueryVersionReq;
+#define sz_xFontCacheQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of Font-Cache */
+ CARD16 minorVersion B16; /* minor version of Font-Cache */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xFontCacheQueryVersionReply;
+#define sz_xFontCacheQueryVersionReply 32
+
+typedef struct _FontCacheGetCacheSettings {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheGetCacheSettings */
+ CARD16 length B16;
+} xFontCacheGetCacheSettingsReq;
+#define sz_xFontCacheGetCacheSettingsReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 himark B32;
+ CARD32 lowmark B32;
+ CARD32 balance B32;
+ CARD32 reserve0 B32;
+ CARD32 reserve1 B32;
+ CARD32 reserve2 B32;
+} xFontCacheGetCacheSettingsReply;
+#define sz_xFontCacheGetCacheSettingsReply 32
+
+typedef struct _FontCacheChangeCacheSettings {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheChangeCacheSettings */
+ CARD16 length B16;
+ CARD32 himark B32;
+ CARD32 lowmark B32;
+ CARD32 balance B32;
+ CARD32 reserve0 B32;
+ CARD32 reserve1 B32;
+ CARD32 reserve2 B32;
+ CARD32 reserve3 B32;
+} xFontCacheChangeCacheSettingsReq;
+#define sz_xFontCacheChangeCacheSettingsReq 32
+
+typedef struct _FontCacheGetCacheStatistics {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheGetCacheStatistics */
+ CARD16 length B16;
+} xFontCacheGetCacheStatisticsReq;
+#define sz_xFontCacheGetCacheStatisticsReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 purge_runs B32;
+ CARD32 purge_stat B32;
+ CARD32 balance B32;
+ CARD32 reserve0 B32;
+ CARD32 f_hits B32;
+ CARD32 f_misshits B32;
+ CARD32 f_purged B32;
+ CARD32 f_usage B32;
+ CARD32 f_reserve0 B32;
+ CARD32 v_hits B32;
+ CARD32 v_misshits B32;
+ CARD32 v_purged B32;
+ CARD32 v_usage B32;
+ CARD32 v_reserve0 B32;
+} xFontCacheGetCacheStatisticsReply;
+#define sz_xFontCacheGetCacheStatisticsReply 64
+
+#endif /* _FONTCACHESTR_H_ */
diff --git a/fontproto.h b/fontproto.h
new file mode 100644
index 0000000..ca341da
--- /dev/null
+++ b/fontproto.h
@@ -0,0 +1,94 @@
+/***********************************************************
+
+Copyright (c) 1999 The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc..
+
+*/
+#ifndef _FONTPROTO_H
+#define _FONTPROTO_H
+
+#include <X11/Xfuncproto.h>
+
+/* Externally provided functions required by libXfont */
+
+extern _X_EXPORT int RegisterFPEFunctions (
+ NameCheckFunc name_func,
+ InitFpeFunc init_func,
+ FreeFpeFunc free_func,
+ ResetFpeFunc reset_func,
+ OpenFontFunc open_func,
+ CloseFontFunc close_func,
+ ListFontsFunc list_func,
+ StartLfwiFunc start_lfwi_func,
+ NextLfwiFunc next_lfwi_func,
+ WakeupFpeFunc wakeup_func,
+ ClientDiedFunc client_died,
+ LoadGlyphsFunc load_glyphs,
+ StartLaFunc start_list_alias_func,
+ NextLaFunc next_list_alias_func,
+ SetPathFunc set_path_func);
+
+extern _X_EXPORT int GetDefaultPointSize ( void );
+
+extern _X_EXPORT int init_fs_handlers ( FontPathElementPtr fpe,
+ BlockHandlerProcPtr block_handler);
+extern _X_EXPORT void remove_fs_handlers ( FontPathElementPtr fpe,
+ BlockHandlerProcPtr block_handler,
+ Bool all );
+
+extern _X_EXPORT int client_auth_generation ( ClientPtr client );
+
+#ifndef ___CLIENTSIGNAL_DEFINED___
+#define ___CLIENTSIGNAL_DEFINED___
+extern Bool ClientSignal ( ClientPtr client );
+#endif /* ___CLIENTSIGNAL_DEFINED___ */
+
+extern _X_EXPORT void DeleteFontClientID ( Font id );
+extern _X_EXPORT Font GetNewFontClientID ( void );
+extern _X_EXPORT int StoreFontClientFont ( FontPtr pfont, Font id );
+extern _X_EXPORT void FontFileRegisterFpeFunctions ( void );
+extern _X_EXPORT void FontFileCheckRegisterFpeFunctions ( void );
+
+extern Bool XpClientIsBitmapClient ( ClientPtr client );
+extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe );
+extern void PrinterFontRegisterFpeFunctions ( void );
+
+extern void fs_register_fpe_functions ( void );
+extern void check_fs_register_fpe_functions ( void );
+
+/* util/private.c */
+extern FontPtr CreateFontRec (void);
+extern void DestroyFontRec (FontPtr font);
+extern Bool _FontSetNewPrivate (FontPtr /* pFont */,
+ int /* n */,
+ void * /* ptr */);
+extern int AllocateFontPrivateIndex (void);
+extern void ResetFontPrivateIndex (void);
+
+/* Type1/t1funcs.c */
+extern void Type1RegisterFontFileFunctions(void);
+extern void CIDRegisterFontFileFunctions(void);
+
+/* Speedo/spfuncs.c */
+extern void SpeedoRegisterFontFileFunctions(void);
+
+/* FreeType/ftfuncs.c */
+extern void FreeTypeRegisterFontFileFunctions(void);
+
+#endif
diff --git a/fontsproto.pc.in b/fontsproto.pc.in
new file mode 100644
index 0000000..b7db169
--- /dev/null
+++ b/fontsproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FontsProto
+Description: Fonts extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/fontsproto/.gitignore b/fontsproto/.gitignore
new file mode 100644
index 0000000..f1ca084
--- /dev/null
+++ b/fontsproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for fontsproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/fontsproto/COPYING b/fontsproto/COPYING
new file mode 100644
index 0000000..eac45aa
--- /dev/null
+++ b/fontsproto/COPYING
@@ -0,0 +1,86 @@
+Copyright 1990, 1991 Network Computing Devices;
+Portions Copyright 1987 by Digital Equipment Corporation
+
+Permission to use, copy, modify, distribute, and sell this software and
+its documentation for any purpose is hereby granted without fee, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the names of Network Computing Devices or Digital
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+Network Computing Devices and Digital make no representations
+about the suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
+OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+
+Copyright 1990, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+
+Copyright (c) 1999 The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc..
diff --git a/fontsproto/Makefile.am b/fontsproto/Makefile.am
new file mode 100644
index 0000000..2714762
--- /dev/null
+++ b/fontsproto/Makefile.am
@@ -0,0 +1,26 @@
+SUBDIRS=specs
+
+fontsdir = $(includedir)/X11/fonts
+fonts_HEADERS = \
+ font.h \
+ fontproto.h \
+ fontstruct.h \
+ FS.h \
+ fsmasks.h \
+ FSproto.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fontsproto.pc
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/fontsproto/README b/fontsproto/README
new file mode 100644
index 0000000..0f8ba55
--- /dev/null
+++ b/fontsproto/README
@@ -0,0 +1,25 @@
+ X Fonts Extension
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/fontsproto
+
+ http://cgit.freedesktop.org/xorg/proto/fontsproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/fontsproto/autogen.sh b/fontsproto/autogen.sh
new file mode 100755
index 0000000..a2fdb82
--- /dev/null
+++ b/fontsproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH fontsproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/fontsproto/configure.ac b/fontsproto/configure.ac
new file mode 100644
index 0000000..78f9ff5
--- /dev/null
+++ b/fontsproto/configure.ac
@@ -0,0 +1,20 @@
+AC_PREREQ([2.60])
+AC_INIT([FontsProto], [2.1.3],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros minimum of 1.12 for DocBook external references
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.12)
+XORG_DEFAULT_OPTIONS
+XORG_ENABLE_SPECS
+XORG_WITH_XMLTO(0.0.22)
+XORG_WITH_FOP
+XORG_WITH_XSLTPROC
+XORG_CHECK_SGML_DOCTOOLS(1.8)
+
+AC_CONFIG_FILES([Makefile
+ specs/Makefile
+ fontsproto.pc])
+AC_OUTPUT
diff --git a/fontsproto/docbook.am b/fontsproto/docbook.am
new file mode 100644
index 0000000..bba4d54
--- /dev/null
+++ b/fontsproto/docbook.am
@@ -0,0 +1,105 @@
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# Variables set by the calling Makefile:
+# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
+# docbook: the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Users Documentation and Functional Specifications.
+# Do not use for Developer Documentation which is not installed and does not require olink.
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# DocBook/XML generated output formats to be installed
+shelf_DATA =
+
+# DocBook/XML file with chapters, appendix and images it includes
+dist_shelf_DATA = $(docbook) $(chapters)
+
+if HAVE_XMLTO
+if HAVE_STYLESHEETS
+
+XMLTO_SEARCHPATH_FLAGS = \
+ --searchpath "$(XORG_SGML_PATH)/X11" \
+ --searchpath "$(abs_top_builddir)"
+XMLTO_HTML_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XMLTO_HTML_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_HTML_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.html)
+%.html: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
+
+if HAVE_XMLTO_TEXT
+
+shelf_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+if HAVE_FOP
+XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
+XMLTO_PDF_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+XMLTO_FO_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_FO_STYLESHEET_FLAGS) \
+ $(XMLTO_FO_IMAGEPATH_FLAGS) \
+ $(XMLTO_PDF_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.pdf)
+%.pdf: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+
+shelf_DATA += $(docbook:.xml=.ps)
+%.ps: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+
+# Generate documents cross-reference target databases
+if HAVE_XSLTPROC
+
+XSLT_SEARCHPATH_FLAGS = \
+ --path "$(XORG_SGML_PATH)/X11" \
+ --path "$(abs_top_builddir)"
+XSLT_OLINK_FLAGS = \
+ --stringparam targets.filename "$@" \
+ --stringparam collect.xref.targets "only" \
+ --stringparam olink.base.uri "$(@:.db=)"
+
+XSLT_HTML_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XSLT_PDF_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+shelf_DATA += $(docbook:.xml=.html.db)
+%.html.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
+
+shelf_DATA += $(docbook:.xml=.pdf.db)
+%.pdf.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
+
+endif HAVE_XSLTPROC
+endif HAVE_STYLESHEETS
+endif HAVE_XMLTO
+
+CLEANFILES = $(shelf_DATA)
diff --git a/fontsproto/specs/.gitignore b/fontsproto/specs/.gitignore
new file mode 100644
index 0000000..92946c9
--- /dev/null
+++ b/fontsproto/specs/.gitignore
@@ -0,0 +1,5 @@
+*.html
+*.ps
+*.pdf
+*.txt
+*.db
diff --git a/fontsproto/specs/Makefile.am b/fontsproto/specs/Makefile.am
new file mode 100644
index 0000000..4035d4b
--- /dev/null
+++ b/fontsproto/specs/Makefile.am
@@ -0,0 +1,13 @@
+
+if ENABLE_SPECS
+
+# Main DocBook/XML files (DOCTYPE book)
+docbook = fsproto.xml
+
+# The location where the DocBook/XML files and their generated formats are installed
+shelfdir = $(docdir)
+
+# Generate DocBook/XML output formats with or without stylesheets
+include $(top_srcdir)/docbook.am
+
+endif ENABLE_SPECS
diff --git a/fontstruct.h b/fontstruct.h
new file mode 100644
index 0000000..55c89da
--- /dev/null
+++ b/fontstruct.h
@@ -0,0 +1,297 @@
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef FONTSTR_H
+#define FONTSTR_H
+
+#include <X11/Xproto.h>
+#include "font.h"
+#include <X11/Xfuncproto.h>
+#include <X11/Xdefs.h>
+
+/*
+ * This version of the server font data strucutre is only for describing
+ * the in memory data structure. The file structure is not necessarily a
+ * copy of this. That is up to the compiler and the OS layer font loading
+ * machinery.
+ */
+
+#define GLYPHPADOPTIONS 4 /* 1, 2, 4, or 8 */
+
+typedef struct _FontProp {
+ long name;
+ long value; /* assumes ATOM is not larger than INT32 */
+} FontPropRec;
+
+typedef struct _FontResolution {
+ unsigned short x_resolution;
+ unsigned short y_resolution;
+ unsigned short point_size;
+} FontResolutionRec;
+
+typedef struct _ExtentInfo {
+ DrawDirection drawDirection;
+ int fontAscent;
+ int fontDescent;
+ int overallAscent;
+ int overallDescent;
+ int overallWidth;
+ int overallLeft;
+ int overallRight;
+} ExtentInfoRec;
+
+typedef struct _CharInfo {
+ xCharInfo metrics; /* info preformatted for Queries */
+ char *bits; /* pointer to glyph image */
+} CharInfoRec;
+
+/*
+ * Font is created at font load time. It is specific to a single encoding.
+ * e.g. not all of the glyphs in a font may be part of a single encoding.
+ */
+
+typedef struct _FontInfo {
+ unsigned short firstCol;
+ unsigned short lastCol;
+ unsigned short firstRow;
+ unsigned short lastRow;
+ unsigned short defaultCh;
+ unsigned int noOverlap:1;
+ unsigned int terminalFont:1;
+ unsigned int constantMetrics:1;
+ unsigned int constantWidth:1;
+ unsigned int inkInside:1;
+ unsigned int inkMetrics:1;
+ unsigned int allExist:1;
+ unsigned int drawDirection:2;
+ unsigned int cachable:1;
+ unsigned int anamorphic:1;
+ short maxOverlap;
+ short pad;
+ xCharInfo maxbounds;
+ xCharInfo minbounds;
+ xCharInfo ink_maxbounds;
+ xCharInfo ink_minbounds;
+ short fontAscent;
+ short fontDescent;
+ int nprops;
+ FontPropPtr props;
+ char *isStringProp;
+} FontInfoRec;
+
+typedef struct _Font {
+ int refcnt;
+ FontInfoRec info;
+ char bit;
+ char byte;
+ char glyph;
+ char scan;
+ fsBitmapFormat format;
+ int (*get_glyphs) (FontPtr /* font */,
+ unsigned long /* count */,
+ unsigned char * /* chars */,
+ FontEncoding /* encoding */,
+ unsigned long * /* count */,
+ CharInfoPtr * /* glyphs */);
+ int (*get_metrics) (FontPtr /* font */,
+ unsigned long /* count */,
+ unsigned char * /* chars */,
+ FontEncoding /* encoding */,
+ unsigned long * /* count */,
+ xCharInfo ** /* glyphs */);
+ void (*unload_font) (FontPtr /* font */);
+ void (*unload_glyphs) (FontPtr /* font */);
+ FontPathElementPtr fpe;
+ void *svrPrivate;
+ void *fontPrivate;
+ void *fpePrivate;
+ int maxPrivate;
+ void **devPrivates;
+} FontRec;
+
+#define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (void *) 0 : \
+ (pFont)->devPrivates[n])
+
+#define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \
+ _FontSetNewPrivate (pFont, n, ptr) : \
+ ((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE))
+
+typedef struct _FontNames {
+ int nnames;
+ int size;
+ int *length;
+ char **names;
+} FontNamesRec;
+
+
+/* External view of font paths */
+typedef struct _FontPathElement {
+ int name_length;
+#if FONT_PATH_ELEMENT_NAME_CONST
+ const
+#endif
+ char *name;
+ int type;
+ int refcount;
+ void *private;
+} FontPathElementRec;
+
+typedef Bool (*NameCheckFunc) (const char *name);
+typedef int (*InitFpeFunc) (FontPathElementPtr fpe);
+typedef int (*FreeFpeFunc) (FontPathElementPtr fpe);
+typedef int (*ResetFpeFunc) (FontPathElementPtr fpe);
+typedef int (*OpenFontFunc) ( void *client,
+ FontPathElementPtr fpe,
+ Mask flags,
+ const char* name,
+ int namelen,
+ fsBitmapFormat format,
+ fsBitmapFormatMask fmask,
+ XID id,
+ FontPtr* pFont,
+ char** aliasName,
+ FontPtr non_cachable_font);
+typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont);
+typedef int (*ListFontsFunc) (void *client,
+ FontPathElementPtr fpe,
+ const char* pat,
+ int len,
+ int max,
+ FontNamesPtr names);
+
+typedef int (*StartLfwiFunc) (void *client,
+ FontPathElementPtr fpe,
+ const char* pat,
+ int len,
+ int max,
+ void ** privatep);
+
+typedef int (*NextLfwiFunc) (void *client,
+ FontPathElementPtr fpe,
+ char** name,
+ int* namelen,
+ FontInfoPtr* info,
+ int* numFonts,
+ void *private);
+
+typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe,
+ unsigned long* LastSelectMask);
+
+typedef void (*ClientDiedFunc) (void *client,
+ FontPathElementPtr fpe);
+
+typedef int (*LoadGlyphsFunc) (void *client,
+ FontPtr pfont,
+ Bool range_flag,
+ unsigned int nchars,
+ int item_size,
+ unsigned char* data);
+
+typedef int (*StartLaFunc) (void *client,
+ FontPathElementPtr fpe,
+ const char* pat,
+ int len,
+ int max,
+ void ** privatep);
+
+typedef int (*NextLaFunc) (void *client,
+ FontPathElementPtr fpe,
+ char** namep,
+ int* namelenp,
+ char** resolvedp,
+ int* resolvedlenp,
+ void *private);
+
+typedef void (*SetPathFunc)(void);
+
+typedef struct _FPEFunctions {
+ NameCheckFunc name_check;
+ InitFpeFunc init_fpe;
+ ResetFpeFunc reset_fpe;
+ FreeFpeFunc free_fpe;
+ OpenFontFunc open_font;
+ CloseFontFunc close_font;
+ ListFontsFunc list_fonts;
+ StartLaFunc start_list_fonts_and_aliases;
+ NextLaFunc list_next_font_or_alias;
+ StartLfwiFunc start_list_fonts_with_info;
+ NextLfwiFunc list_next_font_with_info;
+ WakeupFpeFunc wakeup_fpe;
+ ClientDiedFunc client_died;
+ /* for load_glyphs, range_flag = 0 ->
+ nchars = # of characters in data
+ item_size = bytes/char
+ data = list of characters
+ range_flag = 1 ->
+ nchars = # of fsChar2b's in data
+ item_size is ignored
+ data = list of fsChar2b's */
+ LoadGlyphsFunc load_glyphs;
+ SetPathFunc set_path_hook;
+} FPEFunctionsRec, FPEFunctions;
+
+/*
+ * Various macros for computing values based on contents of
+ * the above structures
+ */
+
+#define GLYPHWIDTHPIXELS(pci) \
+ ((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing)
+
+#define GLYPHHEIGHTPIXELS(pci) \
+ ((pci)->metrics.ascent + (pci)->metrics.descent)
+
+#define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3)
+
+#define GLYPHWIDTHPADDED(bc) (((bc)+7) & ~0x7)
+
+#define BYTES_PER_ROW(bits, nbytes) \
+ ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \
+ :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \
+ :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \
+ :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \
+ : 0)
+
+#define BYTES_FOR_GLYPH(ci,pad) (GLYPHHEIGHTPIXELS(ci) * \
+ BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad))
+/*
+ * Macros for computing different bounding boxes for fonts; from
+ * the font protocol
+ */
+
+#define FONT_MAX_ASCENT(pi) ((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \
+ (pi)->fontAscent : (pi)->ink_maxbounds.ascent)
+#define FONT_MAX_DESCENT(pi) ((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \
+ (pi)->fontDescent : (pi)->ink_maxbounds.descent)
+#define FONT_MAX_HEIGHT(pi) (FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi))
+#define FONT_MIN_LEFT(pi) ((pi)->ink_minbounds.leftSideBearing < 0 ? \
+ (pi)->ink_minbounds.leftSideBearing : 0)
+#define FONT_MAX_RIGHT(pi) ((pi)->ink_maxbounds.rightSideBearing > \
+ (pi)->ink_maxbounds.characterWidth ? \
+ (pi)->ink_maxbounds.rightSideBearing : \
+ (pi)->ink_maxbounds.characterWidth)
+#define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi))
+
+#include "fontproto.h"
+
+#endif /* FONTSTR_H */
diff --git a/fsmasks.h b/fsmasks.h
new file mode 100644
index 0000000..c86be83
--- /dev/null
+++ b/fsmasks.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright 1990, 1991 Network Computing Devices;
+ * Portions Copyright 1987 by Digital Equipment Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of Network Computing Devices or Digital
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ * Network Computing Devices and Digital make no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
+ * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+/*
+
+Portions Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+
+/*
+ * masks & values used by the font lib and the font server
+ */
+
+#ifndef _FSMASKS_H_
+#define _FSMASKS_H_
+
+#include <X11/Xmd.h>
+
+/* font format macros */
+#define BitmapFormatByteOrderMask (1L << 0)
+#define BitmapFormatBitOrderMask (1L << 1)
+#define BitmapFormatImageRectMask (3L << 2)
+#define BitmapFormatScanlinePadMask (3L << 8)
+#define BitmapFormatScanlineUnitMask (3L << 12)
+
+#define BitmapFormatByteOrderLSB (0)
+#define BitmapFormatByteOrderMSB (1L << 0)
+#define BitmapFormatBitOrderLSB (0)
+#define BitmapFormatBitOrderMSB (1L << 1)
+
+#define BitmapFormatImageRectMin (0L << 2)
+#define BitmapFormatImageRectMaxWidth (1L << 2)
+#define BitmapFormatImageRectMax (2L << 2)
+
+#define BitmapFormatScanlinePad8 (0L << 8)
+#define BitmapFormatScanlinePad16 (1L << 8)
+#define BitmapFormatScanlinePad32 (2L << 8)
+#define BitmapFormatScanlinePad64 (3L << 8)
+
+#define BitmapFormatScanlineUnit8 (0L << 12)
+#define BitmapFormatScanlineUnit16 (1L << 12)
+#define BitmapFormatScanlineUnit32 (2L << 12)
+#define BitmapFormatScanlineUnit64 (3L << 12)
+
+#define BitmapFormatMaskByte (1L << 0)
+#define BitmapFormatMaskBit (1L << 1)
+#define BitmapFormatMaskImageRectangle (1L << 2)
+#define BitmapFormatMaskScanLinePad (1L << 3)
+#define BitmapFormatMaskScanLineUnit (1L << 4)
+
+typedef CARD32 fsBitmapFormat;
+typedef CARD32 fsBitmapFormatMask;
+
+#endif /* _FSMASKS_H_ */
diff --git a/glproto.pc.in b/glproto.pc.in
new file mode 100644
index 0000000..bd275d8
--- /dev/null
+++ b/glproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: GLProto
+Description: GL extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/glproto/.gitignore b/glproto/.gitignore
new file mode 100644
index 0000000..8582544
--- /dev/null
+++ b/glproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for glproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/glproto/COPYING b/glproto/COPYING
new file mode 100644
index 0000000..78b6de4
--- /dev/null
+++ b/glproto/COPYING
@@ -0,0 +1,27 @@
+SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice including the dates of first publication and
+either this permission notice or a reference to
+http://oss.sgi.com/projects/FreeB/
+shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+Except as contained in this notice, the name of Silicon Graphics, Inc.
+shall not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization from
+Silicon Graphics, Inc.
diff --git a/glproto/Makefile.am b/glproto/Makefile.am
new file mode 100644
index 0000000..5ac8a66
--- /dev/null
+++ b/glproto/Makefile.am
@@ -0,0 +1,27 @@
+gldir = $(includedir)/GL
+gl_HEADERS = \
+ include/GL/glxint.h \
+ include/GL/glxmd.h \
+ include/GL/glxproto.h \
+ include/GL/glxtokens.h
+
+glinternaldir = $(includedir)/GL/internal
+glinternal_HEADERS = \
+ include/GL/internal/glcore.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glproto.pc
+
+EXTRA_DIST = meson.build
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/glproto/README b/glproto/README
new file mode 100644
index 0000000..16c59cb
--- /dev/null
+++ b/glproto/README
@@ -0,0 +1,30 @@
+ OpenGL Extension to the X Window System
+
+This extension defines a protocol for the client to send 3D rendering
+commands to the X server.
+
+Extension name: GLX
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/glproto
+
+ http://cgit.freedesktop.org/xorg/proto/glproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/glproto/autogen.sh b/glproto/autogen.sh
new file mode 100755
index 0000000..5d7e070
--- /dev/null
+++ b/glproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH glproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/glproto/configure.ac b/glproto/configure.ac
new file mode 100644
index 0000000..7b0c608
--- /dev/null
+++ b/glproto/configure.ac
@@ -0,0 +1,13 @@
+AC_PREREQ([2.60])
+AC_INIT([GLProto], [1.4.17], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_FILES([Makefile
+ glproto.pc])
+AC_OUTPUT
diff --git a/include/GL/glxint.h b/include/GL/glxint.h
new file mode 100644
index 0000000..9da4910
--- /dev/null
+++ b/include/GL/glxint.h
@@ -0,0 +1,137 @@
+#ifndef __GLX_glxint_h__
+#define __GLX_glxint_h__
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#include <X11/X.h>
+#include <X11/Xdefs.h>
+#include "GL/gl.h"
+
+typedef struct __GLXvisualConfigRec __GLXvisualConfig;
+typedef struct __GLXFBConfigRec __GLXFBConfig;
+
+struct __GLXvisualConfigRec {
+ VisualID vid;
+ int class;
+ Bool rgba;
+ int redSize, greenSize, blueSize, alphaSize;
+ unsigned long redMask, greenMask, blueMask, alphaMask;
+ int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize;
+ Bool doubleBuffer;
+ Bool stereo;
+ int bufferSize;
+ int depthSize;
+ int stencilSize;
+ int auxBuffers;
+ int level;
+ /* Start of Extended Visual Properties */
+ int visualRating; /* visual_rating extension */
+ int transparentPixel; /* visual_info extension */
+ /* colors are floats scaled to ints */
+ int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
+ int transparentIndex;
+ int multiSampleSize;
+ int nMultiSampleBuffers;
+ int visualSelectGroup;
+};
+
+#define __GLX_MIN_CONFIG_PROPS 18
+#define __GLX_MAX_CONFIG_PROPS 500
+
+#define __GLX_EXT_CONFIG_PROPS 10
+
+/*
+** Since we send all non-core visual properties as token, value pairs,
+** we require 2 words across the wire. In order to maintain backwards
+** compatibility, we need to send the total number of words that the
+** VisualConfigs are sent back in so old libraries can simply "ignore"
+** the new properties.
+*/
+#define __GLX_TOTAL_CONFIG (__GLX_MIN_CONFIG_PROPS + \
+ 2 * __GLX_EXT_CONFIG_PROPS)
+
+struct __GLXFBConfigRec {
+ int visualType;
+ int transparentType;
+ /* colors are floats scaled to ints */
+ int transparentRed, transparentGreen, transparentBlue, transparentAlpha;
+ int transparentIndex;
+
+ int visualCaveat;
+
+ int associatedVisualId;
+ int screen;
+
+ int drawableType;
+ int renderType;
+
+ int maxPbufferWidth, maxPbufferHeight, maxPbufferPixels;
+ int optimalPbufferWidth, optimalPbufferHeight; /* for SGIX_pbuffer */
+
+ int visualSelectGroup; /* visuals grouped by select priority */
+
+ unsigned int id;
+
+ GLboolean rgbMode;
+ GLboolean colorIndexMode;
+ GLboolean doubleBufferMode;
+ GLboolean stereoMode;
+ GLboolean haveAccumBuffer;
+ GLboolean haveDepthBuffer;
+ GLboolean haveStencilBuffer;
+
+ /* The number of bits present in various buffers */
+ GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
+ GLint depthBits;
+ GLint stencilBits;
+ GLint indexBits;
+ GLint redBits, greenBits, blueBits, alphaBits;
+ GLuint redMask, greenMask, blueMask, alphaMask;
+
+ GLuint multiSampleSize; /* Number of samples per pixel (0 if no ms) */
+
+ GLuint nMultiSampleBuffers; /* Number of availble ms buffers */
+ GLint maxAuxBuffers;
+
+ /* frame buffer level */
+ GLint level;
+
+ /* color ranges (for SGI_color_range) */
+ GLboolean extendedRange;
+ GLdouble minRed, maxRed;
+ GLdouble minGreen, maxGreen;
+ GLdouble minBlue, maxBlue;
+ GLdouble minAlpha, maxAlpha;
+};
+
+#define __GLX_TOTAL_FBCONFIG_PROPS 35
+
+#endif /* !__GLX_glxint_h__ */
diff --git a/include/GL/glxmd.h b/include/GL/glxmd.h
new file mode 100644
index 0000000..96c07db
--- /dev/null
+++ b/include/GL/glxmd.h
@@ -0,0 +1,54 @@
+#ifndef _GLX_glxmd_h_
+#define _GLX_glxmd_h_
+
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+/*
+** Machine dependent declarations.
+*/
+
+/*
+** Define floating point wire types. These are in IEEE format on the wire.
+*/
+typedef float FLOAT32;
+typedef double FLOAT64;
+
+/*
+** Like B32, but this is used to store floats in a request.
+**
+** NOTE: Machines that have a native 32-bit IEEE float can define this as
+** nothing. Machines that don't might mimic the float with an integer,
+** and then define this to :32.
+*/
+#define F32
+
+#endif /* _GLX_glxmd_h_ */
diff --git a/include/GL/glxproto.h b/include/GL/glxproto.h
new file mode 100644
index 0000000..b207d93
--- /dev/null
+++ b/include/GL/glxproto.h
@@ -0,0 +1,2722 @@
+#ifndef _GLX_glxproto_h_
+#define _GLX_glxproto_h_
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#include <GL/glxmd.h>
+
+/*****************************************************************************/
+
+/*
+** Errrors.
+*/
+#define GLXBadContext 0
+#define GLXBadContextState 1
+#define GLXBadDrawable 2
+#define GLXBadPixmap 3
+#define GLXBadContextTag 4
+#define GLXBadCurrentWindow 5
+#define GLXBadRenderRequest 6
+#define GLXBadLargeRequest 7
+#define GLXUnsupportedPrivateRequest 8
+#define GLXBadFBConfig 9
+#define GLXBadPbuffer 10
+#define GLXBadCurrentDrawable 11
+#define GLXBadWindow 12
+#define GLXBadProfileARB 13
+
+#define __GLX_NUMBER_ERRORS 14
+
+/*
+** Events.
+** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
+** event - this helps initialization if the server supports the pbuffer
+** extension and the client doesn't.
+*/
+#define GLX_PbufferClobber 0
+#define GLX_BufferSwapComplete 1
+
+#define __GLX_NUMBER_EVENTS 17
+
+#define GLX_EXTENSION_NAME "GLX"
+#define GLX_EXTENSION_ALIAS "SGI-GLX"
+
+#define __GLX_MAX_CONTEXT_PROPS 3
+
+#ifndef GLX_VENDOR
+#define GLX_VENDOR 0x1
+#endif
+#ifndef GLX_VERSION
+#define GLX_VERSION 0x2
+#endif
+#ifndef GLX_EXTENSIONS
+#define GLX_EXTENSIONS 0x3
+#endif
+
+/*****************************************************************************/
+
+/*
+** For the structure definitions in this file, we must redefine these types in
+** terms of Xmd.h types, which may include bitfields. All of these are
+** undef'ed at the end of this file, restoring the definitions in glx.h.
+*/
+#define GLXContextID CARD32
+#define GLXPixmap CARD32
+#define GLXDrawable CARD32
+#define GLXPbuffer CARD32
+#define GLXWindow CARD32
+#define GLXFBConfigID CARD32
+#define GLXFBConfigIDSGIX CARD32
+#define GLXPbufferSGIX CARD32
+
+/*
+** ContextTag is not exposed to the API.
+*/
+typedef CARD32 GLXContextTag;
+
+/*****************************************************************************/
+
+/*
+** Sizes of basic wire types.
+*/
+#define __GLX_SIZE_INT8 1
+#define __GLX_SIZE_INT16 2
+#define __GLX_SIZE_INT32 4
+#define __GLX_SIZE_CARD8 1
+#define __GLX_SIZE_CARD16 2
+#define __GLX_SIZE_CARD32 4
+#define __GLX_SIZE_FLOAT32 4
+#define __GLX_SIZE_FLOAT64 8
+
+/*****************************************************************************/
+
+/* Requests */
+
+/*
+** Render command request. A bunch of rendering commands are packed into
+** a single X extension request.
+*/
+typedef struct GLXRender {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag contextTag B32;
+} xGLXRenderReq;
+#define sz_xGLXRenderReq 8
+
+/*
+** The maximum size that a GLXRender command can be. The value must fit
+** in 16 bits and should be a multiple of 4.
+*/
+#define __GLX_MAX_RENDER_CMD_SIZE 64000
+
+/*
+** Large render command request. A single large rendering command
+** is output in multiple X extension requests. The first packet
+** contains an opcode dependent header (see below) that describes
+** the data that follows.
+*/
+typedef struct GLXRenderLarge {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag contextTag B32;
+ CARD16 requestNumber B16;
+ CARD16 requestTotal B16;
+ CARD32 dataBytes B32;
+} xGLXRenderLargeReq;
+#define sz_xGLXRenderLargeReq 16
+
+/*
+** GLX single request. Commands that go over as single GLX protocol
+** requests use this structure. The glxCode will be one of the X_GLsop
+** opcodes.
+*/
+typedef struct GLXSingle {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag contextTag B32;
+} xGLXSingleReq;
+#define sz_xGLXSingleReq 8
+
+/*
+** glXQueryVersion request
+*/
+typedef struct GLXQueryVersion {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xGLXQueryVersionReq;
+#define sz_xGLXQueryVersionReq 12
+
+/*
+** glXIsDirect request
+*/
+typedef struct GLXIsDirect {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextID context B32;
+} xGLXIsDirectReq;
+#define sz_xGLXIsDirectReq 8
+
+/*
+** glXCreateContext request
+*/
+typedef struct GLXCreateContext {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextID context B32;
+ CARD32 visual B32;
+ CARD32 screen B32;
+ GLXContextID shareList B32;
+ BOOL isDirect;
+ CARD8 reserved1;
+ CARD16 reserved2 B16;
+} xGLXCreateContextReq;
+#define sz_xGLXCreateContextReq 24
+
+/*
+** glXDestroyContext request
+*/
+typedef struct GLXDestroyContext {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextID context B32;
+} xGLXDestroyContextReq;
+#define sz_xGLXDestroyContextReq 8
+
+/*
+** glXMakeCurrent request
+*/
+typedef struct GLXMakeCurrent {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXDrawable drawable B32;
+ GLXContextID context B32;
+ GLXContextTag oldContextTag B32;
+} xGLXMakeCurrentReq;
+#define sz_xGLXMakeCurrentReq 16
+
+/*
+** glXWaitGL request
+*/
+typedef struct GLXWaitGL {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag contextTag B32;
+} xGLXWaitGLReq;
+#define sz_xGLXWaitGLReq 8
+
+/*
+** glXWaitX request
+*/
+typedef struct GLXWaitX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag contextTag B32;
+} xGLXWaitXReq;
+#define sz_xGLXWaitXReq 8
+
+/*
+** glXCopyContext request
+*/
+typedef struct GLXCopyContext {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextID source B32;
+ GLXContextID dest B32;
+ CARD32 mask B32;
+ GLXContextTag contextTag B32;
+} xGLXCopyContextReq;
+#define sz_xGLXCopyContextReq 20
+
+/*
+** glXSwapBuffers request
+*/
+typedef struct GLXSwapBuffers {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag contextTag B32;
+ GLXDrawable drawable B32;
+} xGLXSwapBuffersReq;
+#define sz_xGLXSwapBuffersReq 12
+
+/*
+** glXUseXFont request
+*/
+typedef struct GLXUseXFont {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag contextTag B32;
+ CARD32 font B32;
+ CARD32 first B32;
+ CARD32 count B32;
+ CARD32 listBase B32;
+} xGLXUseXFontReq;
+#define sz_xGLXUseXFontReq 24
+
+/*
+** glXCreateGLXPixmap request
+*/
+typedef struct GLXCreateGLXPixmap {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+ CARD32 visual B32;
+ CARD32 pixmap B32;
+ GLXPixmap glxpixmap B32;
+} xGLXCreateGLXPixmapReq;
+#define sz_xGLXCreateGLXPixmapReq 20
+
+/*
+** glXDestroyGLXPixmap request
+*/
+typedef struct GLXDestroyGLXPixmap {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXPixmap glxpixmap B32;
+} xGLXDestroyGLXPixmapReq;
+#define sz_xGLXDestroyGLXPixmapReq 8
+
+/*
+** glXGetVisualConfigs request
+*/
+typedef struct GLXGetVisualConfigs {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+} xGLXGetVisualConfigsReq;
+#define sz_xGLXGetVisualConfigsReq 8
+
+/*
+** glXVendorPrivate request.
+*/
+typedef struct GLXVendorPrivate {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ GLXContextTag contextTag B32;
+ /*
+ ** More data may follow; this is just the header.
+ */
+} xGLXVendorPrivateReq;
+#define sz_xGLXVendorPrivateReq 12
+
+/*
+** glXVendorPrivateWithReply request
+*/
+typedef struct GLXVendorPrivateWithReply {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ GLXContextTag contextTag B32;
+ /*
+ ** More data may follow; this is just the header.
+ */
+} xGLXVendorPrivateWithReplyReq;
+#define sz_xGLXVendorPrivateWithReplyReq 12
+
+/*
+** glXQueryExtensionsString request
+*/
+typedef struct GLXQueryExtensionsString {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+} xGLXQueryExtensionsStringReq;
+#define sz_xGLXQueryExtensionsStringReq 8
+
+/*
+** glXQueryServerString request
+*/
+typedef struct GLXQueryServerString {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+ CARD32 name B32;
+} xGLXQueryServerStringReq;
+#define sz_xGLXQueryServerStringReq 12
+
+/*
+** glXClientInfo request
+*/
+typedef struct GLXClientInfo {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 major B32;
+ CARD32 minor B32;
+ CARD32 numbytes B32;
+} xGLXClientInfoReq;
+#define sz_xGLXClientInfoReq 16
+
+/*** Start of GLX 1.3 requests */
+
+/*
+** glXGetFBConfigs request
+*/
+typedef struct GLXGetFBConfigs {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+} xGLXGetFBConfigsReq;
+#define sz_xGLXGetFBConfigsReq 8
+
+/*
+** glXCreatePixmap request
+*/
+typedef struct GLXCreatePixmap {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+ GLXFBConfigID fbconfig B32;
+ CARD32 pixmap B32;
+ GLXPixmap glxpixmap B32;
+ CARD32 numAttribs B32;
+ /* followed by attribute list */
+} xGLXCreatePixmapReq;
+#define sz_xGLXCreatePixmapReq 24
+
+/*
+** glXDestroyPixmap request
+*/
+typedef struct GLXDestroyPixmap {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXPixmap glxpixmap B32;
+} xGLXDestroyPixmapReq;
+#define sz_xGLXDestroyPixmapReq 8
+
+/*
+** glXCreateNewContext request
+*/
+typedef struct GLXCreateNewContext {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextID context B32;
+ GLXFBConfigID fbconfig B32;
+ CARD32 screen B32;
+ CARD32 renderType;
+ GLXContextID shareList B32;
+ BOOL isDirect;
+ CARD8 reserved1;
+ CARD16 reserved2 B16;
+} xGLXCreateNewContextReq;
+#define sz_xGLXCreateNewContextReq 28
+
+/*
+** glXQueryContext request
+*/
+typedef struct GLXQueryContext {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextID context B32;
+} xGLXQueryContextReq;
+#define sz_xGLXQueryContextReq 8
+
+/*
+** glXMakeContextCurrent request
+*/
+typedef struct GLXMakeContextCurrent {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextTag oldContextTag B32;
+ GLXDrawable drawable B32;
+ GLXDrawable readdrawable B32;
+ GLXContextID context B32;
+} xGLXMakeContextCurrentReq;
+#define sz_xGLXMakeContextCurrentReq 20
+
+/*
+** glXCreatePbuffer request
+*/
+typedef struct GLXCreatePbuffer {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+ GLXFBConfigID fbconfig B32;
+ GLXPbuffer pbuffer B32;
+ CARD32 numAttribs B32;
+ /* followed by attribute list */
+} xGLXCreatePbufferReq;
+#define sz_xGLXCreatePbufferReq 20
+
+/*
+** glXDestroyPbuffer request
+*/
+typedef struct GLXDestroyPbuffer {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXPbuffer pbuffer B32;
+} xGLXDestroyPbufferReq;
+#define sz_xGLXDestroyPbufferReq 8
+
+/*
+** glXGetDrawableAttributes request
+*/
+typedef struct GLXGetDrawableAttributes {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXDrawable drawable B32;
+} xGLXGetDrawableAttributesReq;
+#define sz_xGLXGetDrawableAttributesReq 8
+
+/*
+** glXChangeDrawableAttributes request
+*/
+typedef struct GLXChangeDrawableAttributes {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXDrawable drawable B32;
+ CARD32 numAttribs B32;
+ /* followed by attribute list */
+} xGLXChangeDrawableAttributesReq;
+#define sz_xGLXChangeDrawableAttributesReq 12
+
+/*
+** glXCreateWindow request
+*/
+typedef struct GLXCreateWindow {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 screen B32;
+ GLXFBConfigID fbconfig B32;
+ CARD32 window B32;
+ GLXWindow glxwindow B32;
+ CARD32 numAttribs B32;
+ /* followed by attribute list */
+} xGLXCreateWindowReq;
+#define sz_xGLXCreateWindowReq 24
+
+/*
+** glXDestroyWindow request
+*/
+typedef struct GLXDestroyWindow {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXWindow glxwindow B32;
+} xGLXDestroyWindowReq;
+#define sz_xGLXDestroyWindowReq 8
+
+/* Replies */
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 error B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetErrorReply;
+#define sz_xGLXGetErrorReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ GLXContextTag contextTag B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXMakeCurrentReply;
+#define sz_xGLXMakeCurrentReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXReadPixelsReply;
+#define sz_xGLXReadPixelsReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 width B32;
+ CARD32 height B32;
+ CARD32 depth B32;
+ CARD32 pad6 B32;
+} xGLXGetTexImageReply;
+#define sz_xGLXGetTexImageReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 width B32;
+ CARD32 height B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetSeparableFilterReply;
+#define sz_xGLXGetSeparableFilterReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 width B32;
+ CARD32 height B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetConvolutionFilterReply;
+#define sz_xGLXGetConvolutionFilterReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 width B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetHistogramReply;
+#define sz_xGLXGetHistogramReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetMinmaxReply;
+#define sz_xGLXGetMinmaxReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 retval B32;
+ CARD32 size B32;
+ CARD32 newMode B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXRenderModeReply;
+#define sz_xGLXRenderModeReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryVersionReply;
+#define sz_xGLXQueryVersionReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numVisuals B32;
+ CARD32 numProps B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetVisualConfigsReply;
+#define sz_xGLXGetVisualConfigsReply 32
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL isDirect;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xGLXIsDirectReply;
+#define sz_xGLXIsDirectReply 32
+
+/*
+** This reply structure is used for all single replies. Single replies
+** ship either 1 piece of data or N pieces of data. In these cases
+** size indicates how much data is to be returned.
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 retval B32;
+ CARD32 size B32;
+ CARD32 pad3 B32; /* NOTE: may hold a single value */
+ CARD32 pad4 B32; /* NOTE: may hold half a double */
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXSingleReply;
+#define sz_xGLXSingleReply 32
+
+/*
+** This reply structure is used for all Vendor Private replies. Vendor
+** Private replies can ship up to 24 bytes within the header or can
+** be variable sized, in which case, the reply length field indicates
+** the number of words of data which follow the header.
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 retval B32;
+ CARD32 size B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXVendorPrivReply;
+#define sz_xGLXVendorPrivReply 32
+
+/*
+** QueryExtensionsStringReply
+** n indicates the number of bytes to be returned.
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 n B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryExtensionsStringReply;
+#define sz_xGLXQueryExtensionsStringReply 32
+
+/*
+** QueryServerString Reply struct
+** n indicates the number of bytes to be returned.
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 n B32;
+ CARD32 pad3 B32; /* NOTE: may hold a single value */
+ CARD32 pad4 B32; /* NOTE: may hold half a double */
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryServerStringReply;
+#define sz_xGLXQueryServerStringReply 32
+
+/*** Start of GLX 1.3 replies */
+
+/*
+** glXGetFBConfigs reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numFBConfigs B32;
+ CARD32 numAttribs B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetFBConfigsReply;
+#define sz_xGLXGetFBConfigsReply 32
+
+/*
+** glXQueryContext reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 n B32; /* number of attribute/value pairs */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryContextReply;
+#define sz_xGLXQueryContextReply 32
+
+/*
+** glXMakeContextCurrent reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ GLXContextTag contextTag B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXMakeContextCurrentReply;
+#define sz_xGLXMakeContextCurrentReply 32
+
+/*
+** glXCreateGLXPbuffer reply
+** This is used only in the direct rendering case on SGIs - otherwise
+** CreateGLXPbuffer has no reply. It is not part of GLX 1.3.
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 success;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXCreateGLXPbufferReply;
+#define sz_xGLXCreateGLXPbufferReply 32
+
+/*
+** glXGetDrawableAttributes reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numAttribs B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetDrawableAttributesReply;
+#define sz_xGLXGetDrawableAttributesReply 32
+
+/*
+** glXGetColorTable reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 width B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetColorTableReply;
+#define sz_xGLXGetColorTableReply 32
+
+/************************************************************************/
+
+/* GLX extension requests and replies */
+
+/*
+** glXQueryContextInfoEXT request
+*/
+typedef struct GLXQueryContextInfoEXT {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ GLXContextID context B32;
+} xGLXQueryContextInfoEXTReq;
+#define sz_xGLXQueryContextInfoEXTReq 16
+
+/*
+** glXQueryContextInfoEXT reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 n B32; /* number of attribute/value pairs */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryContextInfoEXTReply;
+#define sz_xGLXQueryContextInfoEXTReply 32
+
+/*
+** glXMakeCurrentReadSGI request
+*/
+typedef struct GLXMakeCurrentReadSGI {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ GLXContextTag oldContextTag B32;
+ GLXDrawable drawable B32;
+ GLXDrawable readable B32;
+ GLXContextID context B32;
+} xGLXMakeCurrentReadSGIReq;
+#define sz_xGLXMakeCurrentReadSGIReq 24
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ GLXContextTag contextTag B32;
+ CARD32 writeVid B32;
+ CARD32 writeType B32;
+ CARD32 readVid B32;
+ CARD32 readType B32;
+ CARD32 pad6 B32;
+} xGLXMakeCurrentReadSGIReply;
+#define sz_xGLXMakeCurrentReadSGIReply 32
+
+/*
+** glXGetFBConfigsSGIX request
+*/
+typedef struct GLXGetFBConfigsSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ CARD32 screen B32;
+} xGLXGetFBConfigsSGIXReq;
+#define sz_xGLXGetFBConfigsSGIXReq 16
+
+/*
+** glXCreateContextWithConfigSGIX request
+*/
+
+typedef struct GLXCreateContextWithConfigSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ GLXContextID context B32;
+ GLXFBConfigID fbconfig B32;
+ CARD32 screen B32;
+ CARD32 renderType;
+ GLXContextID shareList B32;
+ BOOL isDirect;
+ CARD8 reserved1;
+ CARD16 reserved2 B16;
+} xGLXCreateContextWithConfigSGIXReq;
+#define sz_xGLXCreateContextWithConfigSGIXReq 36
+
+/*
+** glXCreatePixmapWithConfigSGIX request
+*/
+
+typedef struct GLXCreateGLXPixmapWithConfigSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ CARD32 screen B32;
+ GLXFBConfigID fbconfig B32;
+ CARD32 pixmap B32;
+ GLXPixmap glxpixmap B32;
+} xGLXCreateGLXPixmapWithConfigSGIXReq;
+#define sz_xGLXCreateGLXPixmapWithConfigSGIXReq 28
+
+/*
+** glXCreateGLXPbufferSGIX request
+*/
+typedef struct GLXCreateGLXPbufferSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ CARD32 screen B32;
+ GLXFBConfigID fbconfig B32;
+ GLXPbuffer pbuffer B32;
+ CARD32 width B32;
+ CARD32 height B32;
+ /* followed by attribute list */
+} xGLXCreateGLXPbufferSGIXReq;
+#define sz_xGLXCreateGLXPbufferSGIXReq 32
+
+/*
+** glXDestroyGLXPbufferSGIX request
+*/
+typedef struct GLXDestroyGLXPbuffer {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ GLXPbuffer pbuffer B32;
+} xGLXDestroyGLXPbufferSGIXReq;
+#define sz_xGLXDestroyGLXPbufferSGIXReq 16
+
+/*
+** glXChangeDrawableAttributesSGIX request
+*/
+typedef struct GLXChangeDrawableAttributesSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ GLXDrawable drawable B32;
+ CARD32 numAttribs B32;
+ /* followed by attribute list */
+} xGLXChangeDrawableAttributesSGIXReq;
+#define sz_xGLXChangeDrawableAttributesSGIXReq 20
+
+/*
+** glXGetDrawableAttributesSGIX request
+*/
+typedef struct GLXGetDrawableAttributesSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ GLXDrawable drawable B32;
+} xGLXGetDrawableAttributesSGIXReq;
+#define sz_xGLXGetDrawableAttributesSGIXReq 16
+
+/*
+** glXGetDrawableAttributesSGIX reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 numAttribs B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXGetDrawableAttributesSGIXReply;
+#define sz_xGLXGetDrawableAttributesSGIXReply 32
+
+/*
+** glXJoinSwapGroupSGIX request
+*/
+typedef struct GLXJoinSwapGroupSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 unused B32; /* corresponds to contextTag in hdr */
+ GLXDrawable drawable B32;
+ GLXDrawable member B32;
+} xGLXJoinSwapGroupSGIXReq;
+#define sz_xGLXJoinSwapGroupSGIXReq 20
+
+/*
+** glXBindSwapBarrierSGIX request
+*/
+typedef struct GLXBindSwapBarrierSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 unused B32; /* corresponds to contextTag in hdr */
+ GLXDrawable drawable B32;
+ CARD32 barrier B32;
+} xGLXBindSwapBarrierSGIXReq;
+#define sz_xGLXBindSwapBarrierSGIXReq 20
+
+/*
+** glXQueryMaxSwapBarriersSGIX request
+*/
+typedef struct GLXQueryMaxSwapBarriersSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 unused B32; /* corresponds to contextTag in hdr */
+ CARD32 screen B32;
+} xGLXQueryMaxSwapBarriersSGIXReq;
+#define sz_xGLXQueryMaxSwapBarriersSGIXReq 16
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 max B32;
+ CARD32 size B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryMaxSwapBarriersSGIXReply;
+#define sz_xGLXQueryMaxSwapBarriersSGIXReply 32
+
+/*
+** glXQueryHyperpipeNetworkSGIX request
+*/
+typedef struct GLXQueryHyperpipeNetworkSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ CARD32 screen B32;
+} xGLXQueryHyperpipeNetworkSGIXReq;
+#define sz_xGLXQueryHyperpipeNetworkSGIXReq 16
+
+/*
+** glXQueryHyperpipeNetworkSGIX reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 n B32;
+ CARD32 npipes B32; /* NOTE: may hold a single value */
+ CARD32 pad4 B32; /* NOTE: may hold half a double */
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryHyperpipeNetworkSGIXReply;
+#define sz_xGLXQueryHyperpipeNetworkSGIXReply 32
+
+/*
+** glXDestroyHyperpipeConfigSGIX request
+*/
+typedef struct GLXDestroyHyperpipeConfigSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ CARD32 screen B32;
+ CARD32 hpId B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xGLXDestroyHyperpipeConfigSGIXReq;
+#define sz_xGLXDestroyHyperpipeConfigSGIXReq 32
+
+/*
+** glXDestroyHyperpipeConfigSGIX reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 n B32;
+ CARD32 success B32; /* NOTE: may hold a single value */
+ CARD32 pad4 B32; /* NOTE: may hold half a double */
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXDestroyHyperpipeConfigSGIXReply;
+#define sz_xGLXDestroyHyperpipeConfigSGIXReply 32
+
+/*
+** glXQueryHyperpipeConfigSGIX request
+*/
+typedef struct GLXQueryHyperpipeConfigSGIX {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ CARD32 screen B32;
+ CARD32 hpId B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xGLXQueryHyperpipeConfigSGIXReq;
+#define sz_xGLXQueryHyperpipeConfigSGIXReq 32
+
+/*
+** glXQueryHyperpipeConfigSGIX reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 n B32;
+ CARD32 npipes B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXQueryHyperpipeConfigSGIXReply;
+#define sz_xGLXQueryHyperpipeConfigSGIXReply 32
+
+/*
+** glXHyperpipeConfigSGIX request
+*/
+typedef struct {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 vendorCode B32; /* vendor-specific opcode */
+ CARD32 pad1 B32; /* unused; corresponds to contextTag in header */
+ CARD32 screen B32;
+ CARD32 npipes B32;
+ CARD32 networkId B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ /* followed by attribute list */
+} xGLXHyperpipeConfigSGIXReq;
+#define sz_xGLXHyperpipeConfigSGIXReq 32
+
+/*
+** glXHyperpipeConfigSGIX reply
+*/
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 n B32;
+ CARD32 npipes B32;
+ CARD32 hpId B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xGLXHyperpipeConfigSGIXReply;
+#define sz_xGLXHyperpipeConfigSGIXReply 32
+
+/**
+ * \name Protocol structures for GLX_ARB_create_context and
+ * GLX_ARB_create_context_profile
+ */
+/*@{*/
+/**
+ * Protocol header for glXSetClientInfoARB
+ *
+ * This structure is follwed by \c numVersions * 2 \c CARD32 values listing
+ * the OpenGL versions supported by the client. The pairs of values are an
+ * OpenGL major version followed by a minor version. For example,
+ *
+ * CARD32 versions[4] = { 2, 1, 3, 0 };
+ *
+ * says that the client supports OpenGL 2.1 and OpenGL 3.0.
+ *
+ * These are followed by \c numGLExtensionBytes bytes of \c STRING8 containing
+ * the OpenGL extension string supported by the client and up to 3 bytes of
+ * padding.
+ *
+ * The list of OpenGL extensions is followed by \c numGLXExtensionBytes bytes
+ * of \c STRING8 containing the GLX extension string supported by the client
+ * and up to 3 bytes of padding.
+ *
+ * This protocol replaces \c GLXClientInfo.
+ *
+ * \sa GLXClientInfo, GLXSetClientInfo2ARB
+ */
+typedef struct GLXSetClientInfoARB {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 major B32;
+ CARD32 minor B32;
+ CARD32 numVersions B32;
+ CARD32 numGLExtensionBytes B32;
+ CARD32 numGLXExtensionBytes B32;
+ /*
+ ** More data may follow; this is just the header.
+ */
+} xGLXSetClientInfoARBReq;
+#define sz_xGLXSetClientInfoARBReq 24
+
+/**
+ * Protocol head for glXCreateContextAttribsARB
+ *
+ * This protocol replaces \c GLXCreateContext, \c GLXCreateNewContext, and
+ * \c GLXCreateContextWithConfigSGIX.
+ */
+typedef struct GLXCreateContextAttribsARB {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ GLXContextID context B32;
+ GLXFBConfigID fbconfig B32;
+ CARD32 screen;
+ GLXContextID shareList B32;
+ BOOL isDirect;
+ CARD8 reserved1;
+ CARD16 reserved2 B16;
+ CARD32 numAttribs B32;
+ /* followed by attribute list */
+} xGLXCreateContextAttribsARBReq;
+#define sz_xGLXCreateContextAttribsARBReq 28
+
+/**
+ * Protocol header for glXSetClientInfo2ARB
+ *
+ * The glXSetClientInfo2ARB protocol differs from glXSetClientInfoARB in that
+ * the list of OpenGL versions supported by the client is 3 \c CARD32 values
+ * per version: major version, minor version, and supported profile mask.
+ *
+ * This protocol replaces \c GLXClientInfo and \c GLXSetClientInfoARB.
+ *
+ * \sa GLXClientInfo, GLXSetClientInfoARB
+ */
+typedef struct GLXSetClientInfo2ARB {
+ CARD8 reqType;
+ CARD8 glxCode;
+ CARD16 length B16;
+ CARD32 major B32;
+ CARD32 minor B32;
+ CARD32 numVersions B32;
+ CARD32 numGLExtensionBytes B32;
+ CARD32 numGLXExtensionBytes B32;
+ /*
+ ** More data may follow; this is just the header.
+ */
+} xGLXSetClientInfo2ARBReq;
+#define sz_xGLXSetClientInfo2ARBReq 24
+/*@}*/
+
+/************************************************************************/
+
+/*
+** Events
+*/
+
+typedef struct {
+ BYTE type;
+ BYTE pad;
+ CARD16 sequenceNumber B16;
+ CARD16 event_type B16; /*** was clobber_class */
+ CARD16 draw_type B16;
+ CARD32 drawable B32;
+ CARD32 buffer_mask B32; /*** was mask */
+ CARD16 aux_buffer B16;
+ CARD16 x B16;
+ CARD16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 count B16;
+ CARD32 unused2 B32;
+} xGLXPbufferClobberEvent;
+
+typedef struct {
+ BYTE type;
+ BYTE pad;
+ CARD16 sequenceNumber B16;
+ CARD16 event_type B16;
+ CARD32 drawable;
+ CARD32 ust_hi B32;
+ CARD32 ust_lo B32;
+ CARD32 msc_hi B32;
+ CARD32 msc_lo B32;
+ CARD32 sbc_hi B32;
+ CARD32 sbc_lo B32;
+} xGLXBufferSwapComplete;
+
+typedef struct {
+ BYTE type;
+ BYTE pad;
+ CARD16 sequenceNumber B16;
+ CARD16 event_type B16;
+ CARD16 pad2;
+ CARD32 drawable;
+ CARD32 ust_hi B32;
+ CARD32 ust_lo B32;
+ CARD32 msc_hi B32;
+ CARD32 msc_lo B32;
+ CARD32 sbc B32;
+} xGLXBufferSwapComplete2;
+
+/************************************************************************/
+
+/*
+** Size of the standard X request header.
+*/
+#define __GLX_SINGLE_HDR_SIZE sz_xGLXSingleReq
+#define __GLX_VENDPRIV_HDR_SIZE sz_xGLXVendorPrivateReq
+
+#define __GLX_RENDER_HDR \
+ CARD16 length B16; \
+ CARD16 opcode B16
+
+#define __GLX_RENDER_HDR_SIZE 4
+
+typedef struct {
+ __GLX_RENDER_HDR;
+} __GLXrenderHeader;
+
+#define __GLX_RENDER_LARGE_HDR \
+ CARD32 length B32; \
+ CARD32 opcode B32
+
+#define __GLX_RENDER_LARGE_HDR_SIZE 8
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+} __GLXrenderLargeHeader;
+
+/*
+** The glBitmap, glPolygonStipple, glTexImage[12]D, glTexSubImage[12]D
+** and glDrawPixels calls all have a pixel header transmitted after the
+** Render or RenderLarge header and before their own opcode specific
+** headers.
+*/
+#define __GLX_PIXEL_HDR \
+ BOOL swapBytes; \
+ BOOL lsbFirst; \
+ CARD8 reserved0; \
+ CARD8 reserved1; \
+ CARD32 rowLength B32; \
+ CARD32 skipRows B32; \
+ CARD32 skipPixels B32; \
+ CARD32 alignment B32
+
+#define __GLX_PIXEL_HDR_SIZE 20
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+} __GLXpixelHeader;
+
+/*
+** glTexImage[34]D and glTexSubImage[34]D calls
+** all have a pixel header transmitted after the Render or RenderLarge
+** header and before their own opcode specific headers.
+*/
+#define __GLX_PIXEL_3D_HDR \
+ BOOL swapBytes; \
+ BOOL lsbFirst; \
+ CARD8 reserved0; \
+ CARD8 reserved1; \
+ CARD32 rowLength B32; \
+ CARD32 imageHeight B32; \
+ CARD32 imageDepth B32; \
+ CARD32 skipRows B32; \
+ CARD32 skipImages B32; \
+ CARD32 skipVolumes B32; \
+ CARD32 skipPixels B32; \
+ CARD32 alignment B32
+
+#define __GLX_PIXEL_3D_HDR_SIZE 36
+
+/*
+** Data that is specific to a glBitmap call. The data is sent in the
+** following order:
+** Render or RenderLarge header
+** Pixel header
+** Bitmap header
+*/
+#define __GLX_BITMAP_HDR \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ FLOAT32 xorig F32; \
+ FLOAT32 yorig F32; \
+ FLOAT32 xmove F32; \
+ FLOAT32 ymove F32
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_BITMAP_HDR;
+} __GLXbitmapHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_BITMAP_HDR;
+} __GLXbitmapLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+ __GLX_BITMAP_HDR;
+} __GLXdispatchBitmapHeader;
+
+#define __GLX_BITMAP_HDR_SIZE 24
+
+#define __GLX_BITMAP_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE)
+
+#define __GLX_BITMAP_CMD_DISPATCH_HDR_SIZE \
+ (__GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+} __GLXpolygonStippleHeader;
+
+#define __GLX_POLYGONSTIPPLE_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE)
+
+/*
+** Data that is specific to a glTexImage1D or glTexImage2D call. The
+** data is sent in the following order:
+** Render or RenderLarge header
+** Pixel header
+** TexImage header
+** When a glTexImage1D call the height field is unexamined by the server.
+*/
+#define __GLX_TEXIMAGE_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 components B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 border B32; \
+ CARD32 format B32; \
+ CARD32 type B32
+
+#define __GLX_TEXIMAGE_HDR_SIZE 32
+
+#define __GLX_TEXIMAGE_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE)
+
+#define __GLX_TEXIMAGE_CMD_DISPATCH_HDR_SIZE \
+ (__GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_TEXIMAGE_HDR;
+} __GLXtexImageHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_TEXIMAGE_HDR;
+} __GLXtexImageLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+ __GLX_TEXIMAGE_HDR;
+} __GLXdispatchTexImageHeader;
+
+/*
+** Data that is specific to a glTexImage3D or glTexImage4D call. The
+** data is sent in the following order:
+** Render or RenderLarge header
+** Pixel 3D header
+** TexImage 3D header
+** When a glTexImage3D call the size4d and woffset fields are unexamined
+** by the server.
+** Could be used by all TexImage commands and perhaps should be in the
+** future.
+*/
+#define __GLX_TEXIMAGE_3D_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 internalformat B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 depth B32; \
+ CARD32 size4d B32; \
+ CARD32 border B32; \
+ CARD32 format B32; \
+ CARD32 type B32; \
+ CARD32 nullimage B32
+
+#define __GLX_TEXIMAGE_3D_HDR_SIZE 44
+
+#define __GLX_TEXIMAGE_3D_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \
+ __GLX_TEXIMAGE_3D_HDR_SIZE)
+
+#define __GLX_TEXIMAGE_3D_CMD_DISPATCH_HDR_SIZE \
+ (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXIMAGE_3D_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_3D_HDR;
+ __GLX_TEXIMAGE_3D_HDR;
+} __GLXtexImage3DHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_3D_HDR;
+ __GLX_TEXIMAGE_3D_HDR;
+} __GLXtexImage3DLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_3D_HDR;
+ __GLX_TEXIMAGE_3D_HDR;
+} __GLXdispatchTexImage3DHeader;
+
+/*
+** Data that is specific to a glTexSubImage1D or glTexSubImage2D call. The
+** data is sent in the following order:
+** Render or RenderLarge header
+** Pixel header
+** TexSubImage header
+** When a glTexSubImage1D call is made, the yoffset and height fields
+** are unexamined by the server and are considered to be padding.
+*/
+#define __GLX_TEXSUBIMAGE_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 xoffset B32; \
+ CARD32 yoffset B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 format B32; \
+ CARD32 type B32; \
+ CARD32 nullImage \
+
+#define __GLX_TEXSUBIMAGE_HDR_SIZE 36
+
+#define __GLX_TEXSUBIMAGE_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE)
+
+#define __GLX_TEXSUBIMAGE_CMD_DISPATCH_HDR_SIZE \
+ (__GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_TEXSUBIMAGE_HDR;
+} __GLXtexSubImageHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_TEXSUBIMAGE_HDR;
+} __GLXtexSubImageLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+ __GLX_TEXSUBIMAGE_HDR;
+} __GLXdispatchTexSubImageHeader;
+
+/*
+** Data that is specific to a glTexSubImage3D and 4D calls. The
+** data is sent in the following order:
+** Render or RenderLarge header
+** Pixel 3D header
+** TexSubImage 3D header
+** When a glTexSubImage3D call is made, the woffset and size4d fields
+** are unexamined by the server and are considered to be padding.
+*/
+#define __GLX_TEXSUBIMAGE_3D_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 xoffset B32; \
+ CARD32 yoffset B32; \
+ CARD32 zoffset B32; \
+ CARD32 woffset B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 depth B32; \
+ CARD32 size4d B32; \
+ CARD32 format B32; \
+ CARD32 type B32; \
+ CARD32 nullImage \
+
+#define __GLX_TEXSUBIMAGE_3D_HDR_SIZE 52
+
+#define __GLX_TEXSUBIMAGE_3D_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \
+ __GLX_TEXSUBIMAGE_3D_HDR_SIZE)
+
+#define __GLX_TEXSUBIMAGE_3D_CMD_DISPATCH_HDR_SIZE \
+ (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXSUBIMAGE_3D_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_3D_HDR;
+ __GLX_TEXSUBIMAGE_3D_HDR;
+} __GLXtexSubImage3DHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_3D_HDR;
+ __GLX_TEXSUBIMAGE_3D_HDR;
+} __GLXtexSubImage3DLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_3D_HDR;
+ __GLX_TEXSUBIMAGE_3D_HDR;
+} __GLXdispatchTexSubImage3DHeader;
+
+/**
+ * Data that is specific to a \c glCompressedTexImage1D or
+ * \c glCompressedTexImage2D call. The data is sent in the following
+ * order:
+ * - Render or RenderLarge header
+ * - CompressedTexImage header
+ *
+ * When a \c glCompressedTexImage1D call is made, the \c height field is
+ * not examined by the server and is considered padding.
+ */
+
+#define __GLX_COMPRESSED_TEXIMAGE_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 internalFormat B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 border B32; \
+ CARD32 imageSize B32
+
+#define __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE 28
+
+#define __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE)
+
+#define __GLX_COMPRESSED_TEXIMAGE_DISPATCH_HDR_SIZE \
+ (__GLX_COMPRESSED_TEXIMAGE_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_COMPRESSED_TEXIMAGE_HDR;
+} __GLXcompressedTexImageHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_COMPRESSED_TEXIMAGE_HDR;
+} __GLXcompressedTexImageLargeHeader;
+
+typedef struct {
+ __GLX_COMPRESSED_TEXIMAGE_HDR;
+} __GLXdispatchCompressedTexImageHeader;
+
+/**
+ * Data that is specifi to a \c glCompressedTexSubImage1D or
+ * \c glCompressedTexSubImage2D call. The data is sent in the following
+ * order:
+ * - Render or RenderLarge header
+ * - CompressedTexSubImage header
+ *
+ * When a \c glCompressedTexSubImage1D call is made, the \c yoffset and
+ * \c height fields are not examined by the server and are considered padding.
+ */
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 xoffset B32; \
+ CARD32 yoffset B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 format B32; \
+ CARD32 imageSize B32
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE 32
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE)
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_DISPATCH_HDR_SIZE \
+ (__GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_COMPRESSED_TEXSUBIMAGE_HDR;
+} __GLXcompressedTexSubImageHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_COMPRESSED_TEXSUBIMAGE_HDR;
+} __GLXcompressedTexSubImageLargeHeader;
+
+typedef struct {
+ __GLX_COMPRESSED_TEXSUBIMAGE_HDR;
+} __GLXdispatchCompressedTexSubImageHeader;
+
+/**
+ * Data that is specific to a \c glCompressedTexImage3D call. The data is
+ * sent in the following order:
+ * - Render or RenderLarge header
+ * - CompressedTexImage3D header
+ */
+
+#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 internalFormat B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 depth B32; \
+ CARD32 border B32; \
+ CARD32 imageSize B32
+
+#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE 32
+
+#define __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE)
+
+#define __GLX_COMPRESSED_TEXIMAGE_3D_DISPATCH_HDR_SIZE \
+ (__GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_COMPRESSED_TEXIMAGE_3D_HDR;
+} __GLXcompressedTexImage3DHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_COMPRESSED_TEXIMAGE_3D_HDR;
+} __GLXcompressedTexImage3DLargeHeader;
+
+typedef struct {
+ __GLX_COMPRESSED_TEXIMAGE_3D_HDR;
+} __GLXdispatchCompressedTexImage3DHeader;
+
+/**
+ * Data that is specifi to a \c glCompressedTexSubImage3D call. The data is
+ * sent in the following order:
+ * - Render or RenderLarge header
+ * - CompressedTexSubImage3D header
+ */
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR \
+ CARD32 target B32; \
+ CARD32 level B32; \
+ CARD32 xoffset B32; \
+ CARD32 yoffset B32; \
+ CARD32 zoffset B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 depth B32; \
+ CARD32 format B32; \
+ CARD32 imageSize B32
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE 32
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE)
+
+#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_DISPATCH_HDR_SIZE \
+ (__GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR;
+} __GLXcompressedTexSubImage3DHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR;
+} __GLXcompressedTexSubImage3DLargeHeader;
+
+typedef struct {
+ __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR;
+} __GLXdispatchCompressedTexSubImage3DHeader;
+
+/*
+** Data that is specific to a glDrawPixels call. The data is sent in the
+** following order:
+** Render or RenderLarge header
+** Pixel header
+** DrawPixels header
+*/
+#define __GLX_DRAWPIXELS_HDR \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 format B32; \
+ CARD32 type B32
+
+#define __GLX_DRAWPIXELS_HDR_SIZE 16
+
+#define __GLX_DRAWPIXELS_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE)
+
+#define __GLX_DRAWPIXELS_CMD_DISPATCH_HDR_SIZE \
+ (__GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_DRAWPIXELS_HDR;
+} __GLXdrawPixelsHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_DRAWPIXELS_HDR;
+} __GLXdrawPixelsLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+ __GLX_DRAWPIXELS_HDR;
+} __GLXdispatchDrawPixelsHeader;
+
+/*
+** Data that is specific to a glConvolutionFilter1D or glConvolutionFilter2D
+** call. The data is sent in the following order:
+** Render or RenderLarge header
+** Pixel header
+** ConvolutionFilter header
+** When a glConvolutionFilter1D call the height field is unexamined by the server.
+*/
+#define __GLX_CONV_FILT_HDR \
+ CARD32 target B32; \
+ CARD32 internalformat B32; \
+ CARD32 width B32; \
+ CARD32 height B32; \
+ CARD32 format B32; \
+ CARD32 type B32
+
+#define __GLX_CONV_FILT_HDR_SIZE 24
+
+#define __GLX_CONV_FILT_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE)
+
+#define __GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE \
+ (__GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE)
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_CONV_FILT_HDR;
+} __GLXConvolutionFilterHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_CONV_FILT_HDR;
+} __GLXConvolutionFilterLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+ __GLX_CONV_FILT_HDR;
+} __GLXdispatchConvolutionFilterHeader;
+
+/*
+** Data that is specific to a glDrawArraysEXT call. The data is sent in the
+** following order:
+** Render or RenderLarge header
+** Draw Arrays header
+** a variable number of Component headers
+** vertex data for each component type
+*/
+
+#define __GLX_DRAWARRAYS_HDR \
+ CARD32 numVertexes B32; \
+ CARD32 numComponents B32; \
+ CARD32 primType B32
+
+#define __GLX_DRAWARRAYS_HDR_SIZE 12
+
+#define __GLX_DRAWARRAYS_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_DRAWARRAYS_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_DRAWARRAYS_HDR;
+} __GLXdrawArraysHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_DRAWARRAYS_HDR;
+} __GLXdrawArraysLargeHeader;
+
+typedef struct {
+ __GLX_DRAWARRAYS_HDR;
+} __GLXdispatchDrawArraysHeader;
+
+#define __GLX_COMPONENT_HDR \
+ CARD32 datatype B32; \
+ INT32 numVals B32; \
+ CARD32 component B32
+
+typedef struct {
+ __GLX_COMPONENT_HDR;
+} __GLXdispatchDrawArraysComponentHeader;
+
+#define __GLX_COMPONENT_HDR_SIZE 12
+
+/*
+** Data that is specific to a glColorTable call
+** The data is sent in the following order:
+** Render or RenderLarge header
+** Pixel header
+** ColorTable header
+*/
+
+#define __GLX_COLOR_TABLE_HDR \
+ CARD32 target B32; \
+ CARD32 internalformat B32; \
+ CARD32 width B32; \
+ CARD32 format B32; \
+ CARD32 type B32
+
+#define __GLX_COLOR_TABLE_HDR_SIZE 20
+
+#define __GLX_COLOR_TABLE_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_COLOR_TABLE_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_COLOR_TABLE_HDR;
+} __GLXColorTableHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_COLOR_TABLE_HDR;
+} __GLXColorTableLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+ __GLX_COLOR_TABLE_HDR;
+} __GLXdispatchColorTableHeader;
+
+/*
+** Data that is specific to a glColorSubTable call
+** The data is sent in the following order:
+** Render or RenderLarge header
+** Pixel header
+** ColorTable header
+*/
+
+#define __GLX_COLOR_SUBTABLE_HDR \
+ CARD32 target B32; \
+ CARD32 start B32; \
+ CARD32 count B32; \
+ CARD32 format B32; \
+ CARD32 type B32
+
+#define __GLX_COLOR_SUBTABLE_HDR_SIZE 20
+
+#define __GLX_COLOR_SUBTABLE_CMD_HDR_SIZE \
+ (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + \
+ __GLX_COLOR_SUBTABLE_HDR_SIZE)
+
+typedef struct {
+ __GLX_RENDER_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_COLOR_SUBTABLE_HDR;
+} __GLXColorSubTableHeader;
+
+typedef struct {
+ __GLX_RENDER_LARGE_HDR;
+ __GLX_PIXEL_HDR;
+ __GLX_COLOR_SUBTABLE_HDR;
+} __GLXColorSubTableLargeHeader;
+
+typedef struct {
+ __GLX_PIXEL_HDR;
+ __GLX_COLOR_SUBTABLE_HDR;
+} __GLXdispatchColorSubTableHeader;
+
+#define GLX_WINDOW_TYPE 1
+#define GLX_PIXMAP_TYPE 2
+#define GLX_VIDEO_SOURCE_TYPE 3
+#define GLX_PBUFFER_TYPE 4
+/* 5 is for DM_PBUFFER */
+#define GLX_GLXWINDOW_TYPE 6
+
+/*****************************************************************************/
+
+/*
+** Restore these definitions back to the typedefs in glx.h
+*/
+#undef GLXContextID
+#undef GLXPixmap
+#undef GLXDrawable
+#undef GLXPbuffer
+#undef GLXWindow
+#undef GLXFBConfigID
+#undef GLXFBConfigIDSGIX
+#undef GLXPbufferSGIX
+
+
+/* Opcodes for GLX commands */
+
+#define X_GLXRender 1
+#define X_GLXRenderLarge 2
+#define X_GLXCreateContext 3
+#define X_GLXDestroyContext 4
+#define X_GLXMakeCurrent 5
+#define X_GLXIsDirect 6
+#define X_GLXQueryVersion 7
+#define X_GLXWaitGL 8
+#define X_GLXWaitX 9
+#define X_GLXCopyContext 10
+#define X_GLXSwapBuffers 11
+#define X_GLXUseXFont 12
+#define X_GLXCreateGLXPixmap 13
+#define X_GLXGetVisualConfigs 14
+#define X_GLXDestroyGLXPixmap 15
+#define X_GLXVendorPrivate 16
+#define X_GLXVendorPrivateWithReply 17
+#define X_GLXQueryExtensionsString 18
+#define X_GLXQueryServerString 19
+#define X_GLXClientInfo 20
+#define X_GLXGetFBConfigs 21
+#define X_GLXCreatePixmap 22
+#define X_GLXDestroyPixmap 23
+#define X_GLXCreateNewContext 24
+#define X_GLXQueryContext 25
+#define X_GLXMakeContextCurrent 26
+#define X_GLXCreatePbuffer 27
+#define X_GLXDestroyPbuffer 28
+#define X_GLXGetDrawableAttributes 29
+#define X_GLXChangeDrawableAttributes 30
+#define X_GLXCreateWindow 31
+#define X_GLXDestroyWindow 32
+#define X_GLXSetClientInfoARB 33
+#define X_GLXCreateContextAttribsARB 34
+#define X_GLXSetClientInfo2ARB 35
+
+/* Opcodes for single commands (part of GLX command space) */
+
+#define X_GLsop_NewList 101
+#define X_GLsop_EndList 102
+#define X_GLsop_DeleteLists 103
+#define X_GLsop_GenLists 104
+#define X_GLsop_FeedbackBuffer 105
+#define X_GLsop_SelectBuffer 106
+#define X_GLsop_RenderMode 107
+#define X_GLsop_Finish 108
+#define X_GLsop_Flush 142
+#define X_GLsop_PixelStoref 109
+#define X_GLsop_PixelStorei 110
+#define X_GLsop_ReadPixels 111
+#define X_GLsop_GetBooleanv 112
+#define X_GLsop_GetClipPlane 113
+#define X_GLsop_GetDoublev 114
+#define X_GLsop_GetError 115
+#define X_GLsop_GetFloatv 116
+#define X_GLsop_GetIntegerv 117
+#define X_GLsop_GetLightfv 118
+#define X_GLsop_GetLightiv 119
+#define X_GLsop_GetMapdv 120
+#define X_GLsop_GetMapfv 121
+#define X_GLsop_GetMapiv 122
+#define X_GLsop_GetMaterialfv 123
+#define X_GLsop_GetMaterialiv 124
+#define X_GLsop_GetPixelMapfv 125
+#define X_GLsop_GetPixelMapuiv 126
+#define X_GLsop_GetPixelMapusv 127
+#define X_GLsop_GetPolygonStipple 128
+#define X_GLsop_GetString 129
+#define X_GLsop_GetTexEnvfv 130
+#define X_GLsop_GetTexEnviv 131
+#define X_GLsop_GetTexGendv 132
+#define X_GLsop_GetTexGenfv 133
+#define X_GLsop_GetTexGeniv 134
+#define X_GLsop_GetTexImage 135
+#define X_GLsop_GetTexParameterfv 136
+#define X_GLsop_GetTexParameteriv 137
+#define X_GLsop_GetTexLevelParameterfv 138
+#define X_GLsop_GetTexLevelParameteriv 139
+#define X_GLsop_IsEnabled 140
+#define X_GLsop_IsList 141
+#define X_GLsop_AreTexturesResident 143
+#define X_GLsop_DeleteTextures 144
+#define X_GLsop_GenTextures 145
+#define X_GLsop_IsTexture 146
+#define X_GLsop_GetColorTable 147
+#define X_GLsop_GetColorTableParameterfv 148
+#define X_GLsop_GetColorTableParameteriv 149
+#define X_GLsop_GetConvolutionFilter 150
+#define X_GLsop_GetConvolutionParameterfv 151
+#define X_GLsop_GetConvolutionParameteriv 152
+#define X_GLsop_GetSeparableFilter 153
+#define X_GLsop_GetHistogram 154
+#define X_GLsop_GetHistogramParameterfv 155
+#define X_GLsop_GetHistogramParameteriv 156
+#define X_GLsop_GetMinmax 157
+#define X_GLsop_GetMinmaxParameterfv 158
+#define X_GLsop_GetMinmaxParameteriv 159
+#define X_GLsop_GetCompressedTexImage 160
+
+
+/* Opcodes for rendering commands */
+
+#define X_GLrop_CallList 1
+#define X_GLrop_CallLists 2
+#define X_GLrop_ListBase 3
+#define X_GLrop_Begin 4
+#define X_GLrop_Bitmap 5
+#define X_GLrop_Color3bv 6
+#define X_GLrop_Color3dv 7
+#define X_GLrop_Color3fv 8
+#define X_GLrop_Color3iv 9
+#define X_GLrop_Color3sv 10
+#define X_GLrop_Color3ubv 11
+#define X_GLrop_Color3uiv 12
+#define X_GLrop_Color3usv 13
+#define X_GLrop_Color4bv 14
+#define X_GLrop_Color4dv 15
+#define X_GLrop_Color4fv 16
+#define X_GLrop_Color4iv 17
+#define X_GLrop_Color4sv 18
+#define X_GLrop_Color4ubv 19
+#define X_GLrop_Color4uiv 20
+#define X_GLrop_Color4usv 21
+#define X_GLrop_EdgeFlagv 22
+#define X_GLrop_End 23
+#define X_GLrop_Indexdv 24
+#define X_GLrop_Indexfv 25
+#define X_GLrop_Indexiv 26
+#define X_GLrop_Indexsv 27
+#define X_GLrop_Normal3bv 28
+#define X_GLrop_Normal3dv 29
+#define X_GLrop_Normal3fv 30
+#define X_GLrop_Normal3iv 31
+#define X_GLrop_Normal3sv 32
+#define X_GLrop_RasterPos2dv 33
+#define X_GLrop_RasterPos2fv 34
+#define X_GLrop_RasterPos2iv 35
+#define X_GLrop_RasterPos2sv 36
+#define X_GLrop_RasterPos3dv 37
+#define X_GLrop_RasterPos3fv 38
+#define X_GLrop_RasterPos3iv 39
+#define X_GLrop_RasterPos3sv 40
+#define X_GLrop_RasterPos4dv 41
+#define X_GLrop_RasterPos4fv 42
+#define X_GLrop_RasterPos4iv 43
+#define X_GLrop_RasterPos4sv 44
+#define X_GLrop_Rectdv 45
+#define X_GLrop_Rectfv 46
+#define X_GLrop_Rectiv 47
+#define X_GLrop_Rectsv 48
+#define X_GLrop_TexCoord1dv 49
+#define X_GLrop_TexCoord1fv 50
+#define X_GLrop_TexCoord1iv 51
+#define X_GLrop_TexCoord1sv 52
+#define X_GLrop_TexCoord2dv 53
+#define X_GLrop_TexCoord2fv 54
+#define X_GLrop_TexCoord2iv 55
+#define X_GLrop_TexCoord2sv 56
+#define X_GLrop_TexCoord3dv 57
+#define X_GLrop_TexCoord3fv 58
+#define X_GLrop_TexCoord3iv 59
+#define X_GLrop_TexCoord3sv 60
+#define X_GLrop_TexCoord4dv 61
+#define X_GLrop_TexCoord4fv 62
+#define X_GLrop_TexCoord4iv 63
+#define X_GLrop_TexCoord4sv 64
+#define X_GLrop_Vertex2dv 65
+#define X_GLrop_Vertex2fv 66
+#define X_GLrop_Vertex2iv 67
+#define X_GLrop_Vertex2sv 68
+#define X_GLrop_Vertex3dv 69
+#define X_GLrop_Vertex3fv 70
+#define X_GLrop_Vertex3iv 71
+#define X_GLrop_Vertex3sv 72
+#define X_GLrop_Vertex4dv 73
+#define X_GLrop_Vertex4fv 74
+#define X_GLrop_Vertex4iv 75
+#define X_GLrop_Vertex4sv 76
+#define X_GLrop_ClipPlane 77
+#define X_GLrop_ColorMaterial 78
+#define X_GLrop_CullFace 79
+#define X_GLrop_Fogf 80
+#define X_GLrop_Fogfv 81
+#define X_GLrop_Fogi 82
+#define X_GLrop_Fogiv 83
+#define X_GLrop_FrontFace 84
+#define X_GLrop_Hint 85
+#define X_GLrop_Lightf 86
+#define X_GLrop_Lightfv 87
+#define X_GLrop_Lighti 88
+#define X_GLrop_Lightiv 89
+#define X_GLrop_LightModelf 90
+#define X_GLrop_LightModelfv 91
+#define X_GLrop_LightModeli 92
+#define X_GLrop_LightModeliv 93
+#define X_GLrop_LineStipple 94
+#define X_GLrop_LineWidth 95
+#define X_GLrop_Materialf 96
+#define X_GLrop_Materialfv 97
+#define X_GLrop_Materiali 98
+#define X_GLrop_Materialiv 99
+#define X_GLrop_PointSize 100
+#define X_GLrop_PolygonMode 101
+#define X_GLrop_PolygonStipple 102
+#define X_GLrop_Scissor 103
+#define X_GLrop_ShadeModel 104
+#define X_GLrop_TexParameterf 105
+#define X_GLrop_TexParameterfv 106
+#define X_GLrop_TexParameteri 107
+#define X_GLrop_TexParameteriv 108
+#define X_GLrop_TexImage1D 109
+#define X_GLrop_TexImage2D 110
+#define X_GLrop_TexEnvf 111
+#define X_GLrop_TexEnvfv 112
+#define X_GLrop_TexEnvi 113
+#define X_GLrop_TexEnviv 114
+#define X_GLrop_TexGend 115
+#define X_GLrop_TexGendv 116
+#define X_GLrop_TexGenf 117
+#define X_GLrop_TexGenfv 118
+#define X_GLrop_TexGeni 119
+#define X_GLrop_TexGeniv 120
+#define X_GLrop_InitNames 121
+#define X_GLrop_LoadName 122
+#define X_GLrop_PassThrough 123
+#define X_GLrop_PopName 124
+#define X_GLrop_PushName 125
+#define X_GLrop_DrawBuffer 126
+#define X_GLrop_Clear 127
+#define X_GLrop_ClearAccum 128
+#define X_GLrop_ClearIndex 129
+#define X_GLrop_ClearColor 130
+#define X_GLrop_ClearStencil 131
+#define X_GLrop_ClearDepth 132
+#define X_GLrop_StencilMask 133
+#define X_GLrop_ColorMask 134
+#define X_GLrop_DepthMask 135
+#define X_GLrop_IndexMask 136
+#define X_GLrop_Accum 137
+#define X_GLrop_Disable 138
+#define X_GLrop_Enable 139
+#define X_GLrop_PopAttrib 141
+#define X_GLrop_PushAttrib 142
+#define X_GLrop_Map1d 143
+#define X_GLrop_Map1f 144
+#define X_GLrop_Map2d 145
+#define X_GLrop_Map2f 146
+#define X_GLrop_MapGrid1d 147
+#define X_GLrop_MapGrid1f 148
+#define X_GLrop_MapGrid2d 149
+#define X_GLrop_MapGrid2f 150
+#define X_GLrop_EvalCoord1dv 151
+#define X_GLrop_EvalCoord1fv 152
+#define X_GLrop_EvalCoord2dv 153
+#define X_GLrop_EvalCoord2fv 154
+#define X_GLrop_EvalMesh1 155
+#define X_GLrop_EvalPoint1 156
+#define X_GLrop_EvalMesh2 157
+#define X_GLrop_EvalPoint2 158
+#define X_GLrop_AlphaFunc 159
+#define X_GLrop_BlendFunc 160
+#define X_GLrop_LogicOp 161
+#define X_GLrop_StencilFunc 162
+#define X_GLrop_StencilOp 163
+#define X_GLrop_DepthFunc 164
+#define X_GLrop_PixelZoom 165
+#define X_GLrop_PixelTransferf 166
+#define X_GLrop_PixelTransferi 167
+#define X_GLrop_PixelMapfv 168
+#define X_GLrop_PixelMapuiv 169
+#define X_GLrop_PixelMapusv 170
+#define X_GLrop_ReadBuffer 171
+#define X_GLrop_CopyPixels 172
+#define X_GLrop_DrawPixels 173
+#define X_GLrop_DepthRange 174
+#define X_GLrop_Frustum 175
+#define X_GLrop_LoadIdentity 176
+#define X_GLrop_LoadMatrixf 177
+#define X_GLrop_LoadMatrixd 178
+#define X_GLrop_MatrixMode 179
+#define X_GLrop_MultMatrixf 180
+#define X_GLrop_MultMatrixd 181
+#define X_GLrop_Ortho 182
+#define X_GLrop_PopMatrix 183
+#define X_GLrop_PushMatrix 184
+#define X_GLrop_Rotated 185
+#define X_GLrop_Rotatef 186
+#define X_GLrop_Scaled 187
+#define X_GLrop_Scalef 188
+#define X_GLrop_Translated 189
+#define X_GLrop_Translatef 190
+#define X_GLrop_Viewport 191
+#define X_GLrop_DrawArrays 193
+#define X_GLrop_PolygonOffset 192
+#define X_GLrop_CopyTexImage1D 4119
+#define X_GLrop_CopyTexImage2D 4120
+#define X_GLrop_CopyTexSubImage1D 4121
+#define X_GLrop_CopyTexSubImage2D 4122
+#define X_GLrop_TexSubImage1D 4099
+#define X_GLrop_TexSubImage2D 4100
+#define X_GLrop_BindTexture 4117
+#define X_GLrop_PrioritizeTextures 4118
+#define X_GLrop_Indexubv 194
+#define X_GLrop_BlendColor 4096
+#define X_GLrop_BlendEquation 4097
+#define X_GLrop_ColorTable 2053
+#define X_GLrop_ColorTableParameterfv 2054
+#define X_GLrop_ColorTableParameteriv 2055
+#define X_GLrop_CopyColorTable 2056
+#define X_GLrop_ColorSubTable 195
+#define X_GLrop_CopyColorSubTable 196
+#define X_GLrop_ConvolutionFilter1D 4101
+#define X_GLrop_ConvolutionFilter2D 4102
+#define X_GLrop_ConvolutionParameterf 4103
+#define X_GLrop_ConvolutionParameterfv 4104
+#define X_GLrop_ConvolutionParameteri 4105
+#define X_GLrop_ConvolutionParameteriv 4106
+#define X_GLrop_CopyConvolutionFilter1D 4107
+#define X_GLrop_CopyConvolutionFilter2D 4108
+#define X_GLrop_SeparableFilter2D 4109
+#define X_GLrop_Histogram 4110
+#define X_GLrop_Minmax 4111
+#define X_GLrop_ResetHistogram 4112
+#define X_GLrop_ResetMinmax 4113
+#define X_GLrop_TexImage3D 4114
+#define X_GLrop_TexSubImage3D 4115
+#define X_GLrop_CopyTexSubImage3D 4123
+#define X_GLrop_DrawArraysEXT 4116
+
+/* Added for core GL version 1.3 */
+
+#define X_GLrop_ActiveTextureARB 197
+#define X_GLrop_MultiTexCoord1dvARB 198
+#define X_GLrop_MultiTexCoord1fvARB 199
+#define X_GLrop_MultiTexCoord1ivARB 200
+#define X_GLrop_MultiTexCoord1svARB 201
+#define X_GLrop_MultiTexCoord2dvARB 202
+#define X_GLrop_MultiTexCoord2fvARB 203
+#define X_GLrop_MultiTexCoord2ivARB 204
+#define X_GLrop_MultiTexCoord2svARB 205
+#define X_GLrop_MultiTexCoord3dvARB 206
+#define X_GLrop_MultiTexCoord3fvARB 207
+#define X_GLrop_MultiTexCoord3ivARB 208
+#define X_GLrop_MultiTexCoord3svARB 209
+#define X_GLrop_MultiTexCoord4dvARB 210
+#define X_GLrop_MultiTexCoord4fvARB 211
+#define X_GLrop_MultiTexCoord4ivARB 212
+#define X_GLrop_MultiTexCoord4svARB 213
+#define X_GLrop_CompressedTexImage1D 214
+#define X_GLrop_CompressedTexImage2D 215
+#define X_GLrop_CompressedTexImage3D 216
+#define X_GLrop_CompressedTexSubImage1D 217
+#define X_GLrop_CompressedTexSubImage2D 218
+#define X_GLrop_CompressedTexSubImage3D 219
+#define X_GLrop_SampleCoverageARB 229
+
+/* Added for core GL version 1.4 */
+
+#define X_GLrop_WindowPos3fARB 230
+#define X_GLrop_FogCoordfv 4124
+#define X_GLrop_FogCoorddv 4125
+#define X_GLrop_PointParameterfARB 2065
+#define X_GLrop_PointParameterfvARB 2066
+#define X_GLrop_SecondaryColor3bv 4126
+#define X_GLrop_SecondaryColor3sv 4127
+#define X_GLrop_SecondaryColor3iv 4128
+#define X_GLrop_SecondaryColor3fv 4129
+#define X_GLrop_SecondaryColor3dv 4130
+#define X_GLrop_SecondaryColor3ubv 4131
+#define X_GLrop_SecondaryColor3usv 4132
+#define X_GLrop_SecondaryColor3uiv 4133
+#define X_GLrop_BlendFuncSeparate 4134
+#define X_GLrop_PointParameteri 4221
+#define X_GLrop_PointParameteriv 4222
+
+/* Added for core GL version 1.5 */
+/* XXX opcodes not defined in the spec */
+
+/* Opcodes for Vendor Private commands */
+
+
+#define X_GLvop_GetConvolutionFilterEXT 1
+#define X_GLvop_GetConvolutionParameterfvEXT 2
+#define X_GLvop_GetConvolutionParameterivEXT 3
+#define X_GLvop_GetSeparableFilterEXT 4
+#define X_GLvop_GetHistogramEXT 5
+#define X_GLvop_GetHistogramParameterfvEXT 6
+#define X_GLvop_GetHistogramParameterivEXT 7
+#define X_GLvop_GetMinmaxEXT 8
+#define X_GLvop_GetMinmaxParameterfvEXT 9
+#define X_GLvop_GetMinmaxParameterivEXT 10
+#define X_GLvop_AreTexturesResidentEXT 11
+#define X_GLvop_DeleteTexturesEXT 12
+#define X_GLvop_GenTexturesEXT 13
+#define X_GLvop_IsTextureEXT 14
+#define X_GLvop_GetCombinerInputParameterfvNV 1270
+#define X_GLvop_GetCombinerInputParameterivNV 1271
+#define X_GLvop_GetCombinerOutputParameterfvNV 1272
+#define X_GLvop_GetCombinerOutputParameterivNV 1273
+#define X_GLvop_GetFinalCombinerOutputParameterfvNV 1274
+#define X_GLvop_GetFinalCombinerOutputParameterivNV 1275
+#define X_GLvop_DeleteFenceNV 1276
+#define X_GLvop_GenFencesNV 1277
+#define X_GLvop_IsFenceNV 1278
+#define X_GLvop_TestFenceNV 1279
+#define X_GLvop_GetFenceivNV 1280
+#define X_GLvop_AreProgramsResidentNV 1293
+#define X_GLvop_DeleteProgramARB 1294
+#define X_GLvop_GenProgramsARB 1295
+#define X_GLvop_GetProgramEnvParameterfvARB 1296
+#define X_GLvop_GetProgramEnvParameterdvARB 1297
+#define X_GLvop_GetProgramEnvParameterivNV 1298
+#define X_GLvop_GetProgramStringNV 1299
+#define X_GLvop_GetTrackMatrixivNV 1300
+#define X_GLvop_GetVertexAttribdvARB 1301
+#define X_GLvop_GetVertexAttribfvARB 1302
+#define X_GLvop_GetVertexAttribivARB 1303
+#define X_GLvop_IsProgramARB 1304
+#define X_GLvop_GetProgramLocalParameterfvARB 1305
+#define X_GLvop_GetProgramLocalParameterdvARB 1306
+#define X_GLvop_GetProgramivARB 1307
+#define X_GLvop_GetProgramStringARB 1308
+#define X_GLvop_GetProgramNamedParameter4fvNV 1310
+#define X_GLvop_GetProgramNamedParameter4dvNV 1311
+#define X_GLvop_SampleMaskSGIS 2048
+#define X_GLvop_SamplePatternSGIS 2049
+#define X_GLvop_GetDetailTexFuncSGIS 4096
+#define X_GLvop_GetSharpenTexFuncSGIS 4097
+#define X_GLvop_GetColorTableSGI 4098
+#define X_GLvop_GetColorTableParameterfvSGI 4099
+#define X_GLvop_GetColorTableParameterivSGI 4100
+#define X_GLvop_GetTexFilterFuncSGIS 4101
+#define X_GLvop_GetInstrumentsSGIX 4102
+#define X_GLvop_InstrumentsBufferSGIX 4103
+#define X_GLvop_PollInstrumentsSGIX 4104
+#define X_GLvop_FlushRasterSGIX 4105
+
+/* Opcodes for GLX vendor private commands */
+
+#define X_GLXvop_QueryContextInfoEXT 1024
+#define X_GLXvop_BindTexImageEXT 1330
+#define X_GLXvop_ReleaseTexImageEXT 1331
+#define X_GLXvop_SwapIntervalSGI 65536
+#define X_GLXvop_MakeCurrentReadSGI 65537
+#define X_GLXvop_CreateGLXVideoSourceSGIX 65538
+#define X_GLXvop_DestroyGLXVideoSourceSGIX 65539
+#define X_GLXvop_GetFBConfigsSGIX 65540
+#define X_GLXvop_CreateContextWithConfigSGIX 65541
+#define X_GLXvop_CreateGLXPixmapWithConfigSGIX 65542
+#define X_GLXvop_CreateGLXPbufferSGIX 65543
+#define X_GLXvop_DestroyGLXPbufferSGIX 65544
+#define X_GLXvop_ChangeDrawableAttributesSGIX 65545
+#define X_GLXvop_GetDrawableAttributesSGIX 65546
+#define X_GLXvop_JoinSwapGroupSGIX 65547
+#define X_GLXvop_BindSwapBarrierSGIX 65548
+#define X_GLXvop_QueryMaxSwapBarriersSGIX 65549
+#define X_GLXvop_QueryHyperpipeNetworkSGIX 65550
+#define X_GLXvop_QueryHyperpipeConfigSGIX 65551
+#define X_GLXvop_HyperpipeConfigSGIX 65552
+#define X_GLXvop_DestroyHyperpipeConfigSGIX 65553
+
+/* ARB extension opcodes */
+
+/* 1. GL_ARB_multitexture - see GL 1.2 opcodes */
+/* 5. GL_ARB_multisample - see GL 1.3 opcodes */
+/* 12. GL_ARB_texture_compression - see GL 1.3 opcodes */
+/* 14. GL_ARB_point_parameters - see GL 1.4 opcodees */
+
+/* 15. GL_ARB_vertex_blend */
+#define X_GLrop_WeightbvARB 220
+#define X_GLrop_WeightubvARB 221
+#define X_GLrop_WeightsvARB 222
+#define X_GLrop_WeightusvARB 223
+#define X_GLrop_WeightivARB 224
+#define X_GLrop_WeightuivARB 225
+#define X_GLrop_VertexBlendARB 226
+#define X_GLrop_WeightfvARB 227
+#define X_GLrop_WeightdvARB 228
+
+/* 16. GL_ARB_matrix_palette */
+/* XXX opcodes not defined in the spec */
+
+/* 25. GL_ARB_window_pos - see GL 1.4 opcodes */
+
+/* 26. GL_ARB_vertex_program */
+#define X_GLrop_BindProgramARB 4180
+#define X_GLrop_ProgramEnvParameter4fvARB 4184
+#define X_GLrop_ProgramEnvParameter4dvARB 4185
+#define X_GLrop_VertexAttrib1svARB 4189
+#define X_GLrop_VertexAttrib2svARB 4190
+#define X_GLrop_VertexAttrib3svARB 4191
+#define X_GLrop_VertexAttrib4svARB 4192
+#define X_GLrop_VertexAttrib1fvARB 4193
+#define X_GLrop_VertexAttrib2fvARB 4194
+#define X_GLrop_VertexAttrib3fvARB 4195
+#define X_GLrop_VertexAttrib4fvARB 4196
+#define X_GLrop_VertexAttrib1dvARB 4197
+#define X_GLrop_VertexAttrib2dvARB 4198
+#define X_GLrop_VertexAttrib3dvARB 4199
+#define X_GLrop_ProgramLocalParameter4fvARB 4215
+#define X_GLrop_ProgramLocalParameter4dvARB 4216
+#define X_GLrop_ProgramStringARB 4217
+#define X_GLrop_VertexAttrib4dvARB 4200
+#define X_GLrop_VertexAttrib4NubvARB 4201
+#define X_GLrop_VertexAttrib4bvARB 4230
+#define X_GLrop_VertexAttrib4ivARB 4231
+#define X_GLrop_VertexAttrib4ubvARB 4232
+#define X_GLrop_VertexAttrib4usvARB 4233
+#define X_GLrop_VertexAttrib4uivARB 4234
+#define X_GLrop_VertexAttrib4NbvARB 4235
+#define X_GLrop_VertexAttrib4NsvARB 4236
+#define X_GLrop_VertexAttrib4NivARB 4237
+#define X_GLrop_VertexAttrib4NusvARB 4238
+#define X_GLrop_VertexAttrib4NuivARB 4239
+
+/* 27. GL_ARB_fragment_program - see GL_ARB_vertex_program opcodes */
+
+/* 29. GL_ARB_occlusion_query */
+/* XXX opcodes not defined in the spec */
+
+
+/* New extension opcodes */
+
+/* 145. GL_EXT_secondary_color - see GL 1.4 opcodes */
+
+/* 188. GL_EXT_vertex_weighting */
+#define X_GLrop_VertexWeightfvEXT 4135
+
+/* 191. GL_NV_register_combiners */
+#define X_GLrop_CombinerParameterfNV 4136
+#define X_GLrop_CombinerParameterfvNV 4137
+#define X_GLrop_CombinerParameteriNV 4138
+#define X_GLrop_CombinerParameterivNV 4139
+#define X_GLrop_CombinerInputNV 4140
+#define X_GLrop_CombinerOutputNV 4141
+#define X_GLrop_FinalCombinerInputNV 4142
+
+/* 222. GL_NV_fence */
+#define X_GLrop_SetFenceNV 4143
+#define X_GLrop_FinishFenceNV 4144
+
+/* 227. GL_NV_register_combiners2 */
+/* XXX opcodes not defined in the spec */
+
+/* 233. GL_NV_vertex_program - see also GL_ARB_vertex_program opcodes */
+#define X_GLrop_ExecuteProgramNV 4181
+#define X_GLrop_RequestResidentProgramsNV 4182
+#define X_GLrop_LoadProgamNV 4183
+#define X_GLrop_ProgramParameters4fvNV 4186
+#define X_GLrop_ProgramParameters4dvNV 4187
+#define X_GLrop_TrackMatrixNV 4188
+#define X_GLrop_VertexAttribs1svNV 4202
+#define X_GLrop_VertexAttribs2svNV 4203
+#define X_GLrop_VertexAttribs3svNV 4204
+#define X_GLrop_VertexAttribs4svNV 4205
+#define X_GLrop_VertexAttribs1fvNV 4206
+#define X_GLrop_VertexAttribs2fvNV 4207
+#define X_GLrop_VertexAttribs3fvNV 4208
+#define X_GLrop_VertexAttribs4fvNV 4209
+#define X_GLrop_VertexAttribs1dvNV 4210
+#define X_GLrop_VertexAttribs2dvNV 4211
+#define X_GLrop_VertexAttribs3dvNV 4212
+#define X_GLrop_VertexAttribs4dvNV 4213
+#define X_GLrop_VertexAttribs4ubvNV 4214
+
+/* 261. GL_NV_occlusion_query */
+/* XXX opcodes not defined in the spec */
+
+/* 262. GL_NV_point_sprite - see GL 1.4 opcodes */
+
+/* 268. GL_EXT_stencil_two_side */
+#define X_GLrop_ActiveStencilFaceEXT 4220
+
+/* 282. GL_NV_fragment_program - see also GL_NV_vertex_program and GL_ARB_vertex_program opcodes */
+#define X_GLrop_ProgramNamedParameter4fvNV 4218
+#define X_GLrop_ProgramNamedParameter4dvNV 4219
+
+/* 285. GL_NV_primitive_restart */
+/* XXX opcodes not defined in the spec */
+
+/* 297. GL_EXT_depth_bounds_test */
+#define X_GLrop_DepthBoundsEXT 4229
+
+/* 299. GL_EXT_blend_equation_separate */
+#define X_GLrop_BlendEquationSeparateEXT 4228
+
+/* 310. GL_EXT_framebuffer_object */
+#define X_GLvop_IsRenderbufferEXT 1422
+#define X_GLvop_GenRenderbuffersEXT 1423
+#define X_GLvop_GetRenderbufferParameterivEXT 1424
+#define X_GLvop_IsFramebufferEXT 1425
+#define X_GLvop_GenFramebuffersEXT 1426
+#define X_GLvop_CheckFramebufferStatusEXT 1427
+#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
+
+#endif /* _GLX_glxproto_h_ */
diff --git a/include/GL/glxtokens.h b/include/GL/glxtokens.h
new file mode 100644
index 0000000..a95082e
--- /dev/null
+++ b/include/GL/glxtokens.h
@@ -0,0 +1,316 @@
+#ifndef __GLX_glxtokens_h__
+#define __GLX_glxtokens_h__
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define GLX_VERSION_1_1 1
+#define GLX_VERSION_1_2 1
+#define GLX_VERSION_1_3 1
+#define GLX_VERSION_1_4 1
+
+/*
+** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib)
+*/
+#define GLX_USE_GL 1 /* support GLX rendering */
+#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */
+#define GLX_LEVEL 3 /* level in plane stacking */
+#define GLX_RGBA 4 /* true if RGBA mode */
+#define GLX_DOUBLEBUFFER 5 /* double buffering supported */
+#define GLX_STEREO 6 /* stereo buffering supported */
+#define GLX_AUX_BUFFERS 7 /* number of aux buffers */
+#define GLX_RED_SIZE 8 /* number of red component bits */
+#define GLX_GREEN_SIZE 9 /* number of green component bits */
+#define GLX_BLUE_SIZE 10 /* number of blue component bits */
+#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */
+#define GLX_DEPTH_SIZE 12 /* number of depth bits */
+#define GLX_STENCIL_SIZE 13 /* number of stencil bits */
+#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */
+#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */
+#define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */
+#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */
+/*
+** FBConfig-specific attributes
+*/
+#define GLX_X_VISUAL_TYPE 0x22
+#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT_EXT */
+#define GLX_TRANSPARENT_TYPE 0x23
+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
+#define GLX_TRANSPARENT_RED_VALUE 0x25
+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
+#define GLX_DRAWABLE_TYPE 0x8010
+#define GLX_RENDER_TYPE 0x8011
+#define GLX_X_RENDERABLE 0x8012
+#define GLX_FBCONFIG_ID 0x8013
+#define GLX_MAX_PBUFFER_WIDTH 0x8016
+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
+#define GLX_MAX_PBUFFER_PIXELS 0x8018
+#define GLX_VISUAL_ID 0x800B
+
+/* FBConfigSGIX Attributes */
+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
+
+/*
+** Error return values from glXGetConfig. Success is indicated by
+** a value of 0.
+*/
+#define GLX_BAD_SCREEN 1 /* screen # is bad */
+#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */
+#define GLX_NO_EXTENSION 3 /* no glx extension on server */
+#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */
+#define GLX_BAD_CONTEXT 5 /* returned only by import_context EXT? */
+#define GLX_BAD_VALUE 6 /* returned only by glXSwapIntervalSGI? */
+#define GLX_BAD_ENUM 7 /* unused? */
+
+/* FBConfig attribute values */
+
+/*
+** Generic "don't care" value for glX ChooseFBConfig attributes (except
+** GLX_LEVEL)
+*/
+#define GLX_DONT_CARE 0xFFFFFFFF
+
+/* GLX_RENDER_TYPE bits */
+#define GLX_RGBA_BIT 0x00000001
+#define GLX_COLOR_INDEX_BIT 0x00000002
+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
+
+/* GLX_DRAWABLE_TYPE bits */
+#define GLX_WINDOW_BIT 0x00000001
+#define GLX_PIXMAP_BIT 0x00000002
+#define GLX_PBUFFER_BIT 0x00000004
+
+/* GLX_CONFIG_CAVEAT attribute values */
+#define GLX_NONE 0x8000
+#define GLX_SLOW_CONFIG 0x8001
+#define GLX_NON_CONFORMANT_CONFIG 0x800D
+
+/* GLX_X_VISUAL_TYPE attribute values */
+#define GLX_TRUE_COLOR 0x8002
+#define GLX_DIRECT_COLOR 0x8003
+#define GLX_PSEUDO_COLOR 0x8004
+#define GLX_STATIC_COLOR 0x8005
+#define GLX_GRAY_SCALE 0x8006
+#define GLX_STATIC_GRAY 0x8007
+
+/* GLX_TRANSPARENT_TYPE attribute values */
+/* #define GLX_NONE 0x8000 */
+#define GLX_TRANSPARENT_RGB 0x8008
+#define GLX_TRANSPARENT_INDEX 0x8009
+
+/* glXCreateGLXPbuffer attributes */
+#define GLX_PRESERVED_CONTENTS 0x801B
+#define GLX_LARGEST_PBUFFER 0x801C
+#define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */
+#define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */
+
+/* glXQueryGLXPBuffer attributes */
+#define GLX_WIDTH 0x801D
+#define GLX_HEIGHT 0x801E
+#define GLX_EVENT_MASK 0x801F
+
+/* glXCreateNewContext render_type attribute values */
+#define GLX_RGBA_TYPE 0x8014
+#define GLX_COLOR_INDEX_TYPE 0x8015
+
+/* glXQueryContext attributes */
+/* #define GLX_FBCONFIG_ID 0x8013 */
+/* #define GLX_RENDER_TYPE 0x8011 */
+#define GLX_SCREEN 0x800C
+
+/* glXSelectEvent event mask bits */
+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
+#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
+
+/* GLXPbufferClobberEvent event_type values */
+#define GLX_DAMAGED 0x8020
+#define GLX_SAVED 0x8021
+#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
+#define GLX_BLIT_COMPLETE_INTEL 0x8181
+#define GLX_FLIP_COMPLETE_INTEL 0x8182
+
+/* GLXPbufferClobberEvent draw_type values */
+#define GLX_WINDOW 0x8022
+#define GLX_PBUFFER 0x8023
+
+/* GLXPbufferClobberEvent buffer_mask bits */
+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
+#define GLX_AUX_BUFFERS_BIT 0x00000010
+#define GLX_DEPTH_BUFFER_BIT 0x00000020
+#define GLX_STENCIL_BUFFER_BIT 0x00000040
+#define GLX_ACCUM_BUFFER_BIT 0x00000080
+
+/*
+** Extension return values from glXGetConfig. These are also
+** accepted as parameter values for glXChooseVisual.
+*/
+
+#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */
+#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */
+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */
+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */
+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */
+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */
+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */
+
+/* Property values for visual_type */
+#define GLX_TRUE_COLOR_EXT 0x8002
+#define GLX_DIRECT_COLOR_EXT 0x8003
+#define GLX_PSEUDO_COLOR_EXT 0x8004
+#define GLX_STATIC_COLOR_EXT 0x8005
+#define GLX_GRAY_SCALE_EXT 0x8006
+#define GLX_STATIC_GRAY_EXT 0x8007
+
+/* Property values for transparent pixel */
+#define GLX_NONE_EXT 0x8000
+#define GLX_TRANSPARENT_RGB_EXT 0x8008
+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
+
+/* Property values for visual_rating */
+#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */
+#define GLX_SLOW_VISUAL_EXT 0x8001
+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
+
+/* Property values for swap method (GLX_OML_swap_method) */
+#define GLX_SWAP_METHOD_OML 0x8060
+#define GLX_SWAP_EXCHANGE_OML 0x8061
+#define GLX_SWAP_COPY_OML 0x8062
+#define GLX_SWAP_UNDEFINED_OML 0x8063
+
+/* Property values for multi-sampling */
+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 /* visuals grouped by select priority */
+
+/*
+** Names for attributes to glXGetClientString.
+*/
+#define GLX_VENDOR 0x1
+#define GLX_VERSION 0x2
+#define GLX_EXTENSIONS 0x3
+
+/*
+** Names for attributes to glXQueryContextInfoEXT.
+*/
+#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */
+#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */
+#define GLX_SCREEN_EXT 0x800C /* screen number */
+
+/*
+** GLX_EXT_texture_from_pixmap
+*/
+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
+#define GLX_Y_INVERTED_EXT 0x20D4
+
+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
+#define GLX_TEXTURE_TARGET_EXT 0x20D6
+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
+
+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
+
+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
+
+#define GLX_TEXTURE_1D_EXT 0x20DB
+#define GLX_TEXTURE_2D_EXT 0x20DC
+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
+
+#define GLX_FRONT_LEFT_EXT 0x20DE
+#define GLX_FRONT_RIGHT_EXT 0x20DF
+#define GLX_BACK_LEFT_EXT 0x20E0
+#define GLX_BACK_RIGHT_EXT 0x20E1
+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
+#define GLX_AUX0_EXT 0x20E2
+#define GLX_AUX1_EXT 0x20E3
+#define GLX_AUX2_EXT 0x20E4
+#define GLX_AUX3_EXT 0x20E5
+#define GLX_AUX4_EXT 0x20E6
+#define GLX_AUX5_EXT 0x20E7
+#define GLX_AUX6_EXT 0x20E8
+#define GLX_AUX7_EXT 0x20E9
+#define GLX_AUX8_EXT 0x20EA
+#define GLX_AUX9_EXT 0x20EB
+
+/*
+ * GLX 1.4 and later:
+ */
+#define GLX_SAMPLE_BUFFERS_SGIS 100000
+#define GLX_SAMPLES_SGIS 100001
+
+/*
+ * GLX_EXT_framebuffer_SRGB
+ */
+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
+
+/*
+ * GLX_ARB_create_context
+ * GLX_ARB_create_context_profile
+ * GLX_EXT_create_context_es2_profile
+ */
+#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define GLX_CONTEXT_FLAGS_ARB 0x2094
+#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
+
+#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001
+#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
+
+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x0001
+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x0002
+#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x0004
+
+/*
+ * GLX_ARB_create_context_robustness
+ */
+#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x0004
+#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
+#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !__GLX_glxtokens_h__ */
diff --git a/include/GL/internal/glcore.h b/include/GL/internal/glcore.h
new file mode 100644
index 0000000..547b111
--- /dev/null
+++ b/include/GL/internal/glcore.h
@@ -0,0 +1,181 @@
+#ifndef __gl_core_h_
+#define __gl_core_h_
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#if !defined(_WIN32_WCE)
+#include <sys/types.h>
+#endif
+
+#define GL_CORE_SGI 1
+#define GL_CORE_MESA 2
+#define GL_CORE_APPLE 4
+#define GL_CORE_WINDOWS 8
+
+typedef struct __GLcontextRec __GLcontext;
+
+/*
+** This file defines the interface between the GL core and the surrounding
+** "operating system" that supports it (currently the GLX or WGL extensions).
+**
+** Members (data and function pointers) are documented as imported or
+** exported according to how they are used by the core rendering functions.
+** Imported members are initialized by the "operating system" and used by
+** the core functions. Exported members are initialized by the core functions
+** and used by the "operating system".
+*/
+
+/**
+ * Mode and limit information for a context. This information is
+ * kept around in the context so that values can be used during
+ * command execution, and for returning information about the
+ * context to the application.
+ *
+ * Instances of this structure are shared by the driver and the loader. To
+ * maintain binary compatability, new fields \b must be added only to the
+ * end of the structure.
+ *
+ * \sa _gl_context_modes_create
+ */
+typedef struct __GLcontextModesRec {
+ struct __GLcontextModesRec * next;
+
+ GLboolean rgbMode;
+ GLboolean floatMode;
+ GLboolean colorIndexMode;
+ GLuint doubleBufferMode;
+ GLuint stereoMode;
+
+ GLboolean haveAccumBuffer;
+ GLboolean haveDepthBuffer;
+ GLboolean haveStencilBuffer;
+
+ GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
+ GLuint redMask, greenMask, blueMask, alphaMask;
+ GLint rgbBits; /* total bits for rgb */
+ GLint indexBits; /* total bits for colorindex */
+
+ GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
+ GLint depthBits;
+ GLint stencilBits;
+
+ GLint numAuxBuffers;
+
+ GLint level;
+
+ GLint pixmapMode;
+
+ /* GLX */
+ GLint visualID;
+ GLint visualType; /**< One of the GLX X visual types. (i.e.,
+ * \c GLX_TRUE_COLOR, etc.)
+ */
+
+ /* EXT_visual_rating / GLX 1.2 */
+ GLint visualRating;
+
+ /* EXT_visual_info / GLX 1.2 */
+ GLint transparentPixel;
+ /* colors are floats scaled to ints */
+ GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
+ GLint transparentIndex;
+
+ /* ARB_multisample / SGIS_multisample */
+ GLint sampleBuffers;
+ GLint samples;
+
+ /* SGIX_fbconfig / GLX 1.3 */
+ GLint drawableType;
+ GLint renderType;
+ GLint xRenderable;
+ GLint fbconfigID;
+
+ /* SGIX_pbuffer / GLX 1.3 */
+ GLint maxPbufferWidth;
+ GLint maxPbufferHeight;
+ GLint maxPbufferPixels;
+ GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
+ GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
+
+ /* SGIX_visual_select_group */
+ GLint visualSelectGroup;
+
+ /* OML_swap_method */
+ GLint swapMethod;
+
+ GLint screen;
+
+ /* EXT_texture_from_pixmap */
+ GLint bindToTextureRgb;
+ GLint bindToTextureRgba;
+ GLint bindToMipmapTexture;
+ GLint bindToTextureTargets;
+ GLint yInverted;
+} __GLcontextModes;
+
+/* Several fields of __GLcontextModes can take these as values. Since
+ * GLX header files may not be available everywhere they need to be used,
+ * redefine them here.
+ */
+#define GLX_NONE 0x8000
+#define GLX_SLOW_CONFIG 0x8001
+#define GLX_TRUE_COLOR 0x8002
+#define GLX_DIRECT_COLOR 0x8003
+#define GLX_PSEUDO_COLOR 0x8004
+#define GLX_STATIC_COLOR 0x8005
+#define GLX_GRAY_SCALE 0x8006
+#define GLX_STATIC_GRAY 0x8007
+#define GLX_TRANSPARENT_RGB 0x8008
+#define GLX_TRANSPARENT_INDEX 0x8009
+#define GLX_NON_CONFORMANT_CONFIG 0x800D
+#define GLX_SWAP_EXCHANGE_OML 0x8061
+#define GLX_SWAP_COPY_OML 0x8062
+#define GLX_SWAP_UNDEFINED_OML 0x8063
+
+#define GLX_DONT_CARE 0xFFFFFFFF
+
+#define GLX_RGBA_BIT 0x00000001
+#define GLX_COLOR_INDEX_BIT 0x00000002
+#define GLX_WINDOW_BIT 0x00000001
+#define GLX_PIXMAP_BIT 0x00000002
+#define GLX_PBUFFER_BIT 0x00000004
+
+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
+#define GLX_Y_INVERTED_EXT 0x20D4
+
+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
+
+#endif /* __gl_core_h_ */
diff --git a/inputproto.pc.in b/inputproto.pc.in
new file mode 100644
index 0000000..c499cda
--- /dev/null
+++ b/inputproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: InputProto
+Description: Input extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/inputproto/.gitignore b/inputproto/.gitignore
new file mode 100644
index 0000000..d1359e6
--- /dev/null
+++ b/inputproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for inputproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/inputproto/COPYING b/inputproto/COPYING
new file mode 100644
index 0000000..f0b75c0
--- /dev/null
+++ b/inputproto/COPYING
@@ -0,0 +1,63 @@
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Hewlett-Packard not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+Copyright © 2009 Red Hat, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
diff --git a/inputproto/Makefile.am b/inputproto/Makefile.am
new file mode 100644
index 0000000..3312f2f
--- /dev/null
+++ b/inputproto/Makefile.am
@@ -0,0 +1,24 @@
+
+SUBDIRS = specs
+
+inputdir = $(includedir)/X11/extensions
+input_HEADERS = \
+ XI.h \
+ XIproto.h \
+ XI2.h \
+ XI2proto.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = inputproto.pc
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/inputproto/README b/inputproto/README
new file mode 100644
index 0000000..6b98e2b
--- /dev/null
+++ b/inputproto/README
@@ -0,0 +1,30 @@
+ X Input Extension
+
+This extension defines a protocol to provide additional input devices
+management such as graphic tablets.
+
+Extension name: XInputExtension
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/inputproto
+
+ http://cgit.freedesktop.org/xorg/proto/inputproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/inputproto/autogen.sh b/inputproto/autogen.sh
new file mode 100755
index 0000000..a79dc33
--- /dev/null
+++ b/inputproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH inputproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/inputproto/configure.ac b/inputproto/configure.ac
new file mode 100644
index 0000000..7480425
--- /dev/null
+++ b/inputproto/configure.ac
@@ -0,0 +1,16 @@
+AC_PREREQ([2.60])
+AC_INIT([InputProto], [2.3.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros: XORG_WITH_ASCIIDOC
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.10)
+XORG_DEFAULT_OPTIONS
+XORG_ENABLE_SPECS
+XORG_WITH_ASCIIDOC(8.4.5)
+
+AC_CONFIG_FILES([Makefile
+ specs/Makefile
+ inputproto.pc])
+AC_OUTPUT
diff --git a/inputproto/specs/.gitignore b/inputproto/specs/.gitignore
new file mode 100644
index 0000000..2d19fc7
--- /dev/null
+++ b/inputproto/specs/.gitignore
@@ -0,0 +1 @@
+*.html
diff --git a/inputproto/specs/Makefile.am b/inputproto/specs/Makefile.am
new file mode 100644
index 0000000..f2454bc
--- /dev/null
+++ b/inputproto/specs/Makefile.am
@@ -0,0 +1,14 @@
+
+if ENABLE_SPECS
+if HAVE_ASCIIDOC
+
+doc_DATA = XI2proto.html XIproto.html
+dist_doc_DATA = XI2proto.txt XIproto.txt
+
+%.html: %.txt
+ $(AM_V_GEN)TZ=UTC $(ASCIIDOC) -o $@ $<
+
+CLEANFILES = $(doc_DATA)
+
+endif
+endif
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..77bc381
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,316 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2004-02-15.20
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=
+transform_arg=
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+
+usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 -d DIRECTORIES...
+
+In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
+In the second, create the directory path DIR.
+
+Options:
+-b=TRANSFORMBASENAME
+-c copy source (using $cpprog) instead of moving (using $mvprog).
+-d create directories instead of installing files.
+-g GROUP $chgrp installed files to GROUP.
+-m MODE $chmod installed files to MODE.
+-o USER $chown installed files to USER.
+-s strip installed files (using $stripprog).
+-t=TRANSFORM
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit 0;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit 0;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ test -n "$dir_arg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ instcmd=:
+ chmodcmd=
+ else
+ instcmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp" || lasterr=$?
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $instcmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ # If we're going to rename the final executable, determine the name now.
+ if test -z "$transformarg"; then
+ dstfile=`basename "$dst"`
+ else
+ dstfile=`basename "$dst" $transformbasename \
+ | sed $transformarg`$transformbasename
+ fi
+
+ # don't allow the sed command to completely eliminate the filename.
+ test -z "$dstfile" && dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Move or copy the file name to the temp name
+ $doit $instcmd "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $instcmd $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now remove or move aside any old file at destination location. We
+ # try this two ways since rm can't unlink itself on some systems and
+ # the destination file might be busy for other reasons. In this case,
+ # the final cleanup might fail but the new file should still install
+ # successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ fi || { (exit 1); exit; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/kbproto.pc.in b/kbproto.pc.in
new file mode 100644
index 0000000..02a6d44
--- /dev/null
+++ b/kbproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: KBProto
+Description: KB extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/kbproto/.gitignore b/kbproto/.gitignore
new file mode 100644
index 0000000..29b82f2
--- /dev/null
+++ b/kbproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for kbproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/kbproto/COPYING b/kbproto/COPYING
new file mode 100644
index 0000000..6f12c2f
--- /dev/null
+++ b/kbproto/COPYING
@@ -0,0 +1,22 @@
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/kbproto/Makefile.am b/kbproto/Makefile.am
new file mode 100644
index 0000000..4358857
--- /dev/null
+++ b/kbproto/Makefile.am
@@ -0,0 +1,25 @@
+SUBDIRS = specs
+
+kbdir = $(includedir)/X11/extensions
+kb_HEADERS = \
+ XKBgeom.h \
+ XKB.h \
+ XKBproto.h \
+ XKBsrv.h \
+ XKBstr.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = kbproto.pc
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/kbproto/README b/kbproto/README
new file mode 100644
index 0000000..49fa4f9
--- /dev/null
+++ b/kbproto/README
@@ -0,0 +1,30 @@
+ X Keyboard Extension
+
+This extension defines a protcol to provide a number of new capabilities
+and controls for text keyboards.
+
+Extension name: XKEYBOARD
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/kbproto
+
+ http://cgit.freedesktop.org/xorg/proto/kbproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/kbproto/autogen.sh b/kbproto/autogen.sh
new file mode 100755
index 0000000..971ce73
--- /dev/null
+++ b/kbproto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH kbproto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/kbproto/configure.ac b/kbproto/configure.ac
new file mode 100644
index 0000000..807f341
--- /dev/null
+++ b/kbproto/configure.ac
@@ -0,0 +1,20 @@
+AC_PREREQ([2.60])
+AC_INIT([KBProto], [1.0.7],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros minimum of 1.12 for DocBook external references
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.12)
+XORG_DEFAULT_OPTIONS
+XORG_ENABLE_SPECS
+XORG_WITH_XMLTO(0.0.22)
+XORG_WITH_FOP
+XORG_WITH_XSLTPROC
+XORG_CHECK_SGML_DOCTOOLS(1.8)
+
+AC_CONFIG_FILES([Makefile
+ specs/Makefile
+ kbproto.pc])
+AC_OUTPUT
diff --git a/kbproto/docbook.am b/kbproto/docbook.am
new file mode 100644
index 0000000..bba4d54
--- /dev/null
+++ b/kbproto/docbook.am
@@ -0,0 +1,105 @@
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# Variables set by the calling Makefile:
+# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
+# docbook: the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Users Documentation and Functional Specifications.
+# Do not use for Developer Documentation which is not installed and does not require olink.
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# DocBook/XML generated output formats to be installed
+shelf_DATA =
+
+# DocBook/XML file with chapters, appendix and images it includes
+dist_shelf_DATA = $(docbook) $(chapters)
+
+if HAVE_XMLTO
+if HAVE_STYLESHEETS
+
+XMLTO_SEARCHPATH_FLAGS = \
+ --searchpath "$(XORG_SGML_PATH)/X11" \
+ --searchpath "$(abs_top_builddir)"
+XMLTO_HTML_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XMLTO_HTML_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_HTML_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.html)
+%.html: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
+
+if HAVE_XMLTO_TEXT
+
+shelf_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+if HAVE_FOP
+XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
+XMLTO_PDF_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+XMLTO_FO_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_FO_STYLESHEET_FLAGS) \
+ $(XMLTO_FO_IMAGEPATH_FLAGS) \
+ $(XMLTO_PDF_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.pdf)
+%.pdf: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+
+shelf_DATA += $(docbook:.xml=.ps)
+%.ps: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+
+# Generate documents cross-reference target databases
+if HAVE_XSLTPROC
+
+XSLT_SEARCHPATH_FLAGS = \
+ --path "$(XORG_SGML_PATH)/X11" \
+ --path "$(abs_top_builddir)"
+XSLT_OLINK_FLAGS = \
+ --stringparam targets.filename "$@" \
+ --stringparam collect.xref.targets "only" \
+ --stringparam olink.base.uri "$(@:.db=)"
+
+XSLT_HTML_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XSLT_PDF_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+shelf_DATA += $(docbook:.xml=.html.db)
+%.html.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
+
+shelf_DATA += $(docbook:.xml=.pdf.db)
+%.pdf.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
+
+endif HAVE_XSLTPROC
+endif HAVE_STYLESHEETS
+endif HAVE_XMLTO
+
+CLEANFILES = $(shelf_DATA)
diff --git a/kbproto/specs/.gitignore b/kbproto/specs/.gitignore
new file mode 100644
index 0000000..92946c9
--- /dev/null
+++ b/kbproto/specs/.gitignore
@@ -0,0 +1,5 @@
+*.html
+*.ps
+*.pdf
+*.txt
+*.db
diff --git a/kbproto/specs/Makefile.am b/kbproto/specs/Makefile.am
new file mode 100644
index 0000000..44bc973
--- /dev/null
+++ b/kbproto/specs/Makefile.am
@@ -0,0 +1,48 @@
+
+if ENABLE_SPECS
+
+# Main DocBook/XML files (DOCTYPE book)
+docbook = xkbproto.xml
+
+# Included chapters, appendix, images
+chapters = \
+ acknowledgements.xml \
+ appA.xml \
+ appB.xml \
+ appC.xml \
+ appD.xml \
+ ch01.xml \
+ ch02.xml \
+ ch03.xml \
+ ch04.xml \
+ ch05.xml \
+ ch06.xml \
+ ch07.xml \
+ ch08.xml \
+ ch09.xml \
+ ch10.xml \
+ ch11.xml \
+ ch12.xml \
+ ch13.xml \
+ ch14.xml \
+ ch15.xml \
+ ch16.xml \
+ XKBproto-1.svg \
+ XKBproto-2.svg \
+ XKBproto-3.svg \
+ XKBproto-4.svg \
+ XKBproto-5.svg \
+ XKBproto-6.svg \
+ XKBproto-7.svg \
+ XKBproto-8.svg \
+ XKBproto-9.svg \
+ XKBproto-10.svg \
+ XKBproto-11.svg
+
+# The location where the DocBook/XML files and their generated formats are installed
+shelfdir = $(docdir)
+
+# Generate DocBook/XML output formats with or without stylesheets
+include $(top_srcdir)/docbook.am
+
+endif ENABLE_SPECS
diff --git a/keysym.h b/keysym.h
new file mode 100644
index 0000000..4f58488
--- /dev/null
+++ b/keysym.h
@@ -0,0 +1,74 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/* default keysyms */
+#define XK_MISCELLANY
+#define XK_XKB_KEYS
+#define XK_LATIN1
+#define XK_LATIN2
+#define XK_LATIN3
+#define XK_LATIN4
+#define XK_LATIN8
+#define XK_LATIN9
+#define XK_CAUCASUS
+#define XK_GREEK
+#define XK_KATAKANA
+#define XK_ARABIC
+#define XK_CYRILLIC
+#define XK_HEBREW
+#define XK_THAI
+#define XK_KOREAN
+#define XK_ARMENIAN
+#define XK_GEORGIAN
+#define XK_VIETNAMESE
+#define XK_CURRENCY
+#define XK_MATHEMATICAL
+#define XK_BRAILLE
+#define XK_SINHALA
+
+#include <X11/keysymdef.h>
+
diff --git a/keysymdef.h b/keysymdef.h
new file mode 100644
index 0000000..147ecf5
--- /dev/null
+++ b/keysymdef.h
@@ -0,0 +1,2497 @@
+/***********************************************************
+Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+ * The "X11 Window System Protocol" standard defines in Appendix A the
+ * keysym codes. These 29-bit integer values identify characters or
+ * functions associated with each key (e.g., via the visible
+ * engraving) of a keyboard layout. This file assigns mnemonic macro
+ * names for these keysyms.
+ *
+ * This file is also compiled (by src/util/makekeys.c in libX11) into
+ * hash tables that can be accessed with X11 library functions such as
+ * XStringToKeysym() and XKeysymToString().
+ *
+ * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode
+ * character, this is noted in a comment that provides both the U+xxxx
+ * Unicode position, as well as the official Unicode name of the
+ * character.
+ *
+ * Where the correspondence is either not one-to-one or semantically
+ * unclear, the Unicode position and name are enclosed in
+ * parentheses. Such legacy keysyms should be considered deprecated
+ * and are not recommended for use in future keyboard mappings.
+ *
+ * For any future extension of the keysyms with characters already
+ * found in ISO 10646 / Unicode, the following algorithm shall be
+ * used. The new keysym code position will simply be the character's
+ * Unicode number plus 0x01000000. The keysym values in the range
+ * 0x01000100 to 0x0110ffff are reserved to represent Unicode
+ * characters in the range U+0100 to U+10FFFF.
+ *
+ * While most newer Unicode-based X11 clients do already accept
+ * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it
+ * will remain necessary for clients -- in the interest of
+ * compatibility with existing servers -- to also understand the
+ * existing legacy keysym values in the range 0x0100 to 0x20ff.
+ *
+ * Where several mnemonic names are defined for the same keysym in this
+ * file, all but the first one listed should be considered deprecated.
+ *
+ * Mnemonic names for keysyms are defined in this file with lines
+ * that match one of these Perl regular expressions:
+ *
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/
+ *
+ * Before adding new keysyms, please do consider the following: In
+ * addition to the keysym names defined in this file, the
+ * XStringToKeysym() and XKeysymToString() functions will also handle
+ * any keysym string of the form "U0020" to "U007E" and "U00A0" to
+ * "U10FFFF" for all possible Unicode characters. In other words,
+ * every possible Unicode character has already a keysym string
+ * defined algorithmically, even if it is not listed here. Therefore,
+ * defining an additional keysym macro is only necessary where a
+ * non-hexadecimal mnemonic name is needed, or where the new keysym
+ * does not represent any existing Unicode character.
+ *
+ * When adding new keysyms to this file, do not forget to also update the
+ * following as needed:
+ *
+ * - the mappings in src/KeyBind.c in the repo
+ * git://anongit.freedesktop.org/xorg/lib/libX11.git
+ *
+ * - the protocol specification in specs/keysyms.xml
+ * in the repo git://anongit.freedesktop.org/xorg/proto/x11proto.git
+ *
+ */
+
+#define XK_VoidSymbol 0xffffff /* Void symbol */
+
+#ifdef XK_MISCELLANY
+/*
+ * TTY function keys, cleverly chosen to map to ASCII, for convenience of
+ * programming, but could have been arbitrary (at the cost of lookup
+ * tables in client code).
+ */
+
+#define XK_BackSpace 0xff08 /* Back space, back char */
+#define XK_Tab 0xff09
+#define XK_Linefeed 0xff0a /* Linefeed, LF */
+#define XK_Clear 0xff0b
+#define XK_Return 0xff0d /* Return, enter */
+#define XK_Pause 0xff13 /* Pause, hold */
+#define XK_Scroll_Lock 0xff14
+#define XK_Sys_Req 0xff15
+#define XK_Escape 0xff1b
+#define XK_Delete 0xffff /* Delete, rubout */
+
+
+
+/* International & multi-key character composition */
+
+#define XK_Multi_key 0xff20 /* Multi-key character compose */
+#define XK_Codeinput 0xff37
+#define XK_SingleCandidate 0xff3c
+#define XK_MultipleCandidate 0xff3d
+#define XK_PreviousCandidate 0xff3e
+
+/* Japanese keyboard support */
+
+#define XK_Kanji 0xff21 /* Kanji, Kanji convert */
+#define XK_Muhenkan 0xff22 /* Cancel Conversion */
+#define XK_Henkan_Mode 0xff23 /* Start/Stop Conversion */
+#define XK_Henkan 0xff23 /* Alias for Henkan_Mode */
+#define XK_Romaji 0xff24 /* to Romaji */
+#define XK_Hiragana 0xff25 /* to Hiragana */
+#define XK_Katakana 0xff26 /* to Katakana */
+#define XK_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */
+#define XK_Zenkaku 0xff28 /* to Zenkaku */
+#define XK_Hankaku 0xff29 /* to Hankaku */
+#define XK_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */
+#define XK_Touroku 0xff2b /* Add to Dictionary */
+#define XK_Massyo 0xff2c /* Delete from Dictionary */
+#define XK_Kana_Lock 0xff2d /* Kana Lock */
+#define XK_Kana_Shift 0xff2e /* Kana Shift */
+#define XK_Eisu_Shift 0xff2f /* Alphanumeric Shift */
+#define XK_Eisu_toggle 0xff30 /* Alphanumeric toggle */
+#define XK_Kanji_Bangou 0xff37 /* Codeinput */
+#define XK_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */
+#define XK_Mae_Koho 0xff3e /* Previous Candidate */
+
+/* 0xff31 thru 0xff3f are under XK_KOREAN */
+
+/* Cursor control & motion */
+
+#define XK_Home 0xff50
+#define XK_Left 0xff51 /* Move left, left arrow */
+#define XK_Up 0xff52 /* Move up, up arrow */
+#define XK_Right 0xff53 /* Move right, right arrow */
+#define XK_Down 0xff54 /* Move down, down arrow */
+#define XK_Prior 0xff55 /* Prior, previous */
+#define XK_Page_Up 0xff55
+#define XK_Next 0xff56 /* Next */
+#define XK_Page_Down 0xff56
+#define XK_End 0xff57 /* EOL */
+#define XK_Begin 0xff58 /* BOL */
+
+
+/* Misc functions */
+
+#define XK_Select 0xff60 /* Select, mark */
+#define XK_Print 0xff61
+#define XK_Execute 0xff62 /* Execute, run, do */
+#define XK_Insert 0xff63 /* Insert, insert here */
+#define XK_Undo 0xff65
+#define XK_Redo 0xff66 /* Redo, again */
+#define XK_Menu 0xff67
+#define XK_Find 0xff68 /* Find, search */
+#define XK_Cancel 0xff69 /* Cancel, stop, abort, exit */
+#define XK_Help 0xff6a /* Help */
+#define XK_Break 0xff6b
+#define XK_Mode_switch 0xff7e /* Character set switch */
+#define XK_script_switch 0xff7e /* Alias for mode_switch */
+#define XK_Num_Lock 0xff7f
+
+/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */
+
+#define XK_KP_Space 0xff80 /* Space */
+#define XK_KP_Tab 0xff89
+#define XK_KP_Enter 0xff8d /* Enter */
+#define XK_KP_F1 0xff91 /* PF1, KP_A, ... */
+#define XK_KP_F2 0xff92
+#define XK_KP_F3 0xff93
+#define XK_KP_F4 0xff94
+#define XK_KP_Home 0xff95
+#define XK_KP_Left 0xff96
+#define XK_KP_Up 0xff97
+#define XK_KP_Right 0xff98
+#define XK_KP_Down 0xff99
+#define XK_KP_Prior 0xff9a
+#define XK_KP_Page_Up 0xff9a
+#define XK_KP_Next 0xff9b
+#define XK_KP_Page_Down 0xff9b
+#define XK_KP_End 0xff9c
+#define XK_KP_Begin 0xff9d
+#define XK_KP_Insert 0xff9e
+#define XK_KP_Delete 0xff9f
+#define XK_KP_Equal 0xffbd /* Equals */
+#define XK_KP_Multiply 0xffaa
+#define XK_KP_Add 0xffab
+#define XK_KP_Separator 0xffac /* Separator, often comma */
+#define XK_KP_Subtract 0xffad
+#define XK_KP_Decimal 0xffae
+#define XK_KP_Divide 0xffaf
+
+#define XK_KP_0 0xffb0
+#define XK_KP_1 0xffb1
+#define XK_KP_2 0xffb2
+#define XK_KP_3 0xffb3
+#define XK_KP_4 0xffb4
+#define XK_KP_5 0xffb5
+#define XK_KP_6 0xffb6
+#define XK_KP_7 0xffb7
+#define XK_KP_8 0xffb8
+#define XK_KP_9 0xffb9
+
+
+
+/*
+ * Auxiliary functions; note the duplicate definitions for left and right
+ * function keys; Sun keyboards and a few other manufacturers have such
+ * function key groups on the left and/or right sides of the keyboard.
+ * We've not found a keyboard with more than 35 function keys total.
+ */
+
+#define XK_F1 0xffbe
+#define XK_F2 0xffbf
+#define XK_F3 0xffc0
+#define XK_F4 0xffc1
+#define XK_F5 0xffc2
+#define XK_F6 0xffc3
+#define XK_F7 0xffc4
+#define XK_F8 0xffc5
+#define XK_F9 0xffc6
+#define XK_F10 0xffc7
+#define XK_F11 0xffc8
+#define XK_L1 0xffc8
+#define XK_F12 0xffc9
+#define XK_L2 0xffc9
+#define XK_F13 0xffca
+#define XK_L3 0xffca
+#define XK_F14 0xffcb
+#define XK_L4 0xffcb
+#define XK_F15 0xffcc
+#define XK_L5 0xffcc
+#define XK_F16 0xffcd
+#define XK_L6 0xffcd
+#define XK_F17 0xffce
+#define XK_L7 0xffce
+#define XK_F18 0xffcf
+#define XK_L8 0xffcf
+#define XK_F19 0xffd0
+#define XK_L9 0xffd0
+#define XK_F20 0xffd1
+#define XK_L10 0xffd1
+#define XK_F21 0xffd2
+#define XK_R1 0xffd2
+#define XK_F22 0xffd3
+#define XK_R2 0xffd3
+#define XK_F23 0xffd4
+#define XK_R3 0xffd4
+#define XK_F24 0xffd5
+#define XK_R4 0xffd5
+#define XK_F25 0xffd6
+#define XK_R5 0xffd6
+#define XK_F26 0xffd7
+#define XK_R6 0xffd7
+#define XK_F27 0xffd8
+#define XK_R7 0xffd8
+#define XK_F28 0xffd9
+#define XK_R8 0xffd9
+#define XK_F29 0xffda
+#define XK_R9 0xffda
+#define XK_F30 0xffdb
+#define XK_R10 0xffdb
+#define XK_F31 0xffdc
+#define XK_R11 0xffdc
+#define XK_F32 0xffdd
+#define XK_R12 0xffdd
+#define XK_F33 0xffde
+#define XK_R13 0xffde
+#define XK_F34 0xffdf
+#define XK_R14 0xffdf
+#define XK_F35 0xffe0
+#define XK_R15 0xffe0
+
+/* Modifiers */
+
+#define XK_Shift_L 0xffe1 /* Left shift */
+#define XK_Shift_R 0xffe2 /* Right shift */
+#define XK_Control_L 0xffe3 /* Left control */
+#define XK_Control_R 0xffe4 /* Right control */
+#define XK_Caps_Lock 0xffe5 /* Caps lock */
+#define XK_Shift_Lock 0xffe6 /* Shift lock */
+
+#define XK_Meta_L 0xffe7 /* Left meta */
+#define XK_Meta_R 0xffe8 /* Right meta */
+#define XK_Alt_L 0xffe9 /* Left alt */
+#define XK_Alt_R 0xffea /* Right alt */
+#define XK_Super_L 0xffeb /* Left super */
+#define XK_Super_R 0xffec /* Right super */
+#define XK_Hyper_L 0xffed /* Left hyper */
+#define XK_Hyper_R 0xffee /* Right hyper */
+#endif /* XK_MISCELLANY */
+
+/*
+ * Keyboard (XKB) Extension function and modifier keys
+ * (from Appendix C of "The X Keyboard Extension: Protocol Specification")
+ * Byte 3 = 0xfe
+ */
+
+#ifdef XK_XKB_KEYS
+#define XK_ISO_Lock 0xfe01
+#define XK_ISO_Level2_Latch 0xfe02
+#define XK_ISO_Level3_Shift 0xfe03
+#define XK_ISO_Level3_Latch 0xfe04
+#define XK_ISO_Level3_Lock 0xfe05
+#define XK_ISO_Level5_Shift 0xfe11
+#define XK_ISO_Level5_Latch 0xfe12
+#define XK_ISO_Level5_Lock 0xfe13
+#define XK_ISO_Group_Shift 0xff7e /* Alias for mode_switch */
+#define XK_ISO_Group_Latch 0xfe06
+#define XK_ISO_Group_Lock 0xfe07
+#define XK_ISO_Next_Group 0xfe08
+#define XK_ISO_Next_Group_Lock 0xfe09
+#define XK_ISO_Prev_Group 0xfe0a
+#define XK_ISO_Prev_Group_Lock 0xfe0b
+#define XK_ISO_First_Group 0xfe0c
+#define XK_ISO_First_Group_Lock 0xfe0d
+#define XK_ISO_Last_Group 0xfe0e
+#define XK_ISO_Last_Group_Lock 0xfe0f
+
+#define XK_ISO_Left_Tab 0xfe20
+#define XK_ISO_Move_Line_Up 0xfe21
+#define XK_ISO_Move_Line_Down 0xfe22
+#define XK_ISO_Partial_Line_Up 0xfe23
+#define XK_ISO_Partial_Line_Down 0xfe24
+#define XK_ISO_Partial_Space_Left 0xfe25
+#define XK_ISO_Partial_Space_Right 0xfe26
+#define XK_ISO_Set_Margin_Left 0xfe27
+#define XK_ISO_Set_Margin_Right 0xfe28
+#define XK_ISO_Release_Margin_Left 0xfe29
+#define XK_ISO_Release_Margin_Right 0xfe2a
+#define XK_ISO_Release_Both_Margins 0xfe2b
+#define XK_ISO_Fast_Cursor_Left 0xfe2c
+#define XK_ISO_Fast_Cursor_Right 0xfe2d
+#define XK_ISO_Fast_Cursor_Up 0xfe2e
+#define XK_ISO_Fast_Cursor_Down 0xfe2f
+#define XK_ISO_Continuous_Underline 0xfe30
+#define XK_ISO_Discontinuous_Underline 0xfe31
+#define XK_ISO_Emphasize 0xfe32
+#define XK_ISO_Center_Object 0xfe33
+#define XK_ISO_Enter 0xfe34
+
+#define XK_dead_grave 0xfe50
+#define XK_dead_acute 0xfe51
+#define XK_dead_circumflex 0xfe52
+#define XK_dead_tilde 0xfe53
+#define XK_dead_perispomeni 0xfe53 /* alias for dead_tilde */
+#define XK_dead_macron 0xfe54
+#define XK_dead_breve 0xfe55
+#define XK_dead_abovedot 0xfe56
+#define XK_dead_diaeresis 0xfe57
+#define XK_dead_abovering 0xfe58
+#define XK_dead_doubleacute 0xfe59
+#define XK_dead_caron 0xfe5a
+#define XK_dead_cedilla 0xfe5b
+#define XK_dead_ogonek 0xfe5c
+#define XK_dead_iota 0xfe5d
+#define XK_dead_voiced_sound 0xfe5e
+#define XK_dead_semivoiced_sound 0xfe5f
+#define XK_dead_belowdot 0xfe60
+#define XK_dead_hook 0xfe61
+#define XK_dead_horn 0xfe62
+#define XK_dead_stroke 0xfe63
+#define XK_dead_abovecomma 0xfe64
+#define XK_dead_psili 0xfe64 /* alias for dead_abovecomma */
+#define XK_dead_abovereversedcomma 0xfe65
+#define XK_dead_dasia 0xfe65 /* alias for dead_abovereversedcomma */
+#define XK_dead_doublegrave 0xfe66
+#define XK_dead_belowring 0xfe67
+#define XK_dead_belowmacron 0xfe68
+#define XK_dead_belowcircumflex 0xfe69
+#define XK_dead_belowtilde 0xfe6a
+#define XK_dead_belowbreve 0xfe6b
+#define XK_dead_belowdiaeresis 0xfe6c
+#define XK_dead_invertedbreve 0xfe6d
+#define XK_dead_belowcomma 0xfe6e
+#define XK_dead_currency 0xfe6f
+
+/* extra dead elements for German T3 layout */
+#define XK_dead_lowline 0xfe90
+#define XK_dead_aboveverticalline 0xfe91
+#define XK_dead_belowverticalline 0xfe92
+#define XK_dead_longsolidusoverlay 0xfe93
+
+/* dead vowels for universal syllable entry */
+#define XK_dead_a 0xfe80
+#define XK_dead_A 0xfe81
+#define XK_dead_e 0xfe82
+#define XK_dead_E 0xfe83
+#define XK_dead_i 0xfe84
+#define XK_dead_I 0xfe85
+#define XK_dead_o 0xfe86
+#define XK_dead_O 0xfe87
+#define XK_dead_u 0xfe88
+#define XK_dead_U 0xfe89
+#define XK_dead_small_schwa 0xfe8a
+#define XK_dead_capital_schwa 0xfe8b
+
+#define XK_dead_greek 0xfe8c
+
+#define XK_First_Virtual_Screen 0xfed0
+#define XK_Prev_Virtual_Screen 0xfed1
+#define XK_Next_Virtual_Screen 0xfed2
+#define XK_Last_Virtual_Screen 0xfed4
+#define XK_Terminate_Server 0xfed5
+
+#define XK_AccessX_Enable 0xfe70
+#define XK_AccessX_Feedback_Enable 0xfe71
+#define XK_RepeatKeys_Enable 0xfe72
+#define XK_SlowKeys_Enable 0xfe73
+#define XK_BounceKeys_Enable 0xfe74
+#define XK_StickyKeys_Enable 0xfe75
+#define XK_MouseKeys_Enable 0xfe76
+#define XK_MouseKeys_Accel_Enable 0xfe77
+#define XK_Overlay1_Enable 0xfe78
+#define XK_Overlay2_Enable 0xfe79
+#define XK_AudibleBell_Enable 0xfe7a
+
+#define XK_Pointer_Left 0xfee0
+#define XK_Pointer_Right 0xfee1
+#define XK_Pointer_Up 0xfee2
+#define XK_Pointer_Down 0xfee3
+#define XK_Pointer_UpLeft 0xfee4
+#define XK_Pointer_UpRight 0xfee5
+#define XK_Pointer_DownLeft 0xfee6
+#define XK_Pointer_DownRight 0xfee7
+#define XK_Pointer_Button_Dflt 0xfee8
+#define XK_Pointer_Button1 0xfee9
+#define XK_Pointer_Button2 0xfeea
+#define XK_Pointer_Button3 0xfeeb
+#define XK_Pointer_Button4 0xfeec
+#define XK_Pointer_Button5 0xfeed
+#define XK_Pointer_DblClick_Dflt 0xfeee
+#define XK_Pointer_DblClick1 0xfeef
+#define XK_Pointer_DblClick2 0xfef0
+#define XK_Pointer_DblClick3 0xfef1
+#define XK_Pointer_DblClick4 0xfef2
+#define XK_Pointer_DblClick5 0xfef3
+#define XK_Pointer_Drag_Dflt 0xfef4
+#define XK_Pointer_Drag1 0xfef5
+#define XK_Pointer_Drag2 0xfef6
+#define XK_Pointer_Drag3 0xfef7
+#define XK_Pointer_Drag4 0xfef8
+#define XK_Pointer_Drag5 0xfefd
+
+#define XK_Pointer_EnableKeys 0xfef9
+#define XK_Pointer_Accelerate 0xfefa
+#define XK_Pointer_DfltBtnNext 0xfefb
+#define XK_Pointer_DfltBtnPrev 0xfefc
+
+/* Single-Stroke Multiple-Character N-Graph Keysyms For The X Input Method */
+
+#define XK_ch 0xfea0
+#define XK_Ch 0xfea1
+#define XK_CH 0xfea2
+#define XK_c_h 0xfea3
+#define XK_C_h 0xfea4
+#define XK_C_H 0xfea5
+
+#endif /* XK_XKB_KEYS */
+
+/*
+ * 3270 Terminal Keys
+ * Byte 3 = 0xfd
+ */
+
+#ifdef XK_3270
+#define XK_3270_Duplicate 0xfd01
+#define XK_3270_FieldMark 0xfd02
+#define XK_3270_Right2 0xfd03
+#define XK_3270_Left2 0xfd04
+#define XK_3270_BackTab 0xfd05
+#define XK_3270_EraseEOF 0xfd06
+#define XK_3270_EraseInput 0xfd07
+#define XK_3270_Reset 0xfd08
+#define XK_3270_Quit 0xfd09
+#define XK_3270_PA1 0xfd0a
+#define XK_3270_PA2 0xfd0b
+#define XK_3270_PA3 0xfd0c
+#define XK_3270_Test 0xfd0d
+#define XK_3270_Attn 0xfd0e
+#define XK_3270_CursorBlink 0xfd0f
+#define XK_3270_AltCursor 0xfd10
+#define XK_3270_KeyClick 0xfd11
+#define XK_3270_Jump 0xfd12
+#define XK_3270_Ident 0xfd13
+#define XK_3270_Rule 0xfd14
+#define XK_3270_Copy 0xfd15
+#define XK_3270_Play 0xfd16
+#define XK_3270_Setup 0xfd17
+#define XK_3270_Record 0xfd18
+#define XK_3270_ChangeScreen 0xfd19
+#define XK_3270_DeleteWord 0xfd1a
+#define XK_3270_ExSelect 0xfd1b
+#define XK_3270_CursorSelect 0xfd1c
+#define XK_3270_PrintScreen 0xfd1d
+#define XK_3270_Enter 0xfd1e
+#endif /* XK_3270 */
+
+/*
+ * Latin 1
+ * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
+ * Byte 3 = 0
+ */
+#ifdef XK_LATIN1
+#define XK_space 0x0020 /* U+0020 SPACE */
+#define XK_exclam 0x0021 /* U+0021 EXCLAMATION MARK */
+#define XK_quotedbl 0x0022 /* U+0022 QUOTATION MARK */
+#define XK_numbersign 0x0023 /* U+0023 NUMBER SIGN */
+#define XK_dollar 0x0024 /* U+0024 DOLLAR SIGN */
+#define XK_percent 0x0025 /* U+0025 PERCENT SIGN */
+#define XK_ampersand 0x0026 /* U+0026 AMPERSAND */
+#define XK_apostrophe 0x0027 /* U+0027 APOSTROPHE */
+#define XK_quoteright 0x0027 /* deprecated */
+#define XK_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */
+#define XK_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */
+#define XK_asterisk 0x002a /* U+002A ASTERISK */
+#define XK_plus 0x002b /* U+002B PLUS SIGN */
+#define XK_comma 0x002c /* U+002C COMMA */
+#define XK_minus 0x002d /* U+002D HYPHEN-MINUS */
+#define XK_period 0x002e /* U+002E FULL STOP */
+#define XK_slash 0x002f /* U+002F SOLIDUS */
+#define XK_0 0x0030 /* U+0030 DIGIT ZERO */
+#define XK_1 0x0031 /* U+0031 DIGIT ONE */
+#define XK_2 0x0032 /* U+0032 DIGIT TWO */
+#define XK_3 0x0033 /* U+0033 DIGIT THREE */
+#define XK_4 0x0034 /* U+0034 DIGIT FOUR */
+#define XK_5 0x0035 /* U+0035 DIGIT FIVE */
+#define XK_6 0x0036 /* U+0036 DIGIT SIX */
+#define XK_7 0x0037 /* U+0037 DIGIT SEVEN */
+#define XK_8 0x0038 /* U+0038 DIGIT EIGHT */
+#define XK_9 0x0039 /* U+0039 DIGIT NINE */
+#define XK_colon 0x003a /* U+003A COLON */
+#define XK_semicolon 0x003b /* U+003B SEMICOLON */
+#define XK_less 0x003c /* U+003C LESS-THAN SIGN */
+#define XK_equal 0x003d /* U+003D EQUALS SIGN */
+#define XK_greater 0x003e /* U+003E GREATER-THAN SIGN */
+#define XK_question 0x003f /* U+003F QUESTION MARK */
+#define XK_at 0x0040 /* U+0040 COMMERCIAL AT */
+#define XK_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */
+#define XK_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */
+#define XK_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */
+#define XK_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */
+#define XK_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */
+#define XK_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */
+#define XK_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */
+#define XK_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */
+#define XK_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */
+#define XK_J 0x004a /* U+004A LATIN CAPITAL LETTER J */
+#define XK_K 0x004b /* U+004B LATIN CAPITAL LETTER K */
+#define XK_L 0x004c /* U+004C LATIN CAPITAL LETTER L */
+#define XK_M 0x004d /* U+004D LATIN CAPITAL LETTER M */
+#define XK_N 0x004e /* U+004E LATIN CAPITAL LETTER N */
+#define XK_O 0x004f /* U+004F LATIN CAPITAL LETTER O */
+#define XK_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */
+#define XK_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */
+#define XK_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */
+#define XK_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */
+#define XK_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */
+#define XK_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */
+#define XK_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */
+#define XK_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */
+#define XK_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */
+#define XK_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */
+#define XK_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */
+#define XK_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */
+#define XK_backslash 0x005c /* U+005C REVERSE SOLIDUS */
+#define XK_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */
+#define XK_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */
+#define XK_underscore 0x005f /* U+005F LOW LINE */
+#define XK_grave 0x0060 /* U+0060 GRAVE ACCENT */
+#define XK_quoteleft 0x0060 /* deprecated */
+#define XK_a 0x0061 /* U+0061 LATIN SMALL LETTER A */
+#define XK_b 0x0062 /* U+0062 LATIN SMALL LETTER B */
+#define XK_c 0x0063 /* U+0063 LATIN SMALL LETTER C */
+#define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
+#define XK_e 0x0065 /* U+0065 LATIN SMALL LETTER E */
+#define XK_f 0x0066 /* U+0066 LATIN SMALL LETTER F */
+#define XK_g 0x0067 /* U+0067 LATIN SMALL LETTER G */
+#define XK_h 0x0068 /* U+0068 LATIN SMALL LETTER H */
+#define XK_i 0x0069 /* U+0069 LATIN SMALL LETTER I */
+#define XK_j 0x006a /* U+006A LATIN SMALL LETTER J */
+#define XK_k 0x006b /* U+006B LATIN SMALL LETTER K */
+#define XK_l 0x006c /* U+006C LATIN SMALL LETTER L */
+#define XK_m 0x006d /* U+006D LATIN SMALL LETTER M */
+#define XK_n 0x006e /* U+006E LATIN SMALL LETTER N */
+#define XK_o 0x006f /* U+006F LATIN SMALL LETTER O */
+#define XK_p 0x0070 /* U+0070 LATIN SMALL LETTER P */
+#define XK_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */
+#define XK_r 0x0072 /* U+0072 LATIN SMALL LETTER R */
+#define XK_s 0x0073 /* U+0073 LATIN SMALL LETTER S */
+#define XK_t 0x0074 /* U+0074 LATIN SMALL LETTER T */
+#define XK_u 0x0075 /* U+0075 LATIN SMALL LETTER U */
+#define XK_v 0x0076 /* U+0076 LATIN SMALL LETTER V */
+#define XK_w 0x0077 /* U+0077 LATIN SMALL LETTER W */
+#define XK_x 0x0078 /* U+0078 LATIN SMALL LETTER X */
+#define XK_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */
+#define XK_z 0x007a /* U+007A LATIN SMALL LETTER Z */
+#define XK_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */
+#define XK_bar 0x007c /* U+007C VERTICAL LINE */
+#define XK_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */
+#define XK_asciitilde 0x007e /* U+007E TILDE */
+
+#define XK_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */
+#define XK_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */
+#define XK_cent 0x00a2 /* U+00A2 CENT SIGN */
+#define XK_sterling 0x00a3 /* U+00A3 POUND SIGN */
+#define XK_currency 0x00a4 /* U+00A4 CURRENCY SIGN */
+#define XK_yen 0x00a5 /* U+00A5 YEN SIGN */
+#define XK_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */
+#define XK_section 0x00a7 /* U+00A7 SECTION SIGN */
+#define XK_diaeresis 0x00a8 /* U+00A8 DIAERESIS */
+#define XK_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */
+#define XK_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */
+#define XK_guillemotleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XK_notsign 0x00ac /* U+00AC NOT SIGN */
+#define XK_hyphen 0x00ad /* U+00AD SOFT HYPHEN */
+#define XK_registered 0x00ae /* U+00AE REGISTERED SIGN */
+#define XK_macron 0x00af /* U+00AF MACRON */
+#define XK_degree 0x00b0 /* U+00B0 DEGREE SIGN */
+#define XK_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */
+#define XK_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */
+#define XK_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */
+#define XK_acute 0x00b4 /* U+00B4 ACUTE ACCENT */
+#define XK_mu 0x00b5 /* U+00B5 MICRO SIGN */
+#define XK_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */
+#define XK_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */
+#define XK_cedilla 0x00b8 /* U+00B8 CEDILLA */
+#define XK_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */
+#define XK_masculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */
+#define XK_guillemotright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XK_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */
+#define XK_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */
+#define XK_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */
+#define XK_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */
+#define XK_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */
+#define XK_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */
+#define XK_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
+#define XK_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */
+#define XK_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */
+#define XK_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */
+#define XK_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */
+#define XK_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */
+#define XK_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */
+#define XK_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
+#define XK_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
+#define XK_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */
+#define XK_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */
+#define XK_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */
+#define XK_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
+#define XK_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */
+#define XK_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */
+#define XK_Eth 0x00d0 /* deprecated */
+#define XK_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */
+#define XK_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */
+#define XK_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */
+#define XK_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
+#define XK_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */
+#define XK_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */
+#define XK_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */
+#define XK_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XK_Ooblique 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XK_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */
+#define XK_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */
+#define XK_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
+#define XK_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */
+#define XK_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */
+#define XK_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */
+#define XK_Thorn 0x00de /* deprecated */
+#define XK_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */
+#define XK_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */
+#define XK_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */
+#define XK_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */
+#define XK_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */
+#define XK_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */
+#define XK_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */
+#define XK_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */
+#define XK_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */
+#define XK_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */
+#define XK_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
+#define XK_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */
+#define XK_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */
+#define XK_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */
+#define XK_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */
+#define XK_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */
+#define XK_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */
+#define XK_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */
+#define XK_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */
+#define XK_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */
+#define XK_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */
+#define XK_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */
+#define XK_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */
+#define XK_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */
+#define XK_division 0x00f7 /* U+00F7 DIVISION SIGN */
+#define XK_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XK_ooblique 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XK_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */
+#define XK_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */
+#define XK_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */
+#define XK_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */
+#define XK_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */
+#define XK_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */
+#define XK_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
+#endif /* XK_LATIN1 */
+
+/*
+ * Latin 2
+ * Byte 3 = 1
+ */
+
+#ifdef XK_LATIN2
+#define XK_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */
+#define XK_breve 0x01a2 /* U+02D8 BREVE */
+#define XK_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
+#define XK_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */
+#define XK_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */
+#define XK_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */
+#define XK_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */
+#define XK_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */
+#define XK_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */
+#define XK_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */
+#define XK_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */
+#define XK_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */
+#define XK_ogonek 0x01b2 /* U+02DB OGONEK */
+#define XK_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */
+#define XK_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */
+#define XK_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */
+#define XK_caron 0x01b7 /* U+02C7 CARON */
+#define XK_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */
+#define XK_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */
+#define XK_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */
+#define XK_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */
+#define XK_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */
+#define XK_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */
+#define XK_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */
+#define XK_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */
+#define XK_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */
+#define XK_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */
+#define XK_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */
+#define XK_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */
+#define XK_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */
+#define XK_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */
+#define XK_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */
+#define XK_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */
+#define XK_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */
+#define XK_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */
+#define XK_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */
+#define XK_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */
+#define XK_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */
+#define XK_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */
+#define XK_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */
+#define XK_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */
+#define XK_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */
+#define XK_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */
+#define XK_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */
+#define XK_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */
+#define XK_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */
+#define XK_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */
+#define XK_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */
+#define XK_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */
+#define XK_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */
+#define XK_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */
+#define XK_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */
+#define XK_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */
+#define XK_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */
+#define XK_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */
+#define XK_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */
+#define XK_abovedot 0x01ff /* U+02D9 DOT ABOVE */
+#endif /* XK_LATIN2 */
+
+/*
+ * Latin 3
+ * Byte 3 = 2
+ */
+
+#ifdef XK_LATIN3
+#define XK_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */
+#define XK_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */
+#define XK_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */
+#define XK_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */
+#define XK_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */
+#define XK_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */
+#define XK_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */
+#define XK_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */
+#define XK_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */
+#define XK_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */
+#define XK_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */
+#define XK_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */
+#define XK_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */
+#define XK_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */
+#define XK_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */
+#define XK_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */
+#define XK_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */
+#define XK_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */
+#define XK_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */
+#define XK_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */
+#define XK_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */
+#define XK_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */
+#endif /* XK_LATIN3 */
+
+
+/*
+ * Latin 4
+ * Byte 3 = 3
+ */
+
+#ifdef XK_LATIN4
+#define XK_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */
+#define XK_kappa 0x03a2 /* deprecated */
+#define XK_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */
+#define XK_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */
+#define XK_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */
+#define XK_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */
+#define XK_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */
+#define XK_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */
+#define XK_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */
+#define XK_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */
+#define XK_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */
+#define XK_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */
+#define XK_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */
+#define XK_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */
+#define XK_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */
+#define XK_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */
+#define XK_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */
+#define XK_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */
+#define XK_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */
+#define XK_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */
+#define XK_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */
+#define XK_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */
+#define XK_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */
+#define XK_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */
+#define XK_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */
+#define XK_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */
+#define XK_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */
+#define XK_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */
+#define XK_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */
+#define XK_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */
+#define XK_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */
+#define XK_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */
+#define XK_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */
+#define XK_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */
+#define XK_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */
+#define XK_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */
+#endif /* XK_LATIN4 */
+
+/*
+ * Latin 8
+ */
+#ifdef XK_LATIN8
+#define XK_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
+#define XK_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */
+#define XK_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
+#define XK_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */
+#define XK_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */
+#define XK_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */
+#define XK_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */
+#define XK_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */
+#define XK_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */
+#define XK_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */
+#define XK_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */
+#define XK_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */
+#define XK_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */
+#define XK_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */
+#define XK_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */
+#define XK_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */
+#define XK_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */
+#define XK_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */
+#define XK_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */
+#define XK_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */
+#define XK_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */
+#define XK_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */
+#define XK_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */
+#define XK_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */
+#define XK_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */
+#define XK_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */
+#endif /* XK_LATIN8 */
+
+/*
+ * Latin 9
+ * Byte 3 = 0x13
+ */
+
+#ifdef XK_LATIN9
+#define XK_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */
+#define XK_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */
+#define XK_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */
+#endif /* XK_LATIN9 */
+
+/*
+ * Katakana
+ * Byte 3 = 4
+ */
+
+#ifdef XK_KATAKANA
+#define XK_overline 0x047e /* U+203E OVERLINE */
+#define XK_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */
+#define XK_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */
+#define XK_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */
+#define XK_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */
+#define XK_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */
+#define XK_kana_middledot 0x04a5 /* deprecated */
+#define XK_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */
+#define XK_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */
+#define XK_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */
+#define XK_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */
+#define XK_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */
+#define XK_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */
+#define XK_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */
+#define XK_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */
+#define XK_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */
+#define XK_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */
+#define XK_kana_tu 0x04af /* deprecated */
+#define XK_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */
+#define XK_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */
+#define XK_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */
+#define XK_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */
+#define XK_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */
+#define XK_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */
+#define XK_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */
+#define XK_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */
+#define XK_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */
+#define XK_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */
+#define XK_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */
+#define XK_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */
+#define XK_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */
+#define XK_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */
+#define XK_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */
+#define XK_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */
+#define XK_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */
+#define XK_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */
+#define XK_kana_TI 0x04c1 /* deprecated */
+#define XK_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */
+#define XK_kana_TU 0x04c2 /* deprecated */
+#define XK_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */
+#define XK_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */
+#define XK_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */
+#define XK_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */
+#define XK_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */
+#define XK_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */
+#define XK_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */
+#define XK_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */
+#define XK_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */
+#define XK_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */
+#define XK_kana_HU 0x04cc /* deprecated */
+#define XK_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */
+#define XK_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */
+#define XK_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */
+#define XK_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */
+#define XK_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */
+#define XK_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */
+#define XK_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */
+#define XK_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */
+#define XK_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */
+#define XK_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */
+#define XK_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */
+#define XK_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */
+#define XK_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */
+#define XK_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */
+#define XK_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */
+#define XK_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */
+#define XK_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */
+#define XK_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */
+#define XK_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
+#define XK_kana_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_KATAKANA */
+
+/*
+ * Arabic
+ * Byte 3 = 5
+ */
+
+#ifdef XK_ARABIC
+#define XK_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */
+#define XK_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */
+#define XK_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */
+#define XK_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */
+#define XK_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */
+#define XK_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */
+#define XK_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */
+#define XK_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */
+#define XK_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */
+#define XK_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */
+#define XK_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */
+#define XK_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */
+#define XK_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */
+#define XK_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */
+#define XK_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */
+#define XK_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */
+#define XK_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */
+#define XK_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */
+#define XK_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */
+#define XK_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */
+#define XK_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */
+#define XK_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */
+#define XK_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */
+#define XK_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */
+#define XK_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */
+#define XK_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */
+#define XK_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */
+#define XK_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */
+#define XK_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */
+#define XK_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */
+#define XK_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */
+#define XK_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */
+#define XK_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */
+#define XK_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */
+#define XK_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */
+#define XK_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */
+#define XK_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */
+#define XK_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */
+#define XK_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */
+#define XK_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */
+#define XK_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */
+#define XK_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */
+#define XK_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */
+#define XK_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */
+#define XK_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */
+#define XK_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */
+#define XK_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */
+#define XK_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */
+#define XK_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */
+#define XK_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */
+#define XK_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */
+#define XK_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */
+#define XK_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */
+#define XK_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */
+#define XK_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */
+#define XK_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */
+#define XK_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */
+#define XK_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */
+#define XK_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */
+#define XK_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */
+#define XK_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */
+#define XK_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */
+#define XK_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */
+#define XK_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */
+#define XK_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */
+#define XK_Arabic_heh 0x05e7 /* deprecated */
+#define XK_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */
+#define XK_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */
+#define XK_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */
+#define XK_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */
+#define XK_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */
+#define XK_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */
+#define XK_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */
+#define XK_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */
+#define XK_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */
+#define XK_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */
+#define XK_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */
+#define XK_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */
+#define XK_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */
+#define XK_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */
+#define XK_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */
+#define XK_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */
+#define XK_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */
+#define XK_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */
+#define XK_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */
+#define XK_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */
+#define XK_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XK_Arabic_farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XK_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */
+#define XK_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */
+#define XK_Arabic_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_ARABIC */
+
+/*
+ * Cyrillic
+ * Byte 3 = 6
+ */
+#ifdef XK_CYRILLIC
+#define XK_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */
+#define XK_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */
+#define XK_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */
+#define XK_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */
+#define XK_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */
+#define XK_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */
+#define XK_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */
+#define XK_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */
+#define XK_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */
+#define XK_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */
+#define XK_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */
+#define XK_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */
+#define XK_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */
+#define XK_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */
+#define XK_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */
+#define XK_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */
+#define XK_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */
+#define XK_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */
+#define XK_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */
+#define XK_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */
+#define XK_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */
+#define XK_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */
+
+#define XK_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */
+#define XK_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */
+#define XK_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */
+#define XK_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */
+#define XK_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */
+#define XK_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */
+#define XK_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */
+#define XK_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */
+
+#define XK_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */
+#define XK_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */
+#define XK_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */
+#define XK_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */
+#define XK_Ukranian_je 0x06a4 /* deprecated */
+#define XK_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */
+#define XK_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XK_Ukranian_i 0x06a6 /* deprecated */
+#define XK_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */
+#define XK_Ukranian_yi 0x06a7 /* deprecated */
+#define XK_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */
+#define XK_Serbian_je 0x06a8 /* deprecated */
+#define XK_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */
+#define XK_Serbian_lje 0x06a9 /* deprecated */
+#define XK_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */
+#define XK_Serbian_nje 0x06aa /* deprecated */
+#define XK_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */
+#define XK_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */
+#define XK_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */
+#define XK_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */
+#define XK_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */
+#define XK_Serbian_dze 0x06af /* deprecated */
+#define XK_numerosign 0x06b0 /* U+2116 NUMERO SIGN */
+#define XK_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */
+#define XK_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */
+#define XK_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */
+#define XK_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */
+#define XK_Ukranian_JE 0x06b4 /* deprecated */
+#define XK_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */
+#define XK_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XK_Ukranian_I 0x06b6 /* deprecated */
+#define XK_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */
+#define XK_Ukranian_YI 0x06b7 /* deprecated */
+#define XK_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */
+#define XK_Serbian_JE 0x06b8 /* deprecated */
+#define XK_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */
+#define XK_Serbian_LJE 0x06b9 /* deprecated */
+#define XK_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */
+#define XK_Serbian_NJE 0x06ba /* deprecated */
+#define XK_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */
+#define XK_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */
+#define XK_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
+#define XK_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */
+#define XK_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */
+#define XK_Serbian_DZE 0x06bf /* deprecated */
+#define XK_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */
+#define XK_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */
+#define XK_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */
+#define XK_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */
+#define XK_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */
+#define XK_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */
+#define XK_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */
+#define XK_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */
+#define XK_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */
+#define XK_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */
+#define XK_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */
+#define XK_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */
+#define XK_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */
+#define XK_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */
+#define XK_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */
+#define XK_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */
+#define XK_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */
+#define XK_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */
+#define XK_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */
+#define XK_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */
+#define XK_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */
+#define XK_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */
+#define XK_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */
+#define XK_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */
+#define XK_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */
+#define XK_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */
+#define XK_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */
+#define XK_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */
+#define XK_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */
+#define XK_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */
+#define XK_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */
+#define XK_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */
+#define XK_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */
+#define XK_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */
+#define XK_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */
+#define XK_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */
+#define XK_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */
+#define XK_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */
+#define XK_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */
+#define XK_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */
+#define XK_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */
+#define XK_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */
+#define XK_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */
+#define XK_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */
+#define XK_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */
+#define XK_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */
+#define XK_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */
+#define XK_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */
+#define XK_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */
+#define XK_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */
+#define XK_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */
+#define XK_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */
+#define XK_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */
+#define XK_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */
+#define XK_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */
+#define XK_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */
+#define XK_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */
+#define XK_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */
+#define XK_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */
+#define XK_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */
+#define XK_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */
+#define XK_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */
+#define XK_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */
+#define XK_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */
+#endif /* XK_CYRILLIC */
+
+/*
+ * Greek
+ * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7)
+ * Byte 3 = 7
+ */
+
+#ifdef XK_GREEK
+#define XK_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */
+#define XK_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */
+#define XK_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */
+#define XK_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */
+#define XK_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */
+#define XK_Greek_IOTAdiaeresis 0x07a5 /* old typo */
+#define XK_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */
+#define XK_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */
+#define XK_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */
+#define XK_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */
+#define XK_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */
+#define XK_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */
+#define XK_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */
+#define XK_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */
+#define XK_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */
+#define XK_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */
+#define XK_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */
+#define XK_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */
+#define XK_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */
+#define XK_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */
+#define XK_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */
+#define XK_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */
+#define XK_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */
+#define XK_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */
+#define XK_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */
+#define XK_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */
+#define XK_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */
+#define XK_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */
+#define XK_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */
+#define XK_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */
+#define XK_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */
+#define XK_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */
+#define XK_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */
+#define XK_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XK_Greek_LAMBDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XK_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */
+#define XK_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */
+#define XK_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */
+#define XK_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */
+#define XK_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */
+#define XK_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */
+#define XK_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */
+#define XK_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */
+#define XK_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */
+#define XK_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */
+#define XK_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */
+#define XK_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */
+#define XK_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */
+#define XK_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */
+#define XK_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */
+#define XK_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */
+#define XK_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */
+#define XK_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */
+#define XK_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */
+#define XK_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */
+#define XK_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */
+#define XK_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */
+#define XK_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */
+#define XK_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XK_Greek_lambda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XK_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */
+#define XK_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */
+#define XK_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */
+#define XK_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */
+#define XK_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */
+#define XK_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */
+#define XK_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */
+#define XK_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */
+#define XK_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */
+#define XK_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */
+#define XK_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */
+#define XK_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */
+#define XK_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */
+#define XK_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */
+#define XK_Greek_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_GREEK */
+
+/*
+ * Technical
+ * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html)
+ * Byte 3 = 8
+ */
+
+#ifdef XK_TECHNICAL
+#define XK_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */
+#define XK_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/
+#define XK_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/
+#define XK_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */
+#define XK_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */
+#define XK_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/
+#define XK_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */
+#define XK_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */
+#define XK_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */
+#define XK_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */
+#define XK_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */
+#define XK_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */
+#define XK_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */
+#define XK_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */
+#define XK_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */
+#define XK_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */
+#define XK_topleftsummation 0x08b1
+#define XK_botleftsummation 0x08b2
+#define XK_topvertsummationconnector 0x08b3
+#define XK_botvertsummationconnector 0x08b4
+#define XK_toprightsummation 0x08b5
+#define XK_botrightsummation 0x08b6
+#define XK_rightmiddlesummation 0x08b7
+#define XK_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */
+#define XK_notequal 0x08bd /* U+2260 NOT EQUAL TO */
+#define XK_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */
+#define XK_integral 0x08bf /* U+222B INTEGRAL */
+#define XK_therefore 0x08c0 /* U+2234 THEREFORE */
+#define XK_variation 0x08c1 /* U+221D PROPORTIONAL TO */
+#define XK_infinity 0x08c2 /* U+221E INFINITY */
+#define XK_nabla 0x08c5 /* U+2207 NABLA */
+#define XK_approximate 0x08c8 /* U+223C TILDE OPERATOR */
+#define XK_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */
+#define XK_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */
+#define XK_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */
+#define XK_identical 0x08cf /* U+2261 IDENTICAL TO */
+#define XK_radical 0x08d6 /* U+221A SQUARE ROOT */
+#define XK_includedin 0x08da /* U+2282 SUBSET OF */
+#define XK_includes 0x08db /* U+2283 SUPERSET OF */
+#define XK_intersection 0x08dc /* U+2229 INTERSECTION */
+#define XK_union 0x08dd /* U+222A UNION */
+#define XK_logicaland 0x08de /* U+2227 LOGICAL AND */
+#define XK_logicalor 0x08df /* U+2228 LOGICAL OR */
+#define XK_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */
+#define XK_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */
+#define XK_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */
+#define XK_uparrow 0x08fc /* U+2191 UPWARDS ARROW */
+#define XK_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */
+#define XK_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */
+#endif /* XK_TECHNICAL */
+
+/*
+ * Special
+ * (from the DEC VT100 Special Graphics Character Set)
+ * Byte 3 = 9
+ */
+
+#ifdef XK_SPECIAL
+#define XK_blank 0x09df
+#define XK_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */
+#define XK_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */
+#define XK_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */
+#define XK_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */
+#define XK_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */
+#define XK_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */
+#define XK_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */
+#define XK_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */
+#define XK_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */
+#define XK_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */
+#define XK_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */
+#define XK_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */
+#define XK_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */
+#define XK_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */
+#define XK_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */
+#define XK_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */
+#define XK_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */
+#define XK_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */
+#define XK_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
+#define XK_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */
+#define XK_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */
+#define XK_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */
+#define XK_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */
+#endif /* XK_SPECIAL */
+
+/*
+ * Publishing
+ * (these are probably from a long forgotten DEC Publishing
+ * font that once shipped with DECwrite)
+ * Byte 3 = 0x0a
+ */
+
+#ifdef XK_PUBLISHING
+#define XK_emspace 0x0aa1 /* U+2003 EM SPACE */
+#define XK_enspace 0x0aa2 /* U+2002 EN SPACE */
+#define XK_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */
+#define XK_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */
+#define XK_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */
+#define XK_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */
+#define XK_thinspace 0x0aa7 /* U+2009 THIN SPACE */
+#define XK_hairspace 0x0aa8 /* U+200A HAIR SPACE */
+#define XK_emdash 0x0aa9 /* U+2014 EM DASH */
+#define XK_endash 0x0aaa /* U+2013 EN DASH */
+#define XK_signifblank 0x0aac /*(U+2423 OPEN BOX)*/
+#define XK_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */
+#define XK_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */
+#define XK_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */
+#define XK_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */
+#define XK_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */
+#define XK_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */
+#define XK_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */
+#define XK_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */
+#define XK_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */
+#define XK_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */
+#define XK_careof 0x0ab8 /* U+2105 CARE OF */
+#define XK_figdash 0x0abb /* U+2012 FIGURE DASH */
+#define XK_leftanglebracket 0x0abc /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/
+#define XK_decimalpoint 0x0abd /*(U+002E FULL STOP)*/
+#define XK_rightanglebracket 0x0abe /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/
+#define XK_marker 0x0abf
+#define XK_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */
+#define XK_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */
+#define XK_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */
+#define XK_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */
+#define XK_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */
+#define XK_signaturemark 0x0aca /*(U+2613 SALTIRE)*/
+#define XK_trademarkincircle 0x0acb
+#define XK_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/
+#define XK_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/
+#define XK_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/
+#define XK_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/
+#define XK_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */
+#define XK_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */
+#define XK_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */
+#define XK_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */
+#define XK_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */
+#define XK_permille 0x0ad5 /* U+2030 PER MILLE SIGN */
+#define XK_minutes 0x0ad6 /* U+2032 PRIME */
+#define XK_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */
+#define XK_latincross 0x0ad9 /* U+271D LATIN CROSS */
+#define XK_hexagram 0x0ada
+#define XK_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/
+#define XK_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/
+#define XK_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/
+#define XK_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/
+#define XK_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/
+#define XK_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/
+#define XK_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/
+#define XK_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/
+#define XK_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/
+#define XK_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/
+#define XK_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/
+#define XK_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/
+#define XK_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/
+#define XK_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/
+#define XK_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/
+#define XK_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/
+#define XK_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/
+#define XK_club 0x0aec /* U+2663 BLACK CLUB SUIT */
+#define XK_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */
+#define XK_heart 0x0aee /* U+2665 BLACK HEART SUIT */
+#define XK_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */
+#define XK_dagger 0x0af1 /* U+2020 DAGGER */
+#define XK_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */
+#define XK_checkmark 0x0af3 /* U+2713 CHECK MARK */
+#define XK_ballotcross 0x0af4 /* U+2717 BALLOT X */
+#define XK_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */
+#define XK_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */
+#define XK_malesymbol 0x0af7 /* U+2642 MALE SIGN */
+#define XK_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */
+#define XK_telephone 0x0af9 /* U+260E BLACK TELEPHONE */
+#define XK_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */
+#define XK_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */
+#define XK_caret 0x0afc /* U+2038 CARET */
+#define XK_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */
+#define XK_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */
+#define XK_cursor 0x0aff
+#endif /* XK_PUBLISHING */
+
+/*
+ * APL
+ * Byte 3 = 0x0b
+ */
+
+#ifdef XK_APL
+#define XK_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/
+#define XK_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/
+#define XK_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/
+#define XK_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/
+#define XK_overbar 0x0bc0 /*(U+00AF MACRON)*/
+#define XK_downtack 0x0bc2 /* U+22A4 DOWN TACK */
+#define XK_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/
+#define XK_downstile 0x0bc4 /* U+230A LEFT FLOOR */
+#define XK_underbar 0x0bc6 /*(U+005F LOW LINE)*/
+#define XK_jot 0x0bca /* U+2218 RING OPERATOR */
+#define XK_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */
+#define XK_uptack 0x0bce /* U+22A5 UP TACK */
+#define XK_circle 0x0bcf /* U+25CB WHITE CIRCLE */
+#define XK_upstile 0x0bd3 /* U+2308 LEFT CEILING */
+#define XK_downshoe 0x0bd6 /*(U+222A UNION)*/
+#define XK_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/
+#define XK_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/
+#define XK_lefttack 0x0bdc /* U+22A3 LEFT TACK */
+#define XK_righttack 0x0bfc /* U+22A2 RIGHT TACK */
+#endif /* XK_APL */
+
+/*
+ * Hebrew
+ * Byte 3 = 0x0c
+ */
+
+#ifdef XK_HEBREW
+#define XK_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */
+#define XK_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */
+#define XK_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */
+#define XK_hebrew_beth 0x0ce1 /* deprecated */
+#define XK_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */
+#define XK_hebrew_gimmel 0x0ce2 /* deprecated */
+#define XK_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */
+#define XK_hebrew_daleth 0x0ce3 /* deprecated */
+#define XK_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */
+#define XK_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */
+#define XK_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */
+#define XK_hebrew_zayin 0x0ce6 /* deprecated */
+#define XK_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */
+#define XK_hebrew_het 0x0ce7 /* deprecated */
+#define XK_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */
+#define XK_hebrew_teth 0x0ce8 /* deprecated */
+#define XK_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */
+#define XK_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */
+#define XK_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */
+#define XK_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */
+#define XK_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */
+#define XK_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */
+#define XK_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */
+#define XK_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */
+#define XK_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */
+#define XK_hebrew_samekh 0x0cf1 /* deprecated */
+#define XK_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */
+#define XK_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */
+#define XK_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */
+#define XK_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */
+#define XK_hebrew_finalzadi 0x0cf5 /* deprecated */
+#define XK_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */
+#define XK_hebrew_zadi 0x0cf6 /* deprecated */
+#define XK_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */
+#define XK_hebrew_kuf 0x0cf7 /* deprecated */
+#define XK_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */
+#define XK_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */
+#define XK_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */
+#define XK_hebrew_taf 0x0cfa /* deprecated */
+#define XK_Hebrew_switch 0xff7e /* Alias for mode_switch */
+#endif /* XK_HEBREW */
+
+/*
+ * Thai
+ * Byte 3 = 0x0d
+ */
+
+#ifdef XK_THAI
+#define XK_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */
+#define XK_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */
+#define XK_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */
+#define XK_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */
+#define XK_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */
+#define XK_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */
+#define XK_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */
+#define XK_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */
+#define XK_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */
+#define XK_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */
+#define XK_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */
+#define XK_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */
+#define XK_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */
+#define XK_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */
+#define XK_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */
+#define XK_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */
+#define XK_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */
+#define XK_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */
+#define XK_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */
+#define XK_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */
+#define XK_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */
+#define XK_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */
+#define XK_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */
+#define XK_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */
+#define XK_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */
+#define XK_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */
+#define XK_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */
+#define XK_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */
+#define XK_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */
+#define XK_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */
+#define XK_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */
+#define XK_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */
+#define XK_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */
+#define XK_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */
+#define XK_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */
+#define XK_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */
+#define XK_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */
+#define XK_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */
+#define XK_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */
+#define XK_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */
+#define XK_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */
+#define XK_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */
+#define XK_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */
+#define XK_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */
+#define XK_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */
+#define XK_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */
+#define XK_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */
+#define XK_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */
+#define XK_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */
+#define XK_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */
+#define XK_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */
+#define XK_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */
+#define XK_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */
+#define XK_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */
+#define XK_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */
+#define XK_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */
+#define XK_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */
+#define XK_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */
+#define XK_Thai_maihanakat_maitho 0x0dde
+#define XK_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */
+#define XK_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */
+#define XK_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */
+#define XK_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */
+#define XK_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */
+#define XK_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */
+#define XK_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */
+#define XK_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */
+#define XK_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */
+#define XK_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */
+#define XK_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */
+#define XK_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */
+#define XK_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */
+#define XK_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */
+#define XK_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */
+#define XK_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */
+#define XK_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */
+#define XK_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */
+#define XK_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */
+#define XK_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */
+#define XK_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */
+#define XK_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */
+#define XK_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */
+#define XK_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */
+#define XK_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */
+#endif /* XK_THAI */
+
+/*
+ * Korean
+ * Byte 3 = 0x0e
+ */
+
+#ifdef XK_KOREAN
+
+#define XK_Hangul 0xff31 /* Hangul start/stop(toggle) */
+#define XK_Hangul_Start 0xff32 /* Hangul start */
+#define XK_Hangul_End 0xff33 /* Hangul end, English start */
+#define XK_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */
+#define XK_Hangul_Jamo 0xff35 /* Hangul Jamo mode */
+#define XK_Hangul_Romaja 0xff36 /* Hangul Romaja mode */
+#define XK_Hangul_Codeinput 0xff37 /* Hangul code input mode */
+#define XK_Hangul_Jeonja 0xff38 /* Jeonja mode */
+#define XK_Hangul_Banja 0xff39 /* Banja mode */
+#define XK_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */
+#define XK_Hangul_PostHanja 0xff3b /* Post Hanja conversion */
+#define XK_Hangul_SingleCandidate 0xff3c /* Single candidate */
+#define XK_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */
+#define XK_Hangul_PreviousCandidate 0xff3e /* Previous candidate */
+#define XK_Hangul_Special 0xff3f /* Special symbols */
+#define XK_Hangul_switch 0xff7e /* Alias for mode_switch */
+
+/* Hangul Consonant Characters */
+#define XK_Hangul_Kiyeog 0x0ea1
+#define XK_Hangul_SsangKiyeog 0x0ea2
+#define XK_Hangul_KiyeogSios 0x0ea3
+#define XK_Hangul_Nieun 0x0ea4
+#define XK_Hangul_NieunJieuj 0x0ea5
+#define XK_Hangul_NieunHieuh 0x0ea6
+#define XK_Hangul_Dikeud 0x0ea7
+#define XK_Hangul_SsangDikeud 0x0ea8
+#define XK_Hangul_Rieul 0x0ea9
+#define XK_Hangul_RieulKiyeog 0x0eaa
+#define XK_Hangul_RieulMieum 0x0eab
+#define XK_Hangul_RieulPieub 0x0eac
+#define XK_Hangul_RieulSios 0x0ead
+#define XK_Hangul_RieulTieut 0x0eae
+#define XK_Hangul_RieulPhieuf 0x0eaf
+#define XK_Hangul_RieulHieuh 0x0eb0
+#define XK_Hangul_Mieum 0x0eb1
+#define XK_Hangul_Pieub 0x0eb2
+#define XK_Hangul_SsangPieub 0x0eb3
+#define XK_Hangul_PieubSios 0x0eb4
+#define XK_Hangul_Sios 0x0eb5
+#define XK_Hangul_SsangSios 0x0eb6
+#define XK_Hangul_Ieung 0x0eb7
+#define XK_Hangul_Jieuj 0x0eb8
+#define XK_Hangul_SsangJieuj 0x0eb9
+#define XK_Hangul_Cieuc 0x0eba
+#define XK_Hangul_Khieuq 0x0ebb
+#define XK_Hangul_Tieut 0x0ebc
+#define XK_Hangul_Phieuf 0x0ebd
+#define XK_Hangul_Hieuh 0x0ebe
+
+/* Hangul Vowel Characters */
+#define XK_Hangul_A 0x0ebf
+#define XK_Hangul_AE 0x0ec0
+#define XK_Hangul_YA 0x0ec1
+#define XK_Hangul_YAE 0x0ec2
+#define XK_Hangul_EO 0x0ec3
+#define XK_Hangul_E 0x0ec4
+#define XK_Hangul_YEO 0x0ec5
+#define XK_Hangul_YE 0x0ec6
+#define XK_Hangul_O 0x0ec7
+#define XK_Hangul_WA 0x0ec8
+#define XK_Hangul_WAE 0x0ec9
+#define XK_Hangul_OE 0x0eca
+#define XK_Hangul_YO 0x0ecb
+#define XK_Hangul_U 0x0ecc
+#define XK_Hangul_WEO 0x0ecd
+#define XK_Hangul_WE 0x0ece
+#define XK_Hangul_WI 0x0ecf
+#define XK_Hangul_YU 0x0ed0
+#define XK_Hangul_EU 0x0ed1
+#define XK_Hangul_YI 0x0ed2
+#define XK_Hangul_I 0x0ed3
+
+/* Hangul syllable-final (JongSeong) Characters */
+#define XK_Hangul_J_Kiyeog 0x0ed4
+#define XK_Hangul_J_SsangKiyeog 0x0ed5
+#define XK_Hangul_J_KiyeogSios 0x0ed6
+#define XK_Hangul_J_Nieun 0x0ed7
+#define XK_Hangul_J_NieunJieuj 0x0ed8
+#define XK_Hangul_J_NieunHieuh 0x0ed9
+#define XK_Hangul_J_Dikeud 0x0eda
+#define XK_Hangul_J_Rieul 0x0edb
+#define XK_Hangul_J_RieulKiyeog 0x0edc
+#define XK_Hangul_J_RieulMieum 0x0edd
+#define XK_Hangul_J_RieulPieub 0x0ede
+#define XK_Hangul_J_RieulSios 0x0edf
+#define XK_Hangul_J_RieulTieut 0x0ee0
+#define XK_Hangul_J_RieulPhieuf 0x0ee1
+#define XK_Hangul_J_RieulHieuh 0x0ee2
+#define XK_Hangul_J_Mieum 0x0ee3
+#define XK_Hangul_J_Pieub 0x0ee4
+#define XK_Hangul_J_PieubSios 0x0ee5
+#define XK_Hangul_J_Sios 0x0ee6
+#define XK_Hangul_J_SsangSios 0x0ee7
+#define XK_Hangul_J_Ieung 0x0ee8
+#define XK_Hangul_J_Jieuj 0x0ee9
+#define XK_Hangul_J_Cieuc 0x0eea
+#define XK_Hangul_J_Khieuq 0x0eeb
+#define XK_Hangul_J_Tieut 0x0eec
+#define XK_Hangul_J_Phieuf 0x0eed
+#define XK_Hangul_J_Hieuh 0x0eee
+
+/* Ancient Hangul Consonant Characters */
+#define XK_Hangul_RieulYeorinHieuh 0x0eef
+#define XK_Hangul_SunkyeongeumMieum 0x0ef0
+#define XK_Hangul_SunkyeongeumPieub 0x0ef1
+#define XK_Hangul_PanSios 0x0ef2
+#define XK_Hangul_KkogjiDalrinIeung 0x0ef3
+#define XK_Hangul_SunkyeongeumPhieuf 0x0ef4
+#define XK_Hangul_YeorinHieuh 0x0ef5
+
+/* Ancient Hangul Vowel Characters */
+#define XK_Hangul_AraeA 0x0ef6
+#define XK_Hangul_AraeAE 0x0ef7
+
+/* Ancient Hangul syllable-final (JongSeong) Characters */
+#define XK_Hangul_J_PanSios 0x0ef8
+#define XK_Hangul_J_KkogjiDalrinIeung 0x0ef9
+#define XK_Hangul_J_YeorinHieuh 0x0efa
+
+/* Korean currency symbol */
+#define XK_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/
+
+#endif /* XK_KOREAN */
+
+/*
+ * Armenian
+ */
+
+#ifdef XK_ARMENIAN
+#define XK_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */
+#define XK_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XK_Armenian_verjaket 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XK_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */
+#define XK_Armenian_but 0x100055d /* U+055D ARMENIAN COMMA */
+#define XK_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XK_Armenian_yentamna 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XK_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XK_Armenian_amanak 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XK_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XK_Armenian_shesht 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XK_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XK_Armenian_paruyk 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XK_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */
+#define XK_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */
+#define XK_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */
+#define XK_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */
+#define XK_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */
+#define XK_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */
+#define XK_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */
+#define XK_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */
+#define XK_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */
+#define XK_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */
+#define XK_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */
+#define XK_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */
+#define XK_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */
+#define XK_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */
+#define XK_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */
+#define XK_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */
+#define XK_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */
+#define XK_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */
+#define XK_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */
+#define XK_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */
+#define XK_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */
+#define XK_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */
+#define XK_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */
+#define XK_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */
+#define XK_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */
+#define XK_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */
+#define XK_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */
+#define XK_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */
+#define XK_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */
+#define XK_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */
+#define XK_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */
+#define XK_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */
+#define XK_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */
+#define XK_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */
+#define XK_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */
+#define XK_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */
+#define XK_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */
+#define XK_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */
+#define XK_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */
+#define XK_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */
+#define XK_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */
+#define XK_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */
+#define XK_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */
+#define XK_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */
+#define XK_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */
+#define XK_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */
+#define XK_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */
+#define XK_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */
+#define XK_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */
+#define XK_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */
+#define XK_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */
+#define XK_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */
+#define XK_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */
+#define XK_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */
+#define XK_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */
+#define XK_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */
+#define XK_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */
+#define XK_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */
+#define XK_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */
+#define XK_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */
+#define XK_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */
+#define XK_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */
+#define XK_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */
+#define XK_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */
+#define XK_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */
+#define XK_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */
+#define XK_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */
+#define XK_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */
+#define XK_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */
+#define XK_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */
+#define XK_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */
+#define XK_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */
+#define XK_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */
+#define XK_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */
+#define XK_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */
+#define XK_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */
+#define XK_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */
+#endif /* XK_ARMENIAN */
+
+/*
+ * Georgian
+ */
+
+#ifdef XK_GEORGIAN
+#define XK_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */
+#define XK_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */
+#define XK_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */
+#define XK_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */
+#define XK_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */
+#define XK_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */
+#define XK_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */
+#define XK_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */
+#define XK_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */
+#define XK_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */
+#define XK_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */
+#define XK_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */
+#define XK_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */
+#define XK_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */
+#define XK_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */
+#define XK_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */
+#define XK_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */
+#define XK_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */
+#define XK_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */
+#define XK_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */
+#define XK_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */
+#define XK_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */
+#define XK_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */
+#define XK_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */
+#define XK_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */
+#define XK_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */
+#define XK_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */
+#define XK_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */
+#define XK_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */
+#define XK_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */
+#define XK_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */
+#define XK_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */
+#define XK_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */
+#define XK_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */
+#define XK_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */
+#define XK_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */
+#define XK_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */
+#define XK_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */
+#define XK_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */
+#endif /* XK_GEORGIAN */
+
+/*
+ * Azeri (and other Turkic or Caucasian languages)
+ */
+
+#ifdef XK_CAUCASUS
+/* latin */
+#define XK_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */
+#define XK_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */
+#define XK_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */
+#define XK_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */
+#define XK_Ocaron 0x10001d1 /* U+01D2 LATIN CAPITAL LETTER O WITH CARON */
+#define XK_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */
+#define XK_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */
+#define XK_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */
+#define XK_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */
+#define XK_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */
+#define XK_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */
+#define XK_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */
+#define XK_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */
+#define XK_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */
+#define XK_EZH 0x10001b7 /* U+01B7 LATIN CAPITAL LETTER EZH */
+#define XK_ezh 0x1000292 /* U+0292 LATIN SMALL LETTER EZH */
+/* those are not really Caucasus */
+/* For Inupiak */
+#define XK_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */
+#define XK_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */
+#endif /* XK_CAUCASUS */
+
+/*
+ * Vietnamese
+ */
+
+#ifdef XK_VIETNAMESE
+#define XK_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */
+#define XK_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */
+#define XK_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */
+#define XK_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */
+#define XK_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XK_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XK_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XK_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XK_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XK_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XK_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */
+#define XK_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */
+#define XK_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */
+#define XK_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */
+#define XK_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XK_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XK_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */
+#define XK_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */
+#define XK_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */
+#define XK_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */
+#define XK_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */
+#define XK_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */
+#define XK_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */
+#define XK_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */
+#define XK_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */
+#define XK_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */
+#define XK_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XK_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XK_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XK_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XK_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XK_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XK_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */
+#define XK_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */
+#define XK_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */
+#define XK_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */
+#define XK_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */
+#define XK_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */
+#define XK_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */
+#define XK_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */
+#define XK_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XK_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XK_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XK_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XK_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XK_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XK_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */
+#define XK_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */
+#define XK_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */
+#define XK_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */
+#define XK_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */
+#define XK_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */
+#define XK_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */
+#define XK_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */
+#define XK_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */
+#define XK_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */
+#define XK_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */
+#define XK_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */
+#define XK_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */
+#define XK_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */
+#define XK_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */
+#define XK_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */
+#define XK_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */
+#define XK_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */
+#define XK_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */
+#define XK_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */
+#define XK_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */
+#define XK_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */
+#define XK_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */
+#define XK_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */
+#define XK_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */
+#define XK_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */
+#define XK_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */
+#define XK_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */
+#define XK_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */
+#define XK_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */
+#define XK_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */
+#define XK_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */
+#define XK_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */
+#define XK_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */
+
+#endif /* XK_VIETNAMESE */
+
+#ifdef XK_CURRENCY
+#define XK_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */
+#define XK_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */
+#define XK_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */
+#define XK_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */
+#define XK_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */
+#define XK_MillSign 0x10020a5 /* U+20A5 MILL SIGN */
+#define XK_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */
+#define XK_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */
+#define XK_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */
+#define XK_WonSign 0x10020a9 /* U+20A9 WON SIGN */
+#define XK_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */
+#define XK_DongSign 0x10020ab /* U+20AB DONG SIGN */
+#define XK_EuroSign 0x20ac /* U+20AC EURO SIGN */
+#endif /* XK_CURRENCY */
+
+#ifdef XK_MATHEMATICAL
+/* one, two and three are defined above. */
+#define XK_zerosuperior 0x1002070 /* U+2070 SUPERSCRIPT ZERO */
+#define XK_foursuperior 0x1002074 /* U+2074 SUPERSCRIPT FOUR */
+#define XK_fivesuperior 0x1002075 /* U+2075 SUPERSCRIPT FIVE */
+#define XK_sixsuperior 0x1002076 /* U+2076 SUPERSCRIPT SIX */
+#define XK_sevensuperior 0x1002077 /* U+2077 SUPERSCRIPT SEVEN */
+#define XK_eightsuperior 0x1002078 /* U+2078 SUPERSCRIPT EIGHT */
+#define XK_ninesuperior 0x1002079 /* U+2079 SUPERSCRIPT NINE */
+#define XK_zerosubscript 0x1002080 /* U+2080 SUBSCRIPT ZERO */
+#define XK_onesubscript 0x1002081 /* U+2081 SUBSCRIPT ONE */
+#define XK_twosubscript 0x1002082 /* U+2082 SUBSCRIPT TWO */
+#define XK_threesubscript 0x1002083 /* U+2083 SUBSCRIPT THREE */
+#define XK_foursubscript 0x1002084 /* U+2084 SUBSCRIPT FOUR */
+#define XK_fivesubscript 0x1002085 /* U+2085 SUBSCRIPT FIVE */
+#define XK_sixsubscript 0x1002086 /* U+2086 SUBSCRIPT SIX */
+#define XK_sevensubscript 0x1002087 /* U+2087 SUBSCRIPT SEVEN */
+#define XK_eightsubscript 0x1002088 /* U+2088 SUBSCRIPT EIGHT */
+#define XK_ninesubscript 0x1002089 /* U+2089 SUBSCRIPT NINE */
+#define XK_partdifferential 0x1002202 /* U+2202 PARTIAL DIFFERENTIAL */
+#define XK_emptyset 0x1002205 /* U+2205 NULL SET */
+#define XK_elementof 0x1002208 /* U+2208 ELEMENT OF */
+#define XK_notelementof 0x1002209 /* U+2209 NOT AN ELEMENT OF */
+#define XK_containsas 0x100220B /* U+220B CONTAINS AS MEMBER */
+#define XK_squareroot 0x100221A /* U+221A SQUARE ROOT */
+#define XK_cuberoot 0x100221B /* U+221B CUBE ROOT */
+#define XK_fourthroot 0x100221C /* U+221C FOURTH ROOT */
+#define XK_dintegral 0x100222C /* U+222C DOUBLE INTEGRAL */
+#define XK_tintegral 0x100222D /* U+222D TRIPLE INTEGRAL */
+#define XK_because 0x1002235 /* U+2235 BECAUSE */
+#define XK_approxeq 0x1002248 /* U+2245 ALMOST EQUAL TO */
+#define XK_notapproxeq 0x1002247 /* U+2247 NOT ALMOST EQUAL TO */
+#define XK_notidentical 0x1002262 /* U+2262 NOT IDENTICAL TO */
+#define XK_stricteq 0x1002263 /* U+2263 STRICTLY EQUIVALENT TO */
+#endif /* XK_MATHEMATICAL */
+
+#ifdef XK_BRAILLE
+#define XK_braille_dot_1 0xfff1
+#define XK_braille_dot_2 0xfff2
+#define XK_braille_dot_3 0xfff3
+#define XK_braille_dot_4 0xfff4
+#define XK_braille_dot_5 0xfff5
+#define XK_braille_dot_6 0xfff6
+#define XK_braille_dot_7 0xfff7
+#define XK_braille_dot_8 0xfff8
+#define XK_braille_dot_9 0xfff9
+#define XK_braille_dot_10 0xfffa
+#define XK_braille_blank 0x1002800 /* U+2800 BRAILLE PATTERN BLANK */
+#define XK_braille_dots_1 0x1002801 /* U+2801 BRAILLE PATTERN DOTS-1 */
+#define XK_braille_dots_2 0x1002802 /* U+2802 BRAILLE PATTERN DOTS-2 */
+#define XK_braille_dots_12 0x1002803 /* U+2803 BRAILLE PATTERN DOTS-12 */
+#define XK_braille_dots_3 0x1002804 /* U+2804 BRAILLE PATTERN DOTS-3 */
+#define XK_braille_dots_13 0x1002805 /* U+2805 BRAILLE PATTERN DOTS-13 */
+#define XK_braille_dots_23 0x1002806 /* U+2806 BRAILLE PATTERN DOTS-23 */
+#define XK_braille_dots_123 0x1002807 /* U+2807 BRAILLE PATTERN DOTS-123 */
+#define XK_braille_dots_4 0x1002808 /* U+2808 BRAILLE PATTERN DOTS-4 */
+#define XK_braille_dots_14 0x1002809 /* U+2809 BRAILLE PATTERN DOTS-14 */
+#define XK_braille_dots_24 0x100280a /* U+280a BRAILLE PATTERN DOTS-24 */
+#define XK_braille_dots_124 0x100280b /* U+280b BRAILLE PATTERN DOTS-124 */
+#define XK_braille_dots_34 0x100280c /* U+280c BRAILLE PATTERN DOTS-34 */
+#define XK_braille_dots_134 0x100280d /* U+280d BRAILLE PATTERN DOTS-134 */
+#define XK_braille_dots_234 0x100280e /* U+280e BRAILLE PATTERN DOTS-234 */
+#define XK_braille_dots_1234 0x100280f /* U+280f BRAILLE PATTERN DOTS-1234 */
+#define XK_braille_dots_5 0x1002810 /* U+2810 BRAILLE PATTERN DOTS-5 */
+#define XK_braille_dots_15 0x1002811 /* U+2811 BRAILLE PATTERN DOTS-15 */
+#define XK_braille_dots_25 0x1002812 /* U+2812 BRAILLE PATTERN DOTS-25 */
+#define XK_braille_dots_125 0x1002813 /* U+2813 BRAILLE PATTERN DOTS-125 */
+#define XK_braille_dots_35 0x1002814 /* U+2814 BRAILLE PATTERN DOTS-35 */
+#define XK_braille_dots_135 0x1002815 /* U+2815 BRAILLE PATTERN DOTS-135 */
+#define XK_braille_dots_235 0x1002816 /* U+2816 BRAILLE PATTERN DOTS-235 */
+#define XK_braille_dots_1235 0x1002817 /* U+2817 BRAILLE PATTERN DOTS-1235 */
+#define XK_braille_dots_45 0x1002818 /* U+2818 BRAILLE PATTERN DOTS-45 */
+#define XK_braille_dots_145 0x1002819 /* U+2819 BRAILLE PATTERN DOTS-145 */
+#define XK_braille_dots_245 0x100281a /* U+281a BRAILLE PATTERN DOTS-245 */
+#define XK_braille_dots_1245 0x100281b /* U+281b BRAILLE PATTERN DOTS-1245 */
+#define XK_braille_dots_345 0x100281c /* U+281c BRAILLE PATTERN DOTS-345 */
+#define XK_braille_dots_1345 0x100281d /* U+281d BRAILLE PATTERN DOTS-1345 */
+#define XK_braille_dots_2345 0x100281e /* U+281e BRAILLE PATTERN DOTS-2345 */
+#define XK_braille_dots_12345 0x100281f /* U+281f BRAILLE PATTERN DOTS-12345 */
+#define XK_braille_dots_6 0x1002820 /* U+2820 BRAILLE PATTERN DOTS-6 */
+#define XK_braille_dots_16 0x1002821 /* U+2821 BRAILLE PATTERN DOTS-16 */
+#define XK_braille_dots_26 0x1002822 /* U+2822 BRAILLE PATTERN DOTS-26 */
+#define XK_braille_dots_126 0x1002823 /* U+2823 BRAILLE PATTERN DOTS-126 */
+#define XK_braille_dots_36 0x1002824 /* U+2824 BRAILLE PATTERN DOTS-36 */
+#define XK_braille_dots_136 0x1002825 /* U+2825 BRAILLE PATTERN DOTS-136 */
+#define XK_braille_dots_236 0x1002826 /* U+2826 BRAILLE PATTERN DOTS-236 */
+#define XK_braille_dots_1236 0x1002827 /* U+2827 BRAILLE PATTERN DOTS-1236 */
+#define XK_braille_dots_46 0x1002828 /* U+2828 BRAILLE PATTERN DOTS-46 */
+#define XK_braille_dots_146 0x1002829 /* U+2829 BRAILLE PATTERN DOTS-146 */
+#define XK_braille_dots_246 0x100282a /* U+282a BRAILLE PATTERN DOTS-246 */
+#define XK_braille_dots_1246 0x100282b /* U+282b BRAILLE PATTERN DOTS-1246 */
+#define XK_braille_dots_346 0x100282c /* U+282c BRAILLE PATTERN DOTS-346 */
+#define XK_braille_dots_1346 0x100282d /* U+282d BRAILLE PATTERN DOTS-1346 */
+#define XK_braille_dots_2346 0x100282e /* U+282e BRAILLE PATTERN DOTS-2346 */
+#define XK_braille_dots_12346 0x100282f /* U+282f BRAILLE PATTERN DOTS-12346 */
+#define XK_braille_dots_56 0x1002830 /* U+2830 BRAILLE PATTERN DOTS-56 */
+#define XK_braille_dots_156 0x1002831 /* U+2831 BRAILLE PATTERN DOTS-156 */
+#define XK_braille_dots_256 0x1002832 /* U+2832 BRAILLE PATTERN DOTS-256 */
+#define XK_braille_dots_1256 0x1002833 /* U+2833 BRAILLE PATTERN DOTS-1256 */
+#define XK_braille_dots_356 0x1002834 /* U+2834 BRAILLE PATTERN DOTS-356 */
+#define XK_braille_dots_1356 0x1002835 /* U+2835 BRAILLE PATTERN DOTS-1356 */
+#define XK_braille_dots_2356 0x1002836 /* U+2836 BRAILLE PATTERN DOTS-2356 */
+#define XK_braille_dots_12356 0x1002837 /* U+2837 BRAILLE PATTERN DOTS-12356 */
+#define XK_braille_dots_456 0x1002838 /* U+2838 BRAILLE PATTERN DOTS-456 */
+#define XK_braille_dots_1456 0x1002839 /* U+2839 BRAILLE PATTERN DOTS-1456 */
+#define XK_braille_dots_2456 0x100283a /* U+283a BRAILLE PATTERN DOTS-2456 */
+#define XK_braille_dots_12456 0x100283b /* U+283b BRAILLE PATTERN DOTS-12456 */
+#define XK_braille_dots_3456 0x100283c /* U+283c BRAILLE PATTERN DOTS-3456 */
+#define XK_braille_dots_13456 0x100283d /* U+283d BRAILLE PATTERN DOTS-13456 */
+#define XK_braille_dots_23456 0x100283e /* U+283e BRAILLE PATTERN DOTS-23456 */
+#define XK_braille_dots_123456 0x100283f /* U+283f BRAILLE PATTERN DOTS-123456 */
+#define XK_braille_dots_7 0x1002840 /* U+2840 BRAILLE PATTERN DOTS-7 */
+#define XK_braille_dots_17 0x1002841 /* U+2841 BRAILLE PATTERN DOTS-17 */
+#define XK_braille_dots_27 0x1002842 /* U+2842 BRAILLE PATTERN DOTS-27 */
+#define XK_braille_dots_127 0x1002843 /* U+2843 BRAILLE PATTERN DOTS-127 */
+#define XK_braille_dots_37 0x1002844 /* U+2844 BRAILLE PATTERN DOTS-37 */
+#define XK_braille_dots_137 0x1002845 /* U+2845 BRAILLE PATTERN DOTS-137 */
+#define XK_braille_dots_237 0x1002846 /* U+2846 BRAILLE PATTERN DOTS-237 */
+#define XK_braille_dots_1237 0x1002847 /* U+2847 BRAILLE PATTERN DOTS-1237 */
+#define XK_braille_dots_47 0x1002848 /* U+2848 BRAILLE PATTERN DOTS-47 */
+#define XK_braille_dots_147 0x1002849 /* U+2849 BRAILLE PATTERN DOTS-147 */
+#define XK_braille_dots_247 0x100284a /* U+284a BRAILLE PATTERN DOTS-247 */
+#define XK_braille_dots_1247 0x100284b /* U+284b BRAILLE PATTERN DOTS-1247 */
+#define XK_braille_dots_347 0x100284c /* U+284c BRAILLE PATTERN DOTS-347 */
+#define XK_braille_dots_1347 0x100284d /* U+284d BRAILLE PATTERN DOTS-1347 */
+#define XK_braille_dots_2347 0x100284e /* U+284e BRAILLE PATTERN DOTS-2347 */
+#define XK_braille_dots_12347 0x100284f /* U+284f BRAILLE PATTERN DOTS-12347 */
+#define XK_braille_dots_57 0x1002850 /* U+2850 BRAILLE PATTERN DOTS-57 */
+#define XK_braille_dots_157 0x1002851 /* U+2851 BRAILLE PATTERN DOTS-157 */
+#define XK_braille_dots_257 0x1002852 /* U+2852 BRAILLE PATTERN DOTS-257 */
+#define XK_braille_dots_1257 0x1002853 /* U+2853 BRAILLE PATTERN DOTS-1257 */
+#define XK_braille_dots_357 0x1002854 /* U+2854 BRAILLE PATTERN DOTS-357 */
+#define XK_braille_dots_1357 0x1002855 /* U+2855 BRAILLE PATTERN DOTS-1357 */
+#define XK_braille_dots_2357 0x1002856 /* U+2856 BRAILLE PATTERN DOTS-2357 */
+#define XK_braille_dots_12357 0x1002857 /* U+2857 BRAILLE PATTERN DOTS-12357 */
+#define XK_braille_dots_457 0x1002858 /* U+2858 BRAILLE PATTERN DOTS-457 */
+#define XK_braille_dots_1457 0x1002859 /* U+2859 BRAILLE PATTERN DOTS-1457 */
+#define XK_braille_dots_2457 0x100285a /* U+285a BRAILLE PATTERN DOTS-2457 */
+#define XK_braille_dots_12457 0x100285b /* U+285b BRAILLE PATTERN DOTS-12457 */
+#define XK_braille_dots_3457 0x100285c /* U+285c BRAILLE PATTERN DOTS-3457 */
+#define XK_braille_dots_13457 0x100285d /* U+285d BRAILLE PATTERN DOTS-13457 */
+#define XK_braille_dots_23457 0x100285e /* U+285e BRAILLE PATTERN DOTS-23457 */
+#define XK_braille_dots_123457 0x100285f /* U+285f BRAILLE PATTERN DOTS-123457 */
+#define XK_braille_dots_67 0x1002860 /* U+2860 BRAILLE PATTERN DOTS-67 */
+#define XK_braille_dots_167 0x1002861 /* U+2861 BRAILLE PATTERN DOTS-167 */
+#define XK_braille_dots_267 0x1002862 /* U+2862 BRAILLE PATTERN DOTS-267 */
+#define XK_braille_dots_1267 0x1002863 /* U+2863 BRAILLE PATTERN DOTS-1267 */
+#define XK_braille_dots_367 0x1002864 /* U+2864 BRAILLE PATTERN DOTS-367 */
+#define XK_braille_dots_1367 0x1002865 /* U+2865 BRAILLE PATTERN DOTS-1367 */
+#define XK_braille_dots_2367 0x1002866 /* U+2866 BRAILLE PATTERN DOTS-2367 */
+#define XK_braille_dots_12367 0x1002867 /* U+2867 BRAILLE PATTERN DOTS-12367 */
+#define XK_braille_dots_467 0x1002868 /* U+2868 BRAILLE PATTERN DOTS-467 */
+#define XK_braille_dots_1467 0x1002869 /* U+2869 BRAILLE PATTERN DOTS-1467 */
+#define XK_braille_dots_2467 0x100286a /* U+286a BRAILLE PATTERN DOTS-2467 */
+#define XK_braille_dots_12467 0x100286b /* U+286b BRAILLE PATTERN DOTS-12467 */
+#define XK_braille_dots_3467 0x100286c /* U+286c BRAILLE PATTERN DOTS-3467 */
+#define XK_braille_dots_13467 0x100286d /* U+286d BRAILLE PATTERN DOTS-13467 */
+#define XK_braille_dots_23467 0x100286e /* U+286e BRAILLE PATTERN DOTS-23467 */
+#define XK_braille_dots_123467 0x100286f /* U+286f BRAILLE PATTERN DOTS-123467 */
+#define XK_braille_dots_567 0x1002870 /* U+2870 BRAILLE PATTERN DOTS-567 */
+#define XK_braille_dots_1567 0x1002871 /* U+2871 BRAILLE PATTERN DOTS-1567 */
+#define XK_braille_dots_2567 0x1002872 /* U+2872 BRAILLE PATTERN DOTS-2567 */
+#define XK_braille_dots_12567 0x1002873 /* U+2873 BRAILLE PATTERN DOTS-12567 */
+#define XK_braille_dots_3567 0x1002874 /* U+2874 BRAILLE PATTERN DOTS-3567 */
+#define XK_braille_dots_13567 0x1002875 /* U+2875 BRAILLE PATTERN DOTS-13567 */
+#define XK_braille_dots_23567 0x1002876 /* U+2876 BRAILLE PATTERN DOTS-23567 */
+#define XK_braille_dots_123567 0x1002877 /* U+2877 BRAILLE PATTERN DOTS-123567 */
+#define XK_braille_dots_4567 0x1002878 /* U+2878 BRAILLE PATTERN DOTS-4567 */
+#define XK_braille_dots_14567 0x1002879 /* U+2879 BRAILLE PATTERN DOTS-14567 */
+#define XK_braille_dots_24567 0x100287a /* U+287a BRAILLE PATTERN DOTS-24567 */
+#define XK_braille_dots_124567 0x100287b /* U+287b BRAILLE PATTERN DOTS-124567 */
+#define XK_braille_dots_34567 0x100287c /* U+287c BRAILLE PATTERN DOTS-34567 */
+#define XK_braille_dots_134567 0x100287d /* U+287d BRAILLE PATTERN DOTS-134567 */
+#define XK_braille_dots_234567 0x100287e /* U+287e BRAILLE PATTERN DOTS-234567 */
+#define XK_braille_dots_1234567 0x100287f /* U+287f BRAILLE PATTERN DOTS-1234567 */
+#define XK_braille_dots_8 0x1002880 /* U+2880 BRAILLE PATTERN DOTS-8 */
+#define XK_braille_dots_18 0x1002881 /* U+2881 BRAILLE PATTERN DOTS-18 */
+#define XK_braille_dots_28 0x1002882 /* U+2882 BRAILLE PATTERN DOTS-28 */
+#define XK_braille_dots_128 0x1002883 /* U+2883 BRAILLE PATTERN DOTS-128 */
+#define XK_braille_dots_38 0x1002884 /* U+2884 BRAILLE PATTERN DOTS-38 */
+#define XK_braille_dots_138 0x1002885 /* U+2885 BRAILLE PATTERN DOTS-138 */
+#define XK_braille_dots_238 0x1002886 /* U+2886 BRAILLE PATTERN DOTS-238 */
+#define XK_braille_dots_1238 0x1002887 /* U+2887 BRAILLE PATTERN DOTS-1238 */
+#define XK_braille_dots_48 0x1002888 /* U+2888 BRAILLE PATTERN DOTS-48 */
+#define XK_braille_dots_148 0x1002889 /* U+2889 BRAILLE PATTERN DOTS-148 */
+#define XK_braille_dots_248 0x100288a /* U+288a BRAILLE PATTERN DOTS-248 */
+#define XK_braille_dots_1248 0x100288b /* U+288b BRAILLE PATTERN DOTS-1248 */
+#define XK_braille_dots_348 0x100288c /* U+288c BRAILLE PATTERN DOTS-348 */
+#define XK_braille_dots_1348 0x100288d /* U+288d BRAILLE PATTERN DOTS-1348 */
+#define XK_braille_dots_2348 0x100288e /* U+288e BRAILLE PATTERN DOTS-2348 */
+#define XK_braille_dots_12348 0x100288f /* U+288f BRAILLE PATTERN DOTS-12348 */
+#define XK_braille_dots_58 0x1002890 /* U+2890 BRAILLE PATTERN DOTS-58 */
+#define XK_braille_dots_158 0x1002891 /* U+2891 BRAILLE PATTERN DOTS-158 */
+#define XK_braille_dots_258 0x1002892 /* U+2892 BRAILLE PATTERN DOTS-258 */
+#define XK_braille_dots_1258 0x1002893 /* U+2893 BRAILLE PATTERN DOTS-1258 */
+#define XK_braille_dots_358 0x1002894 /* U+2894 BRAILLE PATTERN DOTS-358 */
+#define XK_braille_dots_1358 0x1002895 /* U+2895 BRAILLE PATTERN DOTS-1358 */
+#define XK_braille_dots_2358 0x1002896 /* U+2896 BRAILLE PATTERN DOTS-2358 */
+#define XK_braille_dots_12358 0x1002897 /* U+2897 BRAILLE PATTERN DOTS-12358 */
+#define XK_braille_dots_458 0x1002898 /* U+2898 BRAILLE PATTERN DOTS-458 */
+#define XK_braille_dots_1458 0x1002899 /* U+2899 BRAILLE PATTERN DOTS-1458 */
+#define XK_braille_dots_2458 0x100289a /* U+289a BRAILLE PATTERN DOTS-2458 */
+#define XK_braille_dots_12458 0x100289b /* U+289b BRAILLE PATTERN DOTS-12458 */
+#define XK_braille_dots_3458 0x100289c /* U+289c BRAILLE PATTERN DOTS-3458 */
+#define XK_braille_dots_13458 0x100289d /* U+289d BRAILLE PATTERN DOTS-13458 */
+#define XK_braille_dots_23458 0x100289e /* U+289e BRAILLE PATTERN DOTS-23458 */
+#define XK_braille_dots_123458 0x100289f /* U+289f BRAILLE PATTERN DOTS-123458 */
+#define XK_braille_dots_68 0x10028a0 /* U+28a0 BRAILLE PATTERN DOTS-68 */
+#define XK_braille_dots_168 0x10028a1 /* U+28a1 BRAILLE PATTERN DOTS-168 */
+#define XK_braille_dots_268 0x10028a2 /* U+28a2 BRAILLE PATTERN DOTS-268 */
+#define XK_braille_dots_1268 0x10028a3 /* U+28a3 BRAILLE PATTERN DOTS-1268 */
+#define XK_braille_dots_368 0x10028a4 /* U+28a4 BRAILLE PATTERN DOTS-368 */
+#define XK_braille_dots_1368 0x10028a5 /* U+28a5 BRAILLE PATTERN DOTS-1368 */
+#define XK_braille_dots_2368 0x10028a6 /* U+28a6 BRAILLE PATTERN DOTS-2368 */
+#define XK_braille_dots_12368 0x10028a7 /* U+28a7 BRAILLE PATTERN DOTS-12368 */
+#define XK_braille_dots_468 0x10028a8 /* U+28a8 BRAILLE PATTERN DOTS-468 */
+#define XK_braille_dots_1468 0x10028a9 /* U+28a9 BRAILLE PATTERN DOTS-1468 */
+#define XK_braille_dots_2468 0x10028aa /* U+28aa BRAILLE PATTERN DOTS-2468 */
+#define XK_braille_dots_12468 0x10028ab /* U+28ab BRAILLE PATTERN DOTS-12468 */
+#define XK_braille_dots_3468 0x10028ac /* U+28ac BRAILLE PATTERN DOTS-3468 */
+#define XK_braille_dots_13468 0x10028ad /* U+28ad BRAILLE PATTERN DOTS-13468 */
+#define XK_braille_dots_23468 0x10028ae /* U+28ae BRAILLE PATTERN DOTS-23468 */
+#define XK_braille_dots_123468 0x10028af /* U+28af BRAILLE PATTERN DOTS-123468 */
+#define XK_braille_dots_568 0x10028b0 /* U+28b0 BRAILLE PATTERN DOTS-568 */
+#define XK_braille_dots_1568 0x10028b1 /* U+28b1 BRAILLE PATTERN DOTS-1568 */
+#define XK_braille_dots_2568 0x10028b2 /* U+28b2 BRAILLE PATTERN DOTS-2568 */
+#define XK_braille_dots_12568 0x10028b3 /* U+28b3 BRAILLE PATTERN DOTS-12568 */
+#define XK_braille_dots_3568 0x10028b4 /* U+28b4 BRAILLE PATTERN DOTS-3568 */
+#define XK_braille_dots_13568 0x10028b5 /* U+28b5 BRAILLE PATTERN DOTS-13568 */
+#define XK_braille_dots_23568 0x10028b6 /* U+28b6 BRAILLE PATTERN DOTS-23568 */
+#define XK_braille_dots_123568 0x10028b7 /* U+28b7 BRAILLE PATTERN DOTS-123568 */
+#define XK_braille_dots_4568 0x10028b8 /* U+28b8 BRAILLE PATTERN DOTS-4568 */
+#define XK_braille_dots_14568 0x10028b9 /* U+28b9 BRAILLE PATTERN DOTS-14568 */
+#define XK_braille_dots_24568 0x10028ba /* U+28ba BRAILLE PATTERN DOTS-24568 */
+#define XK_braille_dots_124568 0x10028bb /* U+28bb BRAILLE PATTERN DOTS-124568 */
+#define XK_braille_dots_34568 0x10028bc /* U+28bc BRAILLE PATTERN DOTS-34568 */
+#define XK_braille_dots_134568 0x10028bd /* U+28bd BRAILLE PATTERN DOTS-134568 */
+#define XK_braille_dots_234568 0x10028be /* U+28be BRAILLE PATTERN DOTS-234568 */
+#define XK_braille_dots_1234568 0x10028bf /* U+28bf BRAILLE PATTERN DOTS-1234568 */
+#define XK_braille_dots_78 0x10028c0 /* U+28c0 BRAILLE PATTERN DOTS-78 */
+#define XK_braille_dots_178 0x10028c1 /* U+28c1 BRAILLE PATTERN DOTS-178 */
+#define XK_braille_dots_278 0x10028c2 /* U+28c2 BRAILLE PATTERN DOTS-278 */
+#define XK_braille_dots_1278 0x10028c3 /* U+28c3 BRAILLE PATTERN DOTS-1278 */
+#define XK_braille_dots_378 0x10028c4 /* U+28c4 BRAILLE PATTERN DOTS-378 */
+#define XK_braille_dots_1378 0x10028c5 /* U+28c5 BRAILLE PATTERN DOTS-1378 */
+#define XK_braille_dots_2378 0x10028c6 /* U+28c6 BRAILLE PATTERN DOTS-2378 */
+#define XK_braille_dots_12378 0x10028c7 /* U+28c7 BRAILLE PATTERN DOTS-12378 */
+#define XK_braille_dots_478 0x10028c8 /* U+28c8 BRAILLE PATTERN DOTS-478 */
+#define XK_braille_dots_1478 0x10028c9 /* U+28c9 BRAILLE PATTERN DOTS-1478 */
+#define XK_braille_dots_2478 0x10028ca /* U+28ca BRAILLE PATTERN DOTS-2478 */
+#define XK_braille_dots_12478 0x10028cb /* U+28cb BRAILLE PATTERN DOTS-12478 */
+#define XK_braille_dots_3478 0x10028cc /* U+28cc BRAILLE PATTERN DOTS-3478 */
+#define XK_braille_dots_13478 0x10028cd /* U+28cd BRAILLE PATTERN DOTS-13478 */
+#define XK_braille_dots_23478 0x10028ce /* U+28ce BRAILLE PATTERN DOTS-23478 */
+#define XK_braille_dots_123478 0x10028cf /* U+28cf BRAILLE PATTERN DOTS-123478 */
+#define XK_braille_dots_578 0x10028d0 /* U+28d0 BRAILLE PATTERN DOTS-578 */
+#define XK_braille_dots_1578 0x10028d1 /* U+28d1 BRAILLE PATTERN DOTS-1578 */
+#define XK_braille_dots_2578 0x10028d2 /* U+28d2 BRAILLE PATTERN DOTS-2578 */
+#define XK_braille_dots_12578 0x10028d3 /* U+28d3 BRAILLE PATTERN DOTS-12578 */
+#define XK_braille_dots_3578 0x10028d4 /* U+28d4 BRAILLE PATTERN DOTS-3578 */
+#define XK_braille_dots_13578 0x10028d5 /* U+28d5 BRAILLE PATTERN DOTS-13578 */
+#define XK_braille_dots_23578 0x10028d6 /* U+28d6 BRAILLE PATTERN DOTS-23578 */
+#define XK_braille_dots_123578 0x10028d7 /* U+28d7 BRAILLE PATTERN DOTS-123578 */
+#define XK_braille_dots_4578 0x10028d8 /* U+28d8 BRAILLE PATTERN DOTS-4578 */
+#define XK_braille_dots_14578 0x10028d9 /* U+28d9 BRAILLE PATTERN DOTS-14578 */
+#define XK_braille_dots_24578 0x10028da /* U+28da BRAILLE PATTERN DOTS-24578 */
+#define XK_braille_dots_124578 0x10028db /* U+28db BRAILLE PATTERN DOTS-124578 */
+#define XK_braille_dots_34578 0x10028dc /* U+28dc BRAILLE PATTERN DOTS-34578 */
+#define XK_braille_dots_134578 0x10028dd /* U+28dd BRAILLE PATTERN DOTS-134578 */
+#define XK_braille_dots_234578 0x10028de /* U+28de BRAILLE PATTERN DOTS-234578 */
+#define XK_braille_dots_1234578 0x10028df /* U+28df BRAILLE PATTERN DOTS-1234578 */
+#define XK_braille_dots_678 0x10028e0 /* U+28e0 BRAILLE PATTERN DOTS-678 */
+#define XK_braille_dots_1678 0x10028e1 /* U+28e1 BRAILLE PATTERN DOTS-1678 */
+#define XK_braille_dots_2678 0x10028e2 /* U+28e2 BRAILLE PATTERN DOTS-2678 */
+#define XK_braille_dots_12678 0x10028e3 /* U+28e3 BRAILLE PATTERN DOTS-12678 */
+#define XK_braille_dots_3678 0x10028e4 /* U+28e4 BRAILLE PATTERN DOTS-3678 */
+#define XK_braille_dots_13678 0x10028e5 /* U+28e5 BRAILLE PATTERN DOTS-13678 */
+#define XK_braille_dots_23678 0x10028e6 /* U+28e6 BRAILLE PATTERN DOTS-23678 */
+#define XK_braille_dots_123678 0x10028e7 /* U+28e7 BRAILLE PATTERN DOTS-123678 */
+#define XK_braille_dots_4678 0x10028e8 /* U+28e8 BRAILLE PATTERN DOTS-4678 */
+#define XK_braille_dots_14678 0x10028e9 /* U+28e9 BRAILLE PATTERN DOTS-14678 */
+#define XK_braille_dots_24678 0x10028ea /* U+28ea BRAILLE PATTERN DOTS-24678 */
+#define XK_braille_dots_124678 0x10028eb /* U+28eb BRAILLE PATTERN DOTS-124678 */
+#define XK_braille_dots_34678 0x10028ec /* U+28ec BRAILLE PATTERN DOTS-34678 */
+#define XK_braille_dots_134678 0x10028ed /* U+28ed BRAILLE PATTERN DOTS-134678 */
+#define XK_braille_dots_234678 0x10028ee /* U+28ee BRAILLE PATTERN DOTS-234678 */
+#define XK_braille_dots_1234678 0x10028ef /* U+28ef BRAILLE PATTERN DOTS-1234678 */
+#define XK_braille_dots_5678 0x10028f0 /* U+28f0 BRAILLE PATTERN DOTS-5678 */
+#define XK_braille_dots_15678 0x10028f1 /* U+28f1 BRAILLE PATTERN DOTS-15678 */
+#define XK_braille_dots_25678 0x10028f2 /* U+28f2 BRAILLE PATTERN DOTS-25678 */
+#define XK_braille_dots_125678 0x10028f3 /* U+28f3 BRAILLE PATTERN DOTS-125678 */
+#define XK_braille_dots_35678 0x10028f4 /* U+28f4 BRAILLE PATTERN DOTS-35678 */
+#define XK_braille_dots_135678 0x10028f5 /* U+28f5 BRAILLE PATTERN DOTS-135678 */
+#define XK_braille_dots_235678 0x10028f6 /* U+28f6 BRAILLE PATTERN DOTS-235678 */
+#define XK_braille_dots_1235678 0x10028f7 /* U+28f7 BRAILLE PATTERN DOTS-1235678 */
+#define XK_braille_dots_45678 0x10028f8 /* U+28f8 BRAILLE PATTERN DOTS-45678 */
+#define XK_braille_dots_145678 0x10028f9 /* U+28f9 BRAILLE PATTERN DOTS-145678 */
+#define XK_braille_dots_245678 0x10028fa /* U+28fa BRAILLE PATTERN DOTS-245678 */
+#define XK_braille_dots_1245678 0x10028fb /* U+28fb BRAILLE PATTERN DOTS-1245678 */
+#define XK_braille_dots_345678 0x10028fc /* U+28fc BRAILLE PATTERN DOTS-345678 */
+#define XK_braille_dots_1345678 0x10028fd /* U+28fd BRAILLE PATTERN DOTS-1345678 */
+#define XK_braille_dots_2345678 0x10028fe /* U+28fe BRAILLE PATTERN DOTS-2345678 */
+#define XK_braille_dots_12345678 0x10028ff /* U+28ff BRAILLE PATTERN DOTS-12345678 */
+#endif /* XK_BRAILLE */
+
+/*
+ * Sinhala (http://unicode.org/charts/PDF/U0D80.pdf)
+ * http://www.nongnu.org/sinhala/doc/transliteration/sinhala-transliteration_6.html
+ */
+
+#ifdef XK_SINHALA
+#define XK_Sinh_ng 0x1000d82 /* U+0D82 SINHALA ANUSVARAYA */
+#define XK_Sinh_h2 0x1000d83 /* U+0D83 SINHALA VISARGAYA */
+#define XK_Sinh_a 0x1000d85 /* U+0D85 SINHALA AYANNA */
+#define XK_Sinh_aa 0x1000d86 /* U+0D86 SINHALA AAYANNA */
+#define XK_Sinh_ae 0x1000d87 /* U+0D87 SINHALA AEYANNA */
+#define XK_Sinh_aee 0x1000d88 /* U+0D88 SINHALA AEEYANNA */
+#define XK_Sinh_i 0x1000d89 /* U+0D89 SINHALA IYANNA */
+#define XK_Sinh_ii 0x1000d8a /* U+0D8A SINHALA IIYANNA */
+#define XK_Sinh_u 0x1000d8b /* U+0D8B SINHALA UYANNA */
+#define XK_Sinh_uu 0x1000d8c /* U+0D8C SINHALA UUYANNA */
+#define XK_Sinh_ri 0x1000d8d /* U+0D8D SINHALA IRUYANNA */
+#define XK_Sinh_rii 0x1000d8e /* U+0D8E SINHALA IRUUYANNA */
+#define XK_Sinh_lu 0x1000d8f /* U+0D8F SINHALA ILUYANNA */
+#define XK_Sinh_luu 0x1000d90 /* U+0D90 SINHALA ILUUYANNA */
+#define XK_Sinh_e 0x1000d91 /* U+0D91 SINHALA EYANNA */
+#define XK_Sinh_ee 0x1000d92 /* U+0D92 SINHALA EEYANNA */
+#define XK_Sinh_ai 0x1000d93 /* U+0D93 SINHALA AIYANNA */
+#define XK_Sinh_o 0x1000d94 /* U+0D94 SINHALA OYANNA */
+#define XK_Sinh_oo 0x1000d95 /* U+0D95 SINHALA OOYANNA */
+#define XK_Sinh_au 0x1000d96 /* U+0D96 SINHALA AUYANNA */
+#define XK_Sinh_ka 0x1000d9a /* U+0D9A SINHALA KAYANNA */
+#define XK_Sinh_kha 0x1000d9b /* U+0D9B SINHALA MAHA. KAYANNA */
+#define XK_Sinh_ga 0x1000d9c /* U+0D9C SINHALA GAYANNA */
+#define XK_Sinh_gha 0x1000d9d /* U+0D9D SINHALA MAHA. GAYANNA */
+#define XK_Sinh_ng2 0x1000d9e /* U+0D9E SINHALA KANTAJA NAASIKYAYA */
+#define XK_Sinh_nga 0x1000d9f /* U+0D9F SINHALA SANYAKA GAYANNA */
+#define XK_Sinh_ca 0x1000da0 /* U+0DA0 SINHALA CAYANNA */
+#define XK_Sinh_cha 0x1000da1 /* U+0DA1 SINHALA MAHA. CAYANNA */
+#define XK_Sinh_ja 0x1000da2 /* U+0DA2 SINHALA JAYANNA */
+#define XK_Sinh_jha 0x1000da3 /* U+0DA3 SINHALA MAHA. JAYANNA */
+#define XK_Sinh_nya 0x1000da4 /* U+0DA4 SINHALA TAALUJA NAASIKYAYA */
+#define XK_Sinh_jnya 0x1000da5 /* U+0DA5 SINHALA TAALUJA SANYOOGA NAASIKYAYA */
+#define XK_Sinh_nja 0x1000da6 /* U+0DA6 SINHALA SANYAKA JAYANNA */
+#define XK_Sinh_tta 0x1000da7 /* U+0DA7 SINHALA TTAYANNA */
+#define XK_Sinh_ttha 0x1000da8 /* U+0DA8 SINHALA MAHA. TTAYANNA */
+#define XK_Sinh_dda 0x1000da9 /* U+0DA9 SINHALA DDAYANNA */
+#define XK_Sinh_ddha 0x1000daa /* U+0DAA SINHALA MAHA. DDAYANNA */
+#define XK_Sinh_nna 0x1000dab /* U+0DAB SINHALA MUURDHAJA NAYANNA */
+#define XK_Sinh_ndda 0x1000dac /* U+0DAC SINHALA SANYAKA DDAYANNA */
+#define XK_Sinh_tha 0x1000dad /* U+0DAD SINHALA TAYANNA */
+#define XK_Sinh_thha 0x1000dae /* U+0DAE SINHALA MAHA. TAYANNA */
+#define XK_Sinh_dha 0x1000daf /* U+0DAF SINHALA DAYANNA */
+#define XK_Sinh_dhha 0x1000db0 /* U+0DB0 SINHALA MAHA. DAYANNA */
+#define XK_Sinh_na 0x1000db1 /* U+0DB1 SINHALA DANTAJA NAYANNA */
+#define XK_Sinh_ndha 0x1000db3 /* U+0DB3 SINHALA SANYAKA DAYANNA */
+#define XK_Sinh_pa 0x1000db4 /* U+0DB4 SINHALA PAYANNA */
+#define XK_Sinh_pha 0x1000db5 /* U+0DB5 SINHALA MAHA. PAYANNA */
+#define XK_Sinh_ba 0x1000db6 /* U+0DB6 SINHALA BAYANNA */
+#define XK_Sinh_bha 0x1000db7 /* U+0DB7 SINHALA MAHA. BAYANNA */
+#define XK_Sinh_ma 0x1000db8 /* U+0DB8 SINHALA MAYANNA */
+#define XK_Sinh_mba 0x1000db9 /* U+0DB9 SINHALA AMBA BAYANNA */
+#define XK_Sinh_ya 0x1000dba /* U+0DBA SINHALA YAYANNA */
+#define XK_Sinh_ra 0x1000dbb /* U+0DBB SINHALA RAYANNA */
+#define XK_Sinh_la 0x1000dbd /* U+0DBD SINHALA DANTAJA LAYANNA */
+#define XK_Sinh_va 0x1000dc0 /* U+0DC0 SINHALA VAYANNA */
+#define XK_Sinh_sha 0x1000dc1 /* U+0DC1 SINHALA TAALUJA SAYANNA */
+#define XK_Sinh_ssha 0x1000dc2 /* U+0DC2 SINHALA MUURDHAJA SAYANNA */
+#define XK_Sinh_sa 0x1000dc3 /* U+0DC3 SINHALA DANTAJA SAYANNA */
+#define XK_Sinh_ha 0x1000dc4 /* U+0DC4 SINHALA HAYANNA */
+#define XK_Sinh_lla 0x1000dc5 /* U+0DC5 SINHALA MUURDHAJA LAYANNA */
+#define XK_Sinh_fa 0x1000dc6 /* U+0DC6 SINHALA FAYANNA */
+#define XK_Sinh_al 0x1000dca /* U+0DCA SINHALA AL-LAKUNA */
+#define XK_Sinh_aa2 0x1000dcf /* U+0DCF SINHALA AELA-PILLA */
+#define XK_Sinh_ae2 0x1000dd0 /* U+0DD0 SINHALA AEDA-PILLA */
+#define XK_Sinh_aee2 0x1000dd1 /* U+0DD1 SINHALA DIGA AEDA-PILLA */
+#define XK_Sinh_i2 0x1000dd2 /* U+0DD2 SINHALA IS-PILLA */
+#define XK_Sinh_ii2 0x1000dd3 /* U+0DD3 SINHALA DIGA IS-PILLA */
+#define XK_Sinh_u2 0x1000dd4 /* U+0DD4 SINHALA PAA-PILLA */
+#define XK_Sinh_uu2 0x1000dd6 /* U+0DD6 SINHALA DIGA PAA-PILLA */
+#define XK_Sinh_ru2 0x1000dd8 /* U+0DD8 SINHALA GAETTA-PILLA */
+#define XK_Sinh_e2 0x1000dd9 /* U+0DD9 SINHALA KOMBUVA */
+#define XK_Sinh_ee2 0x1000dda /* U+0DDA SINHALA DIGA KOMBUVA */
+#define XK_Sinh_ai2 0x1000ddb /* U+0DDB SINHALA KOMBU DEKA */
+#define XK_Sinh_o2 0x1000ddc /* U+0DDC SINHALA KOMBUVA HAA AELA-PILLA*/
+#define XK_Sinh_oo2 0x1000ddd /* U+0DDD SINHALA KOMBUVA HAA DIGA AELA-PILLA*/
+#define XK_Sinh_au2 0x1000dde /* U+0DDE SINHALA KOMBUVA HAA GAYANUKITTA */
+#define XK_Sinh_lu2 0x1000ddf /* U+0DDF SINHALA GAYANUKITTA */
+#define XK_Sinh_ruu2 0x1000df2 /* U+0DF2 SINHALA DIGA GAETTA-PILLA */
+#define XK_Sinh_luu2 0x1000df3 /* U+0DF3 SINHALA DIGA GAYANUKITTA */
+#define XK_Sinh_kunddaliya 0x1000df4 /* U+0DF4 SINHALA KUNDDALIYA */
+#endif /* XK_SINHALA */
diff --git a/lg3dproto.pc b/lg3dproto.pc
new file mode 100644
index 0000000..020b364
--- /dev/null
+++ b/lg3dproto.pc
@@ -0,0 +1,9 @@
+prefix=/home/dj4236/lgn/x/xorg/cvs/head/modular
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Lg3dProto
+Description: LGE extension headers
+Version: 5.0
+Cflags: -I${includedir}
diff --git a/lg3dproto.pc.in b/lg3dproto.pc.in
new file mode 100644
index 0000000..11ae302
--- /dev/null
+++ b/lg3dproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Lg3dProto
+Description: LGE extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/lg3dproto/AUTHORS b/lg3dproto/AUTHORS
new file mode 100644
index 0000000..456f836
--- /dev/null
+++ b/lg3dproto/AUTHORS
@@ -0,0 +1 @@
+Deron Johnson, Sun Microsystems
diff --git a/lg3dproto/COPYING b/lg3dproto/COPYING
new file mode 100644
index 0000000..03b6262
--- /dev/null
+++ b/lg3dproto/COPYING
@@ -0,0 +1,22 @@
+
+Copyright (c) 2004, Sun Microsystems, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+SUN MICROSYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Sun Microsystems shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from Sun Microsystems.
diff --git a/lg3dproto/Makefile.am b/lg3dproto/Makefile.am
new file mode 100644
index 0000000..55476bc
--- /dev/null
+++ b/lg3dproto/Makefile.am
@@ -0,0 +1,39 @@
+# Copyright (c) 2004, Sun Microsystems, Inc.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation.
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# SUN MICROSYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of Sun Microsystems shall not be
+# used in advertising or otherwise to promote the sale, use or other dealings
+# in this Software without prior written authorization from Sun Microsystems.
+
+lg3ddir = $(includedir)/X11/extensions
+lg3d_HEADERS = lgewire.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = lg3dproto.pc
+
+EXTRA_DIST = autogen.sh lg3dproto.pc.in
+
+EXTRA_DIST += ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+ (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
diff --git a/lg3dproto/README b/lg3dproto/README
new file mode 100644
index 0000000..b88e7f1
--- /dev/null
+++ b/lg3dproto/README
@@ -0,0 +1,9 @@
+ Project Looking Glass Extension
+ Version 5.0
+ 2006-11-18
+
+This package contains header files and documentation for the
+Project Looking Glass extension.
+
+Deron Johnson
+deron.johnson@sun.com
diff --git a/lg3dproto/autogen.sh b/lg3dproto/autogen.sh
new file mode 100755
index 0000000..904cd67
--- /dev/null
+++ b/lg3dproto/autogen.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/lg3dproto/configure.ac b/lg3dproto/configure.ac
new file mode 100644
index 0000000..d051ad0
--- /dev/null
+++ b/lg3dproto/configure.ac
@@ -0,0 +1,30 @@
+dnl Copyright (c) 2004, Sun Microsystems, Inc.
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included in
+dnl all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+dnl SUN MICROSYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+dnl AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+dnl CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of Sun Microsystems shall not be
+dnl used in advertising or otherwise to promote the sale, use or other dealings
+dnl in this Software without prior written authorization from Sun Microsystems.
+
+AC_PREREQ([2.57])
+AC_INIT([Lg3dProto], [5.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+XORG_RELEASE_VERSION
+
+AC_OUTPUT([Makefile
+ lg3dproto.pc])
diff --git a/lgewire.h b/lgewire.h
new file mode 100644
index 0000000..75ec0a4
--- /dev/null
+++ b/lgewire.h
@@ -0,0 +1,120 @@
+/************************************************************
+
+Copyright (c) 2004, Sun Microsystems, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+/*
+ * lge.h - Looking Glass Extension Definitions
+ */
+
+#ifndef _LGEWIRE_H
+#define _LGEWIRE_H
+
+#include "X11/Xfuncproto.h"
+
+#define LGE_NAME "LGE"
+
+/* Current interface version numbers */
+#define LGE_MAJOR_VERSION 5
+#define LGE_MINOR_VERSION 0
+
+/* Display Server is alive */
+#define X_LgeQueryVersion 0
+#define X_LgeRegisterClient 1
+#define X_LgeRegisterScreen 2
+#define X_LgeControlLgMode 3
+#define X_LgeSendEvent 4
+
+/* Arguments to XLgeRegisterClient */
+#define LGE_CLIENT_GENERIC 0
+#define LGE_CLIENT_PICKER 1
+#define LGE_CLIENT_EVENT_DELIVERER 2
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 lgeReqType;
+ CARD16 length B16;
+} xLgeQueryVersionReq;
+
+#define sz_xLgeQueryVersionReq sizeof(xLgeQueryVersionReq)
+
+typedef struct {
+ /* Always X_Reply */
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 implementation B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xLgeQueryVersionReply;
+
+#define sz_xLgeQueryVersionReply sizeof(xLgeQueryVersionReply)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 lgeReqType;
+ CARD16 length B16;
+ CARD8 clientType;
+ BOOL sendEventDirect;
+ CARD16 pad2 B16;
+} xLgeRegisterClientReq;
+
+#define sz_xLgeRegisterClientReq sizeof(xLgeRegisterClientReq)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 lgeReqType;
+ CARD16 length B16;
+ /* The pseudo-root window of the screen */
+ Window prw;
+} xLgeRegisterScreenReq;
+
+#define sz_xLgeRegisterScreenReq sizeof(xLgeRegisterScreenReq)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 lgeReqType;
+ CARD16 length B16;
+ BOOL enable;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xLgeControlLgModeReq;
+
+#define sz_xLgeControlLgModeReq sizeof(xLgeControlLgModeReq)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 lgeReqType;
+ CARD16 length B16;
+ xEvent event;
+} xLgeSendEventReq;
+
+#define sz_xLgeSendEventReq sizeof(xLgeSendEventReq)
+
+#endif /* LGEWIRE_H */
+
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..aaa2fe6
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,42 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+project('glproto', license : 'MIT', version : '1.4.17')
+
+install_headers(
+ 'include/GL/glxint.h',
+ 'include/GL/glxmd.h',
+ 'include/GL/glxproto.h',
+ 'include/GL/glxtokens.h',
+ subdir : 'GL')
+install_headers('include/GL/internal/glcore.h', subdir : 'GL/internal')
+
+pkg = import('pkgconfig')
+
+pkg.generate(
+ name : 'GLProto',
+ filebase : 'glproto',
+ description : 'GL extension headers',
+ version : meson.project_version(),
+)
+
+ext_glproto = declare_dependency(
+ include_directories : include_directories('include')
+)
diff --git a/missing b/missing
new file mode 100755
index 0000000..e7ef83a
--- /dev/null
+++ b/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2003-09-02.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/specs/SIAddresses/.gitignore b/specs/SIAddresses/.gitignore
new file mode 100644
index 0000000..a50f54b
--- /dev/null
+++ b/specs/SIAddresses/.gitignore
@@ -0,0 +1,4 @@
+# Override *.txt from toplevel .gitignore
+!hostname.txt
+!IPv6.txt
+!localuser.txt
diff --git a/specs/SIAddresses/IPv6.txt b/specs/SIAddresses/IPv6.txt
new file mode 100644
index 0000000..4b69a99
--- /dev/null
+++ b/specs/SIAddresses/IPv6.txt
@@ -0,0 +1,11 @@
+ServerInterpreted address definition for type "IPv6":
+
+The X.org Architecture Task Force reserves the ServerInterpreted
+address type of "IPv6" for use with IPv6 literal address formats.
+The syntax for the value will be defined as specified in RFC 3513
+and the IETF RFC to be published based on the current draft at
+http://www.ietf.org/internet-drafts/draft-ietf-ipv6-scoping-arch-00.txt
+This address type specification will be formally issued once the
+IETF IPv6 Working Group issues the corresponding RFC.
+
+Version 0.9, March 2004
diff --git a/specs/SIAddresses/Makefile.am b/specs/SIAddresses/Makefile.am
new file mode 100644
index 0000000..662776a
--- /dev/null
+++ b/specs/SIAddresses/Makefile.am
@@ -0,0 +1,6 @@
+dist_noinst_DATA = \
+ hostname.txt \
+ IPv6.txt \
+ localuser.txt \
+ README
+
diff --git a/specs/SIAddresses/README b/specs/SIAddresses/README
new file mode 100644
index 0000000..8858529
--- /dev/null
+++ b/specs/SIAddresses/README
@@ -0,0 +1,4 @@
+This directory contains the specifications of address types for the
+ServerInterpreted address family used in the ChangeHost and ListHosts
+requests in the X11 Protocol. See Chapter 9 of the X11 Protocol spec
+for more information.
diff --git a/specs/SIAddresses/hostname.txt b/specs/SIAddresses/hostname.txt
new file mode 100644
index 0000000..64023d7
--- /dev/null
+++ b/specs/SIAddresses/hostname.txt
@@ -0,0 +1,11 @@
+ServerInterpreted address definition for type "hostname":
+
+A ServerInterpreted address with type "hostname" shall have a value
+representing a hostname as defined in IETF RFC 2396. Due to Mobile IP
+and dynamic DNS, the name service should be consulted at connection
+authentication time. Clients supporting Internationalized Domain
+Names must convert to ASCII Compatible Encoding as specified in the
+relevant IETF RFC's before use in the X11 protocol. Note that this
+definition of hostname does not allow use of literal IP addresses.
+
+Version 1.0, March 2004
diff --git a/specs/SIAddresses/localuser.txt b/specs/SIAddresses/localuser.txt
new file mode 100644
index 0000000..e67ff01
--- /dev/null
+++ b/specs/SIAddresses/localuser.txt
@@ -0,0 +1,20 @@
+Server-interpreted Authentication Types "localuser" and "localgroup":
+
+On systems which can determine in a secure fashion the credentials of a client
+process, the "localuser" and "localgroup" authentication methods provide access
+based on those credentials. The format of the values provided is platform
+specific. For POSIX & UNIX platforms, if the value starts with the character
+'#', the rest of the string shall be treated as a decimal uid or gid, otherwise
+the string is defined as a user name or group name.
+
+Systems offering this MUST not simply trust a user supplied value (such as an
+environment variable or IDENT protocol response). It is expected many systems
+will only support this for clients running on the same host using a local IPC
+transport.
+
+Examples:
+ xhost +SI:localuser:alanc
+ xhost +SI:localuser:#1234
+ xhost +SI:localgroup:wheel
+ xhost +SI:localgroup:#0
+
diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
new file mode 100644
index 0000000..697dd89
--- /dev/null
+++ b/specs/XI2proto.txt
@@ -0,0 +1,2715 @@
+The X Input Extension 2.x
+=========================
+:toclevels: 3
+:toc:
+:numbered:
+
+Authors:
+
+- Peter Hutterer (Red Hat) <peter.hutterer@redhat.com>
+- Daniel Stone (Collabora Ltd.) <daniel@fooishbar.org>
+- Chase Douglas (Canonical, Ltd.) <chase.douglas@canonical.com>
+
+[[history]]
+History
+-------
+
+- v2.3, December 2012: Pointer barrier events added
+- v2.2, March 2012: Multitouch support added
+- v2.1, December 2011: new raw event behaviour, smooth scrolling support
+ added
+- v2.0, October 2009: Initial release of XI2 protocol
+
+[[intro-xi20]]
+Introduction
+------------
+
+The X Input Extension version 2.0 (XI2) is the second major release of the X
+Input Extension.
+
+XI2 provides a number of enhancements over version 1.5, including:
+
+- use of XGE and GenericEvents. GenericEvents are of flexible length with a
+ minimum length of 32 bytes.
+- explicit device hierarchy of master and slave devices. See Section
+<<hierarchy,The Master/Slave device hierarchy>>.
+- use of multiple independent master devices (Multi-Pointer X or MPX).
+- the ability for devices to change capabilities at runtime.
+- raw device events
+
+XI2's intent is to replace both core input processing and prior versions of
+the X Input Extension. Historically, the majority of applications employed the
+core protocol requests and events to handle user input. The core protocol does
+not provide information about which device generated the event. The X Input
+Extension version up to 1.5 requires the differentiation between core and
+extended devices. Extended devices may not be core devices and thus cannot be
+used on applications employing the core protocol. XI2 addresses both of these
+issues by enabling devices to be both extended and core devices and providing
+device information in each event (with the exception of core events).
+
+Changes in version 2.1
+----------------------
+
+- RawEvents are sent regardless of the grab state.
+- Addition of the ScrollClass for smooth scrolling
+
+Changes in version 2.2
+----------------------
+
+- Multitouch support added
+
+Changes in version 2.3
+----------------------
+
+- Pointer barrier events added
+
+// ❧❧❧❧❧❧❧❧❧❧❧
+
+Notations used in this document
+-------------------------------
+
+Notation for requests:
+
+ ┌───
+ Name of request
+ name of request field: type of request field
+ name of request field: type of request field
+ ▶
+ name of reply field: type of reply field
+ └───
+
+Notation for events:
+
+ ┌───
+ Name of event
+ name of field: type of field
+ name of field: type of field
+ └───
+
+Complex fields are specified in the following notation:
+
+ name of field: COMPLEXFIELDTYPE
+
+or, if multiple of these fields exist:
+
+ name of field: LISTofCOMPLEXFIELDTYPE
+
+ COMPLEXFIELDTYPE: { name of subfield: type of subfield,
+ name of subfield: type of subfield }
+
+// ❧❧❧❧❧❧❧❧❧❧❧
+
+Interoperability between version 1.x and 2.0
+--------------------------------------------
+
+There is little interaction between 1.x and 2.x versions of the X Input
+Extension. Clients are requested to avoid mixing XI1.x and XI2 code as much as
+possible. Several direct incompatibilities are observable:
+
+[[interop-xi1-limitations]]
+Limitations resulting from different variable ranges
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+XI2 provides a larger range for some fields than XI1. As a result, XI1 clients
+may not receive data an XI2 client receives.
+These fields include:
+
+- devices with a deviceid of greater than 127 are invisible to XI1 clients.
+- key events and key grabs featuring larger than 255 can only be sent to XI2
+ clients.
+- no subpixel information is available to XI1 clients. If motion events are in
+ a subpixel range only, the server may omit these events and an XI 1.x client
+ will not receive events until the pixel boundary is crossed.
+
+
+[[interop-xi1-grabs]]
+Blocking of grabs
+~~~~~~~~~~~~~~~~~
+
+XI1 grabs are different to XI2 grab and a device may not be grabbed through an
+XI2 grab if an XI1 grab is currently active on this device or vice versa.
+Likewise, a keycode or button already grabbed by an XI 1.x or XI2 client may
+not be grabbed with the same modifier combination by an XI2 or XI 1.x client,
+respectively.
+
+[[interop-xi1-device-list]]
+Invisibility of Master Devices
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+XI 1.x was not designed with support for multiple master devices. As a
+result, only the first master pointer and master keyboard are visible to XI
+1.x clients; all other master devices are invisible and cannot be accessed
+from XI 1.x calls.
+
+Smooth scrolling
+~~~~~~~~~~~~~~~~
+
+Historically, X implemented scrolling events by using button press events:
+button 4 was one “click” of the scroll wheel upwards, button 5 was downwards,
+button 6 was one unit of scrolling left, and button 7 was one unit of scrolling
+right. This is insufficient for e.g. touchpads which are able to provide
+scrolling events through multi-finger drag gestures, or simply dragging your
+finger along a designated strip along the side of the touchpad.
+
+Newer X servers may provide scrolling information through valuators to
+provide clients with more precision than the legacy button events. This
+scrolling information is part of the valuator data in device events.
+Scrolling events do not have a specific event type.
+
+Valuators for axes sending scrolling information must have one
+ScrollClass for each scrolling axis. If scrolling valuators are present on a
+device, the server must provide two-way emulation between these valuators
+and the legacy button events for each delta unit of scrolling.
+
+One unit of scrolling in either direction is considered to be equivalent to
+one button event, e.g. for a unit size of 1.0, -2.0 on an valuator type
+Vertical sends two button press/release events for button 4. Likewise, a
+button press event for button 7 generates an event on the Horizontal
+valuator with a value of +1.0. The server may accumulate deltas of less than
+one unit of scrolling.
+
+Any server providing this behaviour marks emulated button or valuator events
+with the XIPointerEmulated flag for DeviceEvents, and the XIRawEmulated flag
+for raw events, to hint at applications which event is a hardware event.
+
+If more than one scroll valuator of the same type is present on a device,
+the valuator marked with Preferred for the same scroll direction is used to
+convert legacy button events into scroll valuator events. If no valuator is
+marked Preferred or more than one valuator is marked with Preferred for this
+scroll direction, this should be considered a driver bug and the behaviour
+is implementation-dependent.
+
+[[hierarchy]]
+The Master/Slave device hierarchy
+---------------------------------
+
+XI2 introduces a device hierarchy split up into so-called Master Devices (MD)
+and Slave Devices (SD).
+
+[[hierarchy-master]]
+Master devices
+~~~~~~~~~~~~~~
+An MD is a virtual device created and managed by the server. MDs may send core
+events and XI events. However, an MD does not represent a physical device and
+relies on SDs for event generation. MDs come in two forms: as master pointers
+or as master keyboards. A master pointer is represented by a visible cursor on
+the screen. A master keyboard is represented by a keyboard focus.
+
+Each master pointer is paired with the respective master keyboard and vice
+versa, and this pairing is constant for the lifetime of both input devices.
+Clients can use this pairing behaviour to implement input paradigms that
+require pointer and keyboard interation (e.g. SHIFT + Click).
+
+[[hierarchy-slave]]
+Slave devices
+~~~~~~~~~~~~~
+An SD is usually a physical device configured in the server. SDs are not
+represented by a cursor or keyboard focus and may be attached to a master
+pointer or master keyboard. SDs can only be attached to any master of the same
+type (e.g. a physical pointer device can be attached to any master pointer).
+
+If an event is generated by an SD
+
+- if the SD is attached to a master pointer, it changes the position and/or
+ button state of the master pointer.
+- if the SD has a keyboard focus other than None, the key event is sent to
+ the focus window.
+- if the SD is attached to a master keyboard, it sends events to this
+ keyboard's focus window (if applicable) and/or changes the modifier state of
+ this keyboard.
+- if the SD is not attached to an MD ("floating"), it does not change
+ any master device. The SD has its own (invisible) sprite and its own focus.
+ Both the sprite and the focus must be managed explicitly by the client
+ program.
+
+Note: the keyboard focus of an attached slave device is independent to that
+of the master device. Two keyboard events are generated, once with deviceid
+and sourceid set to the slave device. This keyboard event is sent to the
+slave device's focus window. The second event has a deviceid of the master
+and a sourceid of the slave device. This second event is delivered to the
+master keyboard's focus window.
+
+[[hierarchy-dcce]]
+Event processing for attached slave devices
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Whenever an SD changes its logical state,
+
+- the event is delivered as an XI event to any interested clients. If the
+ device is floating, event processing stops.
+ Otherwise, if the device is attached,
+- the master device changes its classes to reflect the SD's capabilities. All
+ interested clients are notified of this device change.
+- then, the event is delivered as an XI event from the MD to any interested
+ clients. If the event has been delivered, event processing stops.
+ Otherwise,
+- the event is delivered as a core event to any interested clients.
+
+Given that W is the event window, and P the parent window of W, event delivery
+to P is only attempted if neither the XI event, nor the core event has been
+delivered on W. Once an event has been delivered as either XI or core event,
+event processing stops.
+
+[[clientpointer]]
+The ClientPointer principle
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Many core protocol and some extension requests are ambiguous when multiple
+master devices are available (e.g. QueryPointer does not specify which pointer).
+The X server does not have the knowledge to chose the contextually correct
+master device. For each client, one master pointer is designated as this
+clients's "ClientPointer". Whenever a client sends an ambiguous request (e.g.
+QueryPointer), the ClientPointer or the keyboard paired with the ClientPointer
+is chosen to provide the data for this request.
+
+This ClientPointer may be explicitly assigned to a client with the
+SetClientPointer call. If no ClientPointer is set when a client issues an
+ambiguous request, the server choses one device as the ClientPointer. The
+method of chosing a ClientPointer from the available master pointers is
+implementation-specific.
+
+If the master pointer currently set as ClientPointer for one or more clients is
+removed, the server may either unset the ClientPointer setting or change the
+ClientPointer to a different master pointer.
+
+[[multitouch]]
+Touch device support
+--------------------
+
+XI 2.2 introduces support for multi-touch devices. The traditional
+pointer/keyboard approach enforced by XI 2.0 with the master/slave device
+hierarchy is not always suitable for multi-touch devices that can provide a
+dynamic number of touchpoints per physical device; it is not known without
+client-specific interpretation whether the touchpoints must be considered
+separately or grouped together.
+
+The additions in XI 2.2 aim to:
+
+- support a dynamic number of simultaneous touch points,
+- support devices that are both multi-touch and traditional pointer devices,
+- allow touchpoints to be either grouped together or handled separately,
+- be backwards-compatible to pre-XI 2.2 clients through emulation of XI 2.x/XI 1.x and core
+ pointer events.
+
+Touch events are only available to clients supporting version 2.2 or later of
+the X Input Extension. Clients must use the XIQueryVersion request to announce
+support for this version. Touch devices may generate emulated pointer events
+alongside XI 2.2 touch events to support older clients; see Section
+<<multitouch-processing,Touch event delivery>>.
+
+Touch event processing differs from normal event processing in a few ways.
+The most notable differences are that touch events are processed partially
+out-of-band from pointer and keyboard events, and that touch events may be
+sent to multiple clients simultaneously. For more details see Section
+<<multitouch-processing, Touch event delivery>>.
+
+[[multitouch-lifecycle]]
+Touch event sequences
+~~~~~~~~~~~~~~~~~~~~~
+
+Touch input follows a three-stage cycle:
+
+ begin - update - update - ... - end
+
+i.e. “begin” the sequence by touching the device, “update” the current
+touch location or properties any number of times, and finally “end” the
+sequence by ceasing to touch the device. Within this document, the term
+"touch sequence" is used to describe the above sequence of events.
+In the protocol, the three stages are represented with the event
+types TouchBegin, TouchUpdate, and TouchEnd, respectively. A touch sequence
+always generates TouchBegin and TouchEnd events, and may also generate
+TouchUpdate events. Clients must select for all three of these events
+simultaneously.
+
+When a touch starts, clients are sent a TouchBegin event
+detailing the position of the touchpoint, as well as the
+initial properties of the touchpoint. Note that the logical state of the
+device (as seen through the input protocol) may lag the physical state if event
+processing is affected by grabs. Multiple touchpoints may be active on the
+same device at any time, potentially owned by and/or delivered to a different
+set of clients.
+
+Whenever the touch position or any other property of the touchpoint changes,
+a TouchUpdate event is sent to all clients listening
+to events for that touchpoint with the updated information.
+
+When the touch has physically ended, or a client will otherwise not receive
+any more events for a given touchpoint, a TouchEnd event will be sent to
+that client.
+
+Passive touch grabs are similar to standard input event grabs in that they
+take precedence over event selections and are searched from the root window
+to the child window (as opposed to selections, which start their search at the
+child window and continue up to the root window). When a touch grab activates,
+the client whose grab activates becomes the “owner” of this touch sequence,
+and must decide what to do with it, as per Section
+<<multitouch-ownership,Ownership of touch sequences>>. See the
+<<requests-passivegrabdevice,XIPassiveGrabDevice>> request
+documentation for more information on passive grab activation.
+
+Only one client may select for touch events from a given device on a window.
+
+[[multitouch-ownership]]
+Ownership of touch sequences
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Once a grabbing client becomes the owner of a touch, it must either “accept” or
+"reject" the touch sequence using the XIAllowEvents request. If a touch sequence
+is rejected, a TouchEnd event is sent to the rejecting client, and it will not
+receive any more events for this touch. The server then looks to the next
+window in the stack for another passive grab, and attempts to pass ownership
+on to the next candidate for a passive grab (i.e. the next window towards
+the final child window with a matching grab), or to the first applicable
+event selection if there are no more grabs.
+
+If a touch sequence is accepted by its owner, all other clients receive
+TouchEnd events, and the touch sequence is exclusively delivered to the
+owner from that point on.
+
+If the touch sequence physically ends while the owner of the touch sequence
+has not yet accepted or rejected ownership, the owner receives a TouchEnd
+event and all other clients receive a TouchUpdate event with the
+TouchPendingEnd flag set. The owner must still accept or reject the sequence
+nonetheless. If the owner rejects the touch sequence, the server will still
+attempt to exhaust all other passive grabs and/or event selections looking
+for a final owner.
+
+If the touch sequence has not physically ended yet and the owner of the
+touch sequence rejects, the owner receives a TouchEnd event and ownership is
+passed to the next client.
+
+Clients may opt for touch events to be delivered before they become the
+owner of the touch sequence. In this case, the logical state of the device (as
+seen by means of the protocol) always matches the physical state of the device.
+Clients must use caution if they opt for this feature; any action taken must be
+undone if the touch sequence ends without the client becoming the owner.
+
+To select for touch events regardless of ownership, a client must set the
+TouchOwnership event mask in addition to the
+TouchBegin, TouchUpdate and TouchEnd mask. When selected, a client will receive
+touch events as they occur on the device. If and when the client
+becomes the owner of a touch sequence, a TouchOwnership event is sent to the
+client. If the client is the initial owner of the sequence, the TouchBegin is
+immediately followed by the TouchOwnership event. Otherwise, TouchUpdate events
+may preceed a TouchOwnership event. A client is not guaranteed to become the
+owner of any given touch sequence.
+
+The server delivers touch events to all clients that have selected for
+TouchOwnership and to the current owner of the sequence in parallel.
+
+If a client has selected for TouchOwnership and is not the current owner of
+the sequence and the current owner accepts the sequence, the client receives
+a TouchEnd event and no further events from this sequence are sent to this
+client.
+
+If a client has selected for TouchOwnership and the physical touch ends
+before the current owner has accepted or rejected the sequence, the client
+receives a TouchUpdate event with the TouchPendingEnd flag set. No further
+TouchUpdate events will be sent for this sequence. If the current owner
+accepts the sequence, the client receives a TouchEnd event. Otherwise, if
+the current owner rejects the sequence, the client may become
+the owner of the touch sequence and receive a TouchOwnership event and a
+TouchEnd event.
+
+[[multitouch-device-modes]]
+Touch device modes
+~~~~~~~~~~~~~~~~~~
+
+Touch devices come in many different forms with varying capabilities. The
+following device modes are defined for this protocol:
+
+'DirectTouch':
+ These devices map their input region to a subset of the screen region. Touch
+ events are delivered to window at the location of the touch. "direct"
+ here refers to the user manipulating objects at their screen location.
+ An example of a DirectTouch device is a touchscreen.
+
+'DependentTouch':
+ These devices do not have a direct correlation between a touch location and
+ a position on the screen. Touch events are delivered according to the
+ location of the device's cursor and often need to be interpreted
+ relative to the current position of that cursor. Such interactions are
+ usually the result of a gesture performed on the device, rather than
+ direct manipulation. An example of a DependentTouch device is a
+ trackpad.
+
+A device is identified as only one of the device modes above at any time, and
+the touch mode may change at any time. If a device's touch mode changes, an
+XIDeviceChangedEvent is generated.
+
+[[multitouch-processing]]
+Touch event delivery
+~~~~~~~~~~~~~~~~~~~~
+
+For direct touch devices, the window set for event propagation is the set of
+windows from the root window to the topmost window lying at the co-ordinates
+of the touch.
+
+For dependent devices, the window set for event propagation is the set of
+windows from the root window to the window that contains the device's
+pointer. A dependent device may only have one window set at a time, for all
+touches. Any future touch sequence will use the same window set. The window set
+is cleared when all touch sequences on the device end.
+
+A window set is calculated on TouchBegin and remains constant until the end
+of the sequence. Modifications to the window hierarchy, new grabs or changed
+event selection do not affect the window set.
+
+Pointer control of dependent devices
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+On a dependent device, the device may differ between a pointer-controlling
+touch and a non-pointer-controlling touch. For example, on a touchpad the
+first touch is pointer-controlling (i.e. serves only to move the visible
+pointer). Multi-finger gestures on a touchpad cause all touches to be
+non-pointer-controlling.
+
+For pointer-controlling touches, no touch events are sent; the touch
+generates regular pointer events instead. Non-pointer-controlling touches
+send touch events. A touch may change from pointer-controlling to
+non-pointer-controlling, or vice versa.
+
+- If a touch changes from pointer-controlling to non-pointer-controlling,
+ a new touch ID is assigned and a TouchBegin is sent for the last known
+ position of the touch. Further events are sent as TouchUpdate events, or as
+ TouchEnd event if the touch terminates.
+
+- If a touch changes from non-pointer-controlling to pointer-controlling, a
+ TouchEnd is sent for that touch at the last known position of the touch.
+ Further events are sent as pointer events.
+
+The conditions to switch from pointer-controlling to non-pointer-controlling
+touch is implementation-dependent. A device may support touches that are
+both pointer-controlling and a touch event.
+
+In the dependent touch example event sequence below, touches are marked when
+switching to pointer-controlling (pc) or to non-pointer-controlling (np).
+
+.Dependent touch example event sequence on a touchpad
+[width="50%", options="header"]
+|====================================================
+| Finger 1 | Finger 2 | Event generated(touchid)
+| down | | Motion
+| move | | Motion
+| move | | Motion
+| (np) | down | TouchBegin(0), TouchBegin(1)
+| move | -- | TouchUpdate(0)
+| -- | move | TouchUpdate(1)
+| up | (pc) | TouchEnd(0), TouchEnd(1)
+| | move | Motion
+| down | (np) | TouchBegin(2), TouchBegin(3)
+| move | -- | TouchUpdate(2)
+| up | (pc) | TouchEnd(2), TouchEnd(3)
+| | up | Motion
+| down | | Motion
+| (np) | down | TouchBegin(4), TouchBegin(5)
+| (pc) | up | TouchEnd(4), TouchEnd(5)
+| move | | Motion
+| up | | Motion
+|====================================================
+
+
+[[multitouch-emulation]]
+Pointer emulation from multitouch events
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Touch sequences from direct touch devices may emulate pointer events. Only one
+touch sequence from a device may emulate pointer events at a time; which touch
+sequence emulates pointer events is implementation-dependent.
+
+Pointer events are emulated as follows:
+
+- A TouchBegin event generates a pointer motion event to the location of the
+ touch with the same axis values of the touch event, followed by a button press
+ event for button 1.
+- A TouchUpdate event generates a pointer motion event to the location of the
+ touch and/or to update axis values of the pointer device. The button state
+ as seen from the protocol includes button 1 set.
+- A TouchEnd event generates a pointer motion event to the location of the touch
+ and/or to update the axis values if either have changed, followed by a button
+ release event for button 1. The button state as seen from the protocol
+ includes button 1 set.
+
+If a touch sequence emulates pointer events and an emulated pointer event
+triggers the activation of a passive grab, the grabbing client becomes the
+owner of the touch sequence.
+
+The touch sequence is considered to have been accepted if
+
+- the grab mode is asynchronous, or
+- the grab mode is synchronous and the device is thawed as a result of
+ AllowEvents with AsyncPointer or AsyncDevice
+
+Otherwise, if the button press is replayed by the client, the touch sequence
+is considered to be rejected.
+
+Touch event delivery precedes pointer event delivery. A touch event emulating
+pointer events is delivered:
+
+- as a touch event to the top-most window of the current window set if a
+ client has a touch grab on this window,
+- otherwise, as a pointer event to the top-most window of the current window
+ set if a client has a pointer grab on this window,
+- otherwise, to the next child window in the window set until a grab has been
+ found.
+
+If no touch or pointer grab on any window is active and the last window in the
+window set has been reached, the event is delivered:
+
+- as a touch event to the window if a client has selected for touch events
+ on this window
+- otherwise, as a pointer event to the window if a client has selected for
+ pointer events.
+- otherwise, to the next parent window in the window set until a selection has
+ been found.
+
+Emulated pointer events will have the PointerEmulated flag set. A touch
+event that emulates pointer events has the TouchEmulatingPointer flag set.
+
+
+[[barrier-events]]
+Pointer barrier events
+^^^^^^^^^^^^^^^^^^^^^^
+If a master pointer moves against a pointer barrier blocking movement in
+that pointer's direction, the movement of the pointer is clamped to the x or
+y coordinate of the barrier, whichever applies. For a description of pointer
+barriers and barrier creation and destruction see the XFixes protocol
+specification v 5.0 or later.
+http://cgit.freedesktop.org/xorg/proto/fixesproto/plain/fixesproto.txt
+
+A pointer hitting a blocking barrier creates a new barrier event sequence,
+identified by a unique event ID. A new event ID is assigned when the pointer
+first hits a barrier. Subsequent movements against or along the pointer
+barrier are assigned the same event ID. The event generated by the pointer
+leaving the barrier, or being released by a client request, is the last
+event with this event ID. Any future movements of this device blocked by
+this barrier will be assigned a new event ID.
+
+Pointer barrier events are delivered exclusively to the client that created
+the barrier, and to the window specified in the CreatePointerBarrier
+request (the "barrier window"). A pointer barrier blocks pointer movement
+regardless of whether its window is mapped and/or viewable. If the pointer
+barrier window is destroyed, the pointer barrier remains blocking but a
+client will not receive further events.
+
+If a device is actively grabbed by a client or a passive grab activated
+for this client, and the pointer moves against a pointer barrier created by
+this client and the grab-window is the barrier window, that client will
+receive pointer barrier events if:
+- owner-events is true or false and the grab's event mask includes
+ pointer barrier events, or
+- owner-events is true and the client has selected for barrier events on the
+ barrier window.
+
+If the grab-window is not the barrier window, the client will receive events
+if:
+- the client has selected for barrier events on the barrier window.
+
+If the barrier is not owned by this client, no barrier events are sent to
+this client. The client owning the barrier will receive events if:
+- the client has pointer barrier events selected on the window associated
+ with the pointer barrier
+
+The BarrierDeviceIsGrabbed flag is set whenever a pointer barrier event is
+generated while the device is actively grabbed by any client or a passive
+grab has activated for this device prior to the event.
+
+[[glossary-notations]]
+Notations used in this document
+-------------------------------
+
+Notation for requests:
+
+ ┌───
+ Name of request
+ name of request field: type of request field
+ name of request field: type of request field
+ ▶
+ name of reply field: type of reply field
+ └───
+
+Notation for events:
+
+ ┌───
+ Name of event
+ name of field: type of field
+ name of field: type of field
+ └───
+
+Complex fields are specified in the following notation:
+
+ name of field: COMPLEXFIELDTYPE
+
+or, if multiple of these fields exist:
+
+ name of field: LISTofCOMPLEXFIELDTYPE
+
+ COMPLEXFIELDTYPE: { name of subfield: type of subfield,
+ name of subfield: type of subfield }
+
+
+[[glossary-datatypes]]
+Data types
+----------
+
+ BUTTONMASK
+ A binary mask defined as (1 << button number).
+ A SETofBUTTONMASK is a binary OR of zero or more BUTTONMASK.
+
+ DEVICE { DEVICEID, AllDevices, AllMasterDevices }
+ A DEVICE specifies either a DEVICEID or AllDevices or
+ AllMasterDevices.
+
+ DEVICEID { CARD16 }
+ A DEVICEID is a numerical ID for a device currently available in the
+ server. The server may re-use a device ID after a device's removal.
+ The device IDs 0 and 1 are reserved.
+ AllDevices ........ 0
+ AllMasterDevices .. 1
+
+ DEVICEUSE { MasterPointer, MasterKeyboard, SlavePointer,
+ SlaveKeyboard, FloatingSlave }
+ A DEVICEUSE field specifies the current use of a device in the MD/SD
+ device hierarchy. See Section "The Master/Slave device hierarchy"
+ for more information.
+
+ EVTYPEMASK
+ An EVTYPEMASK is a binary mask defined as (1 << event type).
+ A SETofEVTYPEMASK is a binary OR of zero or more EVTYPEMASK.
+
+ FP1616
+ Fixed point decimal in 16.16 format as one INT16 and one CARD16.
+ The INT16 contains the integral part, the CARD16 the decimal fraction
+ shifted by 16.
+
+ FP3232
+ Fixed point decimal in 32.32 format as one INT32 and one CARD32.
+ The INT32 contains the integral part, the CARD32 the decimal fraction
+ shifted by 32.
+
+ MODIFIERMASK
+ A MODIFIERMASK is a binary mask defined as (1 << modifier map index).
+ A SETofMODIFIERMASK is a binary OR of zero or more MODIFIERMASK or
+ GrabAnyModifier.
+
+ VALUATORMASK
+ A binary mask defined as (1 << valuator number).
+ A SETofVALUATORMASK is a binary OR of zero or more VALUATORMASK.
+
+
+[[errors]]
+Errors
+------
+
+Errors are sent using core X error reports.
+
+ Device
+ A value for a DEVICE argument does not specify a valid DEVICE.
+
+
+[[requests]]
+Requests
+--------
+
+The server does not guarantee that the length of a reply remains constant in
+future revisions of XI2. A client must always retrieve the exact length of the
+protocol reply from the connection, even if the reply is longer than defined
+for the XI2 version supported by the client.
+Additional bytes in a request may include data supported in later versions of
+XI2. Clients should ignore this data. Padding bytes in XI2 protocol requests
+are required to be 0.
+
+[[requests-xi20]]
+Requests introduced in version 2.0
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[[requests-queryversion]]
+XIQueryVersion
+^^^^^^^^^^^^^^
+ ┌───
+ XIQueryVersion
+ major_version: CARD16
+ minor_version: CARD16
+ ▶
+ major_version: CARD16
+ minor_version: CARD16
+ └───
+
+The client sends the highest supported version to the server and the
+server sends the highest version it supports, but no higher than the
+requested version. Major versions changes can introduce incompatibilities
+in existing functionality, minor version changes introduce only backward
+compatible changes. It is the client's responsibility to ensure that the
+server supports a version which is compatible with its expectations.
+
+ major_version
+ Major XI2 version.
+ minor_version
+ Minor XI2 version.
+
+If major_version is less than 2, a BadValue error occurs.
+
+[[requests-querydevice]]
+XIQueryDevice
+^^^^^^^^^^^^^
+ ┌───
+ XIQueryDevice
+ DEVICE deviceid
+ ▶
+ num_devices: CARD16
+ deviceinfo: LISTofDEVICEINFO
+ └───
+
+ DEVICEINFO { deviceid: DEVICEID
+ use: DEVICEUSE
+ attachment: DEVICEID
+ enabled: BOOL
+ num_classes: CARD16
+ name_len: CARD16
+ name: LISTofCHAR8
+ classes: LISTofCLASS }
+
+ CLASS { BUTTONCLASS, KEYCLASS, VALUATORCLASS, SCROLLCLASS, TOUCHCLASS }
+
+ BUTTONCLASS { type: ButtonClass
+ length: CARD16
+ sourceid: CARD16
+ num_buttons: CARD16
+ state: SETofBUTTONMASK
+ labels: LISTofATOM }
+
+ KEYCLASS { type: KeyClass
+ length: CARD16
+ sourceid: CARD16
+ num_keys: CARD16
+ keys: LISTofCARD32 }
+
+ VALUATORCLASS { type: ValuatorClass
+ length: CARD16
+ sourceid: CARD16
+ number: CARD16
+ label: ATOM
+ min: FP3232
+ max: FP3232
+ value: FP3232
+ resolution: CARD32
+ mode: CARD8 }
+
+ SCROLLCLASS¹ { type: ScrollClass
+ length: CARD16
+ sourceid: CARD16
+ number: CARD16
+ scroll_type: SCROLLTYPE
+ flags: SETofSCROLLFLAGS
+ increment: FP3232 }
+
+ SCROLLTYPE { Vertical, Horizontal }
+
+ SCROLLFLAGS { NoEmulation, Preferred }
+
+ TOUCHCLASS² { type: TouchClass
+ length: CARD16
+ sourceid: CARD16
+ mode: TOUCHMODE
+ num_touches: CARD16 }
+
+ TOUCHMODE { DirectTouch, DependentTouch }
+
+ ¹ since XI 2.1
+ ² since XI 2.2
+
+XIQueryDevice details information about the requested input devices.
+
+ devices
+ The device to list. If devices is AllDevices, all enabled and
+ disabled devices are listed. If devices is AllMasterDevices, all
+ enabled and disabled master devices are listed. If devices is a
+ valid DEVICE, only this DEVICE is listed and num_devices is 1.
+ num_devices
+ The number of deviceinfos returned.
+
+Each deviceinfo is detailed as follows:
+
+ deviceid
+ The unique ID of the device. Device IDs may get re-used when a device
+ is removed.
+ use
+ If the device is a master pointer, use is MasterPointer.
+ If the device is a master keyboard, use is MasterKeyboard.
+ If the device is a slave pointer, use is SlavePointer.
+ If the device is a slave keyboard, use is SlaveKeyboard.
+ If the device is a floating slave, use is FloatingSlave.
+ attachment
+ If the device is a master pointer or a master keyboard, attachment
+ specifies the paired master keyboard, or the paired master pointer,
+ respectively. If the device is a non-floating slave device
+ attachment specifies the master device this device is attached to.
+ If the device is a floating slave, attachment is undefined.
+ enabled
+ Zero if the device is disabled, non-zero otherwise.
+ num_classes
+ Number of classes provided.
+ name_len
+ Length of the name in bytes not including padding.
+ classes
+ Details the available classes provided by the device in an undefined
+ order.
+ name
+ The device's name. padded to a multiple of 4 bytes.
+
+For all classes, type specifies the device class. Clients are required
+to ignore unknown device classes. The length field specifies the length
+of the class in 4 byte units.
+The following classes may occur only once: ButtonClass, KeyClass
+
+ ButtonClass:
+ type
+ Always ButtonClass.
+ length
+ Length in 4 byte units.
+ sourceid
+ The device this class originates from.
+ num_buttons
+ Number of buttons provided by the device.
+ labels
+ List of Atoms specifying the label for each button. An Atom of None
+ specifies an unlabeled button. Buttons are listed in the device-native
+ order regardless of the current button mapping.
+ state
+ The current button mask for this device after button mapping is
+ applied. Each bit representing a button is 1 if this button is
+ logically down, or 0 otherwise. State is a multiple of 4-byte units
+ and always contains at least num_buttons bits.
+
+ KeyClass:
+ type
+ Always KeyClass.
+ length
+ Length in 4 byte units.
+ sourceid
+ The device this class originates from.
+ num_keys
+ Number of keycodes provided by the device.
+ keys
+ List of keycodes provided.
+
+ ValuatorClass:
+ type
+ Always ValuatorClass.
+ length
+ Length in 4 byte units.
+ sourceid
+ The device this class originates from.
+ number
+ Valuator number of this axis. The valuator number is in device-native
+ order and potential axis mappings are ignored.
+ label
+ Atom specifying the axis name. An Atom of None specifies an unlabeled
+ axis.
+ min
+ Minimum value.
+ max
+ Minimum value.
+ resolution
+ Resolution in counts/meter.
+ mode
+ Relative or Absolute.
+ value
+ Last published axis value (if mode is absolute).
+
+An axis in Relative mode may specify min and max as a hint to the
+client. If no min and max information is available, both must be 0.
+
+ ScrollClass:
+ type
+ Always ScrollClass.
+ number
+ Valuator number that is referred to. This valuator number must be listed in
+ the ValuatorClassInfo.
+ scroll_type:
+ Vertical for a vertical scrolling axis, Horizontal for a horizontal
+ scrolling axis.
+ flags:
+ A set of flags that apply to this scroll axis.
+ NoEmulation: no legacy scroll button events are generated for events
+ on this scrolling axis.
+ Preferred: This axis is the preferred axis for emulating valuator
+ events from legacy scroll button events.
+ increment:
+ The valuator delta equivalent to one positive unit of scrolling.
+
+A ScrollClass may only exist if the device has at least one ValuatorClass
+and each valuator number listed in any ScrollClass. Only one ScrollClass may
+exist per ValuatorClass.
+
+ TouchClass:
+ type
+ Always TouchClass.
+ length
+ Length in 4 byte units.
+ sourceid
+ The device this class originates from.
+ mode
+ The device type of the touch device. This mode may change at runtime.
+ num_touches
+ The maximum number of simultaneous touchpoints the device may send.
+ If num_touches is 0, the number of supported touches is unknown or
+ unlimited.
+
+Devices with a TouchClass emit touch events with the same axes as pointer
+events.
+
+[[requests-selectevents]]
+XISelectEvents
+^^^^^^^^^^^^^^
+ ┌───
+ XISelectEvents
+ window: Window
+ num_masks: CARD16
+ masks: LISTofEVENTMASK
+
+ └───
+
+ EVENTMASK { deviceid: DEVICE,
+ mask_len: CARD16,
+ mask: SETofEVTYPEMASK }
+
+ window
+ The window to select the events on.
+ num_masks
+ Number of items in masks.
+ deviceid
+ Numerical deviceid, or AllDevices, or AllMasterDevices.
+ mask_len
+ Length of mask in 4 byte units.
+ mask
+ Event mask. An event mask for an event type T is defined as (1 << T).
+
+XISelectEvents selects for XI2 events on window.
+
+If num_masks is 0, a BadValue error occurs.
+
+Each mask sets the (and overwrites a previous) event mask for the DEVICE
+specified through deviceid. The device AllDevices or
+AllMasterDevices is treated as a separate device by server. A client's
+event mask is the union of AllDevices, AllMasterDevices and the
+per-device event mask.
+The removal of device from the server unsets the event masks for the
+device. If an event mask is set for AllDevices or AllMasterDevices, the
+event mask is not cleared on device removal and affects all future
+devices.
+
+If mask_len is 0, the event mask for the given device is cleared.
+
+The mask for XIHierarchyEvents may only be selected for XIAllDevices.
+Setting it for any other device results in a BadValue error.
+
+A client selecting for any of XI_TouchBegin, XI_TouchUpdate, or XI_TouchEnd
+must select for all three events at the same time, else a BadValue error
+will be generated. A client selecting for XI_TouchOwnership must select for
+all three of the other touch events. If the selection for these touch events
+overlaps a current selection by another client (e.g. selecting for a
+specific device when another client has a selection for XIAllDevices), a
+BadAccess error occurs.
+
+[[requests-getselectedevents]]
+XIGetSelectedEvents
+^^^^^^^^^^^^^^^^^^^
+ ┌───
+ XIGetSelectedEvents
+ window: Window
+ ▶
+ num_masks: CARD16
+ masks: LISTofEVENTMASK
+ └───
+
+ window
+ The window to select the events on.
+ num_masks
+ Number of items in masks.
+ masks
+ Selected event masks by this client.
+
+Masks are returned on a per-device basis, with masks for AllDevices and
+AllMasterDevices returned separately. A client can calculate the
+effective mask for a device with a bitwise OR of the AllDevices, the
+AllMasterDevices and the device-specific mask.
+
+If num_masks is 0, no events have been selected by this client on the
+given window.
+
+[[requests-querypointer]]
+XIQueryPointer
+^^^^^^^^^^^^^^
+ ┌───
+ XIQueryPointer
+ window: Window
+ deviceid: DEVICEID
+ ▶
+ root: Window
+ child: Window
+ root_x: FP1616
+ root_y: FP1616
+ win_x: FP1616
+ win_y: FP1616
+ same_screen: BOOL
+ mods: MODIFIERINFO
+ group: GROUPINFO
+ buttons_len: CARD16
+ buttons: SETofBUTTONMASK
+ └───
+
+Query a master pointer device for its current position.
+
+ root
+ The root window the pointer is logically on.
+ child
+ The child window of window that contains the pointer or None.
+ root_x
+ root_y
+ Pointer position relative to the root window's origin.
+ win_x
+ win_y
+ Pointer position relative to window or 0 if same_screen is false.
+ same_screen
+ True if window is on the same screen as the pointer.
+ mods
+ XKB modifier state on the paired device.
+ group
+ XKB group state on the paired device.
+ buttons_len
+ The length of buttons in 4 byte units.
+ buttons
+ Button state.
+
+If the device is not a master pointer device or not a floating slave
+pointer, a BadDevice error results.
+
+[[requests-warppointer]]
+XIWarpPointer
+^^^^^^^^^^^^^
+ ┌───
+ XIWarpPointer
+ src_win: Window
+ dst_win: Window
+ src_x: FP1616
+ src_y: FP1616
+ src_width: INT16
+ src_height: INT16
+ dst_x: FP1616
+ dst_y: FP1616
+ deviceid: DEVICEID
+ └───
+
+WarpPointer moves the pointer of deviceid as if the user had moved
+the pointer. WarpPointer can only be called for MasterPointer and
+FloatingSlave devices.
+
+ src_win
+ If src_window is not None, the move only takes place if src_window
+ contains the pointer and the pointer is contained in the specified
+ rectangle of src_window.
+ dst_win
+ If dst_win is None, this request moves the pointer by offsets
+ dst_x/dst_y relative to the current position of the pointer. If
+ dst_window is a window, this request moves the pointer to
+ dst_x/dst_y relative to dst_win's origin.
+ src_x
+ src_y
+ src_width
+ src_height
+ Specifies the source window rectangle.
+ dst_x
+ dst_y
+ The relative coordinates to move the pointer if dst_win is None, or
+ the absolute coordinates if dst_win is a window.
+ deviceid
+ The device to warp.
+
+This request cannot be used to move the pointer outside the confine-to
+window of an active pointer grab. An attempt will only move the pointer as
+far as the closest edge of the confine-to window.
+
+This request will generate events just as if the user had instantaneously
+moved the pointer.
+
+[[requests-changecursor]]
+XIChangeCursor
+^^^^^^^^^^^^^^
+ ┌───
+ XIChangeCursor
+ win: Window
+ cursor: Cursor
+ deviceid: DEVICEID
+ └───
+
+Change a master pointer's cursor on the specified window.
+
+ window
+ The window.
+ cursor
+ The new cursor or None.
+ deviceid
+ The master pointer device.
+
+Whenever device enters a window W, the cursor shape is selected in the
+following order:
+
+- if the current window has a device cursor C(d) defined for device,
+ display this cursor C(d).
+- otherwise, if the current window has a cursor C(w) defined in the core
+ protocol's window attributes, display cursor C(w).
+- repeat on parent window until a cursor has been found.
+
+The device cursor for a given window is reset once the window is destroyed
+or the device is removed, whichever comes earlier.
+
+If deviceid does not specify a master pointer, a BadDevice error
+is returned.
+
+[[requests-changehierarchy]]
+XIChangeHierarchy
+^^^^^^^^^^^^^^^^^
+ ┌───
+ XIChangeHierarchy
+ num_changes: CARD8
+ changes: LISTofHIERARCHYCHANGES
+ └───
+
+ HIERARCHYCHANGE { ADDMASTER, REMOVEMASTER, ATTACHSLAVE, DETACHSLAVE }
+
+ HIERARCHYCHANGETYPE { AddMaster, RemoveMaster, AttachSlave, DetachSlave }
+
+ CHANGEMODE { Float, Attach }
+
+ ADDMASTER { type: HIERARCHYCHANGETYPE
+ length: CARD16
+ name_len: CARD16
+ send_core: BOOL
+ enable: BOOL
+ name: LISTofCHAR8 }
+
+ REMOVEMASTER { type: HIERARCHYCHANGETYPE
+ length: CARD16
+ deviceid: DEVICEID
+ return_mode: CHANGEMODE
+ return_pointer: DEVICEID
+ return_keyboard: DEVICEID }
+
+ ATTACHSLAVE { type: HIERARCHYCHANGETYPE
+ length: CARD16
+ deviceid: DEVICEID
+ master: DEVICEID }
+
+ DETACHSLAVE { type: HIERARCHYCHANGETYPE
+ length: CARD16
+ deviceid: DEVICEID }
+
+XIChangeHierarchy allows a client to modify the
+<<hierarchy,Master/Slave device hierarchy>>.
+
+ num_changes
+ The number of changes to apply to the current hierarchy.
+ changes
+ The list of changes.
+
+The server processes the changes in the order received from the client and
+applies each requested change immediately. If an error occurs, processing
+stops at the current change and returns the number of successfully applied
+changes in the error.
+
+ ADDMASTER creates a pair of master devices.
+ type
+ Always AddMaster.
+ length
+ Length in 4 byte units.
+ name_len
+ Length of name in bytes.
+ send_core
+ True if the device should send core events.
+ enable
+ True if the device is to be enabled immediately.
+ name
+ The name for the new master devices. The master pointer's name is
+ automatically appended with " pointer", the master keyboard's name is
+ automatically appended with " keyboard".
+
+ REMOVEMASTER removes an existing master device.
+ type
+ Always RemoveMaster.
+ length
+ Length in 4 byte units.
+ deviceid
+ The device to remove.
+ return_mode
+ Return mode for attached slave devices.
+ If return_mode is Float, all slave devices are set to floating.
+ If return_mode is Attach, slave pointers are attached to
+ return_pointer and slave keyboards are attached to
+ return_keyboard.
+ return_pointer
+ return_keyboard
+ The master pointer and master keyboard to attach slave devices to, if
+ return_mode is Attach. If return_mode is Float, return_pointer
+ and return_keyboard are undefined.
+
+Removing a master pointer removes the paired master keyboard and vice
+versa.
+
+ ATTACHSLAVE attaches a slave device to a given master device.
+ type
+ Always ChangeAttachment.
+ length
+ Length in 4 byte units.
+ deviceid
+ Deviceid of the slave device.
+ master
+ The new master device to attach this slave device to.
+
+If any clients are selecting for touch events from the slave device, their
+selection will be canceled.
+
+ DETACHSLAVE detaches a slave device from its current master device.
+ type
+ Always ChangeAttachment.
+ length
+ Length in 4 byte units.
+ deviceid
+ Deviceid of the slave device.
+
+[[requests-setclientpointer]]
+XISetClientPointer
+^^^^^^^^^^^^^^^^^^
+ ┌───
+ XISetClientPointer
+ win: Window
+ deviceid: DEVICEID
+ └───
+
+Set the ClientPointer for the client owning win to the given device.
+
+ win
+ Window or client ID.
+ deviceid
+ The master pointer or master keyboard that acts as ClientPointer.
+
+Some protocol requests are ambiguous and the server has to choose a device
+to provide data for a request or a reply. By default, the server will
+choose a client's ClientPointer device to provide the data, unless the
+client currently has a grab on another device. See section
+<<clientpointer,The ClientPointer principle>> for more details.
+
+If win is None, the ClientPointer for this client is set to the given
+device. Otherwise, if win is a valid window, the ClientPointer for the
+client owning this window is set to the given device. Otherwise, if win is
+not a valid window but a client with the client mask equal to win exists,
+this client's ClientPointer is set to the given device.
+
+If deviceid does not specify a master pointer or master keyboard, a
+BadDevice error is returned.
+
+If window does not specify a valid window or client ID and is not None, a
+BadWindow error is returned.
+
+[[requests-getclientpointer]]
+XIGetClientPointer
+^^^^^^^^^^^^^^^^^^
+ ┌───
+ XIGetClientPointer
+ win: Window
+ ▶
+ set: BOOL
+ deviceid: DEVICEID
+ └───
+
+Query the ClientPointer for the client owning win.
+
+ win
+ The window or client ID.
+ set
+ True if the client has a ClientPointer set.
+ deviceid
+ The master pointer that acts as a ClientPointer if set is True.
+
+No difference is made between a ClientPointer set explicitly through
+XISetClientPointer and a ClientPointer implicitly assigned by the server
+in response to an ambiguous request.
+
+[[requests-setfocus]]
+XISetFocus
+^^^^^^^^^^
+ ┌───
+ XISetFocus
+ focus: Window
+ deviceid: DEVICEID
+ time: Time
+ └───
+
+Set the focus for the given device to the given window. Future key events
+from this device are sent to this window.
+This request generates FocusIn and FocusOut events.
+
+ focus
+ A viewable window or None.
+ deviceid
+ The device to modify the focus window for.
+ time
+ Specifies the time to change the focus or CurrentTime.
+
+If focus is None, key events from this device are discarded until a new
+focus window is set. If focus is a viewable window, key events from this
+device are sent to this window. If the window becomes unviewable, the
+window's first viewable ancestor automatically becomes the focus window
+and FocusIn and FocusOut events are sent as if a client had changed the
+focus window.
+This is equivalent to RevertToParent in the core XSetInputFocus window.
+
+This request has no effect if the specified time is earlier than the
+current last-focus-change time or is later than the current X server time.
+Otherwise, the last-focus-change time is set to the specified time.
+
+[[requests-getfocus]]
+XIGetFocus
+^^^^^^^^^^
+ ┌───
+ XIGetFocus
+ deviceid: DEVICEID
+ ▶
+ focus: Window
+ └───
+
+Return the current focus window for the given device.
+
+[[requests-grabdevice]]
+XIGrabDevice
+^^^^^^^^^^^^
+ ┌───
+ XIGrabDevice
+ deviceid: DEVICEID
+ grab_window: Window
+ owner_events: BOOL
+ grab_mode: { Synchronous, Asynchronous }
+ paired_device_mode: { Synchronous, Asynchronous }
+ time: TIMESTAMP or CurrentTime
+ cursor: Cursor
+ mask_len: CARD16
+ masks: SETofEVTYPEMASK
+ ▶
+ status: Success, AlreadyGrabbed, Frozen, InvalidTime, NotViewable
+ └───
+
+This request actively grabs control of the specified input device. Further
+input events from this device are reported only to the grabbing client.
+This request overides any previous active grab by this client for this
+device. This request does not affect the processing of XI 2.2
+touch events.
+
+ deviceid
+ The device to grab.
+ grab_window
+ Events are reported relative to the grab window.
+ owner_events
+ Specifies whether event will be reported normally or relative to the
+ grab window.
+ grab_mode
+ Specifies if this device will be frozen as a result of the grab.
+ paired_device_mode
+ Specifies if the master device paired with this device will be frozen
+ as a result of the grab.
+ time
+ A valid server time or CurrentTime.
+ cursor
+ The cursor to display for the duration of the grab or None.
+ mask_len
+ Length of mask in 4 byte units.
+ mask
+ Event mask. An event mask for an event type T is defined as (1 << T).
+ status
+ Success or the reason why the grab could not be established.
+
+The masks parameter specifies which events the client wishes to receive
+while the device is grabbed.
+
+If owner-events is False, input events generated from this device are
+reported with respect to grab-window, and are only reported if selected by
+being included in the event-list. If owner-events is True, then if a
+generated event would normally be reported to this client, it is reported
+normally, otherwise the event is reported with respect to the grab-window,
+and is only reported if selected by being included in the event-list. For
+either value of owner-events, unreported events are discarded.
+
+If grab-mode is Asynchronous, device event processing continues normally.
+If the device is currently frozen by this client, then processing of
+device events is resumed. If grab-mode is Synchronous, the state of the
+grabbed device (as seen by means of the protocol) appears to freeze,
+and no further device events are generated by the server until the
+grabbing client issues a releasing XIAllowEvents request or until the
+device grab is released. Actual device input events are not lost while the
+device is frozen; they are simply queued for later processing.
+
+If the device is a slave device, the paired-device-mode is ignored.
+Otherwise, if this device is a master device and paired-device-mode is
+Asynchronous, event processing is unaffected by activation of the grab. If
+this device is a master device and paired-device-mode is Synchronous, the
+state of the master device paired with this device (as seen by means of the
+protocol) appears to freeze, and no further events are generated by the
+server until the grabbing client issues a releasing XIAllowEvents request
+or until the device grab is released. Actual events are not lost while the
+devices are frozen; they are simply queued for later processing.
+
+If the cursor is not None and the device is a master pointer device, the
+cursor will be displayed until the device is ungrabbed.
+
+This request fails and returns:
+
+ AlreadyGrabbed: If the device is actively grabbed by some other client.
+ NotViewable: If grab-window is not viewable.
+ InvalidTime: If the specified time is earlier than the last-grab-time for
+ the specified device or later than the current X server time.
+ Otherwise, the last-grab-time for the specified device is set
+ to the specified time and CurrentTime is replaced by the
+ current X server time.
+ Frozen: If the device is frozen by an active grab of another client.
+
+To release a grab of a device, use XIUngrabDevice.
+
+[[requests-ungrabdevice]]
+XIUngrabDevice
+^^^^^^^^^^^^^^
+ ┌───
+ XIUngrabDevice
+ deviceid: DEVICEID
+ time: TIMESTAMP or CurrentTime
+ └───
+
+This request releases the device if this client has it actively grabbed
+(from either XIGrabDevice or XIPassiveGrabDevice) and
+releases any queued events. If any devices were frozen by the grab,
+XIUngrabDevice thaws them.
+
+ deviceid
+ The device to grab.
+ time
+ A valid server time or CurrentTime.
+
+The request has no effect if the specified time is earlier than the
+last-device-grab time or is later than the current server time.
+This request generates FocusIn and FocusOut events.
+An XIUngrabDevice is performed automatically if the event window for an
+active device grab becomes not viewable.
+
+[[requests-allowevents]]
+XIAllowEvents
+^^^^^^^^^^^^^
+ ┌───
+ XIAllowEvents
+ deviceid: DEVICEID
+ time: TIMESTAMP or CurrentTime
+ event_mode: { AsyncDevice, SyncDevice,
+ AsyncPairedDevice, SyncPairedDevice,
+ ReplayDevice, AsyncPair, SyncPair,
+ AcceptTouch¹, RejectTouch¹ }
+ touchid¹: CARD32
+ grab_window¹: Window
+ └───
+
+ ¹ since XI 2.2
+
+The XIAllowEvents request releases some queued events if the client
+has caused a device to freeze. It also is used to handle touch grab and
+ownership processing.
+
+ deviceid
+ The device to grab.
+ time
+ A valid server time or CurrentTime.
+ event_mode
+ Specifies whether a device is to be thawed and events are to be
+ replayed, or how to handle a grabbed touch sequence.
+ touchid
+ The ID of the touch sequence to accept or reject. The value is undefined
+ for event modes other than AcceptTouch and RejectTouch.
+ grab_window
+ The window on which to accept or reject a touch sequence grab. The value
+ is undefined for event modes other than AcceptTouch and RejectTouch.
+
+The request has no effect if the specified time is earlier than the last-grab
+time of the most recent active grab for the client, or if the specified time is
+later than the current X server time. The time parameter must be CurrentTime for
+requests with event modes of AcceptTouch and RejectTouch.
+
+When event-mode is AcceptTouch, a BadValue error occurs if the touch ID is
+invalid. A BadAccess error occurs if this client is not the current or potential
+owner of the specified touch ID.
+
+The following describes the processing that occurs depending on what constant
+you pass to the event-mode argument:
+
+ AsyncDevice:
+ If the specified device is frozen by the client, event processing for that
+ device continues as usual. If the device is frozen multiple times by the
+ client on behalf of multiple separate grabs, AsyncDevice thaws for
+ all.
+ AsyncDevice has no effect if the specified device is not frozen by the
+ client, but the device need not be grabbed by the client.
+ SyncDevice:
+ If the specified device is frozen and actively grabbed by the client,
+ event processing for that device continues normally until the next
+ event is reported to the client. At this time, the specified device
+ again appears to freeze. However, if the reported event causes the
+ grab to be released, the specified device does not freeze.
+ SyncDevice has no effect if the specified device is not frozen by the
+ client or is not grabbed by the client.
+ ReplayDevice:
+ If the specified device is actively grabbed by the client and is frozen
+ as the result of an event having been sent to the client (either from
+ the activation of a XIGrabButton or from a previous XIAllowEvents with
+ mode SyncDevice, but not from a Grab), the grab is released and
+ that event is completely reprocessed. This time, however, the request
+ ignores any passive grabs at or above (towards the root) the
+ grab-window of the grab just released.
+ The request has no effect if the specified device is not grabbed by
+ the client or if it is not frozen as the result of an event.
+ AsyncPairedDevice
+ If the paired master device is frozen by the client, event processing
+ for it continues as usual. If the paired device is frozen multiple
+ times by the client on behalf of multiple separate grabs,
+ AsyncPairedDevice thaws for all.
+ AsyncPairedDevice has no effect if the device is not frozen by the
+ client, but those devices need not be grabbed by the client.
+ AsyncPairedDevice has no effect if deviceid specifies a slave device.
+ SyncPairedDevice
+ If the paired master device is frozen by the client, event processing (for
+ the paired master device) continues normally until the next button or key
+ event is reported to the client for the grabbed device (button event for
+ the grabbed device, key or motion event for the device), at which time
+ the device again appears to freeze. However, if the reported event causes
+ the grab to be released, then the device does not freeze.
+ SyncPairedDevice has no effect if the specified device is not grabbed
+ by the client or if it is no frozen as the result of an event.
+ SyncPairedDevice has no effect if deviceid specifies a slave device.
+ SyncPair
+ If both the device and the paired master device are frozen by the
+ client, event processing (for both devices) continues normally until
+ the next XIButtonPress, XIButtonRelease, XIKeyPress, or XIKeyRelease
+ event is reported to the client for a grabbed device (button event for
+ a pointer, key event for a keyboard), at which time the devices again
+ appear to freeze. However, if the reported event causes the grab to be
+ released, then the devices do not freeze (but if the other device is
+ still grabbed, then a subsequent event for it will still cause both
+ devices to freeze).
+ SyncPair has no effect unless both the device and the paired master
+ device are frozen by the client. If the device or paired master device
+ is frozen twice by the client on behalf of two separate grabs,
+ SyncPair thaws for both (but a subsequent freeze for SyncPair will
+ only freeze each device once).
+ SyncPair has no effect if deviceid specifies a slave device.
+ AsyncPair
+ If the device and the paired master device are frozen by the client,
+ event processing for both devices continues normally. If a device is
+ frozen twice by the client on behalf of two separate grabs, AsyncBoth
+ thaws for both. AsyncPair has no effect unless both the device and the
+ paired master device frozen by the client.
+ AsyncPair has no effect if deviceid specifies a slave device.
+ AcceptTouch
+ The client is deemed to have taken control of the touch sequence once it
+ owns the sequence. TouchEnd events will be sent to all clients listening
+ to the touch sequence that have either grabbed the touch sequence on a
+ child window of the grab_window or have received events for the touch
+ sequence through event selection. These clients will no longer receive
+ any TouchUpdate events.
+ RejectTouch
+ The client is no longer interested in the touch sequence, and will
+ receive a TouchEnd event. If the client is the current owner of the
+ sequence, ownership will be passed on to the next listener.
+
+[[requests-passivegrabdevice]]
+XIPassiveGrabDevice
+^^^^^^^^^^^^^^^^^^^
+ ┌───
+ XIPassiveGrabDevice
+ deviceid: DEVICE
+ detail: CARD32
+ grab_type: GRABTYPE
+ time: TIMESTAMP
+ grab_window: Window
+ cursor: Cursor
+ owner_events: Bool
+ grab_mode: { Synchronous, Asynchronous, Touch¹ }
+ paired_device_mode: { Synchronous, Asynchronous }
+ num_modifiers: INT16
+ mask_len: CARD16
+ masks: SETofEVTYPEMASK
+ modifiers: LISTofSETofMODIFIERMASK
+ ▶
+ num_modifiers_return: INT16
+ modifiers_return: LISTofGRABMODIFIERINFO
+ └───
+
+ GRABTYPE { GrabtypeButton, GrabtypeKeycode, GrabtypeEnter,
+ GrabtypeFocusIn, GrabtypeTouchBegin¹ }
+
+ GRABMODIFIERINFO { status: Access
+ modifiers: SETofMODIFIERMASK }
+
+ ¹ since XI 2.2
+
+Establish an explicit passive grab for a button or keycode
+on the specified input device.
+
+ cursor
+ The cursor to display for the duration of the grab. If grab_type
+ is not GrabtypeButton, this argument is ignored.
+ deviceid
+ The device to establish the passive grab on or AllDevices or
+ AllMasterDevices.
+ detail
+ The button number, or key symbol to grab for.
+ Must be 0 for GrabtypeEnter, GrabtypeFocusIn, and
+ GrabtypeTouchBegin.
+ grab_type
+ The type of grab to establish.
+ grab_window
+ Events are reported relative to the grab window.
+ grab_mode
+ If grab-mode is Asynchronous, device event processing continues
+ normally. If the device is currently frozen by this client, then
+ processing of device events is resumed. If grab-mode is
+ Synchronous, the state of the grabbed device (as seen by means of
+ the protocol) appears to freeze, and no further device events are
+ generated by the server until the grabbing client issues a
+ releasing XIAllowEvents request or until the device grab is
+ released. Actual device input events are not lost while the device
+ is frozen; they are simply queued for later processing. If grab_type
+ is GrabtypeTouchBegin, grab_mode must be set to Touch.
+ mask_len
+ Length of mask in 4 byte units.
+ mask
+ Event mask. An event mask for an event type T is defined as (1 << T).
+ modifiers
+ XKB modifier state to activate this passive grab.
+ num_modifiers
+ Number of elements in modifiers.
+ owner_events
+ Specifies whether event will be reported normally or relative to the
+ grab window.
+ num_modifiers_return
+ Number of elements in modifiers_return
+ modifiers_return
+ XKB modifier state that could not be grabbed.
+ time
+ This field is unused.
+
+If owner-events is False, input events generated from this device are
+reported with respect to grab-window, and are only reported if
+selected by being included in the event-list. If owner-events is
+True, then if a generated event would normally be reported to this
+client, it is reported normally, otherwise the event is reported
+with respect to the grab-window, and is only reported if selected
+by being included in the event-list. For either value of
+owner-events, unreported events are discarded.
+
+If deviceid specifies a master pointer, the modifiers of the paired
+master keyboard are used. If deviceid specifies a slave pointer
+the modifiers of the master keyboard paired with the attached master
+pointers are used. If deviceid specifies a slave keyboard, the
+modifiers of the attached master keyboard are used. Note that
+activating a grab on a slave device detaches the device from its
+master. In this case, the modifiers after activation of the grab are
+from the slave device only and may be different to the modifier state
+when the grab was triggered.
+
+In the future, if grab_type is GrabtypeButton or GrabtypeKeyboard, the
+device is actively grabbed if:
+
+ - the device is not grabbed, and
+ - the specified modifier keys are down, and
+ - the grab_type is GrabtypeButton and the button specified in detail
+ is logically pressed or the grab_type is GrabtypeKeycode and the
+ keycode specified in detail is logically pressed, and
+ - the grab_window contains the pointer, and
+ - a passive grab on the same button/keycode + modifier
+ combination does not exist on an ancestor of grab_window.
+
+Otherwise, if grab_type is GrabtypeEnter or GrabtypeFocusIn, the
+device is actively grabbed if:
+
+ - the device is not actively grabbed, and
+ - the specified modifier keys are down, and
+ - the grab_type is GrabtypeEnter and the device's pointer has moved
+ into grab_window or a descendant of grab_window, or the grab_type is
+ GrabtypeFocusIn and the device's focus has been set to the
+ grab_window or a descendant of grab_window, and
+ - a passive grab of the same grab_type + modifier combination does not
+ does not exist on an ancestor of grab_window.
+
+Otherwise, if grab_type is GrabtypeTouchBegin, a touch grab begins if:
+
+ - the device is not actively grabbed, and
+ - the specified modifier keys are down
+ - a touch begins in grab_window or a descendant of grab_window, and
+ - a passive grab of the same grab_type + modifier combination does not
+ does not exist on an ancestor of grab_window.
+
+Ownership of the touch sequence is granted to the grabbing client if:
+
+ - a TouchBegin or pointer grab for an emulated touch sequence of a
+ direct touch device with the same modifier set does not exist on
+ an ancestor of grab_window, or all applicable grabs have released
+ ownership.
+
+A modifier of GrabAnyModifier is equivalent to issuing the request for
+all possible modifier combinations (including no modifiers). A client
+may request a grab for GrabAnyModifier and explicit modifier
+combinations in the same request.
+
+A GrabtypeButton or GrabtypeKeyboard grab is released when all buttons
+or keycode are released, independent of the state of modifier keys.
+A GrabtypeEnter or GrabtypeFocusIn grab is released when the
+pointer or focus leaves the window and all of its descendants,
+independent of the state of modifier keys.
+A GrabtypeTouchBegin grab is released when the touch sequence ends or
+the client uses XIAllowEvents with mode RejectTouch.
+Note that the logical state of a device (as seen by means of the
+protocol) may lag the physical state if device event processing is
+frozen.
+
+This request overrides all previous passive grabs by the same
+client on the same button/key/enter/focus in + modifier combinations
+on the same window.
+
+If some other client already has issued a XIPassiveGrabDevice request
+with the same button or keycode and modifier combination, the
+failed modifier combinations is returned in modifiers_return. If some
+other client already has issued an XIPassiveGrabDevice request of
+grab_type XIGrabtypeEnter, XIGrabtypeFocusIn, or
+XIGrabtypeTouchBegin with the same grab_window and the same
+modifier combination, the failed modifier combinations are returned
+in modifiers_return. If num_modifiers_return is zero, all passive
+grabs have been successful.
+
+If a button grab or enter grab activates, EnterNotify and LeaveNotify
+events with mode Grab are generated as if the pointer were to suddenly
+warp from its current position some position in the grab_window.
+However, the pointer does not warp, and the pointer position is used
+as both the initial and final positions for the events.
+
+If a keycode grab or focus grab activates, FocusIn and FocusOut events
+with mode Grab are generated as if the focus were to change from the
+current window to the grab_window.
+
+If an enter or focus in grab activates, additional EnterNotify events
+with mode XIPassiveGrabNotify are generated as if the pointer or focus
+were to suddenly warp from its current position to some position in
+the grab window. These events are sent to the grabbing client only
+and only if the grab event mask has selected for it. If such a passive
+grab deactivates, addional LeaveNotify events with mode
+XIPassiveUngrabNotify are generated and sent to the grabbing client
+before the grab deactivates.
+
+For GrabtypeTouchBegin, grab_mode must be Touch or a BadValue error
+is generated.
+
+See section <<multitouch-ownership, Ownership of touch sequences>> for
+additional notes on touch grabs, as they do not behave like traditional
+grabs: in particular, they do not freeze the device, and delivery of touch
+events continues even if the device is frozen due to a grab by another
+client.
+
+[[requests-passiveungrabdevice]]
+XIPassiveUngrabDevice
+^^^^^^^^^^^^^^^^^^^^^
+ ┌───
+ XIPassiveUngrabDevice
+ deviceid: DEVICEID
+ detail: CARD32
+ grab_type: GRABTYPE
+ grab_window: Window
+ num_modifiers: INT16
+ modifiers: LISTofSETofMODIFIERMASK
+ └───
+
+Release an explicit passive grab on the specified input device.
+
+ deviceid
+ The device to establish the passive grab on.
+ detail
+ The button number or key symbol to ungrab.
+ Must be 0 for GrabtypeEnter, GrabtypeFocusIn, and
+ GrabtypeTouchBegin.
+ grab_type
+ The type of grab to establish.
+ grab_window
+ Events are reported relative to the grab window.
+ modifiers
+ XKB modifier state to activate this passive grab.
+ num_modifiers
+ Number of elements in modifiers.
+
+This request has no effect if the client does not have a passive grab
+of the same type, same button or keycode (if applicable) and modifier
+combination on the grab_window.
+
+[[requests-listproperties]]
+XIListProperties
+^^^^^^^^^^^^^^^^
+ ┌───
+ XIListProperties
+ deviceid: DEVICEID
+ ▶
+ num_properties: INT16
+ properties: LISTofATOM
+ └───
+
+List the properties associated with the given device.
+
+ deviceid
+ The device to list the properties for.
+ num_properties
+ Number of properties in the reply
+ properties
+ All properties on the device.
+
+[[requests-changeproperty]]
+XIChangeProperty
+^^^^^^^^^^^^^^^^
+ ┌───
+ XIChangeProperty
+ deviceid: DEVICEID
+ property: ATOM
+ type: ATOM
+ format: { 8, 16, 32 }
+ mode: { Append, Prepend, Replace }
+ num_items: CARD32
+ data: LISTofINT8, or LISTofINT16, or LISTofINT32
+ └───
+
+Change the given property on the given device.
+
+ deviceid
+ The device to change the property on.
+ property
+ The property to modify.
+ type
+ The property's type.
+ mode
+ One of Append, Prepend, or Replace
+ num_items
+ Number of items following this request.
+ data
+ Property data (nitems * format/8 bytes)
+
+The type is uninterpreted by the server. The format specifies whether
+the data should be viewed as a list of 8-bit, 16-bit, or 32-bit
+quantities so that the server can correctly byte-swap as necessary.
+
+If the mode is Replace, the previous propert y value is discarded. If
+the mode is Prepend or Append, then the type and format must match the
+existing property value (or a Match error results). If the property is
+undefined, it is treated as defined with the correct type and format
+with zero-length data. For Prepend, the data is tacked on to the
+beginning of the existing data, and for Append, it is tacked on to the
+end of the existing data.
+
+The lifetime of a property is not tied to the storing client. Properties
+remain until explicitly deleted, until the device is removed, or
+until server reset.
+
+A property cannot be deleted by setting nitems to zero. To delete a
+property, use XIDeleteProperty.
+
+This request generates an XIPropertyEvent.
+
+[[requests-deleteproperty]]
+XIDeleteProperty
+^^^^^^^^^^^^^^^^
+ ┌───
+ XIDeleteProperty
+ deviceid: DEVICEID
+ property: ATOM
+ └───
+
+Deletes the given property on the given device.
+
+ deviceid
+ The device to delete the property on.
+ property
+ The property to delete.
+
+If the property is deleted, an XIPropertyEvent is generated on the device.
+If the property does not exist, this request does nothing.
+
+[[requests-getproperty]]
+XIGetProperty
+^^^^^^^^^^^^^
+ ┌───
+ XIGetProperty
+ deviceid: DEVICEID
+ property: ATOM
+ type: Atom or AnyPropertyType
+ offset: CARD32
+ len: CARD32
+ delete: BOOL
+ ▶
+ type: Atom
+ bytes_after: CARD32
+ num_items: CARD32
+ format: { 8, 16, 32 }
+ data: LISTofINT8, or LISTofINT16, or LISTofINT32
+ └───
+
+Get the data for the given property on the given device.
+
+ deviceid
+ The device to retrieve the property data from.
+ property
+ The property to retrieve the data from..
+ type
+ The property type to retrieve or AnyPropertyType
+ offset
+ The offset in 4-byte units.
+ len
+ Number of bytes to receive in 4-byte units.
+ delete
+ Delete the property after retrieving the data.
+ bytes_after
+ Number of unread bytes in the stored property
+ num_items
+ Number of items in data
+ format
+ 8, 16, or 32
+ data
+ Property data (nitems * format/8 bytes)
+
+If the specified property does not exist for the specified device, then
+the return type is None, the format and bytes-after are zero, and the value is
+empty. The delete argument is ignored in this case. If the specified property
+exists but its type does not match the specified type, then the return
+type is the actual type of the property, the format is the actual format of the
+property (never zero), the bytes-after is the length of the property in bytes
+(even if the format is 16 or 32), and the value is empty. The delete
+argument is ignored in this case. If the specified property exists and
+either AnyPropertyType is specified or the specified type matches the actual
+type of the property, then the return type is the actual type of the property,
+the format is the actual format of the property
+(never zero), and the bytes-after and value are as follows, given:
+ N = actual length of the stored property in bytes
+ (even if the format is 16 or 32)
+ I = 4 * long-offset
+ T = N−I
+ L = MINIMUM(T, 4 * long-length)
+ A = N − (I + L)
+The returned value starts at byte index I in the property (indexing
+from 0), and its length in bytes is L. However, it is a Value error if
+offset is given such that L is negative. The value of bytes_after is A,
+giving the number of trailing unread bytes in the stored property. If
+delete is True and the bytes_after is zero, the property is also
+deleted from the device, and a XIPropertyNotify event is generated on
+the device.
+
+[[requests-xi23]]
+Requests introduced in version 2.3
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[[requests-barrierreleasepointer]]
+XIBarrierReleasePointer
+^^^^^^^^^^^^^^^^^^^^^^^
+ ┌───
+ XIBarrierReleasePointer
+ num_items: CARD32
+ ▶
+ data: LISTofBARRIERRELEASEINFO
+ └───
+
+ BARRIERRELEASEINFO { deviceid: DEVICEID,
+ barrier: Barrier,
+ eventid: CARD32 }
+
+Release a pointer currently blocked by a barrier. In the future, movement of
+this pointer against the barrier will not be blocked.
+
+ deviceid
+ The device currently being blocked by a barrier
+ barrier
+ The barrier currently blocking the device
+ eventid
+ The unique event ID assigned to this barrier event sequence
+
+If the barrier given does not currently block this device, or the eventid
+is invalid, this request does nothing.
+
+Releasing a pointer barrier is only valid during one barrier event sequence,
+and only applies to the next movement of this device against this barrier.
+If the pointer moves away from the barrier following a
+XIBarrierReleasePointer request, the release request is discarded. In the
+future, if the pointer moves against the barrier again, a new eventid is
+assigned and the client must re-issue the XIBarrierReleasePointer request.
+
+If the device is not a master pointer device, a BadDevice error results.
+If the barrier does not name a valid barrier, a BadValue error results.
+
+
+[[events]]
+Events
+------
+
+An event specifies its length in 4-byte units after the initial 32 bytes.
+Future versions of the protocol may provide additional information
+in the same event, thus increasing the event size. Clients are required to
+always read the number of bytes specified by the event, not the size of the
+event they may have been compiled against.
+
+
+The following event types are available in XI2.
+
+Version 2.0:
+
+ - HierarchyChanged
+ - DeviceChanged
+ - KeyPress
+ - KeyRelease
+ - ButtonPress
+ - ButtonRelease
+ - Motion
+ - RawKeyPress
+ - RawKeyRelease
+ - RawButtonPress
+ - RawButtonRelease
+ - RawMotion
+ - Enter
+ - Leave
+ - FocusIn
+ - FocusOut
+ - PropertyEvent
+
+Version 2.2:
+
+ - TouchBegin
+ - TouchUpdate
+ - TouchOwnership
+ - TouchEnd
+ - RawTouchBegin
+ - RawTouchUpdate
+ - RawTouchEnd
+
+Version 2.3:
+
+ - BarrierHit
+ - BarrierLeave
+
+All events have a set of common fields specified as EVENTHEADER.
+
+
+ EVENTHEADER { type: BYTE
+ extension: BYTE
+ sequenceNumber: CARD16
+ length: CARD32
+ evtype: CARD16
+ deviceid: DEVICEID
+ time: Time }
+
+ type
+ Always GenericEvent.
+ extension
+ Always the X Input extension offset.
+ sequenceNumber
+ Sequence number of last request processed by the server.
+ length
+ Length in 4-byte units after the initial 32 bytes.
+ evtype
+ XI-specific event type.
+ deviceid
+ Numerical device id for a device.
+ time
+ Time in ms when the event occurred.
+
+
+[[events-xi20]]
+Events introduced in version 2.0
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[[events-hierarchyevent]]
+HierarchyEvent
+^^^^^^^^^^^^^^
+ ┌───
+ HierarchyEvent
+ EVENTHEADER
+ flags: SETofHIERARCHYMASK
+ num_info: CARD16
+ info: LISTofHIERARCHYINFO
+ └───
+
+
+ HIERARCHYMASK { MasterAdded, MasterRemoved, SlaveAttached, SlaveDetached,
+ SlaveAdded, SlaveRemoved, DeviceEnabled, DeviceDisabled }
+
+ HIERARCHYINFO { deviceid: DEVICEID,
+ attachment: DEVICEID,
+ type: DEVICEUSE
+ enabled: BOOL
+ flags: SETofHIERARCHYMASK}
+
+ flags
+ Set of the changes that have occured, causing this event.
+ num_info
+ The number of device info structs following the request.
+ info:
+ The current hierarchy information.
+
+An XIHierarchyEvent is sent whenever the device hierarchy been
+changed. The flags specify all types of hierarchy modifiations that have
+occured.
+For all devices, info details the hierarchy information after the
+modification of the hierarchy has occured. For each device specified with
+deviceid:
+
+- if type is MasterPointer or MasterKeyboard, attachment decribes the
+ pairing of this device.
+- if type is SlavePointer or SlaveKeyboard, attachment describes the
+ master device this device is attached to.
+- if type is FloatingSlave device, attachment is undefined.
+
+ enabled
+ True if the device is enabled and can send events. A disabled master
+ device will not forward events from an attached, enabled slave
+ device.
+
+Note: Multiple devices may be affected in one hierarchy change,
+deviceid in an XIHierarchyEvent is always the first affected
+device. Clients should ignore deviceid and instead use the devices list.
+
+[[events-devicechangedevent]]
+DeviceChangedEvent
+^^^^^^^^^^^^^^^^^^
+ ┌───
+ DeviceChangedEvent
+ EVENTHEADER
+ reason: CHANGEREASON
+ source: DEVICEID
+ num_classes: CARD16
+ classes: LISTofCLASS
+ └───
+
+ CHANGEREASON { SlaveSwitch, DeviceChange }
+
+A DeviceChangeEvent is sent whenever a device changes it's capabilities.
+This can happen either by a new slave device sending events through a
+master device, or by a physical device changing capabilities at runtime.
+
+ reason
+ The reason for generating this event.
+ If reason is SlaveSwitch, the slave device sending events through
+ this device has changed and source specifies the new slave device.
+ A SlaveSwitch reason can only occur on a master device.
+ If reason is DeviceChange, the device itself has changed through
+ other means (e.g. a physical device change) and source is
+ the device itself.
+ source
+ The source of the new classes.
+ num_classes
+ Number of classes provided.
+ classes
+ Details the available classes provided by the device. The order the
+ classes are provided in is undefined.
+
+For a detailed description of classes, see the XIQueryDevice request.
+
+[[events-deviceevent]]
+DeviceEvent
+^^^^^^^^^^^
+ ┌───
+ DeviceEvent
+ EVENTHEADER
+ detail: CARD32
+ root: Window
+ event: Window
+ child: Window
+ root_x: FP1616
+ root_y: FP1616
+ event_x: FP1616
+ event_y: FP1616
+ buttons_len: CARD16
+ valuators_len: CARD16
+ sourceid: DEVICEID
+ mods: MODIFIERINFO
+ group: GROUPINFO
+ flags: DEVICEEEVENTFLAGS
+ buttons: SETofBUTTONMASK
+ valuators: SETofVALUATORMASK
+ axisvalues: LISTofFP3232
+ └───
+
+ BUTTONBIT { (1 << Button1), (1 << Button2), ... , (1 << ButtonN) }
+ VALUATORBIT { (1 << 1), ( 1 << 2), ... ( 1 << n) }
+
+ MODIFIERINFO { base_mods: CARD32,
+ latched_mods: CARD32,
+ locked_mods: CARD32,
+ effective_mods: CARD32}
+ GROUPINFO { base_group: CARD8,
+ latched_group: CARD8,
+ locked_group: CARD8,
+ effective_group: CARD8}
+
+ DEVICEEVENTFLAGS (all events): none
+ DEVICEEVENTFLAGS (key events only): { KeyRepeat }
+ DEVICEEVENTFLAGS (pointer events only): { PointerEmulated }
+ DEVICEEVENTFLAGS (touch events only): { TouchPendingEnd,
+ TouchEmulatingPointer }
+
+An XIDeviceEvent is generated whenever the logical state of a device
+changes in response to a button press, a button release, a motion, a key
+press or a key release. The event type may be one of KeyPress,
+KeyRelease, ButtonPress, ButtonRelease, Motion.
+
+XI 2.2: The event type may also be TouchBegin, TouchUpdate, or TouchEnd.
+
+ detail
+ The button number, key code, touch ID, or 0.
+ root
+ event
+ child
+ The root window, event window or subwindow, respectively. See core
+ protocol specification for more detail.
+ root_x
+ root_y
+ The position of the pointer in screen coordinates (16.16 fixed point).
+ event_x
+ event_y
+ The position of the pointer in screen coordinates relative to the
+ event window (16.16 fixed point).
+
+ buttons_len
+ The length of buttons in 4 byte units.
+ valuators_len
+ The length of valuators in 4 byte units.
+ sourceid
+ The source device that originally generated the event.
+ mods
+ XKB modifier state before the event occured.
+ group
+ XKB group state before the event.
+ buttons
+ Button state before the event.
+ valuators
+ Bitmask of valuators provided in axisvalues.
+ axisvalues
+ Valuator data in device-native resolution. This is a non-sparse
+ array, value N represents the axis corresponding to the Nth bit set
+ in valuators.
+ flags
+ Miscellaneous information about this event; the union of the
+ common flag set and either the key or pointer flag set,
+ depending on the event type.
+ KeyRepeat means that this event is for repeating purposes, and
+ the physical state of the key has not changed. This is only
+ valid for KeyPress events.
+ PointerEmulated signals that the event has been emulated from another
+ XI 2.x event for legacy client support, and that this event should
+ be ignored if the client listens for these events. This flag is
+ set on scroll ButtonPress and RawButtonPress events (buttons 4, 5, 6
+ and 7) if a smooth-scrolling event on the Rel Vert Scroll or
+ Rel Horiz Scroll axes was also generated. It is also set on Motion,
+ ButtonPress, and ButtonRelease events generated by direct touch devices.
+ TouchPendingEnd (for touch events only) means that the touch
+ has physically ended, however another client still holds a grab, so the
+ touch should be considered alive until all grabbing clients have
+ accepted or passed on ownership. The touch will not generate any
+ further TouchUpdate events once an event with TouchPendingEnd has been
+ received.
+ TouchEmulatingPointer is set on touch events that emulate pointer
+ events.
+
+Modifier state in mods is detailed as follows:
+
+ base_mods
+ XKB base modifier state.
+ latched_mods
+ XKB latched modifier state.
+ locked_mods
+ XKB locked modifier state.
+
+Group state in group is detailed as follows:
+
+ base_group
+ XKB base group state.
+ latched_group
+ XKB latched group state.
+ locked_group
+ XKB locked group state.
+
+In servers supporting XI 2.2, a TouchBegin event is generated whenever a new
+touch sequence initializes.
+A TouchEnd event is generated whenever a touch sequence ceases. A
+TouchUpdate event is generated whenever a valuator value changes, or a flag
+flag (e.g. pending end) has changed for that touch sequence; this may result
+in a TouchUpdate event being sent with zero valuators.
+
+The average finger size is significantly larger than one pixel. The
+selection of the hotspot of a touchpoint is implementation dependent and
+may not be the logical center of the touch.
+
+Touch tracking IDs are provided in the detail field of touch events. Its
+value is always provided in every touch event. Tracking IDs are
+represented as unsigned 32-bit values and increase strictly monotonically in
+value for each new touch, wrapping back to 0 upon reaching the numerical limit
+of IDs. The increment between two touch IDs is indeterminate. Clients may not
+assume that any future touches will have specific touch IDs. IDs are globally
+unique.
+
+The button state in touch events represents the state of the device's
+physical buttons only, even if that sequence is emulating pointer events.
+
+Touch events do not generate enter/leave events.
+
+[[events-rawevent]]
+RawEvent
+^^^^^^^^
+ ┌───
+ RawEvent
+ EVENTHEADER
+ detail: CARD32
+ sourceid¹: DEVICEID
+ flags: DEVICEEVENTFLAGS
+ valuators_len: CARD16
+ valuators: SETofVALUATORMASK
+ axisvalues: LISTofFP3232
+ axisvalues_raw: LISTofFP3232
+ └───
+
+ ¹ since XI 2.1
+
+A RawEvent provides the information provided by the driver to the
+client. RawEvent provides both the raw data as supplied by the driver and
+transformed data as used in the server. Transformations include, but are
+not limited to, axis clipping and acceleration.
+Transformed valuator data may be equivalent to raw data. In this case,
+both raw and transformed valuator data is provided.
+RawEvents are sent exclusively to all root windows.
+Clients supporting XI 2.0 receive raw events when the device is not grabbed,
+or when the device is grabbed by the client but not when the device is
+grabbed by another client.
+Clients supporting XI 2.1 or later receive raw events at all times, even
+when the device is grabbed by another client.
+
+
+ eventtype
+ The type of event that occured on the device.
+ detail
+ The button number, keycode or touch ID¹.
+ sourceid
+ The source device that originally generated the event. The sourceid
+ is undefined for clients not supporting XI 2.1.
+ flags
+ Flags as described in DeviceEvent.
+ valuators_len
+ The length of valuators in 4 byte units.
+ valuators
+ Bitmask of valuators provided in axisvalues and axisvalues_raw.
+ axisvalues
+ Valuator data in device-native resolution. This is a non-sparse
+ array, value N represents the axis corresponding to the Nth bit set
+ in valuators.
+ axisvalues_raw
+ Untransformed valuator data in device-native resolution. This is a
+ non-sparse array, value N represents the axis corresponding to the
+ Nth bit set in valuators.
+
+ ¹ since XI 2.2
+
+[[events-enterleave]]
+Enter or Leave or FocusIn or FocusOut
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ ┌───
+ Enter or Leave or FocusIn or FocusOut
+ EVENTHEADER
+ root: Window
+ event: Window
+ child: Window
+ sourceid: DEVICEID
+ root_x: FP1616
+ root_y: FP1616
+ event_x FP1616
+ event_y: FP1616
+ mode: NOTIFYMODE
+ detail: NOTIFYDETAIL
+ same_screen: BOOL
+ focus: BOOL
+ mods: MODIFIERINFO
+ group: GROUPINFO
+ buttons_len: CARD16
+ buttons: SETofBUTTONMASK
+ └───
+
+ NOTIFYMODE { Normal, Grab, Ungrab }
+ NOTIFYDETAIL { Ancestor, Virtual, Inferior, Nonlinear, NonlinearVirtual,
+ Pointer, PointerRoot, None }
+
+Enter or Leave events are sent whenever a device's pointer enters or
+leaves a window.
+FocusIn or FocusOut events are sent whenever a device's focus is set to or
+away from a window.
+The enter/leave and focus in/out model is described in the core protocol
+specification, Section 11. (EnterNotify, LeaveNotify events).
+
+For enter and leave events, the modifier and group state is the state of
+the paired master device if the device is a master device, or the state of
+the attached master keyboard if the device is an attached slave device, or
+zero if the device is a floating slave device.
+
+For focus in and out events, the button state is the state of the paired
+master device if the device is a master device, or the state of the
+attached master keyboard if the device is an attached slave device, or
+zero if the device is a floating slave device.
+
+ root
+ event
+ child
+ The root window, event window, and child window, respectively. See the
+ core protocol specification for more detail.
+ sourceid
+ The device that caused the pointer to move.
+ root_x
+ root_y
+ The pointer coordinates relative to the root window.
+ event_x
+ event_y
+ The pointer coordinates relative to the event window.
+ mode
+ Normal pointer motion events have mode Normal. Pseudo-motion events
+ when a grab activates have mode Grab, and pseudo-motion events when a
+ grab deactivates have mode Ungrab. Pseudo-motion events caused by the
+ activation or deactivation of a passive enter or focus in grab have mode
+ XIPassiveGrabNotify or XIPassiveUngrabNotify.
+ detail
+ Specifies the relation of the event window to the window the pointer
+ entered or left. See the core protocol spec for details.
+ same_screen
+ True if the event window is on the same screen as the pointer's root
+ window.
+ focus
+ If the event window is the focus window or an inferior of the focus
+ window, then focus is True. Otherwise, focus is False. This field is
+ unspecified for focus in/out events.
+ mods
+ XKB modifier state before the event occured.
+ group
+ XKB group state before the event.
+ buttons_len
+ The length of buttons in 4 byte units.
+ buttons
+ Button state before the event.
+
+[[events-propertyevent]]
+XIPropertyEvent
+^^^^^^^^^^^^^^^
+ ┌───
+ XIPropertyEvent
+ EVENTHEADER
+ property: ATOM
+ what: { PropertyCreated, PropertyDeleted, PropertyModified }
+ └───
+
+XIPropertyEvents are sent whenever a device property is created, deleted or
+modified by a client.
+
+ property
+ The property that has been created, deleted, or modified
+ what
+ Specifies what has been changed.
+
+[[events-xi22]]
+Events introduced in version 2.2
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[[events-touchownershipevent]]
+TouchOwnershipEvent
+^^^^^^^^^^^^^^^^^^^
+ ┌───
+ TouchOwnershipEvent
+ EVENTHEADER
+ touchid: CARD32
+ root: Window
+ event: Window
+ child: Window
+ sourceid: DEVICEID
+ flags: SETofTOUCHOWNERSHIPFLAGS
+ └───
+
+ TOUCHOWNERSHIPFLAGS: (none currently defined)
+
+A TouchOwnershipEvent indicates that ownership has changed, and the client
+is now the owner of the touch sequence specified by touchid.
+
+ touchid
+ The identifier of the touch sequence.
+ root
+ event
+ child
+ The root window, event window, and child window, respectively. See the
+ core protocol specification for more detail.
+ sourceid
+ The source device that originally generated the event.
+ flags
+ A bitmask of flags for this event.
+
+[[events-xi23]]
+Events introduced in version 2.3
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[[events-barrierevent]]
+BarrierEvent
+^^^^^^^^^^^^
+ ┌───
+ BarrierEvent
+ EVENTHEADER
+ eventid: CARD32
+ root: Window
+ event: Window
+ barrier: Barrier
+ dtime: CARD32
+ flags: SETofBARRIERFLAGS
+ sourceid: DEVICEID
+ root_x: FP1616
+ root_y: FP1616
+ dx: FP3232
+ dy: FP3232
+ └───
+
+ BARRIERFLAGS { PointerReleased, DeviceIsGrabbed }
+
+A BarrierEvent indicates interaction between a barrier and a pointer device.
+If the event type is BarrierHit, pointer movement has been blocked by a
+barrier. If the event type is BarrierLeave, a pointer previously blocked
+by a barrier has moved away from that barrier, or has moved
+through the blocking barrier following an earlier XIBarrierReleasePointer
+request.
+
+ eventid
+ The unique event ID for this barrier event sequence.
+ root
+ event
+ The root window or barrier window, respectively. The barrier window
+ is always the drawable specified in in the CreatePointerBarrier request.
+ barrier
+ The barrier blocking pointer movement.
+ dtime
+ The relative time in milliseconds between the last event and this
+ event.
+ flags
+ A set of flags that apply to this barrier event
+ PointerReleased:
+ The pointer has moved through the barrier following a
+ XIBarrierReleasePointer request (BarrierLeave only).
+ DeviceIsGrabbed:
+ The pointer device that generated this event is currently
+ grabbed.
+ sourceid
+ The source device that originally generated the event.
+ root_x
+ root_y
+ The position of the pointer in screen coordinates (16.16 fixed
+ point), after being constrained by barrier and/or screen extents.
+ dx
+ dy
+ The relative movement of the pointer from its previous position to
+ the new position if pointer movement were not constrained by this
+ barrier.
+
+Root coordinates in barrier events represent the position of the cursor
+after confinement by barriers, screens and RandR output extents.
+
+Barrier event IDs are provided in the eventid field of barrier events. Its
+value is always provided in every barrier event. Event IDs are
+represented as unsigned 32-bit values and increase strictly monotonically in
+value for each new barrier event sequence, wrapping back to 0 upon reaching
+the numerical limit of IDs. The increment between two event IDs is
+indeterminate. Clients may not assume that any future barrier constraints
+will have specific event IDs. IDs are unique per device per barrier.
+
+If a pointer is actively grabbed after a barrier event sequence has
+initiated, future barrier events of this sequence continue to use the same
+eventid, but all barrier events have the DeviceIsGrabbed flag set. If the
+pointer is ungrabbed, future events of this sequence have the same eventid
+and the DeviceIsGrabbed flag is unset.
+
+The PointerReleased flag may only be set on a BarrierLeave event.
+A BarrierLeave(PointerReleased) event is generated when the pointer moves
+through the barrier following a XIBarrierReleasePointer request. The time
+between the XIBarrierReleasePointer and the BarrierLeave event thus depends
+on user input.
+A BarrierLeave(PointerReleased) event is also generated if the barrier is
+destroyed while pointer movement is constrained by the barrier, or the
+master pointer blocked by the barrier is removed. This event
+has a dx/dy of 0/0.
+
+:numbered!:
+[[xi22-usecases]]
+[appendix]
+XI 2.2 Use-cases
+----------------
+
+All use-cases that include the receiving and processing of touch events
+require the client to announce XI 2.2 support in the XIQueryVersion request.
+
+Client C wants to process touch events from a device D on window W.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* C calls XISelectEvent for XI_Touch{Begin|Update|End} from D on W.
+* C receives TouchBegin whenever a touch sequence starts within W's borders.
+* C receives TouchUpdate events whenever an axis valuator value changes for a
+ touch sequence it received a TouchBegin event for.
+* C receives TouchEnd whenever a touch it received a TouchBegin event for
+ ceases.
+
+While client I wants to pre-process touch events from device D on the parent window of W.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* C calls XISelectEvent for XI_Touch{Begin|Update|Ownership|End} from D on W.
+* I calls XIPassiveGrab for XI_Touch{Begin|Update|Ownership|End} from D on a
+ parent window of W.
+* I receives TouchBegin whenever a touch begins within window W, as well as a
+ TouchOwnership event indicating that it currently owns the touch sequence.
+ C receives a TouchBegin event as well, but without TouchOwnership.
+* When an axis valuator changes in this touch sequence, both I and C receive a
+ TouchUpdate event. I may process the event to determine if it is going to
+ accept or reject the touch, whereas C may perform reversible processing.
+* If I decides it is going to claim the touch sequence for its exclusive
+ processing, it calls XIAllowEvents with an event mode of XIAcceptTouch; at
+ this point, C receives a TouchEnd event, and undoes any processing it has
+ already performed due to the touch sequence. Further TouchUpdate events are
+ delivered only to I.
+* Alternatively, if I decides it does not want to receive further events
+ from this touch sequence, it calls XIAllowEvents with an event mode of
+ XIRejectTouch; at this point, I receives a TouchEnd event confirming that it
+ has rejected the touch. C receives a TouchOwnership event confirming that it
+ is now the new owner of the touch, and further TouchUpdate events are
+ delivered only to C. As C now owns the touch, it is free to perform
+ irreversible processing of the sequence.
+* When the touch physically ceases, a TouchEnd event is sent to C.
+
+While client I wants to process pointer events on window W's parent, window Y.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* I calls XIPassiveGrab for XI_{ButtonPress,MotionNotify,ButtonRelease} to
+ create a synchronous pointer grab from D on Y.
+* C calls XISelectEvent for XI_Touch{Begin|Update|Ownership|End} from D on W.
+* I receives a ButtonPress event whenever a touch begins within W, and is
+ considered the owner of the event. C receives a TouchBegin event, but does
+ not receive a TouchOwnership event.
+* When the touchpoint moves, C will receive a TouchUpdate event. Event
+ delivery to I is subject to the synchronous delivery mechanism. The
+ emulated motion notify event is queued in the server while the device is
+ frozen.
+* I may assert ownership by calling XIAllowEvents on Y with any mode other
+ than ReplayDevice, which will cause all further events to be sent only to I,
+ with a TouchEnd event being sent to C.
+* Alternatively, I may reject the touch sequence by calling XIAllowEvents on
+ Y with mode ReplayDevice, which will cause no further events from that touch
+ to be sent to I, and a TouchOwnership event to be sent to C, with subsequent
+ motion events being sent as TouchUpdate events.
+
+Driver DRV provides touch support from tracked device D:
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* DRV initializes a TouchClass for the device.
+* DRV parses D's device protocol and selects one touch sequence to be emulated
+ as pointer event.
+* DRV calls the respective input driver API with the touch sequence data. The
+ touch sequence emulating a pointer has the respective flag set. DRV does not
+ submit pointer data for any touchpoint.
diff --git a/specs/XIproto.txt b/specs/XIproto.txt
new file mode 100644
index 0000000..1095a26
--- /dev/null
+++ b/specs/XIproto.txt
@@ -0,0 +1,2576 @@
+X11 Input Extension Protocol Specification
+==========================================
+
+ Version 1.0
+ X Consortium Standard
+ X Version 11, Release 6.8
+ Mark Patrick, Ardent Computer
+ George Sachs, Hewlett-Packard
+
+ Version 1.5
+ Peter Hutterer
+
+ Copyright © 1989, 1990, 1991 by Hewlett-Packard Company and
+ Ardent Computer
+
+ Permission to use, copy, modify, and distribute this
+ documentation for any purpose and without fee is hereby
+ granted, provided that the above copyright notice and this
+ permission notice appear in all copies. Ardent and
+ Hewlett-Packard make no representations about the suitability
+ for any purpose of the information in this document. It is
+ provided "as is" without express or implied warranty. Copyright
+ © 1989, 1990, 1991, 1992 X Consortium
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the “Software”), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ Except as contained in this notice, the name of the X
+ Consortium shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software
+ without prior written authorization from the X Consortium. X
+ Window System is a trademark of The Open Group.
+
+ Copyright © 2008 by Peter Hutterer
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ (including the next paragraph) shall be included in all copies
+ or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+1. Input Extension Overview
+---------------------------
+
+This document defines an extension to the X11 protocol to
+support input devices other than the core X keyboard and
+pointer. An accompanying document defines a corresponding
+extension to Xlib (similar extensions for languages other than
+C are anticipated). This first section gives an overview of the
+input extension. The next section defines the new protocol
+requests defined by the extension. We conclude with a
+description of the new input events generated by the additional
+input devices.
+
+This document only describes the behaviour of servers supporting
+up to the X Input Extension 1.5. For servers supporting the X
+Input Extensions 2.0, see XI2proto.txt. New clients are discouraged
+from using this protocol specification. Instead, the use of XI 2.x
+is recommended.
+
+1.1 Design Approach
+~~~~~~~~~~~~~~~~~~~
+
+The design approach of the extension is to define requests and
+events analogous to the core requests and events. This allows
+extension input devices to be individually distinguishable from
+each other and from the core input devices. These requests and
+events make use of a device identifier and support the
+reporting of n-dimensional motion data as well as other data
+that is not reportable via the core input events.
+
+1.2 Core Input Devices
+~~~~~~~~~~~~~~~~~~~~~~
+
+The X server core protocol supports two input devices: a
+pointer and a keyboard. The pointer device has two major
+functions. First, it may be used to generate motion information
+that client programs can detect. Second, it may also be used to
+indicate the current location and focus of the X keyboard. To
+accomplish this, the server echoes a cursor at the current
+position of the X pointer. Unless the X keyboard has been
+explicitly focused, this cursor also shows the current location
+and focus of the X keyboard. The X keyboard is used to generate
+input that client programs can detect.
+
+In servers supporting XI 1.4 and above, the core pointer and
+the core keyboard are virtual devices that do not represent a
+physical device connected to the host computer.
+In servers supporting XI 2.0 and above, there may be multiple
+core pointers and keyboards. Refer to XI2proto.txt for more
+information.
+
+The X keyboard and X pointer are referred to in this document
+as the core devices, and the input events they generate
+(KeyPress, KeyRelease, ButtonPress, ButtonRelease, and
+MotionNotify) are known as the core input events. All other
+input devices are referred to as extension input devices and
+the input events they generate are referred to as extension
+input events.
+
+In servers supporting only XI 1.x, this input extension does
+not change the behavior or functionality of the core input
+devices, core events, or core protocol requests, with the
+exception of the core grab requests. These requests may affect
+the synchronization of events from extension devices. See the
+explanation in the section titled "Event Synchronization and
+Core Grabs".
+
+Selection of the physical devices to be initially used by the
+server as the core devices is left implementation-dependent.
+Requests are defined that allow client programs to change which
+physical devices are used as the core devices.
+
+1.3 Extension Input Devices
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The input extension v1.x controls access to input devices other
+than the X keyboard and X pointer. It allows client programs to
+select input from these devices independently from each other
+and independently from the core devices.
+
+A client that wishes to access a specific device must first
+determine whether that device is connected to the X server.
+This is done through the ListInputDevices request, which will
+return a list of all devices that can be opened by the X
+server. A client can then open one or more of these devices
+using the OpenDevice request, specify what events they are
+interested in receiving, and receive and process input events
+from extension devices in the same way as events from the X
+keyboard and X pointer. Input events from these devices are of
+extension types ( DeviceKeyPress, DeviceKeyRelease,
+DeviceButtonPress, DeviceButtonRelease, DeviceMotionNotify,
+etc.) and contain a device identifier so that events of the
+same type coming from different input devices can be
+distinguished.
+
+Any kind of input device may be used as an extension input
+device. Extension input devices may have 0 or more keys, 0 or
+more buttons, and may report 0 or more axes of motion. Motion
+may be reported as relative movements from a previous position
+or as an absolute position. All valuators reporting motion
+information for a given extension input device must report the
+same kind of motion information (absolute or relative).
+
+This extension is designed to accommodate new types of input
+devices that may be added in the future. The protocol requests
+that refer to specific characteristics of input devices
+organize that information by input classes. Server implementors
+may add new classes of input devices without changing the
+protocol requests. Input classes are unique numbers registered
+with the X Consortium. Each extension input device may support
+multiple input classes.
+
+In XI 1.x, all extension input devices are treated like the
+core X keyboard in determining their location and focus. The
+server does not track the location of these devices on an
+individual basis, and therefore does not echo a cursor to
+indicate their current location. Instead, their location is
+determined by the location of the core X pointer. Like the core
+X keyboard, some may be explicitly focused. If they are not
+explicitly focused, their focus is determined by the location
+of the core X pointer.
+
+Most input events reported by the server to a client are of
+fixed size (32 bytes). In order to represent the change in
+state of an input device the extension may need to generate a
+sequence of input events. A client side library (such as Xlib)
+will typically take these raw input events and format them into
+a form more convenient to the client.
+
+1.4 Event Classes
+-----------------
+
+In the core protocol a client registers interest in receiving
+certain input events directed to a window by modifying that
+window's event-mask. Most of the bits in the event mask are
+already used to specify interest in core X events. The input
+extension specifies a different mechanism by which a client can
+express interest in events generated by this extension.
+
+When a client opens a extension input device via the OpenDevice
+request, an XDevice structure is returned. Macros are provided
+that extract 32-bit numbers called event classes from that
+structure, that a client can use to register interest in
+extension events via the SelectExtensionEvent request. The
+event class combines the desired event type and device id, and
+may be thought of as the equivalent of core event masks.
+
+1.5 Input Classes
+~~~~~~~~~~~~~~~~~
+
+Some of the input extension requests divide input devices into
+classes based on their functionality. This is intended to allow
+new classes of input devices to be defined at a later time
+without changing the semantics of these requests. The following
+input device classes are currently defined:
+
+ KEY
+ The device reports key events.
+
+ BUTTON
+ The device reports button events.
+
+ VALUATOR
+ The device reports valuator data in motion events.
+
+ PROXIMITY
+ The device reports proximity events.
+
+ FOCUS
+ The device can be focused and reports focus events.
+
+ FEEDBACK
+ The device supports feedbacks.
+
+ OTHER
+ The ChangeDeviceNotify, DeviceMappingNotify, and
+ DeviceStateNotify macros may be invoked passing the
+ XDevice structure returned for this device.
+
+Each extension input device may support multiple input classes.
+Additional classes may be added in the future. Requests that
+support multiple input classes, such as the ListInputDevices
+function that lists all available input devices, organize the
+data they return by input class. Client programs that use these
+requests should not access data unless it matches a class
+defined at the time those clients were compiled. In this way,
+new classes can be added without forcing existing clients that
+use these requests to be recompiled.
+
+2. Requests
+-----------
+
+Extension input devices are accessed by client programs through
+the use of new protocol requests. This section summarizes the
+new requests defined by this extension. The syntax and type
+definitions used below follow the notation used for the X11
+core protocol.
+
+2.1 Getting the Extension Version
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The GetExtensionVersion request returns version information
+about the input extension.
+
+ GetExtensionVersion
+ name: STRING
+ =>
+ present: BOOL
+ protocol-major-version: CARD16
+ protocol-minor-version: CARD16
+
+The protocol version numbers returned indicate the version of
+the input extension supported by the target X server. The
+version numbers can be compared to constants defined in the
+header file XI.h. Each version is a superset of the previous
+versions.
+
+The name must be the name of the Input Extension as defined
+in the header file XI.h.
+
+2.2 Listing Available Devices
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+A client that wishes to access a specific device must first
+determine whether that device is connected to the X server.
+This is done through the ListInputDevices request, which will
+return a list of all devices that can be opened by the X
+server.
+
+ ListInputDevices
+ =>
+ input-devices: ListOfDeviceInfo
+
+where
+
+ DEVICEINFO:
+ [type: ATOM
+ id: CARD8
+ num_classes: CARD8
+ use: {IsXKeyboard, IsXPointer, IsXExtensionPointer,
+ IsXExtensionKeyboard, IsExtensionDevice}
+ info: LISTofINPUTINFO
+ name: STRING8]
+
+ INPUTINFO: {KEYINFO, BUTTONINFO, VALUATORINFO}
+ KEYINFO:
+ [class: CARD8
+ length: CARD8
+ min-keycode: KEYCODE
+ max-keycode: KEYCODE
+ num-keys: CARD16]
+ BUTTONINFO:
+ [class: CARD8
+ length: CARD8
+ num-buttons: CARD16]
+ VALUATORINFO:
+ [class: CARD8
+ length: CARD8
+ num_axes: CARD8
+ mode: SETofDEVICEMODE
+ motion_buffer_size: CARD32
+ axes: LISTofAXISINFO]
+
+ AXISINFO:
+ [resolution: CARD32
+ min-val: CARD32
+ max-val: CARD32]
+ DEVICEMODE: {Absolute, Relative}
+
+ Errors: None
+
+This request returns a list of all devices that can be opened
+by the X server, including the core X keyboard and X pointer.
+Some implementations may open all input devices as part of X
+initialization, while others may not open an input device until
+requested to do so by a client program.
+
+The information returned for each device is as follows:
+
+ type
+ The type field is of type Atom and indicates the nature
+ of the device. Clients may determine device types by
+ invoking the XInternAtom request passing one of the
+ names defined in the header file XI.h. The following
+ names have been defined to date:
+
+ MOUSE
+ TABLET
+ KEYBOARD
+ TOUCHSCREEN
+ TOUCHPAD
+ BUTTONBOX
+ BARCODE
+ KNOB_BOX
+ TRACKBALL
+ QUADRATURE
+ SPACEBALL
+ DATAGLOVE
+ EYETRACKER
+ CURSORKEYS
+ FOOTMOUSE
+ ID_MODULE
+ ONE_KNOB
+ NINE_KNOB
+ JOYSTICK
+
+
+ id
+ The id is a small cardinal value in the range 0-128 that
+ uniquely identifies the device. It is assigned to the
+ device when it is initialized by the server. Some
+ implementations may not open an input device until
+ requested by a client program, and may close the device
+ when the last client accessing it requests that it be
+ closed. If a device is opened by a client program via
+ XOpenDevice, then closed via XCloseDevice, then opened
+ again, it is not guaranteed to have the same id after
+ the second open request.
+
+ num_classes
+ The num_classes field is a small cardinal value in the
+ range 0-255 that specifies the number of input classes
+ supported by the device for which information is
+ returned by ListInputDevices. Some input classes, such
+ as class Focus and class Proximity do not have any
+ information to be returned by ListInputDevices.
+
+ use
+ The use field specifies how the device is currently
+ being used. If the value is IsXKeyboard, the device is
+ currently being used as the X keyboard. If the value is
+ IsXPointer, the device is currently being used as the X
+ pointer. If the value is IsXExtensionPointer, the device
+ is available for use as an extension pointer. If the value
+ is IsXExtensionKeyboard, the device is available for use as
+ and extension keyboard.
+ Older versions of XI report all extension devices as
+ IsXExtensionDevice.
+
+ name
+ The name field contains a pointer to a null-terminated
+ string that corresponds to one of the defined device
+ types.
+
+ InputInfo
+ InputInfo is one of: KeyInfo, ButtonInfo or
+ ValuatorInfo. The first two fields are common to all
+ three:
+
+ class
+ The class field is a cardinal value in the range
+ 0-255. It uniquely identifies the class of input
+ for which information is returned.
+
+ length
+ The length field is a cardinal value in the range
+ 0-255. It specifies the number of bytes of data
+ that are contained in this input class. The length
+ includes the class and length fields.
+
+The remaining information returned for input class
+KEYCLASS is as follows:
+
+ min_keycode
+ min_keycode is of type KEYCODE. It specifies the
+ minimum keycode that the device will report. The
+ minimum keycode will not be smaller than 8.
+
+ max_keycode
+ max_keycode is of type KEYCODE. It specifies the
+ maximum keycode that the device will report. The
+ maximum keycode will not be larger than 255.
+
+ num_keys
+ num_keys is a cardinal value that specifies the
+ number of keys that the device has.
+
+The remaining information returned for input class
+BUTTONCLASS is as follows:
+
+ num_buttons
+ num_buttons is a cardinal value that specifies the
+ number of buttons that the device has.
+
+The remaining information returned for input class
+VALUATORCLASS is as follows:
+
+ mode
+ mode is a constant that has one of the following
+ values: Absolute or Relative. Some devices allow
+ the mode to be changed dynamically via the
+ SetDeviceMode request.
+
+ motion_buffer_size
+ motion_buffer_size is a cardinal number that
+ specifies the number of elements that can be
+ contained in the motion history buffer for the
+ device.
+
+ axes
+ The axes field contains a pointer to an AXISINFO
+ struture.
+
+The information returned for each axis reported by the
+device is:
+
+ resolution
+ The resolution is a cardinal value in
+ counts/meter.
+
+ min_val
+ The min_val field is a cardinal value in that
+ contains the minimum value the device reports for
+ this axis. For devices whose mode is Relative, the
+ min_val field will contain 0.
+
+ max_val
+ The max_val field is a cardinal value in that
+ contains the maximum value the device reports for
+ this axis. For devices whose mode is Relative, the
+ max_val field will contain 0.
+
+2.3 Enabling Devices
+~~~~~~~~~~~~~~~~~~~~
+
+Client programs that wish to access an extension device must
+request that the server open that device. This is done via the
+OpenDevice request.
+
+ OpenDevice
+ id: CARD8
+ =>
+ DEVICE:
+ [device_id: XID
+ num_classes: INT32
+ classes: LISTofINPUTCLASSINFO]
+ INPUTCLASSINFO:
+ [input_class: CARD8
+ event_type_base: CARD8]
+
+ Errors: Device
+
+This request returns the event classes to be used by the client
+to indicate which events the client program wishes to receive.
+Each input class may report several event classes. For example,
+input class Keys reports DeviceKeyPress and DeviceKeyRelease
+event classes. Input classes are unique numbers registered with
+the X Consortium. Input class Other exists to report event
+classes that are not specific to any one input class, such as
+DeviceMappingNotify, ChangeDeviceNotify, and DeviceStateNotify.
+
+The information returned for each device is as follows:
+
+ device_id
+ The device_id is a number that uniquely identifies the
+ device.
+
+ num_classes
+ The num_classes field contains the number of input
+ classes supported by this device.
+
+ For each class of input supported by the device, the
+ InputClassInfo structure contains the following information:
+
+ input_class
+ The input_class is a small cardinal number that
+ identifies the class of input.
+
+ event_type_base
+ The event_type_base is a small cardinal number that
+ specifies the event type of one of the events reported
+ by this input class. This information is not directly
+ used by client programs. Instead, the Device is used by
+ macros that return extension event types and event
+ classes. This is described in the section of this
+ document entitled "Selecting Extension Device Events".
+
+The information in the InputClassInfo reflects the state of
+this device at the time the request was processed.
+
+Before it exits, the client program should explicitly request
+that the server close the device. This is done via the
+CloseDevice request.
+
+A client may open the same extension device more than once.
+Requests after the first successful one return an additional
+XDevice structure with the same information as the first, but
+otherwise have no effect. A single CloseDevice request will
+terminate that client's access to the device.
+
+Closing a device releases any active or passive grabs the
+requesting client has established. If the device is frozen only
+by an active grab of the requesting client, the queued events
+are released when the client terminates.
+
+If a client program terminates without closing a device, the
+server will automatically close that device on behalf of the
+client. This does not affect any other clients that may be
+accessing that device.
+
+ CloseDevice:
+ device: DEVICE
+
+ Errors: Device
+
+2.4 Changing The Mode Of A Device
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Some devices are capable of reporting either relative or
+absolute motion data. To change the mode of a device from
+relative to absolute, use the SetDeviceMode request. The valid
+values are Absolute or Relative.
+
+This request will fail and return DeviceBusy if another client
+already has the device open with a different mode. It will fail
+and return AlreadyGrabbed if another client has the device
+grabbed. The request will fail with a BadMatch error if the
+device has no valuators and reports no axes of motion. The
+request will fail with a BadMode error if the requested mode
+is not supported by the device.
+
+ SetDeviceMode
+ device:DEVICE
+ mode: {Absolute, Relative}
+ =>
+ status: {Success, DeviceBusy, AlreadyGrabbed}
+
+ Errors: Device, Match, Mode
+
+2.5 Initializing Valuators on an Input Device
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Some devices that report absolute positional data can be
+initialized to a starting value. Devices that are capable of
+reporting relative motion or absolute positional data may
+require that their valuators be initialized to a starting value
+after the mode of the device is changed to Absolute. To
+initialize the valuators on such a device, use the
+SetDeviceValuators request.
+
+ SetDeviceValuators
+ device: DEVICE
+ first_valuator: CARD8
+ num_valuators: CARD8
+ valuators: LISTOFINT32
+ =>
+ status: {Success, AlreadyGrabbed}
+
+ Errors: Length, Device, Match, Value
+
+This request initializes the specified valuators on the
+specified extension input device. Valuators are numbered
+beginning with zero. Only the valuators in the range specified
+by first_valuator and num_valuators are set. If the number of
+valuators supported by the device is less than the expression
+first_valuator + num_valuators, a Value error will result.
+
+If the request succeeds, Success is returned. If the specifed
+device is grabbed by some other client, the request will fail
+and a status of AlreadyGrabbed will be returned.
+
+2.6 Getting Input Device Controls
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ GetDeviceControl
+ device: DEVICE
+ control: XID
+ =>
+ controlState: {DeviceState}
+
+where
+
+ DeviceState: DeviceResolutionState
+
+ Errors: Length, Device, Match, Value
+
+This request returns the current state of the specified device
+control. The device control must be supported by the target
+server and device or an error will result.
+
+If the request is successful, a pointer to a generic
+DeviceState structure will be returned. The information
+returned varies according to the specified control and is
+mapped by a structure appropriate for that control.
+
+GetDeviceControl will fail with a BadValue error if the server
+does not support the specified control. It will fail with a
+BadMatch error if the device does not support the specified
+control.
+
+Supported device controls and the information returned for them
+include:
+
+ DEVICE_RESOLUTION:
+ [control: CARD16
+ length: CARD16
+ num_valuators: CARD8
+ resolutions: LISTofCARD32
+ min_resolutions: LISTofCARD32
+ max_resolutions: LISTofCARD32]
+
+This device control returns a list of valuators and the range
+of valid resolutions allowed for each. Valuators are numbered
+beginning with 0. Resolutions for all valuators on the device
+are returned. For each valuator i on the device, resolutions[i]
+returns the current setting of the resolution,
+min_resolutions[i] returns the minimum valid setting, and
+max_resolutions[i] returns the maximum valid setting.
+
+When this control is specified, XGetDeviceControl will fail
+with a BadMatch error if the specified device has no valuators.
+
+ ChangeDeviceControl:
+ device: DEVICE
+ XID: controlId
+ control: DeviceControl
+
+where
+
+ DeviceControl: DeviceResolutionControl
+ =>
+ status: {Success, DeviceBusy, AlreadyGrabbed}
+
+ Errors: Length, Device, Match, Value
+
+ChangeDeviceControl changes the specifed device control
+according to the values specified in the DeviceControl
+structure. The device control must be supported by the target
+server and device or an error will result.
+
+The information passed with this request varies according to
+the specified control and is mapped by a structure appropriate
+for that control.
+
+ChangeDeviceControl will fail with a BadValue error if the
+server does not support the specified control. It will fail
+with a BadMatch error if the server supports the specified
+control, but the requested device does not. The request will
+fail and return a status of DeviceBusy if another client
+already has the device open with a device control state that
+conflicts with the one specified in the request. It will fail
+with a status of AlreadyGrabbed if some other client has
+grabbed the specified device. If the request succeeds, Success
+is returned. If it fails, the device control is left unchanged.
+
+Supported device controls and the information specified for
+them include:
+
+ DEVICE_RESOLUTION:
+ [control: CARD16
+ length: CARD16
+ first_valuator: CARD8
+ num_valuators: CARD8
+ resolutions: LISTofCARD32]
+
+This device control changes the resolution of the specified
+valuators on the specified extension input device. Valuators
+are numbered beginning with zero. Only the valuators in the
+range specified by first_valuator and num_valuators are set. A
+value of -1 in the resolutions list indicates that the
+resolution for this valuator is not to be changed.
+num_valuators specifies the number of valuators in the
+resolutions list.
+
+When this control is specified, XChangeDeviceControl will fail
+with a BadMatch error if the specified device has no valuators.
+If a resolution is specified that is not within the range of
+valid values (as returned by XGetDeviceControl) the request
+will fail with a BadValue error. If the number of valuators
+supported by the device is less than the expression
+first_valuator + num_valuators, a BadValue error will result.
+
+If the request fails for any reason, none of the valuator
+resolutions will be changed.
+
+ChangeDeviceControl causes the server to send a DevicePresence
+event to interested clients.
+
+2.7 Selecting Extension Device Events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Extension input events are selected using the
+SelectExtensionEvent request.
+
+ SelectExtensionEvent
+ interest: LISTofEVENTCLASS
+ window: WINDOW
+
+ Errors: Window, Class, Access
+
+This request specifies to the server the events within the
+specified window which are of interest to the client. As with
+the core XSelectInput function, multiple clients can select
+input on the same window.
+
+XSelectExtensionEvent requires a list of event classes. An
+event class is a 32-bit number that combines an event type and
+device id, and is used to indicate which event a client wishes
+to receive and from which device it wishes to receive it.
+Macros are provided to obtain event classes from the data
+returned by the XOpenDevice request. The names of these macros
+correspond to the desired events, i.e. the DeviceKeyPress is
+used to obtain the event class for DeviceKeyPress events. The
+syntax of the macro invocation is:
+
+ DeviceKeyPress (device, event_type, event_class);
+ device: DEVICE
+ event_type: INT
+ event_class: INT
+
+The value returned in event_type is the value that will be
+contained in the event type field of the XDeviceKeyPressEvent
+when it is received by the client. The value returned in
+event_class is the value that should be passed in making an
+XSelectExtensionEvent request to receive DeviceKeyPress events.
+
+For DeviceButtonPress events, the client may specify whether or
+not an implicit passive grab should be done when the button is
+pressed. If the client wants to guarantee that it will receive
+a DeviceButtonRelease event for each DeviceButtonPress event it
+receives, it should specify the DeviceButtonPressGrab event
+class as well as the DeviceButtonPress event class. This
+restricts the client in that only one client at a time may
+request DeviceButtonPress events from the same device and
+window if any client specifies this class.
+
+If any client has specified the DeviceButtonPressGrab class,
+any requests by any other client that specify the same device
+and window and specify DeviceButtonPress or
+DeviceButtonPressGrab will cause an Access error to be
+generated.
+
+If only the DeviceButtonPress class is specified, no implicit
+passive grab will be done when a button is pressed on the
+device. Multiple clients may use this class to specify the same
+device and window combination.
+
+A client may also specify the DeviceOwnerGrabButton class. If
+it has specified both the DeviceButtonPressGrab and the
+DeviceOwnerGrabButton classes, implicit passive grabs will
+activate with owner_events set to True. If only the
+DeviceButtonPressGrab class is specified, implicit passive
+grabs will activate with owner_events set to False.
+
+The client may select DeviceMotion events only when a button is
+down. It does this by specifying the event classes
+Button1Motion through Button5Motion, or ButtonMotion. An input
+device will only support as many button motion classes as it
+has buttons.
+
+2.8 Determining Selected Events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To determine which extension events are currently selected from
+a given window, use GetSelectedExtensionEvents.
+
+ GetSelectedExtensionEvents
+ window: WINDOW
+ =>
+ this-client: LISTofEVENTCLASS
+ all-clients: LISTofEVENTCLASS
+
+ Errors: Window
+
+This request returns two lists specifying the events selected
+on the specified window. One list gives the extension events
+selected by this client from the specified window. The other
+list gives the extension events selected by all clients from
+the specified window. This information is equivalent to that
+returned by your-event-mask and all-event-masks in a
+GetWindowAttributes request.
+
+2.9 Controlling Event Propagation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Extension events propagate up the window hierarchy in the same
+manner as core events. If a window is not interested in an
+extension event, it usually propagates to the closest ancestor
+that is interested, unless the dont_propagate list prohibits
+it. Grabs of extension devices may alter the set of windows
+that receive a particular extension event.
+
+Client programs may control extension event propagation through
+the use of the following two requests.
+
+XChangeDeviceDontPropagateList adds an event to or deletes an
+event from the do_not_propagate list of extension events for
+the specified window. This list is maintained for the life of
+the window, and is not altered if the client terminates.
+
+ ChangeDeviceDontPropagateList
+ window: WINDOW
+ eventclass: LISTofEVENTCLASS
+ mode: {AddToList, DeleteFromList}
+
+ Errors: Window, Class, Mode
+
+This function modifies the list specifying the events that are
+not propagated to the ancestors of the specified window. You
+may use the modes AddToList or DeleteFromList.
+
+ GetDeviceDontPropagateList
+ window: WINDOW
+ =>
+ dont-propagate-list: LISTofEVENTCLASS
+
+ Errors: Window
+
+This function returns a list specifying the events that are not
+propagated to the ancestors of the specified window.
+
+2.10 Sending Extension Events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+One client program may send an event to another via the
+XSendExtensionEvent function.
+
+The event in the XEvent structure must be one of the events
+defined by the input extension, so that the X server can
+correctly byte swap the contents as necessary. The contents of
+the event are otherwise unaltered and unchecked by the X server
+except to force send_event to True in the forwarded event and
+to set the sequence number in the event correctly.
+
+XSendExtensionEvent returns zero if the conversion-to-wire
+protocol failed, otherwise it returns nonzero.
+
+ SendExtensionEvent
+ device: DEVICE
+ destination: WINDOW
+ propagate: BOOL
+ eventclass: LISTofEVENTCLASS
+ event: XEVENT
+
+ Errors: Device, Value, Class, Window
+
+2.11 Getting Motion History
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ GetDeviceMotionEvents
+ device: DEVICE
+ start, stop: TIMESTAMP or CurrentTime
+ =>
+ nevents_return: CARD32
+ mode_return: {Absolute, Relative}
+ axis_count_return: CARD8
+ events: LISTofDEVICETIMECOORD
+
+where
+
+ DEVICETIMECOORD:
+ [data: LISTofINT32
+ time: TIMESTAMP]
+
+ Errors: Device, Match
+
+This request returns all positions in the device's motion
+history buffer that fall between the specified start and stop
+times inclusive. If the start time is in the future, or is
+later than the stop time, no positions are returned.
+
+The data field of the DEVICETIMECOORD structure is a sequence
+of data items. Each item is of type INT32, and there is one
+data item per axis of motion reported by the device. The number
+of axes reported by the device is returned in the axis_count
+variable.
+
+The value of the data items depends on the mode of the device,
+which is returned in the mode variable. If the mode is
+Absolute, the data items are the raw values generated by the
+device. These may be scaled by the client program using the
+maximum values that the device can generate for each axis of
+motion that it reports. The maximum and minimum values for each
+axis are reported by the ListInputDevices request.
+
+If the mode is Relative, the data items are the relative values
+generated by the device. The client program must choose an
+initial position for the device and maintain a current position
+by accumulating these relative values.
+
+2.12 Changing The Core Devices
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+These requests are provided to change which physical device is
+used as the X pointer or X keyboard. These requests are
+deprecated in servers supporting XI 1.4 and above, and will
+always return a a BadDevice error.
+
+Using these requests may change the characteristics of the core
+devices. The new pointer device may have a different number of
+buttons than the old one did, or the new keyboard device may
+have a different number of keys or report a different range of
+keycodes. Client programs may be running that depend on those
+characteristics. For example, a client program could allocate
+an array based on the number of buttons on the pointer device,
+and then use the button numbers received in button events as
+indicies into that array. Changing the core devices could cause
+such client programs to behave improperly or abnormally
+terminate.
+
+These requests change the X keyboard or X pointer device and
+generate an ChangeDeviceNotify event and a MappingNotify event.
+The ChangeDeviceNotify event is sent only to those clients that
+have expressed an interest in receiving that event via the
+XSelectExtensionEvent request. The specified device becomes the
+new X keyboard or X pointer device. The location of the core
+device does not change as a result of this request.
+
+These requests fail and return AlreadyGrabbed if either the
+specified device or the core device it would replace are
+grabbed by some other client. They fail and return GrabFrozen
+if either device is frozen by the active grab of another
+client.
+
+These requests fail with a BadDevice error if the specified
+device is invalid, or has not previously been opened via
+OpenDevice. To change the X keyboard device, use the
+ChangeKeyboardDevice request. The specified device must support
+input class Keys (as reported in the ListInputDevices request)
+or the request will fail with a BadMatch error. Once the device
+has successfully replaced one of the core devices, it is
+treated as a core device until it is in turn replaced by
+another ChangeDevice request, or until the server terminates.
+The termination of the client that changed the device will not
+cause it to change back. Attempts to use the CloseDevice
+request to close the new core device will fail with a BadDevice
+error.
+
+The focus state of the new keyboard is the same as the focus
+state of the old X keyboard. If the new keyboard was not
+initialized with a FocusRec, one is added by the
+ChangeKeyboardDevice request. The X keyboard is assumed to have
+a KbdFeedbackClassRec. If the device was initialized without a
+KbdFeedbackClassRec, one will be added by this request. The
+KbdFeedbackClassRec will specify a null routine as the control
+procedure and the bell procedure.
+
+ ChangeKeyboardDevice
+ device: DEVICE
+ =>
+ status: Success, AlreadyGrabbed, Frozen
+
+ Errors: Device, Match
+
+To change the X pointer device, use the ChangePointerDevice
+request. The specified device must support input class
+Valuators (as reported in the ListInputDevices request) or the
+request will fail with a BadMatch error. The valuators to be
+used as the x- and y-axes of the pointer device must be
+specified. Data from other valuators on the device will be
+ignored.
+
+The X pointer device does not contain a FocusRec. If the new
+pointer was initialized with a FocusRec, it is freed by the
+ChangePointerDevice request. The X pointer is assumed to have a
+ButtonClassRec and a PtrFeedbackClassRec. If the device was
+initialized without a ButtonClassRec or a PtrFeedbackClassRec,
+one will be added by this request. The ButtonClassRec added
+will have no buttons, and the PtrFeedbackClassRec will specify
+a null routine as the control procedure.
+
+If the specified device reports absolute positional
+information, and the server implementation does not allow such
+a device to be used as the X pointer, the request will fail
+with a BadDevice error.
+
+Once the device has successfully replaced one of the core
+devices, it is treated as a core device until it is in turn
+replaced by another ChangeDevice request, or until the server
+terminates. The termination of the client that changed the
+device will not cause it to change back. Attempts to use the
+CloseDevice request to close the new core device will fail with
+a BadDevice error.
+
+ ChangePointerDevice
+ device: DEVICE
+ xaxis: CARD8
+ yaxis: CARD8
+ =>
+ status: Success, AlreadyGrabbed, Frozen
+
+ Errors: Device, Match
+
+2.12 Event Synchronization And Core Grabs
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Implementation of the input extension requires an extension of
+the meaning of event synchronization for the core grab
+requests. This is necessary in order to allow window managers
+to freeze all input devices with a single request.
+
+The core grab requests require a pointer_mode and keyboard_mode
+argument. The meaning of these modes is changed by the input
+extension. For the XGrabPointer and XGrabButton requests,
+pointer_mode controls synchronization of the pointer device,
+and keyboard_mode controls the synchronization of all other
+input devices. For the XGrabKeyboard and XGrabKey requests,
+pointer_mode controls the synchronization of all input devices
+except the X keyboard, while keyboard_mode controls the
+synchronization of the keyboard. When using one of the core
+grab requests, the synchronization of extension devices is
+controlled by the mode specified for the device not being
+grabbed.
+
+2.13 Extension Active Grabs
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Active grabs of extension devices are supported via the
+GrabDevice request in the same way that core devices are
+grabbed using the core GrabKeyboard request, except that a
+Device is passed as a function parameter. A list of events that
+the client wishes to receive is also passed. The UngrabDevice
+request allows a previous active grab for an extension device
+to be released.
+
+To grab an extension device, use the GrabDevice request. The
+device must have previously been opened using the OpenDevice
+request.
+
+ GrabDevice
+ device: DEVICE
+ grab-window: WINDOW
+ owner-events: BOOL
+ event-list: LISTofEVENTCLASS
+ this-device-mode: {Synchronous, Asynchronous}
+ other-device-mode: {Synchronous, Asynchronous}
+ time:TIMESTAMP or CurrentTime
+ =>
+ status: Success, AlreadyGrabbed, Frozen,
+ InvalidTime, NotViewable
+
+ Errors: Device, Window, Value
+
+This request actively grabs control of the specified input
+device. Further input events from this device are reported only
+to the grabbing client. This request overrides any previous
+active grab by this client for this device.
+
+The event-list parameter is a pointer to a list of event
+classes. These are used to indicate which events the client
+wishes to receive while the device is grabbed. Only event
+classes obtained from the grabbed device are valid.
+
+If owner-events is False, input events generated from this
+device are reported with respect to grab-window, and are only
+reported if selected by being included in the event-list. If
+owner-events is True, then if a generated event would normally
+be reported to this client, it is reported normally, otherwise
+the event is reported with respect to the grab-window, and is
+only reported if selected by being included in the event-list.
+For either value of owner-events, unreported events are
+discarded.
+
+If this-device-mode is Asynchronous, device event processing
+continues normally. If the device is currently frozen by this
+client, then processing of device events is resumed. If
+this-device-mode is Synchronous, the state of the grabbed
+device (as seen by means of the protocol) appears to freeze,
+and no further device events are generated by the server until
+the grabbing client issues a releasing AllowDeviceEvents
+request or until the device grab is released. Actual device
+input events are not lost while the device is frozen; they are
+simply queued for later processing.
+
+If other-device-mode is Asynchronous, event processing is
+unaffected by activation of the grab. If other-device-mode is
+Synchronous, the state of all input devices except the grabbed
+one (as seen by means of the protocol) appears to freeze, and
+no further events are generated by the server until the
+grabbing client issues a releasing AllowDeviceEvents request or
+until the device grab is released. Actual events are not lost
+while the devices are frozen; they are simply queued for later
+processing.
+
+This request generates DeviceFocusIn and DeviceFocusOut events.
+
+This request fails and returns:
+
+ AlreadyGrabbed
+ If the device is actively grabbed by some other client.
+
+ NotViewable
+ If grab-window is not viewable.
+
+ InvalidTime
+ If the specified time is earlier than the last-grab-time
+ for the specified device or later than the current X
+ server time. Otherwise, the last-grab-time for the
+ specified device is set to the specified time and
+ CurrentTime is replaced by the current X server time.
+
+ Frozen
+ If the device is frozen by an active grab of another
+ client.
+
+If a grabbed device is closed by a client while an active grab
+by that client is in effect, that active grab will be released.
+Any passive grabs established by that client will be released.
+If the device is frozen only by an active grab of the
+requesting client, it is thawed.
+
+To release a grab of an extension device, use UngrabDevice.
+
+ UngrabDevice
+ device: DEVICE
+ time: TIMESTAMP or CurrentTime
+
+ Errors: Device
+
+This request releases the device if this client has it actively
+grabbed (from either GrabDevice or GrabDeviceKey) and releases
+any queued events. If any devices were frozen by the grab,
+UngrabDevice thaws them. The request has no effect if the
+specified time is earlier than the last-device-grab time or is
+later than the current server time.
+
+This request generates DeviceFocusIn and DeviceFocusOut events.
+
+An UngrabDevice is performed automatically if the event window
+for an active device grab becomes not viewable.
+
+2.14 Passively Grabbing A Key
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Passive grabs of buttons and keys on extension devices are
+supported via the GrabDeviceButton and GrabDeviceKey requests.
+These passive grabs are released via the UngrabDeviceKey and
+UngrabDeviceButton requests.
+
+To passively grab a single key on an extension device, use
+GrabDeviceKey. That device must have previously been opened
+using the OpenDevice request.
+
+ GrabDeviceKey
+ device: DEVICE
+ keycode: KEYCODE or AnyKey
+ modifiers: SETofKEYMASK or AnyModifier
+ modifier-device: DEVICE or NULL
+ grab-window: WINDOW
+ owner-events: BOOL
+ event-list: LISTofEVENTCLASS
+ this-device-mode: {Synchronous, Asynchronous}
+ other-device-mode: {Synchronous, Asynchronous}
+
+ Errors: Device, Match, Access, Window, Value
+
+This request is analogous to the core GrabKey request. It
+establishes a passive grab on a device. Consequently, in the
+future:
+
+ * IF the device is not grabbed and the specified key, which
+ itself can be a modifier key, is logically pressed when the
+ specified modifier keys logically are down on the specified
+ modifier device (and no other keys are down),
+ * AND no other modifier keys logically are down,
+ * AND EITHER the grab window is an ancestor of (or is) the
+ focus window OR the grab window is a descendent of the
+ focus window and contains the pointer,
+ * AND a passive grab on the same device and key combination
+ does not exist on any ancestor of the grab window,
+ * THEN the device is actively grabbed, as for GrabDevice, the
+ last-device-grab time is set to the time at which the key
+ was pressed (as transmitted in the DeviceKeyPress event),
+ and the DeviceKeyPress event is reported.
+
+The interpretation of the remaining arguments is as for
+GrabDevice. The active grab is terminated automatically when
+logical state of the device has the specified key released
+(independent of the logical state of the modifier keys).
+
+Note that the logical state of a device (as seen by means of
+the X protocol) may lag the physical state if device event
+processing is frozen.
+
+A modifier of AnyModifier is equivalent to issuing the request
+for all possible modifier combinations (including the
+combination of no modifiers). It is not required that all
+modifiers specified have currently assigned keycodes. A key of
+AnyKey is equivalent to issuing the request for all possible
+keycodes. Otherwise, the key must be in the range specified by
+min-keycode and max-keycode in the ListInputDevices request. If
+it is not within that range, GrabDeviceKey generates a Value
+error.
+
+NULL may be passed for the modifier_device. If the
+modifier_device is NULL, the core X keyboard is used as the
+modifier_device.
+
+An Access error is generated if some other client has issued a
+GrabDeviceKey with the same device and key combination on the
+same window. When using AnyModifier or AnyKey, the request
+fails completely and the X server generates a Access error and
+no grabs are established if there is a conflicting grab for any
+combination.
+
+This request cannot be used to grab a key on the X keyboard
+device. The core GrabKey request should be used for that
+purpose.
+
+To release a passive grab of a single key on an extension
+device, use UngrabDeviceKey.
+
+ UngrabDeviceKey
+ device: DEVICE
+ keycode: KEYCODE or AnyKey
+ modifiers: SETofKEYMASK or AnyModifier
+ modifier-device: DEVICE or NULL
+ grab-window: WINDOW
+
+ Errors: Device, Match, Window, Value, Alloc
+
+This request is analogous to the core UngrabKey request. It
+releases the key combination on the specified window if it was
+grabbed by this client. A modifier of AnyModifier is equivalent
+to issuing the request for all possible modifier combinations
+(including the combination of no modifiers). A key of AnyKey is
+equivalent to issuing the request for all possible keycodes.
+This request has no effect on an active grab.
+
+NULL may be passed for the modifier_device. If the
+modifier_device is NULL, the core X keyboard is used as the
+modifier_device.
+
+2.15 Passively Grabbing A Button
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To establish a passive grab for a single button on an extension
+device, use GrabDeviceButton.
+
+ GrabDeviceButton
+ device: DEVICE
+ button: BUTTON or AnyButton
+ modifiers: SETofKEYMASK or AnyModifier
+ modifier-device: DEVICE or NULL
+ grab-window: WINDOW
+ owner-events: BOOL
+ event-list: LISTofEVENTCLASS
+ this-device-mode: {Synchronous, Asynchronous}
+ other-device-mode: {Synchronous, Asynchronous}
+
+ Errors: Device, Match, Window, Access, Value
+
+This request is analogous to the core GrabButton request. It
+establishes an explicit passive grab for a button on an
+extension input device. Since the server does not track
+extension devices, no cursor is specified with this request.
+For the same reason, there is no confine-to parameter. The
+device must have previously been opened using the OpenDevice
+request.
+
+The GrabDeviceButton request establishes a passive grab on a
+device. Consequently, in the future,
+
+ * IF the device is not grabbed and the specified button is
+ logically pressed when the specified modifier keys
+ logically are down (and no other buttons or modifier
+ keys are down),
+
+ * AND the grab window contains the device,
+
+ * AND a passive grab on the same device and button/ key
+ combination does not exist on any ancestor of the grab
+ window,
+
+ * THEN the device is actively grabbed, as for GrabDevice,
+ the last-grab time is set to the time at which the
+ button was pressed (as transmitted in the
+ DeviceButtonPress event), and the DeviceButtonPress
+ event is reported.
+
+The interpretation of the remaining arguments is as for
+GrabDevice. The active grab is terminated automatically when
+logical state of the device has all buttons released
+(independent of the logical state of the modifier keys).
+
+Note that the logical state of a device (as seen by means of
+the X protocol) may lag the physical state if device event
+processing is frozen.
+
+A modifier of AnyModifier is equivalent to issuing the request
+for all possible modifier combinations (including the
+combination of no modifiers). It is not required that all
+modifiers specified have currently assigned keycodes. A button
+of AnyButton is equivalent to issuing the request for all
+possible buttons. It is not required that the specified button
+be assigned to a physical button.
+
+NULL may be passed for the modifier_device. If the
+modifier_device is NULL, the core X keyboard is used as the
+modifier_device.
+
+An Access error is generated if some other client has issued a
+GrabDeviceButton with the same device and button combination on
+the same window. When using AnyModifier or AnyButton, the
+request fails completely and the X server generates a Access
+error and no grabs are established if there is a conflicting
+grab for any combination. The request has no effect on an
+active grab.
+
+This request cannot be used to grab a button on the X pointer
+device. The core GrabButton request should be used for that
+purpose.
+
+To release a passive grab of a button on an extension device,
+use UngrabDeviceButton.
+
+ UngrabDeviceButton
+ device: DEVICE
+ button: BUTTON or AnyButton
+ modifiers: SETofKEYMASK or AnyModifier
+ modifier-device: DEVICE or NULL
+ grab-window: WINDOW
+
+ Errors: Device, Match, Window, Value, Alloc
+
+This request is analogous to the core UngrabButton request. It
+releases the passive button/key combination on the specified
+window if it was grabbed by the client. A modifiers of
+AnyModifier is equivalent to issuing the request for all
+possible modifier combinations (including the combination of no
+modifiers). A button of AnyButton is equivalent to issuing the
+request for all possible buttons. This request has no effect on
+an active grab. The device must have previously been opened
+using the OpenDevice request otherwise a Device error will be
+generated.
+
+NULL may be passed for the modifier_device. If the
+modifier_device is NULL, the core X keyboard is used as the
+modifier_device.
+
+This request cannot be used to ungrab a button on the X pointer
+device. The core UngrabButton request should be used for that
+purpose.
+
+2.16 Thawing A Device
+~~~~~~~~~~~~~~~~~~~~~
+
+To allow further events to be processed when a device has been
+frozen, use AllowDeviceEvents.
+
+ AllowDeviceEvents
+ device: DEVICE
+ event-mode: {AsyncThisDevice, SyncThisDevice, AsyncOtherDevices,
+ ReplayThisdevice, AsyncAll, or SyncAll}
+ time:TIMESTAMP or CurrentTime
+
+ Errors: Device, Value
+
+The AllowDeviceEvents request releases some queued events if
+the client has caused a device to freeze. The request has no
+effect if the specified time is earlier than the last-grab time
+of the most recent active grab for the client, or if the
+specified time is later than the current X server time.
+
+The following describes the processing that occurs depending on
+what constant you pass to the event-mode argument:
+
+ * If the specified device is frozen by the client, event
+ processing for that device continues as usual. If the
+ device is frozen multiple times by the client on behalf
+ of multiple separate grabs, AsyncThisDevice thaws for
+ all. AsyncThisDevice has no effect if the specified
+ device is not frozen by the client, but the device need
+ not be grabbed by the client.
+
+ * If the specified device is frozen and actively grabbed
+ by the client, event processing for that device
+ continues normally until the next button or key event is
+ reported to the client. At this time, the specified
+ device again appears to freeze. However, if the reported
+ event causes the grab to be released, the specified
+ device does not freeze. SyncThisDevice has no effect if
+ the specified device is not frozen by the client or is
+ not grabbed by the client.
+
+ * If the specified device is actively grabbed by the
+ client and is frozen as the result of an event having
+ been sent to the client (either from the activation of a
+ GrabDeviceButton or from a previous AllowDeviceEvents
+ with mode SyncThisDevice, but not from a Grab), the grab
+ is released and that event is completely reprocessed.
+ This time, however, the request ignores any passive
+ grabs at or above (towards the root) the grab-window of
+ the grab just released. The request has no effect if the
+ specified device is not grabbed by the client or if it
+ is not frozen as the result of an event.
+
+ * If the remaining devices are frozen by the client, event
+ processing for them continues as usual. If the other
+ devices are frozen multiple times by the client on
+ behalf of multiple separate grabs, AsyncOtherDevices
+ “thaws” for all. AsyncOtherDevices has no effect if the
+ devices are not frozen by the client, but those devices
+ need not be grabbed by the client.
+
+ * If all devices are frozen by the client, event
+ processing (for all devices) continues normally until
+ the next button or key event is reported to the client
+ for a grabbed device (button event for the grabbed
+ device, key or motion event for the device), at which
+ time the devices again appear to freeze. However, if the
+ reported event causes the grab to be released, then the
+ devices do not freeze (but if any device is still
+ grabbed, then a subsequent event for it will still cause
+ all devices to freeze). SyncAll has no effect unless all
+ devices are frozen by the client. If any device is
+ frozen twice by the client on behalf of two separate
+ grabs, SyncAll "thaws" for both (but a subsequent freeze
+ for SyncAll will only freeze each device once).
+
+ * If all devices are frozen by the client, event
+ processing (for all devices) continues normally. If any
+ device is frozen multiple times by the client on behalf
+ of multiple separate grabs, AsyncAll "thaws" for all.
+ AsyncAll has no effect unless all devices are frozen by
+ the client.
+
+AsyncThisDevice, SyncThisDevice, and ReplayThisDevice
+have no effect on the processing of events from the
+remaining devices. AsyncOtherDevices has no effect on
+the processing of events from the specified device. When
+the event_mode is SyncAll or AsyncAll, the device
+parameter is ignored.
+
+It is possible for several grabs of different devices
+(by the same or different clients) to be active
+simultaneously. If a device is frozen on behalf of any
+grab, no event processing is performed for the device.
+It is possible for a single device to be frozen because
+of several grabs. In this case, the freeze must be
+released on behalf of each grab before events can again
+be processed.
+
+2.17 Controlling Device Focus
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The current focus window for an extension input device can be
+determined using the GetDeviceFocus request. Extension devices
+are focused using the SetDeviceFocus request in the same way
+that the keyboard is focused using the SetInputFocus request,
+except that a device is specified as part of the request. One
+additional focus state, FollowKeyboard, is provided for
+extension devices.
+
+To get the current focus state, revert state, and focus time of
+an extension device, use GetDeviceFocus.
+
+ GetDeviceFocus
+ device: DEVICE
+ =>
+ focus: WINDOW, PointerRoot, FollowKeyboard, or None
+ revert-to: Parent, PointerRoot, FollowKeyboard, or None
+ focus-time: TIMESTAMP
+
+ Errors: Device, Match
+
+This request returns the current focus state, revert-to state,
+and last-focus-time of an extension device.
+
+To set the focus of an extension device, use SetDeviceFocus.
+
+ SetDeviceFocus
+ device: DEVICE
+ focus: WINDOW, PointerRoot, FollowKeyboard, or None
+ revert-to: Parent, PointerRoot, FollowKeyboard, or None
+ focus-time: TIMESTAMP
+
+ Errors: Device, Window, Value, Match
+
+This request changes the focus for an extension input device
+and the last-focus-change-time. The request has no effect if
+the specified time is earlier than the last-focus-change-time
+or is later than the current X server time. Otherwise, the
+last-focus-change-time is set to the specified time, with
+CurrentTime replaced by the current server time.
+
+The action taken by the server when this request is requested
+depends on the value of the focus argument:
+
+ * If the focus argument is None, all input events from
+ this device will be discarded until a new focus window
+ is set. In this case, the revert-to argument is ignored.
+
+ * If a window ID is assigned to the focus argument, it
+ becomes the focus window of the device. If an input
+ event from the device would normally be reported to this
+ window or to one of its inferiors, the event is reported
+ normally. Otherwise, the event is reported relative to
+ the focus window.
+
+ * If you assign PointerRoot to the focus argument, the
+ focus window is dynamically taken to be the root window
+ of whatever screen the pointer is on at each input
+ event. In this case, the revert-to argument is ignored.
+
+ * If you assign FollowKeyboard to the focus argument, the
+ focus window is dynamically taken to be the same as the
+ focus of the X keyboard at each input event.
+ The specified focus window must be viewable at the time
+ of the request (else a Match error). If the focus window
+ later becomes not viewable, the X server evaluates the
+ revert-to argument to determine the new focus window.
+
+ * If you assign RevertToParent to the revert-to argument,
+ the focus reverts to the parent (or the closest viewable
+ ancestor), and the new revert-to value is taken to be
+ RevertToNone.
+
+ * If you assign RevertToPointerRoot,
+ RevertToFollowKeyboard, or RevertToNone to the revert-to
+ argument, the focus reverts to that value.
+
+When the focus reverts, the X server generates DeviceFocusIn
+and DeviceFocusOut events, but the last-focus-change time is
+not affected.
+
+This request causes the X server to generate DeviceFocusIn and
+DeviceFocusOut events.
+
+2.18 Controlling Device Feedback
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To get the settings of feedbacks on an extension device, use
+GetFeedbackControl. This request provides functionality
+equivalent to the core GetKeyboardControl and GetPointerControl
+functions. It also provides a way to control displays
+associated with an input device that are capable of displaying
+an integer or string.
+
+ GetFeedbackControl
+ device: DEVICE
+ =>
+ num_feedbacks_return: CARD16
+ return_value: LISTofFEEDBACKSTATE
+
+where
+
+ FEEDBACKSTATE: {KbdFeedbackState, PtrFeedbackState,
+ IntegerFeedbackState, StringFeedbackState,
+ BellFeedbackState, LedFeedbackState}
+
+Feedbacks are reported by class. Those feedbacks that are
+reported for the core keyboard device are in class KbdFeedback,
+and are returned in the KbdFeedbackState structure. The members
+of that structure are as follows:
+
+ CLASS Kbd:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ key_click_percent: CARD8
+ bell_percent: CARD8
+ bell_pitch: CARD16
+ bell_duration: CARD16
+ led_value: BITMASK
+ global_auto_repeat: {AutoRepeatModeOn, AutoRepeatModeOff}
+ auto_repeats: LISTofCARD8]
+
+Those feedbacks that are equivalent to those reported for the
+core pointer are in feedback class PtrFeedback and are reported
+in the PtrFeedbackState structure. The members of that
+structure are:
+
+ CLASS Ptr:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ accelNumerator: CARD16
+ accelDenominator: CARD16
+ threshold: CARD16]
+
+Some input devices provide a means of displaying an integer.
+Those devices will support feedback class IntegerFeedback,
+which is reported in the IntegerFeedbackState structure. The
+members of that structure are:
+
+ CLASS Integer:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ resolution: CARD32
+ min-val: INT32
+ max-val: INT32]
+
+Some input devices provide a means of displaying a string.
+Those devices will support feedback class StringFeedback, which
+is reported in the StringFeedbackState structure. The members
+of that structure are:
+
+ CLASS String:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ max_symbols: CARD16
+ num_keysyms_supported: CARD16
+ keysyms_supported: LISTofKEYSYM]
+
+Some input devices contain a bell. Those devices will support
+feedback class BellFeedback, which is reported in the
+BellFeedbackState structure. The members of that structure are:
+
+ CLASS Bell:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ percent: CARD8
+ pitch: CARD16
+ duration: CARD16]
+
+The percent sets the base volume for the bell between 0 (off)
+and 100 (loud) inclusive, if possible. Setting to -1 restores
+the default. Other negative values generate a Value error.
+
+The pitch sets the pitch (specified in Hz) of the bell, if
+possible. Setting to -1 restores the default. Other negative
+values generate a Value error.
+
+The duration sets the duration (specified in milliseconds) of
+the bell, if possible. Setting to -1 restores the default.
+Other negative values generate a Value error.
+
+A bell generator connected with the console but not directly on
+the device is treated as if it were part of the device. Some
+input devices contain LEDs. Those devices will support feedback
+class Led, which is reported in the LedFeedbackState structure.
+The members of that structure are:
+
+ CLASS Led:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ led_mask: BITMASK
+ led_value: BITMASK]
+
+Each bit in led_mask indicates that the corresponding led is
+supported by the feedback. At most 32 LEDs per feedback are
+supported. No standard interpretation of LEDs is defined.
+
+This function will fail with a BadMatch error if the device
+specified in the request does not support feedbacks.
+
+ Errors: Device, Match
+
+To change the settings of a feedback on an extension device,
+use ChangeFeedbackControl.
+
+ ChangeFeedbackControl
+ device: DEVICE
+ feedbackid: CARD8
+ value-mask: BITMASK
+ value: FEEDBACKCONTROL
+ FEEDBACKCONTROL: {KBDFEEDBACKCONTROL,
+ PTRFEEDBACKCONTROL,
+ INTEGERFEEDBACKCONTROL,
+ STRINGFEEDBACKCONTROL,
+ BELLFEEDBACKCONTROL,
+ LEDFEEDBACKCONTROL}
+
+ Errors: Device, Match, Value
+
+Feedback controls are grouped by class. Those feedbacks that
+are equivalent to those supported by the core keyboard are
+controlled by feedback class KbdFeedbackClass using the
+KbdFeedbackControl structure. The members of that structure
+are:
+
+ KBDFEEDBACKCTL
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ key_click_percent: INT8
+ bell_percent: INT8
+ bell_pitch: INT16
+ bell_duration: INT16
+ led_mask: INT32
+ led_value: INT32
+ key: KEYCODE
+ auto_repeat_mode: {AutoRepeatModeOn, AutoRepeatModeOff,
+ AutoRepeatModeDefault}]
+
+The key_click_percent sets the volume for key clicks between 0
+(off) and 100 (loud) inclusive, if possible. Setting to -1
+restores the default. Other negative values generate a Value
+error.
+
+If both auto_repeat_mode and key are specified, then the
+auto_repeat_mode of that key is changed, if possible. If only
+auto_repeat_mode is specified, then the global auto-repeat mode
+for the entire keyboard is changed, if possible, without
+affecting the per-key settings. It is a Match error if a key is
+specified without an auto_repeat_mode.
+
+The order in which controls are verified and altered is
+server-dependent. If an error is generated, a subset of the
+controls may have been altered.
+
+Those feedback controls equivalent to those of the core pointer
+are controlled by feedback class PtrFeedbackClass using the
+PtrFeedbackControl structure. The members of that structure are
+as follows:
+
+ PTRFEEDBACKCTL:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ accelNumerator: INT16
+ accelDenominator: INT16
+ threshold: INT16]
+
+The acceleration, expressed as a fraction, is a multiplier for
+movement. For example, specifying 3/1 means the device moves
+three times as fast as normal. The fraction may be rounded
+arbitrarily by the X server. Acceleration only takes effect if
+the device moves more than threshold pixels at once and only
+applies to the amount beyond the value in the threshold
+argument. Setting a value to -1 restores the default. The
+values of the do-accel and do-threshold arguments must be
+nonzero for the device values to be set. Otherwise, the
+parameters will be unchanged. Negative values generate a Value
+error, as does a zero value for the accel-denominator argument.
+
+Some devices are capable of displaying an integer. This is done
+using feedback class IntegerFeedbackClass using the
+IntegerFeedbackControl structure. The members of that structure
+are as follows:
+
+ INTEGERCTL:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ int_to_display: INT32]
+
+Some devices are capable of displaying a string. This is done
+using feedback class StringFeedbackClass using the
+StringFeedbackCtl structure. The members of that structure are
+as follows:
+
+ STRINGCTL:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ syms_to_display: LISTofKEYSYMS]
+
+Some devices contain a bell. This is done using feedback class
+BellFeedbackClass using the BellFeedbackControl structure. The
+members of that structure are as follows:
+
+ BELLCTL:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ percent: INT8
+ pitch: INT16
+ duration: INT16]
+
+Some devices contain leds. These can be turned on and off using
+the LedFeedbackControl structure. The members of that structure
+are as follows:
+
+ LEDCTL:
+ [class: CARD8
+ length: CARD16
+ feedback id: CARD8
+ led_mask: BITMASK
+ led_value: BITMASK]
+
+ Errors: Device, Match, Value
+
+2.20 Ringing a Bell on an Input Device
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To ring a bell on an extension input device, use DeviceBell.
+
+ DeviceBell:
+ device: DEVICE
+ feedbackclass: CARD8
+ feedbackid: CARD8
+ percent: INT8
+
+ Errors: Device, Value
+
+This request is analogous to the core Bell request. It rings
+the specified bell on the specified input device feedback,
+using the specified volume. The specified volume is relative to
+the base volume for the feedback. If the value for the percent
+argument is not in the range -100 to 100 inclusive, a Value
+error results. The volume at which the bell rings when the
+percent argument is nonnegative is:
+
+ base - [(base * percent) / 100] + percent
+
+The volume at which the bell rings when the percent argument is
+negative is:
+
+ base + [(base * percent) / 100]
+
+To change the base volume of the bell, use
+ChangeFeedbackControl request.
+
+Controlling Device Encoding
+
+To get the keyboard mapping of an extension device that has
+keys, use GetDeviceKeyMapping.
+
+ GetDeviceKeyMapping
+ device: DEVICE
+ first-keycode: KEYCODE
+ count: CARD8
+ =>
+ keysyms-per-keycode: CARD8
+ keysyms: LISTofKEYSYM
+
+ Errors: Device, Match, Value
+
+This request returns the symbols for the specified number of
+keycodes for the specified extension device, starting with the
+specified keycode. The first-keycode must be greater than or
+equal to min-keycode as returned in the connection setup (else
+a Value error), and
+
+ first-keycode + count - 1
+
+must be less than or equal to max-keycode as returned in the
+connection setup (else a Value error). The number of elements
+in the keysyms list is
+
+ count * keysyms-per-keycode
+
+and KEYSYM number N (counting from zero) for keycode K has an
+index (counting from zero) of
+
+ (K - first-keycode) * keysyms-per-keycode + N
+
+in keysyms. The keysyms-per-keycode value is chosen arbitrarily
+by the server to be large enough to report all requested
+symbols. A special KEYSYM value of NoSymbol is used to fill in
+unused elements for individual keycodes.
+
+If the specified device has not first been opened by this
+client via OpenDevice, or if that device does not support input
+class Keys, this request will fail with a Device error.
+
+To change the keyboard mapping of an extension device that has
+keys, use ChangeDeviceKeyMapping.
+
+ ChangeDeviceKeyMapping
+ device: DEVICE
+ first-keycode: KEYCODE
+ keysyms-per-keycode: CARD8
+ keysyms: LISTofKEYSYM
+ num_codes: CARD8
+
+ Errors: Device, Match, Value, Alloc
+
+This request is analogous to the core ChangeKeyMapping request.
+It defines the symbols for the specified number of keycodes for
+the specified extension device. If the specified device has not
+first been opened by this client via OpenDevice, or if that
+device does not support input class Keys, this request will
+fail with a Device error.
+
+The number of elements in the keysyms list must be a multiple
+of keysyms_per_keycode. Otherwise, ChangeDeviceKeyMapping
+generates a Length error. The specified first_keycode must be
+greater than or equal to the min_keycode value returned by the
+ListInputDevices request, or this request will fail with a
+Value error. In addition, if the following expression is not
+less than the max_keycode value returned by the
+ListInputDevices request, the request will fail with a Value
+error:
+
+ first_keycode + (num_codes / keysyms_per_keycode) - 1
+
+To obtain the keycodes that are used as modifiers on an
+extension device that has keys, use GetDeviceModifierMapping.
+
+ GetDeviceModifierMapping
+ device: DEVICE
+ =>
+ keycodes-per-modifier: CARD8
+ keycodes: LISTofKEYCODE
+
+ Errors: Device, Match
+
+This request is analogous to the core GetModifierMapping
+request. This request returns the keycodes of the keys being
+used as modifiers. The number of keycodes in the list is
+8*keycodes-per-modifier. The keycodes are divided into eight
+sets, with each set containing keycodes-per-modifier elements.
+The sets are assigned in order to the modifiers Shift, Lock,
+Control, Mod1, Mod2, Mod3, Mod4, and Mod5. The
+keycodes-per-modifier value is chosen arbitrarily by the
+server; zeroes are used to fill in unused elements within each
+set. If only zero values are given in a set, the use of the
+corresponding modifier has been disabled. The order of keycodes
+within each set is chosen arbitrarily by the server.
+
+To set which keycodes that are to be used as modifiers for an
+extension device, use SetDeviceModifierMapping.
+
+ SetDeviceModifierMapping
+ device: DEVICE
+ keycodes-per-modifier: CARD8
+ keycodes: LISTofKEYCODE
+ =>
+ status: {Success, Busy, Failed}
+
+ Errors: Device, Match, Value, Alloc
+
+This request is analogous to the core SetModifierMapping
+request. This request specifies the keycodes (if any) of the
+keys to be used as modifiers. The number of keycodes in the
+list must be 8*keycodes-per-modifier (else a Length error). The
+keycodes are divided into eight sets, with the sets, with each
+set containing keycodes-per-modifier elements. The sets are
+assigned in order to the modifiers Shift, Lock, Control, Mod1,
+Mod2, Mod3, Mod4, and Mod5. Only non-zero keycode values are
+used within each set; zero values are ignored. All of the
+non-zero keycodes must be in the range specified by min-keycode
+and max-keycode in the ListInputDevices request (else a Value
+error). The order of keycodes within a set does not matter. If
+no non-zero values are specified in a set, the use of the
+corresponding modifier is disabled, and the modifier bit will
+always be zero. Otherwise, the modifier bit will be one
+whenever at least one of the keys in the corresponding set is
+in the down position.
+
+A server can impose restrictions on how modifiers can be
+changed (for example, if certain keys do not generate up
+transitions in hardware or if multiple keys per modifier are
+not supported). If some such restriction is violated, the status
+reply is MappingFailed, and none of the modifiers are changed.
+
+If the new keycodes specified for a modifier differ from those
+currently defined and any (current or new) keys for that
+modifier are in the logically down state, the status reply is
+MappingBusy, and none of the modifiers are changed.
+
+This request generates a DeviceMappingNotify event on a Success
+status. The DeviceMappingNotify event will be sent only to
+those clients that have expressed an interest in receiving that
+event via the XSelectExtensionEvent request.
+
+2.20 Controlling Button Mapping
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+These requests are analogous to the core GetPointerMapping and
+ChangePointerMapping requests. They allow a client to determine
+the current mapping of buttons on an extension device, and to
+change that mapping.
+
+To get the current button mapping for an extension device, use
+GetDeviceButtonMapping.
+
+ GetDeviceButtonMapping
+ device: DEVICE
+ nmap: CARD8
+ =>
+ map_return: LISTofCARD8
+
+ Errors: Device, Match
+
+The GetDeviceButtonMapping function returns the current mapping
+of the buttons on the specified device. Elements of the list
+are indexed starting from one. The length of the list indicates
+the number of physical buttons. The nominal mapping is the
+identity mapping map[i]=i.
+
+nmap indicates the number of elements in the map_return array.
+Only the first nmap entries will be copied by the library into
+the map_return array.
+
+To set the button mapping for an extension device, use
+SetDeviceButtonMapping.
+
+ SetDeviceButtonMapping
+ device: DEVICE
+ map: LISTofCARD8
+ nmap: CARD8
+ =>
+ status: CARD8
+
+ Errors: Device, Match, Value
+
+The SetDeviceButtonMapping function sets the mapping of the
+specified device and causes the X server to generate a
+DeviceMappingNotify event on a status of MappingSuccess.
+Elements of the list are indexed starting from one. The length
+of the list, specified in nmap, must be the same as
+GetDeviceButtonMapping would return. Otherwise,
+SetDeviceButtonMapping generates a Value error. A zero element
+disables a button, and elements are not restricted in value by
+the number of physical buttons. If any of the buttons to be
+altered are in the down state, the status reply is MappingBusy
+and the mapping is not changed.
+
+In servers supporting XI 1.x, no two elements can have the same
+nonzero value. Otherwise, this function generates a Value
+error.
+
+2.21 Obtaining The State Of A Device
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To obtain vectors that describe the state of the keys, buttons
+and valuators of an extension device, use QueryDeviceState.
+
+ QueryDeviceState
+ device: DEVICE
+ =>
+ device-id: CARD8
+ data: LISTofINPUTCLASS
+
+where
+
+ INPUTCLASS: {VALUATOR, BUTTON, KEY}
+ CLASS VALUATOR:
+ [class: CARD8
+ num_valuators: CARD8
+ mode: CARD8
+ #x01 device mode (0 = Relative, 1 = Absolute)
+ #x02 proximity state (0 = InProximity, 1 = OutOfProximity)
+ valuators: LISTofINT32]
+ CLASS BUTTON:
+ [class: CARD8
+ num_buttons: CARD8
+ buttons: LISTofCARD8]
+ CLASS KEY:
+ [class: CARD8
+ num_keys: CARD8
+ keys: LISTofCARD8]
+
+ Errors: Device
+
+The QueryDeviceState request returns the current logical state
+of the buttons, keys, and valuators on the specified input
+device. The buttons and keys arrays, byte N (from 0) contains
+the bits for key or button 8N to 8N+7 with the least
+significant bit in the byte representing key or button 8N.
+
+If the device has valuators, a bit in the mode field indicates
+whether the device is reporting Absolute or Relative data. If
+it is reporting Absolute data, the valuators array will contain
+the current value of the valuators. If it is reporting Relative
+data, the valuators array will contain undefined data.
+
+If the device reports proximity information, a bit in the mode
+field indicates whether the device is InProximity or
+OutOfProximity.
+
+2.22 Listing Device Properties
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Introduced with XI 1.5
+
+ ListDeviceProperties
+ deviceid: CARD8
+ =>
+ nAtoms: CARD16
+ Atoms: LISTofATOM
+
+ Errors: Device
+
+Each device can store an arbitrary number of properties. These
+properties can be allocated by either the client or the driver.
+The client can change device properties and the server
+guarantees that the device driver is notified about a change of
+the device's properties.
+
+ListDeviceProperties returns all properties of a device. The
+client is expected to retrieve details about the properties it
+is interested in separately.
+
+2.23 Getting a Device Property
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Introduced with XI 1.5
+
+ GetDeviceProperty:
+ property: ATOM
+ type: ATOM
+ longOffset: CARD32
+ longLength: CARD32
+ deviceid: CARD8
+ delete: BOOL
+ =>
+ propertyType: ATOM
+ bytesAfter: CARD32
+ nItems: CARD32
+ format: CARD8
+ deviceid: CARD8
+ data: [LISTofCARD8]
+
+ Errors: Atom, Device, Value, Access
+
+Retrieve the value for a property. If the property does not
+exist, propertyType is None and all other fields are undefined.
+
+If type is not AnyPropertyType and does not match the
+property's actual type, the propertyType, bytesAfter, and
+format are returned but not the actual data.
+
+longOffset and longLength specify the offset and length
+respectively in 32-bit multiples of the data to retrieve.
+
+If delete is True, the property is deleted after querying its
+data. If the property cannot be deleted, a BadAccess error is
+returned.
+
+propertyType returns the atom identifier that defines the
+actual type of the property.
+
+If bytesAfter is non-zero, it specifies the number of data
+4-byte units after the retrieved chunk of data.
+
+format specifies whether the data should be viewed as a list of
+8-bit, 16-bit, or 32-bit quantities. Possible values are 8, 16,
+and 32. This information allows the X server to correctly
+perform byte-swap operations as necessary.
+
+nItem specifies the number of 8-bit, 16-bit, or 32-bit items
+returned after the request.
+
+2.24 Changing a Device Property
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Introduced with XI 1.5
+
+ ChangeDeviceProperty:
+ property: ATOM
+ type: ATOM
+ deviceid: CARD8
+ format: CARD8
+ mode: CARD8
+ nUnits: CARD32
+
+ Errors: Atom, Device, Value, Match, Access
+
+Changes the value of a specified property.
+
+The type specifies the atom identifier that defines the type of
+the property. If mode is not PropModeReplace, the type must
+match the current type of the property or a BadMatch error is
+returned.
+
+format specifies whether the data should be viewed as a list of
+8-bit, 16-bit, or 32-bit quantities. Possible values are 8, 16,
+and 32. This information allows the X server to correctly
+perform byte-swap operations as necessary.
+
+If mode is PropModeReplace, a preexising value for this
+property is replaced with the new value. If mode is
+PropModePrepend or PropModeAppend, the value is prepended or
+appended, respectively, to the current value of the property.
+
+nUnits specifies the number of 8-bit, 16-bit, or 32-bit items
+supplied after the reply.
+
+Changing a device property results in a
+DevicePropertyNotifyEvent being sent to all clients.
+
+2.25 Deleting a Device Property
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Introduced with XI 1.5
+
+ DeleteDeviceProperty:
+ property: ATOM
+ deviceid: CARD8
+
+ Errors: Atom, Device, Match, Access.
+
+Deletes the specified property. If the property cannot be
+deleted by the client, a BadAccess error is returned.
+
+3. Events
+---------
+
+The input extension creates input events analogous to the core
+input events. These extension input events are generated by
+manipulating one of the extension input devices.
+
+3.1 Button, Key, and Motion Events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ DeviceKeyPress
+ DeviceKeyRelease
+ DeviceButtonPress,
+ DeviceButtonRelease
+ DeviceMotionNotify
+ device: CARD8
+ root, event: WINDOW
+ child: Window or None
+ same-screen: BOOL
+ root-x, root-y, event-x, event-y: INT16
+ detail: <see below>
+ state: SETofKEYBUTMASK
+ time: TIMESTAMP
+
+These events are generated when a key, button, or valuator
+logically changes state. The generation of these logical
+changes may lag the physical changes, if device event
+processing is frozen. Note that DeviceKeyPress and
+DeviceKeyRelease are generated for all keys, even those mapped
+to modifier bits. The “source” of the event is the window the
+pointer is in. The window with respect to which the event is
+normally reported is found by looking up the hierarchy
+(starting with the source window) for the first window on which
+any client has selected interest in the event. The actual
+window used for reporting can be modified by active grabs and
+by the focus window.The window the event is reported with
+respect to is called the “event” window.
+
+The root is the root window of the “source” window, and root-x
+and root-y are the pointer coordinates relative to root's
+origin at the time of the event. Event is the “event” window.
+If the event window is on the same screen as root, then event-x
+and event-y are the pointer coordinates relative to the event
+window's origin. Otherwise, event-x and event-y are zero. If
+the source window is an inferior of the event window, then
+child is set to the child of the event window that is an
+ancestor of (or is) the source window. Otherwise, it is set to
+None.
+
+The state component gives the logical state of the buttons on
+the X pointer and modifier keys on the core X keyboard just
+before the event.
+
+The detail component type varies with the event type:
+Event Component
+DeviceKeyPress KEYCODE
+DeviceKeyRelease KEYCODE
+DeviceButtonPress BUTTON
+DeviceButtonRelease BUTTON
+DeviceMotionNotify { Normal , Hint }
+
+The granularity of motion events is not guaranteed, but a
+client selecting for motion events is guaranteed to get at
+least one event when a valuator changes. If DeviceMotionHint is
+selected, the server is free to send only one
+DeviceMotionNotify event (with detail Hint) to the client for
+the event window, until either a key or button changes state,
+the pointer leaves the event window, or the client issues a
+QueryDeviceState or GetDeviceMotionEvents request.
+
+3.2 DeviceValuator Event
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+ DeviceValuator
+ device: CARD8
+ device_state: SETofKEYBUTMASK
+ num_valuators: CARD8
+ first_valuator: CARD8
+ valuators: LISTofINT32
+
+DeviceValuator events are generated to contain valuator
+information for which there is insufficient space in DeviceKey,
+DeviceButton, DeviceMotion, and Proximity wire events. For
+events of these types, a second event of type DeviceValuator
+follows immediately. The library combines these events into a
+single event that a client can receive via XNextEvent.
+DeviceValuator events are not selected for by clients, they
+only exist to contain information that will not fit into some
+event selected by clients.
+
+The device_state component gives the state of the buttons and
+modifiers on the device generating the event.
+
+Extension motion devices may report motion data for a variable
+number of axes. The valuators array contains the values of all
+axes reported by the device. If more than 6 axes are reported,
+more than one DeviceValuator event will be sent by the server,
+and more than one DeviceKey, DeviceButton, DeviceMotion, or
+Proximity event will be reported by the library. Clients should
+examine the corresponding fields of the event reported by the
+library to determine the total number of axes reported, and the
+first axis reported in the current event. Axes are numbered
+beginning with zero.
+
+For Button, Key and Motion events on a device reporting
+absolute motion data the current value of the device's
+valuators is reported. For devices that report relative data,
+Button and Key events may be followed by a DeviceValuator event
+that contains 0s in the num_valuators field. In this case, only
+the device_state component will have meaning.
+
+3.3 Device Focus Events
+~~~~~~~~~~~~~~~~~~~~~~~
+
+ DeviceFocusIn
+ DeviceFocusOut
+ device: CARD8
+ time: TIMESTAMP
+ event: WINDOW
+ mode: { Normal, WhileGrabbed, Grab, Ungrab}
+ detail: { Ancestor, Virtual, Inferior, Nonlinear,
+ NonlinearVirtual, Pointer, PointerRoot, None}
+
+These events are generated when the input focus changes and are
+reported to clients selecting DeviceFocusChange for the
+specified device and window. Events generated by SetDeviceFocus
+when the device is not grabbed have mode Normal. Events
+generated by SetDeviceFocus when the device is grabbed have
+mode WhileGrabbed. Events generated when a device grab activates
+have mode Grab, and events generated when a device grab
+deactivates have mode Ungrab.
+
+All DeviceFocusOut events caused by a window unmap are
+generated after any UnmapNotify event, but the ordering of
+DeviceFocusOut with respect to generated EnterNotify,
+LeaveNotify, VisibilityNotify and Expose events is not
+constrained.
+
+DeviceFocusIn and DeviceFocusOut events are generated for focus
+changes of extension devices in the same manner as focus events
+for the core devices are generated.
+
+3.4 Device State Notify Event
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ DeviceStateNotify
+ time: TIMESTAMP
+ device: CARD8
+ num_keys: CARD8
+ num_buttons: CARD8
+ num_valuators: CARD8
+ classes_reported: CARD8 {SetOfDeviceMode | SetOfInputClass}
+ SetOfDeviceMode:
+ #x80 ProximityState 0 = InProxmity, 1 = OutOfProximity
+ #x40 Device Mode (0 = Relative, 1 = Absolute)
+ SetOfInputClass: #x04 reporting valuators
+ #x02 reporting buttons
+ #x01 reporting keys
+ buttons: LISTofCARD8
+ keys: LISTofCARD8
+ valuators: LISTofCARD32
+
+This event reports the state of the device just as in the
+QueryDeviceState request. This event is reported to clients
+selecting DeviceStateNotify for the device and window and is
+generated immediately after every EnterNotify and
+DeviceFocusIn. If the device has no more than 32 buttons, no
+more than 32 keys, and no more than 3 valuators, This event can
+report the state of the device. If the device has more than 32
+buttons, the event will be immediately followed by a
+DeviceButtonStateNotify event. If the device has more than 32
+keys, the event will be followed by a DeviceKeyStateNotify
+event. If the device has more than 3 valuators, the event will
+be followed by one or more DeviceValuator events.
+
+3.5 Device KeyState and ButtonState Notify Events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ DeviceKeyStateNotify
+ device: CARD8
+ keys: LISTofCARD8
+ DeviceButtonStateNotify
+ device: CARD8
+ buttons: LISTofCARD8
+
+These events contain information about the state of keys and
+buttons on a device that will not fit into the
+DeviceStateNotify wire event. These events are not selected by
+clients, rather they may immediately follow a DeviceStateNotify
+wire event and be combined with it into a single
+DeviceStateNotify client event that a client may receive via
+XNextEvent.
+
+3.6 DeviceMappingNotify Event
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ DeviceMappingNotify
+ time: TIMESTAMP
+ device: CARD8
+ request: CARD8
+ first_keycode: CARD8
+ count: CARD8
+
+This event reports a change in the mapping of keys, modifiers,
+or buttons on an extension device. This event is reported to
+clients selecting DeviceMappingNotify for the device and window
+and is generated after every client SetDeviceButtonMapping,
+ChangeDeviceKeyMapping, or ChangeDeviceModifierMapping request.
+
+3.7 ChangeDeviceNotify Event
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ ChangeDeviceNotify
+ device: CARD8
+ time: TIMESTAMP
+ request: CARD8
+
+This event reports a change in the physical device being used
+as the core X keyboard or X pointer device. ChangeDeviceNotify
+events are reported to clients selecting ChangeDeviceNotify for
+the device and window and is generated after every client
+ChangeKeyboardDevice or ChangePointerDevice request.
+
+3.7 Proximity Events
+~~~~~~~~~~~~~~~~~~~~
+
+ ProximityIn
+ ProximityOut
+ device: CARD8
+ root, event: WINDOW
+ child: Window or None
+ same-screen: BOOL
+ root-x, root-y, event-x, event-y: INT16
+ state: SETofKEYBUTMASK
+ time: TIMESTAMP
+ device-state: SETofKEYBUTMASK
+ axis-count: CARD8
+ first-axis: CARD8
+ axis-data: LISTofINT32
+
+These events are generated by some devices (such as graphics
+tablets or touchscreens) to indicate that a stylus has moved
+into or out of contact with a positional sensing surface.
+
+The “source” of the event is the window the pointer is in. The
+window with respect to which the event is normally reported is
+found by looking up the hierarchy (starting with the source
+window) for the first window on which any client has selected
+interest in the event. The actual window used for reporting can
+be modified by active grabs and by the focus window.The window
+the event is reported with respect to is called the “event”
+window.
+
+The root is the root window of the “source” window, and root-x
+and root-y are the pointer coordinates relative to root's
+origin at the time of the event. Event is the “event” window.
+If the event window is on the same screen as root, then event-x
+and event-y are the pointer coordinates relative to the event
+window's origin. Otherwise, event-x and event-y are zero. If
+the source window is an inferior of the event window, then
+child is set to the child of the event window that is an
+ancestor of (or is) the source window. Otherwise, it is set to
+None. The state component gives the logical state of the
+buttons on the core X pointer and modifier keys on the core X
+keyboard just before the event. The device-state component
+gives the state of the buttons and modifiers on the device
+generating the event.
+
+3.8 DevicePresenceEvents
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Introduced with XI 1.4.
+
+ DevicePresence
+ time: TIMESTAMP
+ devchange: BYTE
+ #x00: DeviceAdded
+ #x01: DeviceRemoved
+ #x02: DeviceEnabled
+ #x03: DeviceDisabled
+ #x04: DeviceUnrecoverable
+ #x05: DeviceControlChanged
+ deviceid: BYTE
+ control: CARD16
+
+DevicePresence events are sent when the server adds or removes,
+or enables or disables an input device. The client is expected
+to query the server for the list of input devices using the
+ListInputDevices request to obtain the updated list of input
+devices. DevicePresence events are also sent when a control on
+the device has been changed.
+
+The devchange field specifies the type of operation. In case of
+DeviceAdded, a new device has been added to the server, but
+this device does not yet send events. If devchange is set to
+DeviceEnabled, the device is enabled and will generate events.
+If the field is DeviceDisabled or DeviceRemoved, the given
+device is disabled and stops sending events or was removed from
+the server, respectively. If the field is DeviceUnrecoverable,
+an IO-error has occured on the device and the device is
+forcibly disabled and removed by the server. If devchange is
+DeviceControlChanged, control specifies the type of control
+that has been changed.
+
+3.9 DevicePropertyNotifyEvent
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Introduced with XI 1.5.
+
+ DevicePropertyNotifyEvent
+ deviceid: CARD8
+ state: CARD8
+ time: TIMESTAMP
+ atom: ATOM
+
+A DevicePropertyNotifyEvent is sent to all clients when a
+property on the device is created, deleted, or changes value.
+
+The deviceid specifies the device which's property has been
+modified.
+
+The atom specifies the named identifier of the property that
+has been altered.
+
+If state is PropertyNewValue, the given property has a new
+value or has been newly created. If state is PropertyDeleted,
+the given property has been deleted.
diff --git a/specs/XKBproto-1.svg b/specs/XKBproto-1.svg
new file mode 100644
index 0000000..1f8ba5b
--- /dev/null
+++ b/specs/XKBproto-1.svg
@@ -0,0 +1,1177 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="400"
+ height="40"
+ viewBox="0 0 320 32"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-1.svg">
+ <metadata
+ id="metadata380">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview378"
+ showgrid="false"
+ inkscape:zoom="2.3825"
+ inkscape:cx="200"
+ inkscape:cy="20"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 5.140625,-6.8125 c 0,0 0,-0.109375 -0.125,-0.109375 -0.15625,0 -1.09375,0.09375 -1.265625,0.109375 -0.078125,0.015625 -0.140625,0.0625 -0.140625,0.1875 0,0.125 0.09375,0.125 0.234375,0.125 0.484375,0 0.5,0.0625 0.5,0.171875 L 4.3125,-6.125 3.71875,-3.765625 C 3.53125,-4.140625 3.25,-4.40625 2.796875,-4.40625 c -1.15625,0 -2.390625,1.46875 -2.390625,2.921875 0,0.9375 0.546875,1.59375 1.3125,1.59375 0.203125,0 0.703125,-0.046875 1.296875,-0.75 0.078125,0.421875 0.4375,0.75 0.90625,0.75 0.359375,0 0.578125,-0.234375 0.75,-0.546875 0.15625,-0.359375 0.296875,-0.96875 0.296875,-0.984375 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.1875 -0.171875,0.640625 -0.34375,1.234375 -0.75,1.234375 -0.28125,0 -0.296875,-0.265625 -0.296875,-0.453125 0,-0.25 0.015625,-0.3125 0.046875,-0.484375 z m -2.0625,5.625 C 3.015625,-1 3.015625,-0.984375 2.875,-0.8125 2.4375,-0.265625 2.03125,-0.109375 1.75,-0.109375 c -0.5,0 -0.640625,-0.546875 -0.640625,-0.9375 0,-0.5 0.3125,-1.71875 0.546875,-2.1875 0.3125,-0.578125 0.75,-0.953125 1.15625,-0.953125 0.640625,0 0.78125,0.8125 0.78125,0.875 0,0.0625 -0.015625,0.125 -0.03125,0.171875 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.890625,-3.734375 C 3.625,-3.71875 3.421875,-3.5 3.421875,-3.28125 c 0,0.140625 0.09375,0.296875 0.3125,0.296875 0.21875,0 0.453125,-0.171875 0.453125,-0.5625 C 4.1875,-4 3.765625,-4.40625 3,-4.40625 c -1.3125,0 -1.6875,1.015625 -1.6875,1.453125 0,0.78125 0.734375,0.921875 1.03125,0.984375 0.515625,0.109375 1.03125,0.21875 1.03125,0.765625 0,0.25 -0.21875,1.09375 -1.421875,1.09375 -0.140625,0 -0.90625,0 -1.140625,-0.53125 0.390625,0.046875 0.640625,-0.25 0.640625,-0.53125 0,-0.21875 -0.171875,-0.34375 -0.375,-0.34375 -0.265625,0 -0.5625,0.203125 -0.5625,0.65625 0,0.5625 0.578125,0.96875 1.421875,0.96875 1.625,0 2.015625,-1.203125 2.015625,-1.65625 0,-0.359375 -0.1875,-0.609375 -0.3125,-0.71875 -0.265625,-0.28125 -0.5625,-0.34375 -1,-0.421875 -0.359375,-0.078125 -0.75,-0.15625 -0.75,-0.609375 C 1.890625,-3.578125 2.125,-4.1875 3,-4.1875 c 0.25,0 0.75,0.078125 0.890625,0.453125 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.046875,-3.984375 0.9375,0 c 0.203125,0 0.3125,0 0.3125,-0.203125 0,-0.109375 -0.109375,-0.109375 -0.28125,-0.109375 l -0.875,0 C 2.5,-5.71875 2.546875,-5.90625 2.546875,-5.96875 c 0,-0.171875 -0.125,-0.265625 -0.296875,-0.265625 -0.03125,0 -0.3125,0 -0.390625,0.359375 l -0.390625,1.578125 -0.9375,0 c -0.203125,0 -0.296875,0 -0.296875,0.1875 0,0.125 0.078125,0.125 0.28125,0.125 l 0.875,0 C 0.671875,-1.15625 0.625,-0.984375 0.625,-0.8125 0.625,-0.265625 1,0.109375 1.546875,0.109375 2.5625,0.109375 3.125,-1.34375 3.125,-1.421875 3.125,-1.53125 3.046875,-1.53125 3.015625,-1.53125 2.921875,-1.53125 2.90625,-1.5 2.859375,-1.390625 2.4375,-0.34375 1.90625,-0.109375 1.5625,-0.109375 c -0.203125,0 -0.3125,-0.125 -0.3125,-0.453125 0,-0.25 0.03125,-0.3125 0.0625,-0.484375 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.859375,-2.296875 c 0.296875,0 1.03125,-0.03125 1.53125,-0.234375 0.703125,-0.296875 0.75,-0.890625 0.75,-1.03125 0,-0.4375 -0.375,-0.84375 -1.0625,-0.84375 -1.109375,0 -2.625,0.96875 -2.625,2.71875 0,1.015625 0.59375,1.796875 1.578125,1.796875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.78125,0 -0.875,-0.84375 -0.875,-1.15625 0,-0.125 0.015625,-0.421875 0.15625,-1.03125 z m -0.46875,-0.21875 C 1.78125,-4.03125 2.8125,-4.1875 3.078125,-4.1875 c 0.453125,0 0.734375,0.296875 0.734375,0.625 0,1.046875 -1.59375,1.046875 -2.015625,1.046875 z m 0,0"
+ id="path18"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 0.453125,1.21875 C 0.375,1.5625 0.34375,1.625 -0.09375,1.625 c -0.109375,0 -0.21875,0 -0.21875,0.1875 0,0.078125 0.046875,0.125 0.125,0.125 0.265625,0 0.5625,-0.03125 0.828125,-0.03125 0.34375,0 0.671875,0.03125 1,0.03125 0.046875,0 0.171875,0 0.171875,-0.203125 C 1.8125,1.625 1.71875,1.625 1.578125,1.625 c -0.5,0 -0.5,-0.0625 -0.5,-0.15625 0,-0.125 0.421875,-1.75 0.484375,-2 0.125,0.296875 0.40625,0.640625 0.921875,0.640625 1.15625,0 2.40625,-1.453125 2.40625,-2.921875 0,-0.9375 -0.578125,-1.59375 -1.328125,-1.59375 -0.5,0 -0.984375,0.359375 -1.3125,0.75 -0.09375,-0.546875 -0.53125,-0.75 -0.890625,-0.75 -0.46875,0 -0.65625,0.390625 -0.734375,0.5625 C 0.4375,-3.5 0.3125,-2.90625 0.3125,-2.875 c 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.171875,0 0.3125,0.078125 0.3125,0.453125 0,0.234375 -0.03125,0.34375 -0.078125,0.515625 z m 1.75,-4.328125 C 2.265625,-3.375 2.546875,-3.65625 2.71875,-3.8125 c 0.359375,-0.296875 0.640625,-0.375 0.8125,-0.375 0.390625,0 0.640625,0.34375 0.640625,0.9375 0,0.59375 -0.328125,1.734375 -0.515625,2.109375 -0.34375,0.703125 -0.8125,1.03125 -1.1875,1.03125 C 1.8125,-0.109375 1.6875,-0.9375 1.6875,-1 c 0,-0.015625 0,-0.03125 0.03125,-0.15625 z m 0,0"
+ id="path21"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.71875,-3.765625 C 3.53125,-4.140625 3.25,-4.40625 2.796875,-4.40625 c -1.15625,0 -2.390625,1.46875 -2.390625,2.921875 0,0.9375 0.546875,1.59375 1.3125,1.59375 0.203125,0 0.703125,-0.046875 1.296875,-0.75 0.078125,0.421875 0.4375,0.75 0.90625,0.75 0.359375,0 0.578125,-0.234375 0.75,-0.546875 0.15625,-0.359375 0.296875,-0.96875 0.296875,-0.984375 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.1875 -0.171875,0.640625 -0.34375,1.234375 -0.75,1.234375 -0.28125,0 -0.296875,-0.265625 -0.296875,-0.453125 0,-0.21875 0.015625,-0.3125 0.125,-0.75 C 3.890625,-1.71875 3.90625,-1.828125 4,-2.203125 L 4.359375,-3.59375 c 0.0625,-0.28125 0.0625,-0.296875 0.0625,-0.34375 0,-0.171875 -0.109375,-0.265625 -0.28125,-0.265625 -0.25,0 -0.390625,0.21875 -0.421875,0.4375 z M 3.078125,-1.1875 C 3.015625,-1 3.015625,-0.984375 2.875,-0.8125 2.4375,-0.265625 2.03125,-0.109375 1.75,-0.109375 c -0.5,0 -0.640625,-0.546875 -0.640625,-0.9375 0,-0.5 0.3125,-1.71875 0.546875,-2.1875 0.3125,-0.578125 0.75,-0.953125 1.15625,-0.953125 0.640625,0 0.78125,0.8125 0.78125,0.875 0,0.0625 -0.015625,0.125 -0.03125,0.171875 z m 0,0"
+ id="path24"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.953125,-3.78125 c -0.171875,0 -0.296875,0 -0.4375,0.125 -0.171875,0.15625 -0.1875,0.328125 -0.1875,0.390625 0,0.25 0.1875,0.359375 0.375,0.359375 0.28125,0 0.546875,-0.25 0.546875,-0.640625 0,-0.484375 -0.46875,-0.859375 -1.171875,-0.859375 -1.34375,0 -2.671875,1.421875 -2.671875,2.828125 0,0.90625 0.578125,1.6875 1.625,1.6875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.625,0 -0.90625,-0.484375 -0.90625,-1.09375 0,-0.40625 0.203125,-1.375 0.546875,-1.984375 0.3125,-0.578125 0.859375,-1 1.40625,-1 0.328125,0 0.71875,0.125 0.859375,0.40625 z m 0,0"
+ id="path27"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-7"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.828125,-6.234375 c 0,-0.203125 -0.140625,-0.359375 -0.359375,-0.359375 -0.28125,0 -0.546875,0.265625 -0.546875,0.53125 0,0.1875 0.140625,0.359375 0.375,0.359375 0.234375,0 0.53125,-0.234375 0.53125,-0.53125 z m -0.75,3.75 c 0.109375,-0.28125 0.109375,-0.3125 0.21875,-0.578125 0.078125,-0.203125 0.125,-0.34375 0.125,-0.53125 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.9375,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.28125,-0.9375 0.671875,-1.234375 1.015625,-1.234375 0.078125,0 0.25,0 0.25,0.3125 0,0.21875 -0.078125,0.421875 -0.109375,0.53125 -0.078125,0.25 -0.53125,1.40625 -0.6875,1.84375 -0.109375,0.25 -0.234375,0.578125 -0.234375,0.796875 0,0.46875 0.34375,0.8125 0.8125,0.8125 0.9375,0 1.3125,-1.4375 1.3125,-1.53125 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.09375,0.03125 -0.140625,0.1875 -0.1875,0.625 -0.515625,1.234375 -1.015625,1.234375 -0.171875,0 -0.25,-0.09375 -0.25,-0.328125 0,-0.25 0.0625,-0.390625 0.296875,-1 z m 0,0"
+ id="path30"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-8"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.671875,-2.71875 c 0,-1.046875 -0.6875,-1.6875 -1.59375,-1.6875 -1.328125,0 -2.671875,1.421875 -2.671875,2.828125 0,0.984375 0.671875,1.6875 1.59375,1.6875 1.328125,0 2.671875,-1.375 2.671875,-2.828125 z m -2.65625,2.609375 c -0.4375,0 -0.875,-0.3125 -0.875,-1.09375 0,-0.484375 0.265625,-1.5625 0.578125,-2.0625 0.5,-0.765625 1.078125,-0.921875 1.359375,-0.921875 0.578125,0 0.875,0.484375 0.875,1.078125 0,0.390625 -0.203125,1.4375 -0.578125,2.078125 -0.359375,0.578125 -0.90625,0.921875 -1.359375,0.921875 z m 0,0"
+ id="path33"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-9"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.609375 -0.484375,1.890625 -0.640625,2.3125 C 3.578125,-0.9375 3.5625,-0.8125 3.5625,-0.703125 c 0,0.46875 0.359375,0.8125 0.828125,0.8125 0.9375,0 1.296875,-1.453125 1.296875,-1.53125 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.109375,0 -0.109375,0.03125 -0.15625,0.1875 -0.203125,0.671875 -0.53125,1.234375 -1.015625,1.234375 -0.171875,0 -0.234375,-0.09375 -0.234375,-0.328125 0,-0.25 0.078125,-0.484375 0.171875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.65625 -0.421875,-1.0625 -1.140625,-1.0625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.5625 -0.453125,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 C 0.421875,-3.5 0.296875,-2.90625 0.296875,-2.875 c 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.1875,0 0.296875,0.125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path36"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-10"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.578125,-6.8125 c 0,0 0,-0.109375 -0.140625,-0.109375 -0.21875,0 -0.953125,0.078125 -1.21875,0.109375 -0.078125,0 -0.1875,0.015625 -0.1875,0.203125 0,0.109375 0.109375,0.109375 0.25,0.109375 0.484375,0 0.5,0.09375 0.5,0.171875 L 1.75,-6.125 0.484375,-1.140625 C 0.453125,-1.03125 0.4375,-0.96875 0.4375,-0.8125 c 0,0.578125 0.4375,0.921875 0.90625,0.921875 0.328125,0 0.578125,-0.203125 0.75,-0.5625 0.171875,-0.375 0.296875,-0.953125 0.296875,-0.96875 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.125,0.1875 C 1.96875,-0.703125 1.78125,-0.109375 1.375,-0.109375 c -0.296875,0 -0.296875,-0.3125 -0.296875,-0.453125 0,-0.25 0.015625,-0.296875 0.0625,-0.484375 z m 0,0"
+ id="path39"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-11"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.25 -0.0625,0.53125 -0.140625,0.828125 L 3.890625,-1.5 3.6875,-0.75 c -0.03125,0.203125 -0.125,0.546875 -0.125,0.59375 0,0.171875 0.140625,0.265625 0.28125,0.265625 0.3125,0 0.375,-0.25 0.453125,-0.5625 0.140625,-0.5625 0.515625,-2.015625 0.59375,-2.40625 0.03125,-0.125 0.5625,-1.328125 1.65625,-1.328125 0.421875,0 0.53125,0.34375 0.53125,0.703125 0,0.5625 -0.421875,1.703125 -0.625,2.234375 -0.078125,0.234375 -0.125,0.34375 -0.125,0.546875 0,0.46875 0.34375,0.8125 0.8125,0.8125 0.9375,0 1.3125,-1.453125 1.3125,-1.53125 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.09375,0.03125 -0.140625,0.1875 -0.15625,0.53125 -0.46875,1.234375 -1.015625,1.234375 -0.171875,0 -0.25,-0.09375 -0.25,-0.328125 0,-0.25 0.09375,-0.484375 0.1875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.640625 -0.40625,-1.0625 -1.15625,-1.0625 -0.734375,0 -1.25,0.4375 -1.625,0.96875 0,-0.125 -0.03125,-0.46875 -0.3125,-0.703125 -0.25,-0.21875 -0.5625,-0.265625 -0.8125,-0.265625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.578125 -0.46875,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 -0.171875,0.359375 -0.296875,0.9375 -0.296875,0.96875 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.15625,0 0.296875,0.078125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path42"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-12"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.328125,-3.015625 C 3.390625,-3.265625 3.625,-4.1875 4.3125,-4.1875 c 0.046875,0 0.296875,0 0.5,0.125 C 4.53125,-4 4.34375,-3.765625 4.34375,-3.515625 c 0,0.15625 0.109375,0.34375 0.375,0.34375 0.21875,0 0.53125,-0.171875 0.53125,-0.578125 0,-0.515625 -0.578125,-0.65625 -0.921875,-0.65625 -0.578125,0 -0.921875,0.53125 -1.046875,0.75 -0.25,-0.65625 -0.78125,-0.75 -1.078125,-0.75 -1.03125,0 -1.609375,1.28125 -1.609375,1.53125 0,0.109375 0.109375,0.109375 0.125,0.109375 0.078125,0 0.109375,-0.03125 0.125,-0.109375 0.34375,-1.0625 1,-1.3125 1.34375,-1.3125 0.1875,0 0.53125,0.09375 0.53125,0.671875 0,0.3125 -0.171875,0.96875 -0.53125,2.375 -0.15625,0.609375 -0.515625,1.03125 -0.953125,1.03125 -0.0625,0 -0.28125,0 -0.5,-0.125 0.25,-0.0625 0.46875,-0.265625 0.46875,-0.546875 0,-0.265625 -0.21875,-0.34375 -0.359375,-0.34375 -0.3125,0 -0.546875,0.25 -0.546875,0.578125 0,0.453125 0.484375,0.65625 0.921875,0.65625 0.671875,0 1.03125,-0.703125 1.046875,-0.75 0.125,0.359375 0.484375,0.75 1.078125,0.75 1.03125,0 1.59375,-1.28125 1.59375,-1.53125 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.109375 -0.328125,1.078125 -1,1.3125 -1.3125,1.3125 -0.390625,0 -0.546875,-0.3125 -0.546875,-0.65625 0,-0.21875 0.046875,-0.4375 0.15625,-0.875 z m 0,0"
+ id="path45"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.296875,2.390625 c 0,-0.03125 0,-0.046875 -0.171875,-0.21875 C 1.890625,0.921875 1.5625,-0.96875 1.5625,-2.5 c 0,-1.734375 0.375,-3.46875 1.609375,-4.703125 0.125,-0.125 0.125,-0.140625 0.125,-0.171875 0,-0.078125 -0.03125,-0.109375 -0.09375,-0.109375 -0.109375,0 -1,0.6875 -1.59375,1.953125 -0.5,1.09375 -0.625,2.203125 -0.625,3.03125 0,0.78125 0.109375,1.984375 0.65625,3.125 C 2.25,1.84375 3.09375,2.5 3.203125,2.5 c 0.0625,0 0.09375,-0.03125 0.09375,-0.109375 z m 0,0"
+ id="path48"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.875,-2.5 c 0,-0.765625 -0.109375,-1.96875 -0.65625,-3.109375 -0.59375,-1.21875 -1.453125,-1.875 -1.546875,-1.875 -0.0625,0 -0.109375,0.046875 -0.109375,0.109375 0,0.03125 0,0.046875 0.1875,0.234375 0.984375,0.984375 1.546875,2.5625 1.546875,4.640625 0,1.71875 -0.359375,3.46875 -1.59375,4.71875 C 0.5625,2.34375 0.5625,2.359375 0.5625,2.390625 0.5625,2.453125 0.609375,2.5 0.671875,2.5 0.765625,2.5 1.671875,1.8125 2.25,0.546875 2.765625,-0.546875 2.875,-1.65625 2.875,-2.5 z m 0,0"
+ id="path51"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 6.84375,-3.265625 c 0.15625,0 0.34375,0 0.34375,-0.1875 C 7.1875,-3.65625 7,-3.65625 6.859375,-3.65625 l -5.96875,0 c -0.140625,0 -0.328125,0 -0.328125,0.203125 0,0.1875 0.1875,0.1875 0.328125,0.1875 z m 0.015625,1.9375 c 0.140625,0 0.328125,0 0.328125,-0.203125 0,-0.1875 -0.1875,-0.1875 -0.34375,-0.1875 l -5.953125,0 c -0.140625,0 -0.328125,0 -0.328125,0.1875 0,0.203125 0.1875,0.203125 0.328125,0.203125 z m 0,0"
+ id="path54"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path57"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph2-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.875,-2.765625 1.890625,-4.75 C 1.765625,-4.875 1.75,-4.890625 1.671875,-4.890625 1.5625,-4.890625 1.46875,-4.8125 1.46875,-4.6875 c 0,0.0625 0.015625,0.078125 0.125,0.1875 l 2,2 -2,2.015625 c -0.109375,0.109375 -0.125,0.125 -0.125,0.1875 0,0.125 0.09375,0.203125 0.203125,0.203125 0.078125,0 0.09375,-0.015625 0.21875,-0.140625 L 3.875,-2.21875 l 2.0625,2.0625 c 0.015625,0.015625 0.078125,0.0625 0.140625,0.0625 0.125,0 0.203125,-0.078125 0.203125,-0.203125 0,-0.015625 0,-0.046875 -0.03125,-0.109375 C 6.234375,-0.421875 4.65625,-1.984375 4.15625,-2.5 l 1.828125,-1.8125 c 0.046875,-0.0625 0.203125,-0.1875 0.25,-0.25 0,-0.015625 0.046875,-0.0625 0.046875,-0.125 0,-0.125 -0.078125,-0.203125 -0.203125,-0.203125 C 6,-4.890625 5.96875,-4.859375 5.859375,-4.75 z m 0,0"
+ id="path60"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 6.984375,23.421875 c 0,-0.04687 -0.03125,-0.0625 -0.046875,-0.09375 -0.375,-0.375 -1.03125,-1.03125 -1.703125,-2.109375 C 3.625,18.640625 2.90625,15.40625 2.90625,11.5625 c 0,-2.6875 0.359375,-6.140625 2,-9.109375 C 5.6875,1.03125 6.515625,0.21875 6.953125,-0.21875 c 0.03125,-0.03125 0.03125,-0.046875 0.03125,-0.078125 0,-0.109375 -0.078125,-0.109375 -0.21875,-0.109375 -0.140625,0 -0.15625,0 -0.3125,0.15625 -3.328125,3.046875 -4.375,7.609375 -4.375,11.796875 0,3.921875 0.890625,7.875 3.421875,10.859375 0.203125,0.21875 0.578125,0.625 0.984375,0.984375 0.125,0.125 0.140625,0.125 0.28125,0.125 0.140625,0 0.21875,0 0.21875,-0.09375 z m 0,0"
+ id="path63"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 5.25,11.5625 C 5.25,7.640625 4.359375,3.703125 1.828125,0.71875 1.625,0.484375 1.25,0.078125 0.84375,-0.28125 c -0.125,-0.125 -0.140625,-0.125 -0.28125,-0.125 -0.125,0 -0.21875,0 -0.21875,0.109375 0,0.03125 0.046875,0.078125 0.0625,0.09375 0.34375,0.359375 1.015625,1.03125 1.6875,2.109375 1.609375,2.5625 2.328125,5.8125 2.328125,9.640625 0,2.6875 -0.359375,6.140625 -2,9.125 -0.78125,1.40625 -1.609375,2.234375 -2.03125,2.65625 -0.015625,0.03125 -0.046875,0.0625 -0.046875,0.09375 0,0.09375 0.09375,0.09375 0.21875,0.09375 0.140625,0 0.15625,0 0.3125,-0.15625 C 4.203125,20.328125 5.25,15.765625 5.25,11.5625 z m 0,0"
+ id="path66"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.046875,-2.671875 c -0.25,0.046875 -0.34375,0.234375 -0.34375,0.390625 0,0.1875 0.140625,0.265625 0.265625,0.265625 0.15625,0 0.390625,-0.109375 0.390625,-0.453125 0,-0.46875 -0.53125,-0.609375 -0.90625,-0.609375 -1.046875,0 -2.015625,0.96875 -2.015625,1.9375 0,0.59375 0.40625,1.203125 1.28125,1.203125 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 c -0.5,0 -0.71875,-0.34375 -0.71875,-0.78125 0,-0.1875 0.09375,-0.953125 0.453125,-1.4375 0.265625,-0.34375 0.625,-0.53125 0.984375,-0.53125 0.09375,0 0.421875,0.015625 0.59375,0.203125 z m 0,0"
+ id="path69"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 2.953125,-1.125 C 2.90625,-0.984375 2.84375,-0.71875 2.84375,-0.71875 2.703125,-0.5 2.421875,-0.125 2,-0.125 c -0.484375,0 -0.484375,-0.453125 -0.484375,-0.578125 0,-0.40625 0.1875,-0.90625 0.390625,-1.421875 C 1.953125,-2.265625 2,-2.359375 2,-2.46875 2,-2.84375 1.6875,-3.078125 1.34375,-3.078125 0.640625,-3.078125 0.328125,-2.125 0.328125,-2 c 0,0.078125 0.09375,0.078125 0.125,0.078125 0.09375,0 0.09375,-0.03125 0.125,-0.109375 0.15625,-0.5625 0.46875,-0.84375 0.734375,-0.84375 0.125,0 0.171875,0.078125 0.171875,0.234375 0,0.171875 -0.046875,0.3125 -0.125,0.46875 -0.375,0.96875 -0.375,1.171875 -0.375,1.359375 0,0.109375 0,0.4375 0.265625,0.65625 0.203125,0.171875 0.46875,0.21875 0.71875,0.21875 0.4375,0 0.671875,-0.234375 0.90625,-0.453125 C 3.03125,0.0625 3.484375,0.0625 3.578125,0.0625 3.8125,0.0625 4,-0.0625 4.125,-0.296875 4.28125,-0.578125 4.375,-0.96875 4.375,-1 c 0,-0.09375 -0.09375,-0.09375 -0.109375,-0.09375 -0.109375,0 -0.109375,0.03125 -0.15625,0.21875 -0.09375,0.328125 -0.21875,0.75 -0.515625,0.75 -0.171875,0 -0.234375,-0.15625 -0.234375,-0.34375 0,-0.109375 0.0625,-0.375 0.109375,-0.546875 0.046875,-0.1875 0.125,-0.46875 0.15625,-0.625 l 0.15625,-0.625 C 3.828125,-2.4375 3.90625,-2.75 3.90625,-2.78125 3.90625,-2.921875 3.796875,-3 3.671875,-3 c -0.25,0 -0.3125,0.203125 -0.359375,0.421875 z m 0,0"
+ id="path72"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.640625,-1.40625 c 0,-0.046875 0.171875,-0.671875 0.171875,-0.703125 0.015625,-0.0625 0.21875,-0.40625 0.453125,-0.578125 0.0625,-0.046875 0.25,-0.1875 0.5625,-0.1875 0.0625,0 0.234375,0 0.375,0.09375 -0.21875,0.0625 -0.296875,0.265625 -0.296875,0.390625 0,0.140625 0.109375,0.25 0.265625,0.25 0.171875,0 0.390625,-0.125 0.390625,-0.421875 0,-0.359375 -0.375,-0.515625 -0.734375,-0.515625 -0.359375,0 -0.671875,0.15625 -0.984375,0.5 -0.125,-0.421875 -0.546875,-0.5 -0.71875,-0.5 -0.25,0 -0.421875,0.171875 -0.546875,0.359375 -0.15625,0.265625 -0.25,0.671875 -0.25,0.71875 0,0.078125 0.09375,0.078125 0.125,0.078125 0.09375,0 0.09375,-0.015625 0.140625,-0.203125 0.109375,-0.421875 0.25,-0.75 0.515625,-0.75 0.1875,0 0.234375,0.15625 0.234375,0.34375 0,0.125 -0.0625,0.390625 -0.125,0.578125 -0.046875,0.1875 -0.109375,0.46875 -0.140625,0.625 L 0.84375,-0.4375 C 0.828125,-0.34375 0.78125,-0.171875 0.78125,-0.15625 0.78125,0 0.90625,0.0625 1.015625,0.0625 1.125,0.0625 1.265625,0 1.3125,-0.125 1.328125,-0.171875 1.40625,-0.484375 1.453125,-0.65625 z m 0,0"
+ id="path75"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.71875,-2.53125 c 0,-0.546875 -0.328125,-0.546875 -0.34375,-0.546875 -0.1875,0 -0.375,0.1875 -0.375,0.375 0,0.109375 0.0625,0.171875 0.109375,0.203125 0.125,0.109375 0.265625,0.28125 0.265625,0.5625 0,0.3125 -0.46875,1.8125 -1.296875,1.8125 -0.5625,0 -0.5625,-0.5 -0.5625,-0.625 0,-0.3125 0.125,-0.703125 0.390625,-1.359375 C 1.953125,-2.25 2,-2.359375 2,-2.46875 2,-2.84375 1.6875,-3.078125 1.34375,-3.078125 0.640625,-3.078125 0.328125,-2.125 0.328125,-2 c 0,0.078125 0.09375,0.078125 0.125,0.078125 0.09375,0 0.09375,-0.03125 0.125,-0.109375 C 0.734375,-2.59375 1.03125,-2.875 1.3125,-2.875 c 0.125,0 0.171875,0.078125 0.171875,0.234375 0,0.171875 -0.046875,0.3125 -0.125,0.46875 -0.296875,0.78125 -0.375,1.078125 -0.375,1.328125 0,0.6875 0.546875,0.90625 1.078125,0.90625 1.171875,0 1.65625,-2.015625 1.65625,-2.59375 z m 0,0"
+ id="path78"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.5625,-1.59375 c 0.1875,0 0.75,-0.015625 1.125,-0.140625 0.515625,-0.1875 0.609375,-0.515625 0.609375,-0.71875 0,-0.390625 -0.390625,-0.625 -0.859375,-0.625 -0.84375,0 -1.96875,0.640625 -1.96875,1.84375 0,0.703125 0.4375,1.296875 1.25,1.296875 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 1.3125,-0.125 1.03125,-0.40625 1.03125,-0.96875 c 0,-0.09375 0,-0.234375 0.09375,-0.625 z M 1.171875,-1.78125 C 1.46875,-2.796875 2.234375,-2.875 2.4375,-2.875 2.734375,-2.875 3,-2.71875 3,-2.453125 3,-1.78125 1.8125,-1.78125 1.515625,-1.78125 z m 0,0"
+ id="path81"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.390625,-2.25 0.734375,0 c 0.53125,0 0.625,0.09375 0.625,0.3125 0,0.109375 0,0.125 -0.046875,0.328125 -0.015625,0.03125 -0.03125,0.0625 -0.03125,0.078125 0,0.0625 0.0625,0.109375 0.125,0.109375 0.09375,0 0.09375,-0.046875 0.140625,-0.171875 l 0.375,-1.46875 c 0,-0.03125 0.015625,-0.125 0.015625,-0.140625 0,-0.078125 -0.046875,-0.109375 -0.109375,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.171875 C 3.9375,-2.59375 3.734375,-2.5 3.140625,-2.5 l -0.6875,0 0.4375,-1.75 c 0.046875,-0.203125 0.0625,-0.234375 0.34375,-0.234375 l 1.078125,0 c 0.921875,0 1.09375,0.21875 1.09375,0.8125 0,0.21875 -0.03125,0.375 -0.03125,0.421875 0,0.0625 0.03125,0.125 0.125,0.125 0.109375,0 0.109375,-0.0625 0.125,-0.1875 L 5.75,-4.515625 c 0.015625,-0.21875 -0.03125,-0.21875 -0.203125,-0.21875 l -3.71875,0 c -0.140625,0 -0.21875,0 -0.21875,0.15625 0,0.09375 0.078125,0.09375 0.21875,0.09375 0,0 0.140625,0 0.265625,0.015625 C 2.234375,-4.453125 2.25,-4.4375 2.25,-4.375 c 0,0.046875 -0.015625,0.125 -0.03125,0.15625 L 1.3125,-0.578125 C 1.234375,-0.296875 1.234375,-0.25 0.6875,-0.25 c -0.109375,0 -0.203125,0 -0.203125,0.140625 C 0.484375,-0.03125 0.53125,0 0.59375,0 0.796875,0 1.3125,-0.03125 1.515625,-0.03125 l 0.53125,0.015625 C 2.234375,-0.015625 2.421875,0 2.59375,0 2.640625,0 2.75,0 2.75,-0.15625 2.75,-0.25 2.671875,-0.25 2.515625,-0.25 c -0.015625,0 -0.1875,0 -0.375,-0.015625 C 2,-0.28125 1.9375,-0.28125 1.9375,-0.390625 c 0,-0.015625 0,-0.046875 0.015625,-0.125 z m 0,0"
+ id="path84"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-2.65625 c -0.140625,-0.234375 -0.375,-0.421875 -0.71875,-0.421875 -0.890625,0 -1.796875,0.984375 -1.796875,1.984375 0,0.6875 0.453125,1.15625 1.0625,1.15625 0.375,0 0.703125,-0.203125 0.984375,-0.484375 C 2.59375,0 3,0.0625 3.1875,0.0625 c 0.25,0 0.421875,-0.140625 0.546875,-0.359375 0.15625,-0.28125 0.25,-0.671875 0.25,-0.703125 0,-0.09375 -0.09375,-0.09375 -0.109375,-0.09375 -0.109375,0 -0.109375,0.03125 -0.15625,0.21875 C 3.625,-0.53125 3.5,-0.125 3.203125,-0.125 3.03125,-0.125 2.96875,-0.28125 2.96875,-0.46875 c 0,-0.109375 0.0625,-0.375 0.109375,-0.546875 0.046875,-0.1875 0.125,-0.46875 0.15625,-0.625 L 3.375,-2.171875 C 3.421875,-2.359375 3.5,-2.6875 3.5,-2.71875 3.5,-2.875 3.375,-2.9375 3.265625,-2.9375 c -0.125,0 -0.28125,0.078125 -0.328125,0.28125 z M 2.5,-0.875 C 2.453125,-0.671875 2.296875,-0.53125 2.140625,-0.40625 2.078125,-0.34375 1.796875,-0.125 1.5,-0.125 c -0.265625,0 -0.515625,-0.1875 -0.515625,-0.671875 0,-0.375 0.203125,-1.140625 0.375,-1.421875 0.3125,-0.5625 0.671875,-0.65625 0.859375,-0.65625 0.484375,0 0.625,0.53125 0.625,0.609375 0,0.015625 -0.015625,0.078125 -0.015625,0.09375 z m 0,0"
+ id="path87"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-7"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.71875,-2.75 0.703125,0 c 0.140625,0 0.21875,0 0.21875,-0.15625 C 2.640625,-3 2.5625,-3 2.4375,-3 l -0.65625,0 0.25,-1.03125 C 2.046875,-4.0625 2.0625,-4.109375 2.0625,-4.125 c 0,-0.140625 -0.109375,-0.234375 -0.25,-0.234375 -0.171875,0 -0.265625,0.125 -0.328125,0.296875 C 1.4375,-3.875 1.53125,-4.21875 1.21875,-3 l -0.703125,0 c -0.125,0 -0.21875,0 -0.21875,0.15625 C 0.296875,-2.75 0.375,-2.75 0.5,-2.75 l 0.65625,0 L 0.75,-1.109375 C 0.703125,-0.9375 0.640625,-0.6875 0.640625,-0.59375 c 0,0.40625 0.359375,0.65625 0.75,0.65625 0.78125,0 1.21875,-0.96875 1.21875,-1.0625 0,-0.09375 -0.09375,-0.09375 -0.109375,-0.09375 -0.09375,0 -0.09375,0.015625 -0.15625,0.140625 -0.1875,0.4375 -0.546875,0.828125 -0.921875,0.828125 -0.15625,0 -0.25,-0.09375 -0.25,-0.34375 0,-0.0625 0.03125,-0.21875 0.046875,-0.28125 z m 0,0"
+ id="path90"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph4-8"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.703125,-1.859375 c 0,-0.765625 -0.578125,-1.21875 -1.265625,-1.21875 -1.03125,0 -2,0.96875 -2,1.921875 0,0.703125 0.5,1.21875 1.265625,1.21875 1,0 2,-0.90625 2,-1.921875 z m -2,1.734375 c -0.34375,0 -0.6875,-0.21875 -0.6875,-0.78125 0,-0.28125 0.125,-0.96875 0.40625,-1.359375 C 1.71875,-2.703125 2.125,-2.875 2.4375,-2.875 c 0.375,0 0.6875,0.25 0.6875,0.765625 C 3.125,-1.9375 3.046875,-1.25 2.734375,-0.765625 2.46875,-0.34375 2.0625,-0.125 1.703125,-0.125 z m 0,0"
+ id="path93"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ id="g3778">
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g96">
+ <use
+ xlink:href="#glyph0-0"
+ x="153"
+ y="160.3"
+ id="use98"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g100">
+ <use
+ xlink:href="#glyph1-0"
+ x="158.16016"
+ y="160.3"
+ id="use102"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g104">
+ <use
+ xlink:href="#glyph0-1"
+ x="162"
+ y="160.3"
+ id="use106"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g108">
+ <use
+ xlink:href="#glyph0-2"
+ x="166.68001"
+ y="160.3"
+ id="use110"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g112">
+ <use
+ xlink:href="#glyph0-3"
+ x="170.28001"
+ y="160.3"
+ id="use114"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g116">
+ <use
+ xlink:href="#glyph0-4"
+ x="174.96001"
+ y="160.3"
+ id="use118"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g120">
+ <use
+ xlink:href="#glyph1-1"
+ x="180"
+ y="160.3"
+ id="use122"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g124">
+ <use
+ xlink:href="#glyph1-2"
+ x="186.60001"
+ y="160.3"
+ id="use126"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g128">
+ <use
+ xlink:href="#glyph0-5"
+ x="197.03979"
+ y="160.3"
+ id="use130"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g132">
+ <use
+ xlink:href="#glyph0-6"
+ x="202.31979"
+ y="160.3"
+ id="use134"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g136">
+ <use
+ xlink:href="#glyph0-2"
+ x="206.6398"
+ y="160.3"
+ id="use138"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g140">
+ <use
+ xlink:href="#glyph0-7"
+ x="210.23981"
+ y="160.3"
+ id="use142"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g144">
+ <use
+ xlink:href="#glyph0-8"
+ x="213.7198"
+ y="160.3"
+ id="use146"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g148">
+ <use
+ xlink:href="#glyph0-9"
+ x="218.51981"
+ y="160.3"
+ id="use150"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 79.64514,18.01709 3,0 0,0.48047 -3,0 z m 0,0"
+ id="path152"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g154">
+ <use
+ xlink:href="#glyph0-0"
+ x="228.12"
+ y="160.3"
+ id="use156"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g158">
+ <use
+ xlink:href="#glyph0-3"
+ x="233.28001"
+ y="160.3"
+ id="use160"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g162">
+ <use
+ xlink:href="#glyph0-10"
+ x="237.96001"
+ y="160.3"
+ id="use164"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g166">
+ <use
+ xlink:href="#glyph0-2"
+ x="241.20009"
+ y="160.3"
+ id="use168"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g170">
+ <use
+ xlink:href="#glyph0-5"
+ x="244.80009"
+ y="160.3"
+ id="use172"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g174">
+ <use
+ xlink:href="#glyph2-0"
+ x="252.12"
+ y="160.3"
+ id="use176"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g178">
+ <use
+ xlink:href="#glyph3-0"
+ x="262.08017"
+ y="146.26019"
+ id="use180"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g182">
+ <use
+ xlink:href="#glyph0-11"
+ x="299.88016"
+ y="153.58012"
+ id="use184"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g186">
+ <use
+ xlink:href="#glyph0-5"
+ x="308.64017"
+ y="153.58012"
+ id="use188"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g190">
+ <use
+ xlink:href="#glyph0-12"
+ x="313.92017"
+ y="153.58012"
+ id="use192"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 174.68421,11.29834 3,0 0,0.48047 -3,0 z m 0,0"
+ id="path194"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g196">
+ <use
+ xlink:href="#glyph0-5"
+ x="323.16"
+ y="153.58"
+ id="use198"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g200">
+ <use
+ xlink:href="#glyph0-6"
+ x="328.44"
+ y="153.58"
+ id="use202"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g204">
+ <use
+ xlink:href="#glyph0-6"
+ x="332.76001"
+ y="153.58"
+ id="use206"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g208">
+ <use
+ xlink:href="#glyph0-3"
+ x="337.07999"
+ y="153.58"
+ id="use210"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g212">
+ <use
+ xlink:href="#glyph0-10"
+ x="341.76001"
+ y="153.58"
+ id="use214"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 125.12561,15.73584 103.5586,0 0,0.48047 -103.5586,0 z m 0,0"
+ id="path216"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g218">
+ <use
+ xlink:href="#glyph0-1"
+ x="270.60001"
+ y="167.14"
+ id="use220"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g222">
+ <use
+ xlink:href="#glyph0-2"
+ x="275.28"
+ y="167.14"
+ id="use224"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g226">
+ <use
+ xlink:href="#glyph0-3"
+ x="278.88"
+ y="167.14"
+ id="use228"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g230">
+ <use
+ xlink:href="#glyph0-4"
+ x="283.56003"
+ y="167.14"
+ id="use232"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g234">
+ <use
+ xlink:href="#glyph0-1"
+ x="288.60001"
+ y="167.14"
+ id="use236"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 148.40296,24.85693 3,0 0,0.48047 -3,0 z m 0,0"
+ id="path238"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g240">
+ <use
+ xlink:href="#glyph0-2"
+ x="296.88"
+ y="167.14"
+ id="use242"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g244">
+ <use
+ xlink:href="#glyph0-8"
+ x="300.48001"
+ y="167.14"
+ id="use246"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 160.40296,24.85693 3,0 0,0.48047 -3,0 z m 0,0"
+ id="path248"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g250">
+ <use
+ xlink:href="#glyph0-11"
+ x="308.88"
+ y="167.14"
+ id="use252"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g254">
+ <use
+ xlink:href="#glyph0-5"
+ x="317.64001"
+ y="167.14"
+ id="use256"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g258">
+ <use
+ xlink:href="#glyph0-12"
+ x="322.91998"
+ y="167.14"
+ id="use260"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g262">
+ <use
+ xlink:href="#glyph4-0"
+ x="328.56009"
+ y="164.26031"
+ id="use264"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g266">
+ <use
+ xlink:href="#glyph4-1"
+ x="332.1601"
+ y="164.26031"
+ id="use268"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g270">
+ <use
+ xlink:href="#glyph4-2"
+ x="336.84009"
+ y="164.26031"
+ id="use272"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g274">
+ <use
+ xlink:href="#glyph4-3"
+ x="340.79993"
+ y="164.26031"
+ id="use276"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g278">
+ <use
+ xlink:href="#glyph4-4"
+ x="344.99994"
+ y="164.26031"
+ id="use280"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g282">
+ <use
+ xlink:href="#glyph4-5"
+ x="348.71994"
+ y="164.26031"
+ id="use284"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g286">
+ <use
+ xlink:href="#glyph4-6"
+ x="354.83978"
+ y="164.26031"
+ id="use288"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g290">
+ <use
+ xlink:href="#glyph4-0"
+ x="359.15979"
+ y="164.26031"
+ id="use292"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g294">
+ <use
+ xlink:href="#glyph4-7"
+ x="362.75977"
+ y="164.26031"
+ id="use296"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g298">
+ <use
+ xlink:href="#glyph4-8"
+ x="365.75977"
+ y="164.26031"
+ id="use300"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g302">
+ <use
+ xlink:href="#glyph4-2"
+ x="369.71979"
+ y="164.26031"
+ id="use304"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g306">
+ <use
+ xlink:href="#glyph3-1"
+ x="375.36011"
+ y="146.26031"
+ id="use308"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g310">
+ <use
+ xlink:href="#glyph2-0"
+ x="384.83978"
+ y="160.30011"
+ id="use312"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g314">
+ <use
+ xlink:href="#glyph0-1"
+ x="394.79996"
+ y="160.30011"
+ id="use316"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g318">
+ <use
+ xlink:href="#glyph0-2"
+ x="399.47995"
+ y="160.30011"
+ id="use320"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g322">
+ <use
+ xlink:href="#glyph0-3"
+ x="403.07996"
+ y="160.30011"
+ id="use324"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-145.46423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g326">
+ <use
+ xlink:href="#glyph0-4"
+ x="407.75998"
+ y="160.30011"
+ id="use328"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g330">
+ <use
+ xlink:href="#glyph4-0"
+ x="412.79996"
+ y="156.10011"
+ id="use332"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g334">
+ <use
+ xlink:href="#glyph4-1"
+ x="416.39996"
+ y="156.10011"
+ id="use336"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g338">
+ <use
+ xlink:href="#glyph4-2"
+ x="421.07999"
+ y="156.10011"
+ id="use340"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g342">
+ <use
+ xlink:href="#glyph4-3"
+ x="425.03983"
+ y="156.10011"
+ id="use344"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g346">
+ <use
+ xlink:href="#glyph4-4"
+ x="429.23984"
+ y="156.10011"
+ id="use348"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g350">
+ <use
+ xlink:href="#glyph4-5"
+ x="432.95984"
+ y="156.10011"
+ id="use352"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g354">
+ <use
+ xlink:href="#glyph4-6"
+ x="439.07965"
+ y="156.10011"
+ id="use356"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g358">
+ <use
+ xlink:href="#glyph4-0"
+ x="443.39969"
+ y="156.10011"
+ id="use360"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g362">
+ <use
+ xlink:href="#glyph4-7"
+ x="446.99973"
+ y="156.10011"
+ id="use364"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g366">
+ <use
+ xlink:href="#glyph4-8"
+ x="449.99973"
+ y="156.10011"
+ id="use368"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-143.86423,-141.81494)"
+ style="fill:#000000;fill-opacity:1"
+ id="g370">
+ <use
+ xlink:href="#glyph4-2"
+ x="453.95972"
+ y="156.10011"
+ id="use372"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-10.svg b/specs/XKBproto-10.svg
new file mode 100644
index 0000000..7660079
--- /dev/null
+++ b/specs/XKBproto-10.svg
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="25"
+ height="30"
+ viewBox="0 0 20 24"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-10.svg">
+ <metadata
+ id="metadata42">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview40"
+ showgrid="false"
+ inkscape:zoom="6.3875313"
+ inkscape:cx="12.5"
+ inkscape:cy="15"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.578125,-3.1875 c 0,-0.796875 -0.046875,-1.59375 -0.390625,-2.328125 -0.453125,-0.96875 -1.28125,-1.125 -1.6875,-1.125 -0.609375,0 -1.328125,0.265625 -1.75,1.1875 -0.3125,0.6875 -0.359375,1.46875 -0.359375,2.265625 0,0.75 0.03125,1.640625 0.453125,2.40625 0.421875,0.796875 1.15625,1 1.640625,1 0.53125,0 1.296875,-0.203125 1.734375,-1.15625 0.3125,-0.6875 0.359375,-1.46875 0.359375,-2.25 z M 2.484375,0 C 2.09375,0 1.5,-0.25 1.328125,-1.203125 1.21875,-1.796875 1.21875,-2.71875 1.21875,-3.3125 c 0,-0.640625 0,-1.296875 0.078125,-1.828125 0.1875,-1.1875 0.9375,-1.28125 1.1875,-1.28125 0.328125,0 0.984375,0.1875 1.171875,1.171875 0.109375,0.5625 0.109375,1.3125 0.109375,1.9375 0,0.75 0,1.421875 -0.109375,2.0625 C 3.5,-0.296875 2.9375,0 2.484375,0 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.53125,-1.734375 c 0,-0.84375 -0.671875,-1.5 -1.5,-1.5 -0.828125,0 -1.5,0.671875 -1.5,1.484375 0,0.84375 0.6875,1.5 1.5,1.5 0.84375,0 1.5,-0.671875 1.5,-1.484375 z m -1.5,1.140625 C 1.375,-0.59375 0.875,-1.125 0.875,-1.734375 c 0,-0.65625 0.515625,-1.171875 1.15625,-1.171875 0.65625,0 1.15625,0.53125 1.15625,1.15625 0,0.65625 -0.515625,1.15625 -1.15625,1.15625 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ id="g3030"
+ transform="translate(-295.66002,683.68776)">
+ <g
+ transform="translate(0,-818)"
+ style="fill:#000000;fill-opacity:1"
+ id="g18">
+ <use
+ xlink:href="#glyph0-0"
+ x="300.84"
+ y="143.02"
+ id="use20"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 298.30859,-671.00781 10.07813,0 0,0.48047 -10.07813,0 z m 0,0"
+ id="path22"
+ inkscape:connector-curvature="0" />
+ <g
+ transform="translate(0,-818)"
+ style="fill:#000000;fill-opacity:1"
+ id="g24">
+ <use
+ xlink:href="#glyph0-0"
+ x="298.32001"
+ y="156.58"
+ id="use26"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(0,-818)"
+ style="fill:#000000;fill-opacity:1"
+ id="g28">
+ <use
+ xlink:href="#glyph0-1"
+ x="303.35999"
+ y="156.58"
+ id="use30"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(0,-818)"
+ style="fill:#000000;fill-opacity:1"
+ id="g32">
+ <use
+ xlink:href="#glyph1-0"
+ x="309.48019"
+ y="139.0601"
+ id="use34"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-11.svg b/specs/XKBproto-11.svg
new file mode 100644
index 0000000..fa334de
--- /dev/null
+++ b/specs/XKBproto-11.svg
@@ -0,0 +1,2730 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1070"
+ height="500"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-11.svg"
+ inkscape:export-filename="/home/fcarrijo/Desktop/XKBproto-11.png"
+ inkscape:export-xdpi="156.71965"
+ inkscape:export-ydpi="156.71965"
+ style="display:inline">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.89065421"
+ inkscape:cx="405.32004"
+ inkscape:cy="250"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Vetorial"
+ style="display:inline">
+ <rect
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect5143"
+ width="1054.705"
+ height="461.88309"
+ x="4.3166642"
+ y="16.533602"
+ rx="17.132263"
+ ry="15.693377" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#66cc33;stroke:none"
+ id="path3922"
+ sodipodi:cx="66.804825"
+ sodipodi:cy="98.328964"
+ sodipodi:rx="3.9296956"
+ sodipodi:ry="3.6490033"
+ d="m 70.73452,98.328964 a 3.9296956,3.6490033 0 1 1 -7.859391,0 3.9296956,3.6490033 0 1 1 7.859391,0 z"
+ transform="matrix(1.0178905,0,0,1.0961898,-0.0020999,-10.370621)" />
+ <g
+ id="g5460">
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="53.589493"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="313.59778"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="86.09053"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-1"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="118.59155"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-5"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="151.09259"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-54"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="183.59363"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-7"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="216.09465"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-6"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="248.59569"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-56"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="48.260418"
+ x="281.09674"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-9"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918"
+ y="68.407303"
+ x="52.357876"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="52.357876"
+ id="tspan3920"
+ sodipodi:role="line">&lt;ESC&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4"
+ y="68.407303"
+ x="82.18454"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="82.18454"
+ id="tspan3920-5"
+ sodipodi:role="line">&lt;FK01&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-4"
+ y="68.407303"
+ x="114.71823"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="114.71823"
+ id="tspan3920-5-2"
+ sodipodi:role="line">&lt;FK02&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-49"
+ y="68.407303"
+ x="147.25191"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="147.25191"
+ id="tspan3920-5-9"
+ sodipodi:role="line">&lt;FK03&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-9"
+ y="68.407303"
+ x="179.7856"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="179.7856"
+ id="tspan3920-5-4"
+ sodipodi:role="line">&lt;FK04&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-98"
+ y="68.407303"
+ x="212.31929"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="212.31929"
+ id="tspan3920-5-1"
+ sodipodi:role="line">&lt;FK05&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-6"
+ y="68.402908"
+ x="244.853"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.402908"
+ x="244.853"
+ id="tspan3920-5-3"
+ sodipodi:role="line">&lt;FK06&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-93"
+ y="68.407303"
+ x="277.38666"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="277.38666"
+ id="tspan3920-5-34"
+ sodipodi:role="line">&lt;FK07&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-61"
+ y="68.407303"
+ x="309.92035"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="68.407303"
+ x="309.92035"
+ id="tspan3920-5-5"
+ sodipodi:role="line">&lt;FK08&gt;</tspan></text>
+ </g>
+ <g
+ id="g5257">
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="108.15319"
+ x="48.559811"
+ height="43.22665"
+ width="53.331585"
+ id="rect4022"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="110.67943"
+ x="51.928123"
+ height="38.174183"
+ width="46.594963"
+ id="rect4022-6"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8"
+ y="133.10637"
+ x="58.98122"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="133.10637"
+ x="58.98122"
+ id="tspan3920-6"
+ sodipodi:role="line">&lt;AE12&gt;</tspan></text>
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="154.28033"
+ x="48.559811"
+ height="43.22665"
+ width="53.331585"
+ id="rect4022-7"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="156.80656"
+ x="51.928123"
+ height="38.174183"
+ width="46.594963"
+ id="rect4022-6-2"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-3"
+ y="179.17857"
+ x="61.688251"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="179.17857"
+ x="61.688251"
+ id="tspan3920-7"
+ sodipodi:role="line">&lt;TAB&gt;</tspan></text>
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="200.40747"
+ x="48.559811"
+ height="43.22665"
+ width="53.331585"
+ id="rect4022-9"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="202.93372"
+ x="51.928123"
+ height="38.174183"
+ width="46.594963"
+ id="rect4022-6-28"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-7"
+ y="225.29692"
+ x="58.98122"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="225.29692"
+ x="58.98122"
+ id="tspan3920-2"
+ sodipodi:role="line">&lt;CAPS&gt;</tspan></text>
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="246.53462"
+ x="48.559811"
+ height="43.22665"
+ width="53.331585"
+ id="rect4022-4"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="249.06085"
+ x="51.928123"
+ height="38.174183"
+ width="46.594963"
+ id="rect4022-6-7"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-37"
+ y="271.42407"
+ x="58.98122"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="271.42407"
+ x="58.98122"
+ id="tspan3920-25"
+ sodipodi:role="line">&lt;LFSH&gt;</tspan></text>
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="114.32844"
+ x="103.85625"
+ height="43.80616"
+ width="44.910809"
+ id="rect4172"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="117.03252"
+ x="107.50526"
+ height="38.397991"
+ width="37.612801"
+ id="rect4174"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-7"
+ y="139.50764"
+ x="110.06726"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="139.50764"
+ x="110.06726"
+ id="tspan3920-6-3"
+ sodipodi:role="line">&lt;AE01&gt;</tspan></text>
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="160.92114"
+ x="103.85625"
+ height="43.80616"
+ width="44.910809"
+ id="rect4172-9"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="163.62521"
+ x="107.50526"
+ height="38.397991"
+ width="37.612801"
+ id="rect4174-9"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-1"
+ y="186.10034"
+ x="110.06726"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="186.10034"
+ x="110.06726"
+ id="tspan3920-6-0"
+ sodipodi:role="line">&lt;AD01&gt;</tspan></text>
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="207.51384"
+ x="103.85625"
+ height="43.80616"
+ width="44.910809"
+ id="rect4172-0"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="210.21791"
+ x="107.50526"
+ height="38.397991"
+ width="37.612801"
+ id="rect4174-2"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-0"
+ y="232.69304"
+ x="110.06726"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="232.69304"
+ x="110.06726"
+ id="tspan3920-6-5"
+ sodipodi:role="line">&lt;AC01&gt;</tspan></text>
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="254.10654"
+ x="103.85625"
+ height="43.80616"
+ width="44.910809"
+ id="rect4172-90"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="256.81061"
+ x="107.50526"
+ height="38.397991"
+ width="37.612801"
+ id="rect4174-1"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-03"
+ y="279.28574"
+ x="110.06726"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="279.28574"
+ x="110.06726"
+ id="tspan3920-6-1"
+ sodipodi:role="line">&lt;AB01&gt;</tspan></text>
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="300.69922"
+ x="103.85625"
+ height="43.80616"
+ width="44.910809"
+ id="rect4172-00"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296961"
+ rx="3.9296958"
+ y="303.40332"
+ x="107.50526"
+ height="38.397991"
+ width="37.612801"
+ id="rect4174-6"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8"
+ y="325.88281"
+ x="110.06726"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="325.88281"
+ x="110.06726"
+ id="tspan3920-6-01"
+ sodipodi:role="line">&lt;TLDE&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="107.03043"
+ x="152.41606"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="110.00209"
+ x="156.06506"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-0"
+ y="131.64847"
+ x="158.34639"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="131.64847"
+ x="158.34639"
+ id="tspan3920-6-01-6"
+ sodipodi:role="line">&lt;AE02&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="153.62306"
+ x="152.41606"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="156.59471"
+ x="156.06506"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-3"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-5"
+ y="178.24109"
+ x="158.34639"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="178.24109"
+ x="158.34639"
+ id="tspan3920-6-01-9"
+ sodipodi:role="line">&lt;AD02&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="200.21571"
+ x="152.41606"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-3"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="203.18736"
+ x="156.06506"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-37"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-56"
+ y="224.83376"
+ x="158.34639"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="224.83376"
+ x="158.34639"
+ id="tspan3920-6-01-1"
+ sodipodi:role="line">&lt;AC02&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="246.80835"
+ x="152.41606"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="249.78001"
+ x="156.06506"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-1"
+ y="271.42639"
+ x="158.34639"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="271.42639"
+ x="158.34639"
+ id="tspan3920-6-01-4"
+ sodipodi:role="line">&lt;AB02&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="293.401"
+ x="152.41606"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-94"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="296.37265"
+ x="156.06506"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-2"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-3"
+ y="318.01904"
+ x="161.05342"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="318.01904"
+ x="161.05342"
+ id="tspan3920-6-01-7"
+ sodipodi:role="line">&lt;INS&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="107.03043"
+ x="199.75954"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-33"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="110.00208"
+ x="203.40854"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-92"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-0-4"
+ y="131.64847"
+ x="205.68987"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="131.64847"
+ x="205.68987"
+ id="tspan3920-6-01-6-4"
+ sodipodi:role="line">&lt;AE03&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="153.62306"
+ x="199.75954"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-0-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="156.59471"
+ x="203.40854"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-3-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-5-3"
+ y="178.24109"
+ x="205.68987"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="178.24109"
+ x="205.68987"
+ id="tspan3920-6-01-9-8"
+ sodipodi:role="line">&lt;AD03&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="200.21571"
+ x="199.75954"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-3-2"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="203.18736"
+ x="203.40854"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-37-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-56-5"
+ y="224.83376"
+ x="205.68987"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="224.83376"
+ x="205.68987"
+ id="tspan3920-6-01-1-4"
+ sodipodi:role="line">&lt;AC03&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="246.80835"
+ x="199.75954"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-9-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="249.78001"
+ x="203.40854"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-9-4"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-1-9"
+ y="271.42639"
+ x="205.68987"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="271.42639"
+ x="205.68987"
+ id="tspan3920-6-01-4-5"
+ sodipodi:role="line">&lt;AB03&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="293.401"
+ x="199.75954"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-94-7"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="296.37265"
+ x="203.40854"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-2-3"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-3-9"
+ y="318.02344"
+ x="205.68987"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="318.02344"
+ x="205.68987"
+ id="tspan3920-6-01-7-0"
+ sodipodi:role="line">&lt;LEFT&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="107.03043"
+ x="247.10303"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-33-7"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="110.00208"
+ x="250.75204"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-92-2"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-0-4-9"
+ y="131.64847"
+ x="253.03336"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="131.64847"
+ x="253.03336"
+ id="tspan3920-6-01-6-4-0"
+ sodipodi:role="line">&lt;AE04&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="153.62306"
+ x="247.10303"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-0-9-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="156.59471"
+ x="250.75204"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-3-9-4"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-5-3-1"
+ y="178.24109"
+ x="253.03336"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="178.24109"
+ x="253.03336"
+ id="tspan3920-6-01-9-8-7"
+ sodipodi:role="line">&lt;AD04&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="200.21571"
+ x="247.10303"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-3-2-3"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="203.18736"
+ x="250.75204"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-37-9-6"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-56-5-2"
+ y="224.83376"
+ x="253.03336"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="224.83376"
+ x="253.03336"
+ id="tspan3920-6-01-1-4-1"
+ sodipodi:role="line">&lt;AC04&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="246.80835"
+ x="247.10303"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-9-9-5"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="249.78001"
+ x="250.75204"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-9-4-3"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-1-9-9"
+ y="271.42639"
+ x="253.03336"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="271.42639"
+ x="253.03336"
+ id="tspan3920-6-01-4-5-1"
+ sodipodi:role="line">&lt;AB04&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="293.401"
+ x="247.10303"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-94-7-8"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="296.37265"
+ x="250.75204"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-2-3-7"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-3-9-0"
+ y="318.02344"
+ x="253.03336"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="318.02344"
+ x="253.03336"
+ id="tspan3920-6-01-7-0-5"
+ sodipodi:role="line">&lt;RGHT&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="107.03043"
+ x="294.4465"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-33-7-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="110.00208"
+ x="298.09552"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-92-2-1"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-0-4-9-9"
+ y="131.64847"
+ x="300.37683"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="131.64847"
+ x="300.37683"
+ id="tspan3920-6-01-6-4-0-6"
+ sodipodi:role="line">&lt;AE05&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="153.62306"
+ x="294.4465"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-0-9-0-6"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="156.59471"
+ x="298.09552"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-3-9-4-8"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-5-3-1-4"
+ y="178.24109"
+ x="300.37683"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="178.24109"
+ x="300.37683"
+ id="tspan3920-6-01-9-8-7-6"
+ sodipodi:role="line">&lt;AD05&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="200.21571"
+ x="294.4465"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-3-2-3-7"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="203.18736"
+ x="298.09552"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-37-9-6-2"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-56-5-2-7"
+ y="224.83376"
+ x="300.37683"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="224.83376"
+ x="300.37683"
+ id="tspan3920-6-01-1-4-1-4"
+ sodipodi:role="line">&lt;AC05&gt;</tspan></text>
+ <rect
+ ry="3.9296963"
+ rx="3.9296958"
+ y="246.80835"
+ x="294.4465"
+ height="42.683838"
+ width="44.349422"
+ id="rect4481-9-9-5-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="3.9296958"
+ rx="3.9296958"
+ y="249.78001"
+ x="298.09552"
+ height="36.740517"
+ width="37.051418"
+ id="rect4481-7-9-4-3-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-8-8-1-9-9-6"
+ y="271.42639"
+ x="300.37683"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="271.42639"
+ x="300.37683"
+ id="tspan3920-6-01-4-5-1-4"
+ sodipodi:role="line">&lt;AB05&gt;</tspan></text>
+ </g>
+ <g
+ id="g5516">
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="740.87012"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-2"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="1000.8784"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-17"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="773.37115"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-1-9"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="805.87219"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-5-5"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="838.37323"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-54-6"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="870.87427"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-7-8"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="903.37531"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-6-9"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="935.87634"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-56-5"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="0"
+ rx="8.814271"
+ y="45.952225"
+ x="968.37738"
+ height="33.741531"
+ width="24.611471"
+ id="rect3070-6-9-5"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2"
+ y="66.077141"
+ x="736.93146"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.077141"
+ x="736.93146"
+ id="tspan3920-1"
+ sodipodi:role="line">&lt;FK09&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-5"
+ y="66.099113"
+ x="769.46515"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.099113"
+ x="769.46515"
+ id="tspan3920-5-99"
+ sodipodi:role="line">&lt;FK10&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-4-1"
+ y="66.099113"
+ x="801.99884"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.099113"
+ x="801.99884"
+ id="tspan3920-5-2-6"
+ sodipodi:role="line">&lt;FK11&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-49-2"
+ y="66.099113"
+ x="834.53253"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.099113"
+ x="834.53253"
+ id="tspan3920-5-9-1"
+ sodipodi:role="line">&lt;FK12&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-9-0"
+ y="66.099113"
+ x="867.06622"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.099113"
+ x="867.06622"
+ id="tspan3920-5-4-5"
+ sodipodi:role="line">&lt;PRSC&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-98-3"
+ y="66.099113"
+ x="899.59991"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.099113"
+ x="899.59991"
+ id="tspan3920-5-1-2"
+ sodipodi:role="line">&lt;SCLK&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-6-1"
+ y="66.094719"
+ x="932.13361"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.094719"
+ x="932.13361"
+ id="tspan3920-5-3-9"
+ sodipodi:role="line">&lt;PAUS&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-93-7"
+ y="66.099113"
+ x="964.6673"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.099113"
+ x="964.6673"
+ id="tspan3920-5-34-6"
+ sodipodi:role="line">&lt;FK16&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-4-61-8"
+ y="66.099113"
+ x="997.20099"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="66.099113"
+ x="997.20099"
+ id="tspan3920-5-5-2"
+ sodipodi:role="line">&lt;FK17&gt;</tspan></text>
+ </g>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6144"
+ width="103.10342"
+ height="26.324278"
+ x="604.36157"
+ y="81.005241"
+ rx="3.9296958"
+ ry="3.9296963" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#66cc33;stroke:none;display:inline"
+ id="path3922-3"
+ sodipodi:cx="66.804825"
+ sodipodi:cy="98.328964"
+ sodipodi:rx="3.9296956"
+ sodipodi:ry="3.6490033"
+ d="m 70.73452,98.328964 a 3.9296956,3.6490033 0 1 1 -7.859391,0 3.9296956,3.6490033 0 1 1 7.859391,0 z"
+ transform="matrix(1.0178905,0,0,1.0961898,736.46434,-10.234015)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#66cc33;stroke:none;display:inline"
+ id="path3922-8"
+ sodipodi:cx="66.804825"
+ sodipodi:cy="98.328964"
+ sodipodi:rx="3.9296956"
+ sodipodi:ry="3.6490033"
+ d="m 70.73452,98.328964 a 3.9296956,3.6490033 0 1 1 -7.859391,0 3.9296956,3.6490033 0 1 1 7.859391,0 z"
+ transform="matrix(1.0178905,0,0,1.0961898,908.38962,-10.234015)" />
+ <g
+ id="g5879">
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="107.21355"
+ x="735.79156"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="109.33839"
+ x="739.13055"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8"
+ y="132.64403"
+ x="741.4024"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="132.64403"
+ x="741.4024"
+ id="tspan3920-1-7"
+ sodipodi:role="line">&lt;AE06&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="153.25113"
+ x="735.79156"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-4"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="155.37595"
+ x="739.13055"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-3"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-4"
+ y="178.68159"
+ x="741.4024"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="178.68159"
+ x="741.4024"
+ id="tspan3920-1-9"
+ sodipodi:role="line">&lt;AD06&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="199.2887"
+ x="735.79156"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-6"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="201.41351"
+ x="739.13055"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-3"
+ y="224.71916"
+ x="741.4024"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="224.71916"
+ x="741.4024"
+ id="tspan3920-1-1"
+ sodipodi:role="line">&lt;AC06&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="245.32626"
+ x="735.79156"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-48"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="247.45108"
+ x="739.13055"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-5"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-38"
+ y="270.75674"
+ x="741.4024"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="270.75674"
+ x="741.4024"
+ id="tspan3920-1-79"
+ sodipodi:role="line">&lt;AB06&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="107.21354"
+ x="783.14728"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-2"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="109.33836"
+ x="786.48627"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-97"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-8"
+ y="123.04574"
+ x="788.75812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="123.04574"
+ x="788.75812"
+ id="tspan3920-1-7-4"
+ sodipodi:role="line">&lt;NMLK&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-0"
+ y="142.75565"
+ x="788.75812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="142.75565"
+ x="788.75812"
+ id="tspan3920-1-7-0"
+ sodipodi:role="line">&lt;AE07&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="153.73174"
+ x="783.14728"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-09"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="155.85655"
+ x="786.48627"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-2"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-86"
+ y="168.82205"
+ x="792.07983"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="168.82205"
+ x="792.07983"
+ id="tspan3920-1-7-8"
+ sodipodi:role="line">&lt;KP7&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-2"
+ y="189.15573"
+ x="789.47369"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="189.15573"
+ x="789.47369"
+ id="tspan3920-1-7-3"
+ sodipodi:role="line">&lt;AD07&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="200.24991"
+ x="783.14728"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-8"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="202.37473"
+ x="786.48627"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-7"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-85"
+ y="216.34799"
+ x="791.46515"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="216.34799"
+ x="791.46515"
+ id="tspan3920-1-7-05"
+ sodipodi:role="line">&lt;KP4&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-9"
+ y="234.80699"
+ x="788.75812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="234.80699"
+ x="788.75812"
+ id="tspan3920-1-7-2"
+ sodipodi:role="line">&lt;AC07&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="246.7681"
+ x="783.14728"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-1"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="248.89291"
+ x="786.48627"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-6"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-6"
+ y="261.74802"
+ x="791.46515"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="261.74802"
+ x="791.46515"
+ id="tspan3920-1-7-85"
+ sodipodi:role="line">&lt;KP1&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-28"
+ y="282.61841"
+ x="788.75812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="282.61841"
+ x="788.75812"
+ id="tspan3920-1-7-36"
+ sodipodi:role="line">&lt;AB07&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="293.28625"
+ x="783.14728"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-5"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="295.41107"
+ x="786.48627"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-7"
+ y="319.49194"
+ x="794.17218"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="319.49194"
+ x="794.17218"
+ id="tspan3920-1-7-87"
+ sodipodi:role="line">&lt;UP&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="107.21354"
+ x="830.50299"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-64"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="109.33835"
+ x="833.84198"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-8"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-61"
+ y="122.48763"
+ x="835.93439"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="122.48763"
+ x="835.93439"
+ id="tspan3920-1-7-5"
+ sodipodi:role="line">&lt;KPEQ&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-5"
+ y="142.75565"
+ x="835.93445"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="142.75565"
+ x="835.93445"
+ id="tspan3920-1-7-47"
+ sodipodi:role="line">&lt;AE08&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="153.73174"
+ x="830.50299"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-62"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="155.85655"
+ x="833.84198"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-52"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-65"
+ y="168.81766"
+ x="839.37939"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="168.81766"
+ x="839.37939"
+ id="tspan3920-1-7-6"
+ sodipodi:role="line">&lt;KP8&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-93"
+ y="189.15573"
+ x="836.06854"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="189.15573"
+ x="836.06854"
+ id="tspan3920-1-7-7"
+ sodipodi:role="line">&lt;AD08&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="200.24992"
+ x="830.50299"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-13"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="202.37474"
+ x="833.84198"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-31"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-4"
+ y="216.28427"
+ x="838.63824"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="216.28427"
+ x="838.63824"
+ id="tspan3920-1-7-52"
+ sodipodi:role="line">&lt;KP5&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-54"
+ y="234.80699"
+ x="836.27338"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="234.80699"
+ x="836.27338"
+ id="tspan3920-1-7-74"
+ sodipodi:role="line">&lt;AC08&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="246.7681"
+ x="830.50299"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-69"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="248.89291"
+ x="833.84198"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-4"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-43"
+ y="261.80734"
+ x="839.37939"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="261.80734"
+ x="839.37939"
+ id="tspan3920-1-7-07"
+ sodipodi:role="line">&lt;KP2&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-868"
+ y="282.61841"
+ x="836.54156"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="282.61841"
+ x="836.54156"
+ id="tspan3920-1-7-84"
+ sodipodi:role="line">&lt;AB08&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="293.28625"
+ x="830.50299"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-07"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="295.41107"
+ x="833.84198"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-43"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-3"
+ y="319.55127"
+ x="836.61218"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="319.55127"
+ x="836.61218"
+ id="tspan3920-1-7-1"
+ sodipodi:role="line">&lt;DOWN&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="107.21354"
+ x="877.8587"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-9"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="109.33835"
+ x="881.19769"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-00"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-49"
+ y="123.04134"
+ x="883.84216"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="123.04134"
+ x="883.84216"
+ id="tspan3920-1-7-20"
+ sodipodi:role="line">&lt;KPSL&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-68"
+ y="142.73367"
+ x="882.42322"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="142.73367"
+ x="882.42322"
+ id="tspan3920-1-7-9"
+ sodipodi:role="line">&lt;AE09&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="153.73174"
+ x="877.8587"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-26"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="155.85655"
+ x="881.19769"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-90"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-26"
+ y="168.76712"
+ x="886.073"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="168.76712"
+ x="886.073"
+ id="tspan3920-1-7-64"
+ sodipodi:role="line">&lt;KP9&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-95"
+ y="189.13376"
+ x="883.70807"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="189.13376"
+ x="883.70807"
+ id="tspan3920-1-7-04"
+ sodipodi:role="line">&lt;AD09&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="200.24992"
+ x="877.8587"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-58"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="202.37474"
+ x="881.19769"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-71"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-87"
+ y="216.33481"
+ x="886.4118"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="216.33481"
+ x="886.4118"
+ id="tspan3920-1-7-17"
+ sodipodi:role="line">&lt;KP6&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-27"
+ y="234.78502"
+ x="883.57391"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="234.78502"
+ x="883.57391"
+ id="tspan3920-1-7-22"
+ sodipodi:role="line">&lt;AC09&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="246.76808"
+ x="877.8587"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-60"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="248.8929"
+ x="881.19769"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-41"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-610"
+ y="261.74362"
+ x="884.99286"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="261.74362"
+ x="884.99286"
+ id="tspan3920-1-7-61"
+ sodipodi:role="line">&lt;KP3&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-59"
+ y="282.59644"
+ x="882.62799"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="282.59644"
+ x="882.62799"
+ id="tspan3920-1-7-49"
+ sodipodi:role="line">&lt;AB09&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="293.28625"
+ x="877.8587"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-29"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="295.41107"
+ x="881.19769"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-60"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-09"
+ y="319.55566"
+ x="882.35974"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="319.55566"
+ x="882.35974"
+ id="tspan3920-1-7-177"
+ sodipodi:role="line">&lt;AD11&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="114.62343"
+ x="925.21442"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-3"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="116.74824"
+ x="928.55341"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-54"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-1"
+ y="130.09161"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="130.09161"
+ x="930.82526"
+ id="tspan3920-1-7-15"
+ sodipodi:role="line">&lt;KPMU&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-97"
+ y="148.42969"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="148.42969"
+ x="930.82526"
+ id="tspan3920-1-7-76"
+ sodipodi:role="line">&lt;AE10&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="161.1104"
+ x="925.21442"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-43"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="163.23521"
+ x="928.55341"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-1"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-73"
+ y="177.13062"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="177.13062"
+ x="930.82526"
+ id="tspan3920-1-7-65"
+ sodipodi:role="line">&lt;KPSU&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-63"
+ y="194.99573"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="194.99573"
+ x="930.82526"
+ id="tspan3920-1-7-94"
+ sodipodi:role="line">&lt;AD10&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="207.59738"
+ x="925.21442"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-094"
+ style="fill:#d3d3d3;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="209.7222"
+ x="928.55341"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-56"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-81"
+ y="223.49188"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="223.49188"
+ x="930.82526"
+ id="tspan3920-1-7-29"
+ sodipodi:role="line">&lt;KPAD&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-39"
+ y="242.30295"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="242.30295"
+ x="930.82526"
+ id="tspan3920-1-7-08"
+ sodipodi:role="line">&lt;AC10&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="254.08437"
+ x="925.21442"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-91"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="256.20917"
+ x="928.55341"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-77"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-850"
+ y="269.58493"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="269.58493"
+ x="930.82526"
+ id="tspan3920-1-7-96"
+ sodipodi:role="line">&lt;KPEN&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-38"
+ y="288.39597"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="288.39597"
+ x="930.82526"
+ id="tspan3920-1-7-56"
+ sodipodi:role="line">&lt;AB10&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="300.57135"
+ x="925.21442"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-19"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="302.69617"
+ x="928.55341"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-13"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-11"
+ y="326.06995"
+ x="930.82526"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="326.06995"
+ x="930.82526"
+ id="tspan3920-1-7-59"
+ sodipodi:role="line">&lt;AD12&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-84"
+ y="123.46996"
+ x="982.07812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="123.46996"
+ x="982.07812"
+ id="tspan3920-1-7-81"
+ sodipodi:role="line">&lt;KPEN&gt;</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-03"
+ y="143.80803"
+ x="982.07812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="143.80803"
+ x="982.07812"
+ id="tspan3920-1-7-044"
+ sodipodi:role="line">&lt;AE11&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="108.02888"
+ x="972.57013"
+ height="44.146919"
+ width="52.173634"
+ id="rect4025"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="110.70446"
+ x="976.5835"
+ height="38.795776"
+ width="43.478027"
+ id="rect4027"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-44"
+ y="180.20096"
+ x="982.07812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="180.20096"
+ x="982.07812"
+ id="tspan3920-1-7-763"
+ sodipodi:role="line">&lt;BKSL&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="154.85136"
+ x="972.57013"
+ height="44.146919"
+ width="52.173634"
+ id="rect4025-5"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="157.52695"
+ x="976.5835"
+ height="38.795776"
+ width="43.478027"
+ id="rect4027-7"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-17"
+ y="227.02342"
+ x="982.07812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="227.02342"
+ x="982.07812"
+ id="tspan3920-1-7-596"
+ sodipodi:role="line">&lt;AC11&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="201.67384"
+ x="972.57013"
+ height="44.146919"
+ width="52.173634"
+ id="rect4025-4"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="204.34941"
+ x="976.5835"
+ height="38.795776"
+ width="43.478027"
+ id="rect4027-1"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-8-21"
+ y="273.84595"
+ x="982.07812"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="273.84595"
+ x="982.07812"
+ id="tspan3920-1-7-78"
+ sodipodi:role="line">&lt;RTSH&gt;</tspan></text>
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="248.49634"
+ x="972.57013"
+ height="44.146919"
+ width="52.173634"
+ id="rect4025-8"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="251.17192"
+ x="976.5835"
+ height="38.795776"
+ width="43.478027"
+ id="rect4027-5"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ </g>
+ <g
+ style="display:inline"
+ id="g4593-8"
+ transform="matrix(0.93742177,-0.34819596,0.34819596,0.93742177,100.22386,357.68882)"
+ inkscape:transform-center-x="-88.434743"
+ inkscape:transform-center-y="48.691687">
+ <g
+ id="g4551-1">
+ <g
+ id="g4505-2"
+ transform="translate(0,-2.2858381e-5)">
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="124.68343"
+ x="501.25912"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-4-3-8"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="126.80824"
+ x="504.59811"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-3-8-93"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-4-6-6"
+ y="150.1227"
+ x="506.86993"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="150.1227"
+ x="506.86993"
+ id="tspan3920-1-9-0-8"
+ sodipodi:role="line">&lt;RALT&gt;</tspan></text>
+ </g>
+ </g>
+ <g
+ id="g4558-0">
+ <g
+ id="g4499-2"
+ transform="translate(0,-1.5228987e-5)">
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="170.72099"
+ x="501.25912"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-6-8-1"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="172.84581"
+ x="504.59811"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-9-8-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-3-9-5"
+ y="196.15585"
+ x="506.86993"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="196.15585"
+ x="506.86993"
+ id="tspan3920-1-1-7-1"
+ sodipodi:role="line">&lt;PGUP&gt;</tspan></text>
+ </g>
+ </g>
+ <g
+ id="g4565-1">
+ <g
+ id="g4493-0"
+ transform="translate(0,-7.5995922e-6)">
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="216.75856"
+ x="501.25912"
+ height="44.317482"
+ width="43.710392"
+ id="rect6202-48-6-8"
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="218.88338"
+ x="504.59811"
+ height="40.06786"
+ width="37.032413"
+ id="rect6202-0-5-4-5"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-38-3-0"
+ y="242.19342"
+ x="506.86993"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="242.19342"
+ x="506.86993"
+ id="tspan3920-1-79-0-6"
+ sodipodi:role="line">&lt;PGDN&gt;</tspan></text>
+ </g>
+ </g>
+ <g
+ id="g4572-4">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6202-4-3-0-6"
+ width="43.710392"
+ height="44.317482"
+ x="547.61102"
+ y="124.99924"
+ rx="2.7433832"
+ ry="2.7433832" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-3-8-9-2"
+ width="37.032413"
+ height="40.06786"
+ x="550.95001"
+ y="127.12405"
+ rx="2.7433832"
+ ry="2.7433832" />
+ <text
+ xml:space="preserve"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ x="553.22186"
+ y="150.4341"
+ id="text3918-2-4-6-2-5"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3920-1-9-0-5-8"
+ x="553.22186"
+ y="150.4341">&lt;RCTL&gt;</tspan></text>
+ </g>
+ <g
+ id="g4578-6">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6202-4-3-0-0-2"
+ width="43.710392"
+ height="89.884888"
+ x="547.66498"
+ y="171.1897"
+ rx="2.7433832"
+ ry="2.7433829" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-3-8-9-5-8"
+ width="37.032413"
+ height="81.265785"
+ x="551.00397"
+ y="175.49922"
+ rx="2.7433832"
+ ry="2.7433829" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-4-6-2-2-4"
+ y="219.96637"
+ x="553.27582"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="219.96637"
+ x="553.27582"
+ id="tspan3920-1-9-0-5-4-7"
+ sodipodi:role="line">&lt;RTRN&gt;</tspan></text>
+ </g>
+ <g
+ id="g4584-2">
+ <g
+ id="g4543-4"
+ transform="translate(-0.99996783,0)">
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="171.3858"
+ x="595.01697"
+ height="90.161743"
+ width="43.710392"
+ id="rect6202-4-3-0-0-9-0"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <rect
+ ry="2.7433832"
+ rx="2.7433832"
+ y="175.70863"
+ x="598.35596"
+ height="81.516098"
+ width="37.032413"
+ id="rect6202-0-3-8-9-5-2-6"
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <text
+ xml:space="preserve"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ x="603.33484"
+ y="196.15585"
+ id="text3918-2-4-6-2-7-2"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3920-1-9-0-5-7-9"
+ x="603.33484"
+ y="196.15585">&lt;KP0&gt;</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ x="600.62781"
+ y="242.19342"
+ id="text3918-2-4-6-2-7-5-9"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3920-1-9-0-5-7-4-0"
+ x="600.62781"
+ y="242.19342">&lt;SPCE&gt;</tspan></text>
+ </g>
+ </g>
+ </g>
+ <g
+ id="g5401">
+ <g
+ transform="matrix(0.94202452,0.33554403,-0.33554403,0.94202452,11.325611,-183.06124)"
+ id="g4967">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6202-4-3-1"
+ width="43.710392"
+ height="44.317482"
+ x="-584.29395"
+ y="301.99927"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-3-8-0"
+ width="37.032413"
+ height="40.06786"
+ x="-580.95496"
+ y="304.12408"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <text
+ xml:space="preserve"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ x="546.1944"
+ y="327.43854"
+ id="text3918-2-4-6-3"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3920-1-9-0-4"
+ x="546.1944"
+ y="327.43854">&lt;LALT&gt;</tspan></text>
+ </g>
+ <g
+ transform="matrix(0.94202452,0.33554403,-0.33554403,0.94202452,11.325611,-183.06124)"
+ id="g4973">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6202-6-8-19"
+ width="43.710392"
+ height="44.317482"
+ x="-584.29401"
+ y="348.0368"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-9-8-6"
+ width="37.032413"
+ height="40.06786"
+ x="-580.95502"
+ y="350.16162"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <text
+ xml:space="preserve"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ x="546.19446"
+ y="373.47168"
+ id="text3918-2-3-9-9"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3920-1-1-7-3"
+ x="546.19446"
+ y="373.47168">&lt;HOME&gt;</tspan></text>
+ </g>
+ <g
+ transform="matrix(0.94202452,0.33554403,-0.33554403,0.94202452,11.325611,-183.06124)"
+ id="g4979">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6202-48-6-0"
+ width="43.710392"
+ height="44.317482"
+ x="-584.29401"
+ y="394.0744"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-5-4-56"
+ width="37.032413"
+ height="40.06786"
+ x="-580.95502"
+ y="396.19922"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <text
+ xml:space="preserve"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ x="548.90149"
+ y="419.50925"
+ id="text3918-2-38-3-6"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3920-1-79-0-4"
+ x="548.90149"
+ y="419.50925">&lt;END&gt;</tspan></text>
+ </g>
+ <g
+ transform="matrix(0.94202452,0.33554403,-0.33554403,0.94202452,11.325611,-183.06124)"
+ id="g4985">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6202-4-3-0-04"
+ width="43.710392"
+ height="44.317482"
+ x="-537.94214"
+ y="302.31509"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-3-8-9-6"
+ width="37.032413"
+ height="40.06786"
+ x="-534.60315"
+ y="304.43988"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <text
+ xml:space="preserve"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ x="499.84253"
+ y="327.74994"
+ id="text3918-2-4-6-2-26"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3920-1-9-0-5-75"
+ x="499.84253"
+ y="327.74994">&lt;LCTL&gt;</tspan></text>
+ </g>
+ <g
+ transform="matrix(0.94202452,0.33554403,-0.33554403,0.94202452,11.325611,-183.06124)"
+ id="g4991">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect6202-4-3-0-0-8"
+ width="43.710392"
+ height="89.884888"
+ x="-537.88818"
+ y="348.50555"
+ rx="2.7433832"
+ ry="2.7433829"
+ transform="scale(-1,1)" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-3-8-9-5-7"
+ width="37.032413"
+ height="81.265785"
+ x="-534.54919"
+ y="352.81506"
+ rx="2.7433832"
+ ry="2.7433829"
+ transform="scale(-1,1)" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-4-6-2-2-2"
+ y="397.28223"
+ x="499.78857"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="397.28223"
+ x="499.78857"
+ id="tspan3920-1-9-0-5-4-8"
+ sodipodi:role="line">&lt;DELE&gt;</tspan></text>
+ </g>
+ <g
+ transform="matrix(0.94202452,0.33554403,-0.33554403,0.94202452,11.325611,-183.06124)"
+ id="g4997">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-4-3-0-0-9-6"
+ width="43.710392"
+ height="90.161743"
+ x="-491.53616"
+ y="348.70166"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.99999988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect6202-0-3-8-9-5-2-0"
+ width="37.032413"
+ height="81.516098"
+ x="-488.19717"
+ y="353.02448"
+ rx="2.7433832"
+ ry="2.7433832"
+ transform="scale(-1,1)" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3918-2-4-6-2-7-5-1"
+ y="397.27783"
+ x="453.43655"
+ style="font-size:9px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:DejaVu Sans Mono;-inkscape-font-specification:DejaVu Sans Mono Bold"
+ xml:space="preserve"><tspan
+ y="397.27783"
+ x="453.43655"
+ id="tspan3920-1-9-0-5-7-4-3"
+ sodipodi:role="line">&lt;BKSP&gt;</tspan></text>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-2.svg b/specs/XKBproto-2.svg
new file mode 100644
index 0000000..495be15
--- /dev/null
+++ b/specs/XKBproto-2.svg
@@ -0,0 +1,544 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="200"
+ height="30"
+ viewBox="0 0 160 24"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-2.svg">
+ <metadata
+ id="metadata182">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview180"
+ showgrid="false"
+ inkscape:zoom="2.3825"
+ inkscape:cx="100"
+ inkscape:cy="15"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.953125,-3.78125 c -0.171875,0 -0.296875,0 -0.4375,0.125 -0.171875,0.15625 -0.1875,0.328125 -0.1875,0.390625 0,0.25 0.1875,0.359375 0.375,0.359375 0.28125,0 0.546875,-0.25 0.546875,-0.640625 0,-0.484375 -0.46875,-0.859375 -1.171875,-0.859375 -1.34375,0 -2.671875,1.421875 -2.671875,2.828125 0,0.90625 0.578125,1.6875 1.625,1.6875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.625,0 -0.90625,-0.484375 -0.90625,-1.09375 0,-0.40625 0.203125,-1.375 0.546875,-1.984375 0.3125,-0.578125 0.859375,-1 1.40625,-1 0.328125,0 0.71875,0.125 0.859375,0.40625 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.484375,-0.5625 C 3.59375,-0.15625 3.953125,0.109375 4.375,0.109375 4.71875,0.109375 4.953125,-0.125 5.109375,-0.4375 5.28125,-0.796875 5.40625,-1.40625 5.40625,-1.421875 c 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.109375,0 -0.109375,0.046875 -0.140625,0.1875 -0.140625,0.5625 -0.328125,1.234375 -0.75,1.234375 -0.203125,0 -0.3125,-0.125 -0.3125,-0.453125 0,-0.21875 0.125,-0.6875 0.203125,-1.046875 L 4.578125,-2.6875 C 4.609375,-2.828125 4.703125,-3.203125 4.75,-3.359375 4.796875,-3.59375 4.890625,-3.96875 4.890625,-4.03125 c 0,-0.171875 -0.140625,-0.265625 -0.28125,-0.265625 -0.046875,0 -0.3125,0.015625 -0.390625,0.34375 -0.1875,0.734375 -0.625,2.484375 -0.75,3 -0.015625,0.046875 -0.40625,0.84375 -1.140625,0.84375 -0.515625,0 -0.609375,-0.453125 -0.609375,-0.8125 0,-0.5625 0.28125,-1.34375 0.53125,-2.03125 0.125,-0.3125 0.171875,-0.453125 0.171875,-0.640625 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.953125,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.25,-0.859375 0.640625,-1.234375 1.015625,-1.234375 0.09375,0 0.25,0.015625 0.25,0.328125 0,0.234375 -0.109375,0.53125 -0.171875,0.671875 -0.375,1 -0.578125,1.609375 -0.578125,2.09375 0,0.953125 0.6875,1.203125 1.21875,1.203125 0.65625,0 1.015625,-0.453125 1.1875,-0.671875 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 C 1.46875,-0.203125 1.796875,-1.5625 1.84375,-1.75 c 0.078125,-0.328125 0.265625,-1.015625 0.3125,-1.296875 0.046875,-0.125 0.328125,-0.59375 0.5625,-0.8125 0.078125,-0.0625 0.375,-0.328125 0.796875,-0.328125 0.265625,0 0.40625,0.125 0.421875,0.125 -0.296875,0.046875 -0.515625,0.28125 -0.515625,0.546875 0,0.15625 0.109375,0.34375 0.375,0.34375 0.265625,0 0.546875,-0.234375 0.546875,-0.59375 0,-0.34375 -0.3125,-0.640625 -0.828125,-0.640625 C 2.875,-4.40625 2.4375,-3.921875 2.25,-3.640625 2.15625,-4.09375 1.796875,-4.40625 1.328125,-4.40625 0.875,-4.40625 0.6875,-4.015625 0.59375,-3.84375 0.421875,-3.5 0.296875,-2.90625 0.296875,-2.875 c 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.15625,0 0.296875,0.078125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.671875,-3.703125 c 0,-0.546875 -0.265625,-0.703125 -0.4375,-0.703125 -0.25,0 -0.5,0.265625 -0.5,0.484375 0,0.125 0.046875,0.1875 0.15625,0.296875 0.21875,0.203125 0.34375,0.453125 0.34375,0.8125 0,0.421875 -0.609375,2.703125 -1.765625,2.703125 -0.515625,0 -0.75,-0.34375 -0.75,-0.875 0,-0.546875 0.28125,-1.28125 0.578125,-2.109375 0.078125,-0.171875 0.125,-0.3125 0.125,-0.5 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.9375,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.296875,-1 0.71875,-1.234375 1.015625,-1.234375 0.078125,0 0.25,0 0.25,0.3125 0,0.25 -0.109375,0.53125 -0.171875,0.703125 -0.4375,1.15625 -0.5625,1.609375 -0.5625,2.046875 0,1.078125 0.875,1.234375 1.328125,1.234375 1.671875,0 2.25,-3.296875 2.25,-3.8125 z m 0,0"
+ id="path18"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.859375,-2.296875 c 0.296875,0 1.03125,-0.03125 1.53125,-0.234375 0.703125,-0.296875 0.75,-0.890625 0.75,-1.03125 0,-0.4375 -0.375,-0.84375 -1.0625,-0.84375 -1.109375,0 -2.625,0.96875 -2.625,2.71875 0,1.015625 0.59375,1.796875 1.578125,1.796875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.78125,0 -0.875,-0.84375 -0.875,-1.15625 0,-0.125 0.015625,-0.421875 0.15625,-1.03125 z m -0.46875,-0.21875 C 1.78125,-4.03125 2.8125,-4.1875 3.078125,-4.1875 c 0.453125,0 0.734375,0.296875 0.734375,0.625 0,1.046875 -1.59375,1.046875 -2.015625,1.046875 z m 0,0"
+ id="path21"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.015625,-3.234375 0.96875,0 c 0.75,0 0.828125,0.15625 0.828125,0.4375 0,0.078125 0,0.1875 -0.0625,0.5 C 4.71875,-2.25 4.71875,-2.21875 4.71875,-2.1875 c 0,0.078125 0.0625,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.203125 L 5.53125,-4.453125 C 5.5625,-4.5625 5.5625,-4.578125 5.5625,-4.609375 5.5625,-4.625 5.546875,-4.71875 5.4375,-4.71875 5.34375,-4.71875 5.328125,-4.671875 5.296875,-4.5 5.078125,-3.734375 4.859375,-3.546875 4,-3.546875 l -0.90625,0 0.640625,-2.53125 C 3.828125,-6.4375 3.84375,-6.46875 4.28125,-6.46875 l 1.3125,0 c 1.21875,0 1.453125,0.328125 1.453125,1.09375 0,0.234375 0,0.265625 -0.03125,0.546875 C 7,-4.703125 7,-4.6875 7,-4.65625 c 0,0.046875 0.03125,0.125 0.125,0.125 0.109375,0 0.109375,-0.0625 0.125,-0.25 L 7.453125,-6.515625 C 7.484375,-6.78125 7.4375,-6.78125 7.1875,-6.78125 l -4.890625,0 c -0.1875,0 -0.296875,0 -0.296875,0.203125 0,0.109375 0.09375,0.109375 0.28125,0.109375 0.375,0 0.65625,0 0.65625,0.171875 0,0.046875 0,0.0625 -0.0625,0.25 L 1.5625,-0.78125 c -0.09375,0.390625 -0.109375,0.46875 -0.90625,0.46875 -0.171875,0 -0.28125,0 -0.28125,0.1875 C 0.375,0 0.5,0 0.53125,0 0.8125,0 1.5625,-0.03125 1.84375,-0.03125 2.171875,-0.03125 3,0 3.328125,0 3.421875,0 3.53125,0 3.53125,-0.1875 3.53125,-0.265625 3.484375,-0.296875 3.484375,-0.296875 3.453125,-0.3125 3.421875,-0.3125 3.203125,-0.3125 c -0.21875,0 -0.265625,0 -0.515625,-0.015625 -0.296875,-0.03125 -0.328125,-0.078125 -0.328125,-0.203125 0,-0.015625 0,-0.078125 0.046875,-0.21875 z m 0,0"
+ id="path24"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.71875,-3.765625 C 3.53125,-4.140625 3.25,-4.40625 2.796875,-4.40625 c -1.15625,0 -2.390625,1.46875 -2.390625,2.921875 0,0.9375 0.546875,1.59375 1.3125,1.59375 0.203125,0 0.703125,-0.046875 1.296875,-0.75 0.078125,0.421875 0.4375,0.75 0.90625,0.75 0.359375,0 0.578125,-0.234375 0.75,-0.546875 0.15625,-0.359375 0.296875,-0.96875 0.296875,-0.984375 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.1875 -0.171875,0.640625 -0.34375,1.234375 -0.75,1.234375 -0.28125,0 -0.296875,-0.265625 -0.296875,-0.453125 0,-0.21875 0.015625,-0.3125 0.125,-0.75 C 3.890625,-1.71875 3.90625,-1.828125 4,-2.203125 L 4.359375,-3.59375 c 0.0625,-0.28125 0.0625,-0.296875 0.0625,-0.34375 0,-0.171875 -0.109375,-0.265625 -0.28125,-0.265625 -0.25,0 -0.390625,0.21875 -0.421875,0.4375 z M 3.078125,-1.1875 C 3.015625,-1 3.015625,-0.984375 2.875,-0.8125 2.4375,-0.265625 2.03125,-0.109375 1.75,-0.109375 c -0.5,0 -0.640625,-0.546875 -0.640625,-0.9375 0,-0.5 0.3125,-1.71875 0.546875,-2.1875 0.3125,-0.578125 0.75,-0.953125 1.15625,-0.953125 0.640625,0 0.78125,0.8125 0.78125,0.875 0,0.0625 -0.015625,0.125 -0.03125,0.171875 z m 0,0"
+ id="path27"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-7"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.046875,-3.984375 0.9375,0 c 0.203125,0 0.3125,0 0.3125,-0.203125 0,-0.109375 -0.109375,-0.109375 -0.28125,-0.109375 l -0.875,0 C 2.5,-5.71875 2.546875,-5.90625 2.546875,-5.96875 c 0,-0.171875 -0.125,-0.265625 -0.296875,-0.265625 -0.03125,0 -0.3125,0 -0.390625,0.359375 l -0.390625,1.578125 -0.9375,0 c -0.203125,0 -0.296875,0 -0.296875,0.1875 0,0.125 0.078125,0.125 0.28125,0.125 l 0.875,0 C 0.671875,-1.15625 0.625,-0.984375 0.625,-0.8125 0.625,-0.265625 1,0.109375 1.546875,0.109375 2.5625,0.109375 3.125,-1.34375 3.125,-1.421875 3.125,-1.53125 3.046875,-1.53125 3.015625,-1.53125 2.921875,-1.53125 2.90625,-1.5 2.859375,-1.390625 2.4375,-0.34375 1.90625,-0.109375 1.5625,-0.109375 c -0.203125,0 -0.3125,-0.125 -0.3125,-0.453125 0,-0.25 0.03125,-0.3125 0.0625,-0.484375 z m 0,0"
+ id="path30"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-8"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.671875,-2.71875 c 0,-1.046875 -0.6875,-1.6875 -1.59375,-1.6875 -1.328125,0 -2.671875,1.421875 -2.671875,2.828125 0,0.984375 0.671875,1.6875 1.59375,1.6875 1.328125,0 2.671875,-1.375 2.671875,-2.828125 z m -2.65625,2.609375 c -0.4375,0 -0.875,-0.3125 -0.875,-1.09375 0,-0.484375 0.265625,-1.5625 0.578125,-2.0625 0.5,-0.765625 1.078125,-0.921875 1.359375,-0.921875 0.578125,0 0.875,0.484375 0.875,1.078125 0,0.390625 -0.203125,1.4375 -0.578125,2.078125 -0.359375,0.578125 -0.90625,0.921875 -1.359375,0.921875 z m 0,0"
+ id="path33"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.296875,2.390625 c 0,-0.03125 0,-0.046875 -0.171875,-0.21875 C 1.890625,0.921875 1.5625,-0.96875 1.5625,-2.5 c 0,-1.734375 0.375,-3.46875 1.609375,-4.703125 0.125,-0.125 0.125,-0.140625 0.125,-0.171875 0,-0.078125 -0.03125,-0.109375 -0.09375,-0.109375 -0.109375,0 -1,0.6875 -1.59375,1.953125 -0.5,1.09375 -0.625,2.203125 -0.625,3.03125 0,0.78125 0.109375,1.984375 0.65625,3.125 C 2.25,1.84375 3.09375,2.5 3.203125,2.5 c 0.0625,0 0.09375,-0.03125 0.09375,-0.109375 z m 0,0"
+ id="path36"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.875,-2.5 c 0,-0.765625 -0.109375,-1.96875 -0.65625,-3.109375 -0.59375,-1.21875 -1.453125,-1.875 -1.546875,-1.875 -0.0625,0 -0.109375,0.046875 -0.109375,0.109375 0,0.03125 0,0.046875 0.1875,0.234375 0.984375,0.984375 1.546875,2.5625 1.546875,4.640625 0,1.71875 -0.359375,3.46875 -1.59375,4.71875 C 0.5625,2.34375 0.5625,2.359375 0.5625,2.390625 0.5625,2.453125 0.609375,2.5 0.671875,2.5 0.765625,2.5 1.671875,1.8125 2.25,0.546875 2.765625,-0.546875 2.875,-1.65625 2.875,-2.5 z m 0,0"
+ id="path39"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 6.84375,-3.265625 c 0.15625,0 0.34375,0 0.34375,-0.1875 C 7.1875,-3.65625 7,-3.65625 6.859375,-3.65625 l -5.96875,0 c -0.140625,0 -0.328125,0 -0.328125,0.203125 0,0.1875 0.1875,0.1875 0.328125,0.1875 z m 0.015625,1.9375 c 0.140625,0 0.328125,0 0.328125,-0.203125 0,-0.1875 -0.1875,-0.1875 -0.34375,-0.1875 l -5.953125,0 c -0.140625,0 -0.328125,0 -0.328125,0.1875 0,0.203125 0.1875,0.203125 0.328125,0.203125 z m 0,0"
+ id="path42"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path45"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.078125,-2.296875 2.78125,0 C 7,-2.296875 7.1875,-2.296875 7.1875,-2.5 7.1875,-2.6875 7,-2.6875 6.859375,-2.6875 l -2.78125,0 0,-2.796875 c 0,-0.140625 0,-0.328125 -0.203125,-0.328125 -0.203125,0 -0.203125,0.1875 -0.203125,0.328125 l 0,2.796875 -2.78125,0 c -0.140625,0 -0.328125,0 -0.328125,0.1875 0,0.203125 0.1875,0.203125 0.328125,0.203125 l 2.78125,0 0,2.796875 c 0,0.140625 0,0.328125 0.203125,0.328125 0.203125,0 0.203125,-0.1875 0.203125,-0.328125 z m 0,0"
+ id="path48"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.578125,-3.1875 c 0,-0.796875 -0.046875,-1.59375 -0.390625,-2.328125 -0.453125,-0.96875 -1.28125,-1.125 -1.6875,-1.125 -0.609375,0 -1.328125,0.265625 -1.75,1.1875 -0.3125,0.6875 -0.359375,1.46875 -0.359375,2.265625 0,0.75 0.03125,1.640625 0.453125,2.40625 0.421875,0.796875 1.15625,1 1.640625,1 0.53125,0 1.296875,-0.203125 1.734375,-1.15625 0.3125,-0.6875 0.359375,-1.46875 0.359375,-2.25 z M 2.484375,0 C 2.09375,0 1.5,-0.25 1.328125,-1.203125 1.21875,-1.796875 1.21875,-2.71875 1.21875,-3.3125 c 0,-0.640625 0,-1.296875 0.078125,-1.828125 0.1875,-1.1875 0.9375,-1.28125 1.1875,-1.28125 0.328125,0 0.984375,0.1875 1.171875,1.171875 0.109375,0.5625 0.109375,1.3125 0.109375,1.9375 0,0.75 0,1.421875 -0.109375,2.0625 C 3.5,-0.296875 2.9375,0 2.484375,0 z m 0,0"
+ id="path51"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ transform="translate(-225.2968,-132.76614)"
+ id="g3222">
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g54">
+ <use
+ xlink:href="#glyph0-0"
+ x="233.16"
+ y="146.86"
+ id="use56"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g58">
+ <use
+ xlink:href="#glyph0-1"
+ x="237.48"
+ y="146.86"
+ id="use60"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g62">
+ <use
+ xlink:href="#glyph0-2"
+ x="243.24001"
+ y="146.86"
+ id="use64"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g66">
+ <use
+ xlink:href="#glyph0-3"
+ x="247.92017"
+ y="146.86"
+ id="use68"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g70">
+ <use
+ xlink:href="#glyph0-4"
+ x="253.08032"
+ y="146.86"
+ id="use72"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g74">
+ <use
+ xlink:href="#glyph0-5"
+ x="257.76035"
+ y="146.86"
+ id="use76"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g78">
+ <use
+ xlink:href="#glyph0-6"
+ x="265.56039"
+ y="146.86"
+ id="use80"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g82">
+ <use
+ xlink:href="#glyph0-0"
+ x="270.84039"
+ y="146.86"
+ id="use84"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g86">
+ <use
+ xlink:href="#glyph0-7"
+ x="275.1604"
+ y="146.86"
+ id="use88"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g90">
+ <use
+ xlink:href="#glyph0-8"
+ x="278.76041"
+ y="146.86"
+ id="use92"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g94">
+ <use
+ xlink:href="#glyph0-2"
+ x="283.56039"
+ y="146.86"
+ id="use96"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g98">
+ <use
+ xlink:href="#glyph1-0"
+ x="288.24051"
+ y="146.86"
+ id="use100"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g102">
+ <use
+ xlink:href="#glyph0-0"
+ x="292.08035"
+ y="146.86"
+ id="use104"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g106">
+ <use
+ xlink:href="#glyph0-1"
+ x="296.40033"
+ y="146.86"
+ id="use108"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g110">
+ <use
+ xlink:href="#glyph0-2"
+ x="302.16034"
+ y="146.86"
+ id="use112"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g114">
+ <use
+ xlink:href="#glyph0-3"
+ x="306.84052"
+ y="146.86"
+ id="use116"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g118">
+ <use
+ xlink:href="#glyph0-4"
+ x="312.00067"
+ y="146.86"
+ id="use120"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g122">
+ <use
+ xlink:href="#glyph1-1"
+ x="316.68073"
+ y="146.86"
+ id="use124"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g126">
+ <use
+ xlink:href="#glyph1-2"
+ x="323.40067"
+ y="146.86"
+ id="use128"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g130">
+ <use
+ xlink:href="#glyph1-3"
+ x="333.96082"
+ y="146.86"
+ id="use132"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g134">
+ <use
+ xlink:href="#glyph1-4"
+ x="341.16083"
+ y="146.86"
+ id="use136"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g138">
+ <use
+ xlink:href="#glyph0-0"
+ x="352.31985"
+ y="140.01978"
+ id="use140"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g142">
+ <use
+ xlink:href="#glyph0-1"
+ x="356.63983"
+ y="140.01978"
+ id="use144"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g146">
+ <use
+ xlink:href="#glyph0-2"
+ x="362.39984"
+ y="140.01978"
+ id="use148"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g150">
+ <use
+ xlink:href="#glyph0-3"
+ x="367.08002"
+ y="140.01978"
+ id="use152"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g154">
+ <use
+ xlink:href="#glyph0-4"
+ x="372.24014"
+ y="140.01978"
+ id="use156"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 352.30859,144.11328 24.71875,0 0,0.48047 -24.71875,0 z m 0,0"
+ id="path158"
+ inkscape:connector-curvature="0" />
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g160">
+ <use
+ xlink:href="#glyph1-3"
+ x="354.60001"
+ y="153.7"
+ id="use162"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g164">
+ <use
+ xlink:href="#glyph1-5"
+ x="359.63998"
+ y="153.7"
+ id="use166"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g168">
+ <use
+ xlink:href="#glyph1-5"
+ x="364.67999"
+ y="153.7"
+ id="use170"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g172">
+ <use
+ xlink:href="#glyph1-5"
+ x="369.71997"
+ y="153.7"
+ id="use174"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-3.svg b/specs/XKBproto-3.svg
new file mode 100644
index 0000000..30744c5
--- /dev/null
+++ b/specs/XKBproto-3.svg
@@ -0,0 +1,461 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="160"
+ height="25"
+ viewBox="0 0 128 20"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-3.svg">
+ <metadata
+ id="metadata152">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview150"
+ showgrid="false"
+ inkscape:zoom="4.2117048"
+ inkscape:cx="80"
+ inkscape:cy="12.5"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.296875,2.390625 c 0,-0.03125 0,-0.046875 -0.171875,-0.21875 C 1.890625,0.921875 1.5625,-0.96875 1.5625,-2.5 c 0,-1.734375 0.375,-3.46875 1.609375,-4.703125 0.125,-0.125 0.125,-0.140625 0.125,-0.171875 0,-0.078125 -0.03125,-0.109375 -0.09375,-0.109375 -0.109375,0 -1,0.6875 -1.59375,1.953125 -0.5,1.09375 -0.625,2.203125 -0.625,3.03125 0,0.78125 0.109375,1.984375 0.65625,3.125 C 2.25,1.84375 3.09375,2.5 3.203125,2.5 c 0.0625,0 0.09375,-0.03125 0.09375,-0.109375 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.875,-2.5 c 0,-0.765625 -0.109375,-1.96875 -0.65625,-3.109375 -0.59375,-1.21875 -1.453125,-1.875 -1.546875,-1.875 -0.0625,0 -0.109375,0.046875 -0.109375,0.109375 0,0.03125 0,0.046875 0.1875,0.234375 0.984375,0.984375 1.546875,2.5625 1.546875,4.640625 0,1.71875 -0.359375,3.46875 -1.59375,4.71875 C 0.5625,2.34375 0.5625,2.359375 0.5625,2.390625 0.5625,2.453125 0.609375,2.5 0.671875,2.5 0.765625,2.5 1.671875,1.8125 2.25,0.546875 2.765625,-0.546875 2.875,-1.65625 2.875,-2.5 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.25 -0.0625,0.53125 -0.140625,0.828125 L 3.890625,-1.5 3.6875,-0.75 c -0.03125,0.203125 -0.125,0.546875 -0.125,0.59375 0,0.171875 0.140625,0.265625 0.28125,0.265625 0.3125,0 0.375,-0.25 0.453125,-0.5625 0.140625,-0.5625 0.515625,-2.015625 0.59375,-2.40625 0.03125,-0.125 0.5625,-1.328125 1.65625,-1.328125 0.421875,0 0.53125,0.34375 0.53125,0.703125 0,0.5625 -0.421875,1.703125 -0.625,2.234375 -0.078125,0.234375 -0.125,0.34375 -0.125,0.546875 0,0.46875 0.34375,0.8125 0.8125,0.8125 0.9375,0 1.3125,-1.453125 1.3125,-1.53125 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.09375,0.03125 -0.140625,0.1875 -0.15625,0.53125 -0.46875,1.234375 -1.015625,1.234375 -0.171875,0 -0.25,-0.09375 -0.25,-0.328125 0,-0.25 0.09375,-0.484375 0.1875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.640625 -0.40625,-1.0625 -1.15625,-1.0625 -0.734375,0 -1.25,0.4375 -1.625,0.96875 0,-0.125 -0.03125,-0.46875 -0.3125,-0.703125 -0.25,-0.21875 -0.5625,-0.265625 -0.8125,-0.265625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.578125 -0.46875,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 -0.171875,0.359375 -0.296875,0.9375 -0.296875,0.96875 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.15625,0 0.296875,0.078125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path18"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.71875,-3.765625 C 3.53125,-4.140625 3.25,-4.40625 2.796875,-4.40625 c -1.15625,0 -2.390625,1.46875 -2.390625,2.921875 0,0.9375 0.546875,1.59375 1.3125,1.59375 0.203125,0 0.703125,-0.046875 1.296875,-0.75 0.078125,0.421875 0.4375,0.75 0.90625,0.75 0.359375,0 0.578125,-0.234375 0.75,-0.546875 0.15625,-0.359375 0.296875,-0.96875 0.296875,-0.984375 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.1875 -0.171875,0.640625 -0.34375,1.234375 -0.75,1.234375 -0.28125,0 -0.296875,-0.265625 -0.296875,-0.453125 0,-0.21875 0.015625,-0.3125 0.125,-0.75 C 3.890625,-1.71875 3.90625,-1.828125 4,-2.203125 L 4.359375,-3.59375 c 0.0625,-0.28125 0.0625,-0.296875 0.0625,-0.34375 0,-0.171875 -0.109375,-0.265625 -0.28125,-0.265625 -0.25,0 -0.390625,0.21875 -0.421875,0.4375 z M 3.078125,-1.1875 C 3.015625,-1 3.015625,-0.984375 2.875,-0.8125 2.4375,-0.265625 2.03125,-0.109375 1.75,-0.109375 c -0.5,0 -0.640625,-0.546875 -0.640625,-0.9375 0,-0.5 0.3125,-1.71875 0.546875,-2.1875 0.3125,-0.578125 0.75,-0.953125 1.15625,-0.953125 0.640625,0 0.78125,0.8125 0.78125,0.875 0,0.0625 -0.015625,0.125 -0.03125,0.171875 z m 0,0"
+ id="path21"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.328125,-3.015625 C 3.390625,-3.265625 3.625,-4.1875 4.3125,-4.1875 c 0.046875,0 0.296875,0 0.5,0.125 C 4.53125,-4 4.34375,-3.765625 4.34375,-3.515625 c 0,0.15625 0.109375,0.34375 0.375,0.34375 0.21875,0 0.53125,-0.171875 0.53125,-0.578125 0,-0.515625 -0.578125,-0.65625 -0.921875,-0.65625 -0.578125,0 -0.921875,0.53125 -1.046875,0.75 -0.25,-0.65625 -0.78125,-0.75 -1.078125,-0.75 -1.03125,0 -1.609375,1.28125 -1.609375,1.53125 0,0.109375 0.109375,0.109375 0.125,0.109375 0.078125,0 0.109375,-0.03125 0.125,-0.109375 0.34375,-1.0625 1,-1.3125 1.34375,-1.3125 0.1875,0 0.53125,0.09375 0.53125,0.671875 0,0.3125 -0.171875,0.96875 -0.53125,2.375 -0.15625,0.609375 -0.515625,1.03125 -0.953125,1.03125 -0.0625,0 -0.28125,0 -0.5,-0.125 0.25,-0.0625 0.46875,-0.265625 0.46875,-0.546875 0,-0.265625 -0.21875,-0.34375 -0.359375,-0.34375 -0.3125,0 -0.546875,0.25 -0.546875,0.578125 0,0.453125 0.484375,0.65625 0.921875,0.65625 0.671875,0 1.03125,-0.703125 1.046875,-0.75 0.125,0.359375 0.484375,0.75 1.078125,0.75 1.03125,0 1.59375,-1.28125 1.59375,-1.53125 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.109375 -0.328125,1.078125 -1,1.3125 -1.3125,1.3125 -0.390625,0 -0.546875,-0.3125 -0.546875,-0.65625 0,-0.21875 0.046875,-0.4375 0.15625,-0.875 z m 0,0"
+ id="path24"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.953125,-3.78125 c -0.171875,0 -0.296875,0 -0.4375,0.125 -0.171875,0.15625 -0.1875,0.328125 -0.1875,0.390625 0,0.25 0.1875,0.359375 0.375,0.359375 0.28125,0 0.546875,-0.25 0.546875,-0.640625 0,-0.484375 -0.46875,-0.859375 -1.171875,-0.859375 -1.34375,0 -2.671875,1.421875 -2.671875,2.828125 0,0.90625 0.578125,1.6875 1.625,1.6875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.625,0 -0.90625,-0.484375 -0.90625,-1.09375 0,-0.40625 0.203125,-1.375 0.546875,-1.984375 0.3125,-0.578125 0.859375,-1 1.40625,-1 0.328125,0 0.71875,0.125 0.859375,0.40625 z m 0,0"
+ id="path27"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.859375,-2.296875 c 0.296875,0 1.03125,-0.03125 1.53125,-0.234375 0.703125,-0.296875 0.75,-0.890625 0.75,-1.03125 0,-0.4375 -0.375,-0.84375 -1.0625,-0.84375 -1.109375,0 -2.625,0.96875 -2.625,2.71875 0,1.015625 0.59375,1.796875 1.578125,1.796875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.78125,0 -0.875,-0.84375 -0.875,-1.15625 0,-0.125 0.015625,-0.421875 0.15625,-1.03125 z m -0.46875,-0.21875 C 1.78125,-4.03125 2.8125,-4.1875 3.078125,-4.1875 c 0.453125,0 0.734375,0.296875 0.734375,0.625 0,1.046875 -1.59375,1.046875 -2.015625,1.046875 z m 0,0"
+ id="path30"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.578125,-6.8125 c 0,0 0,-0.109375 -0.140625,-0.109375 -0.21875,0 -0.953125,0.078125 -1.21875,0.109375 -0.078125,0 -0.1875,0.015625 -0.1875,0.203125 0,0.109375 0.109375,0.109375 0.25,0.109375 0.484375,0 0.5,0.09375 0.5,0.171875 L 1.75,-6.125 0.484375,-1.140625 C 0.453125,-1.03125 0.4375,-0.96875 0.4375,-0.8125 c 0,0.578125 0.4375,0.921875 0.90625,0.921875 0.328125,0 0.578125,-0.203125 0.75,-0.5625 0.171875,-0.375 0.296875,-0.953125 0.296875,-0.96875 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.125,0.1875 C 1.96875,-0.703125 1.78125,-0.109375 1.375,-0.109375 c -0.296875,0 -0.296875,-0.3125 -0.296875,-0.453125 0,-0.25 0.015625,-0.296875 0.0625,-0.484375 z m 0,0"
+ id="path33"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.046875,-3.984375 0.9375,0 c 0.203125,0 0.3125,0 0.3125,-0.203125 0,-0.109375 -0.109375,-0.109375 -0.28125,-0.109375 l -0.875,0 C 2.5,-5.71875 2.546875,-5.90625 2.546875,-5.96875 c 0,-0.171875 -0.125,-0.265625 -0.296875,-0.265625 -0.03125,0 -0.3125,0 -0.390625,0.359375 l -0.390625,1.578125 -0.9375,0 c -0.203125,0 -0.296875,0 -0.296875,0.1875 0,0.125 0.078125,0.125 0.28125,0.125 l 0.875,0 C 0.671875,-1.15625 0.625,-0.984375 0.625,-0.8125 0.625,-0.265625 1,0.109375 1.546875,0.109375 2.5625,0.109375 3.125,-1.34375 3.125,-1.421875 3.125,-1.53125 3.046875,-1.53125 3.015625,-1.53125 2.921875,-1.53125 2.90625,-1.5 2.859375,-1.390625 2.4375,-0.34375 1.90625,-0.109375 1.5625,-0.109375 c -0.203125,0 -0.3125,-0.125 -0.3125,-0.453125 0,-0.25 0.03125,-0.3125 0.0625,-0.484375 z m 0,0"
+ id="path36"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-7"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.828125,-6.234375 c 0,-0.203125 -0.140625,-0.359375 -0.359375,-0.359375 -0.28125,0 -0.546875,0.265625 -0.546875,0.53125 0,0.1875 0.140625,0.359375 0.375,0.359375 0.234375,0 0.53125,-0.234375 0.53125,-0.53125 z m -0.75,3.75 c 0.109375,-0.28125 0.109375,-0.3125 0.21875,-0.578125 0.078125,-0.203125 0.125,-0.34375 0.125,-0.53125 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.9375,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.28125,-0.9375 0.671875,-1.234375 1.015625,-1.234375 0.078125,0 0.25,0 0.25,0.3125 0,0.21875 -0.078125,0.421875 -0.109375,0.53125 -0.078125,0.25 -0.53125,1.40625 -0.6875,1.84375 -0.109375,0.25 -0.234375,0.578125 -0.234375,0.796875 0,0.46875 0.34375,0.8125 0.8125,0.8125 0.9375,0 1.3125,-1.4375 1.3125,-1.53125 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.09375,0.03125 -0.140625,0.1875 -0.1875,0.625 -0.515625,1.234375 -1.015625,1.234375 -0.171875,0 -0.25,-0.09375 -0.25,-0.328125 0,-0.25 0.0625,-0.390625 0.296875,-1 z m 0,0"
+ id="path39"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-8"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.671875,-2.71875 c 0,-1.046875 -0.6875,-1.6875 -1.59375,-1.6875 -1.328125,0 -2.671875,1.421875 -2.671875,2.828125 0,0.984375 0.671875,1.6875 1.59375,1.6875 1.328125,0 2.671875,-1.375 2.671875,-2.828125 z m -2.65625,2.609375 c -0.4375,0 -0.875,-0.3125 -0.875,-1.09375 0,-0.484375 0.265625,-1.5625 0.578125,-2.0625 0.5,-0.765625 1.078125,-0.921875 1.359375,-0.921875 0.578125,0 0.875,0.484375 0.875,1.078125 0,0.390625 -0.203125,1.4375 -0.578125,2.078125 -0.359375,0.578125 -0.90625,0.921875 -1.359375,0.921875 z m 0,0"
+ id="path42"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-9"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.609375 -0.484375,1.890625 -0.640625,2.3125 C 3.578125,-0.9375 3.5625,-0.8125 3.5625,-0.703125 c 0,0.46875 0.359375,0.8125 0.828125,0.8125 0.9375,0 1.296875,-1.453125 1.296875,-1.53125 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.109375,0 -0.109375,0.03125 -0.15625,0.1875 -0.203125,0.671875 -0.53125,1.234375 -1.015625,1.234375 -0.171875,0 -0.234375,-0.09375 -0.234375,-0.328125 0,-0.25 0.078125,-0.484375 0.171875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.65625 -0.421875,-1.0625 -1.140625,-1.0625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.5625 -0.453125,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 C 0.421875,-3.5 0.296875,-2.90625 0.296875,-2.875 c 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.1875,0 0.296875,0.125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path45"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-10"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 5.140625,-6.8125 c 0,0 0,-0.109375 -0.125,-0.109375 -0.15625,0 -1.09375,0.09375 -1.265625,0.109375 -0.078125,0.015625 -0.140625,0.0625 -0.140625,0.1875 0,0.125 0.09375,0.125 0.234375,0.125 0.484375,0 0.5,0.0625 0.5,0.171875 L 4.3125,-6.125 3.71875,-3.765625 C 3.53125,-4.140625 3.25,-4.40625 2.796875,-4.40625 c -1.15625,0 -2.390625,1.46875 -2.390625,2.921875 0,0.9375 0.546875,1.59375 1.3125,1.59375 0.203125,0 0.703125,-0.046875 1.296875,-0.75 0.078125,0.421875 0.4375,0.75 0.90625,0.75 0.359375,0 0.578125,-0.234375 0.75,-0.546875 0.15625,-0.359375 0.296875,-0.96875 0.296875,-0.984375 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.1875 -0.171875,0.640625 -0.34375,1.234375 -0.75,1.234375 -0.28125,0 -0.296875,-0.265625 -0.296875,-0.453125 0,-0.25 0.015625,-0.3125 0.046875,-0.484375 z m -2.0625,5.625 C 3.015625,-1 3.015625,-0.984375 2.875,-0.8125 2.4375,-0.265625 2.03125,-0.109375 1.75,-0.109375 c -0.5,0 -0.640625,-0.546875 -0.640625,-0.9375 0,-0.5 0.3125,-1.71875 0.546875,-2.1875 0.3125,-0.578125 0.75,-0.953125 1.15625,-0.953125 0.640625,0 0.78125,0.8125 0.78125,0.875 0,0.0625 -0.015625,0.125 -0.03125,0.171875 z m 0,0"
+ id="path48"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph2-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.875,-2.765625 1.890625,-4.75 C 1.765625,-4.875 1.75,-4.890625 1.671875,-4.890625 1.5625,-4.890625 1.46875,-4.8125 1.46875,-4.6875 c 0,0.0625 0.015625,0.078125 0.125,0.1875 l 2,2 -2,2.015625 c -0.109375,0.109375 -0.125,0.125 -0.125,0.1875 0,0.125 0.09375,0.203125 0.203125,0.203125 0.078125,0 0.09375,-0.015625 0.21875,-0.140625 L 3.875,-2.21875 l 2.0625,2.0625 c 0.015625,0.015625 0.078125,0.0625 0.140625,0.0625 0.125,0 0.203125,-0.078125 0.203125,-0.203125 0,-0.015625 0,-0.046875 -0.03125,-0.109375 C 6.234375,-0.421875 4.65625,-1.984375 4.15625,-2.5 l 1.828125,-1.8125 c 0.046875,-0.0625 0.203125,-0.1875 0.25,-0.25 0,-0.015625 0.046875,-0.0625 0.046875,-0.125 0,-0.125 -0.078125,-0.203125 -0.203125,-0.203125 C 6,-4.890625 5.96875,-4.859375 5.859375,-4.75 z m 0,0"
+ id="path51"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ transform="translate(-241.6498,-134.36781)"
+ id="g3177">
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g54">
+ <use
+ xlink:href="#glyph0-0"
+ x="246.72"
+ y="146.86"
+ id="use56"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g58">
+ <use
+ xlink:href="#glyph1-0"
+ x="250.55984"
+ y="146.86"
+ id="use60"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g62">
+ <use
+ xlink:href="#glyph1-1"
+ x="259.31985"
+ y="146.86"
+ id="use64"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g66">
+ <use
+ xlink:href="#glyph1-2"
+ x="264.59982"
+ y="146.86"
+ id="use68"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 270.82812,146.39062 3,0 0,0.48047 -3,0 z m 0,0"
+ id="path70"
+ inkscape:connector-curvature="0" />
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g72">
+ <use
+ xlink:href="#glyph1-1"
+ x="273.95999"
+ y="146.86"
+ id="use74"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g76">
+ <use
+ xlink:href="#glyph1-3"
+ x="279.23999"
+ y="146.86"
+ id="use78"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g80">
+ <use
+ xlink:href="#glyph1-3"
+ x="283.56"
+ y="146.86"
+ id="use82"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g84">
+ <use
+ xlink:href="#glyph1-4"
+ x="287.88"
+ y="146.86"
+ id="use86"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g88">
+ <use
+ xlink:href="#glyph1-5"
+ x="292.56"
+ y="146.86"
+ id="use90"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g92">
+ <use
+ xlink:href="#glyph2-0"
+ x="297.84009"
+ y="146.86"
+ id="use94"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g96">
+ <use
+ xlink:href="#glyph1-1"
+ x="307.80026"
+ y="146.86"
+ id="use98"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g100">
+ <use
+ xlink:href="#glyph1-3"
+ x="313.08026"
+ y="146.86"
+ id="use102"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g104">
+ <use
+ xlink:href="#glyph1-6"
+ x="317.40027"
+ y="146.86"
+ id="use106"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g108">
+ <use
+ xlink:href="#glyph1-7"
+ x="321.00027"
+ y="146.86"
+ id="use110"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g112">
+ <use
+ xlink:href="#glyph1-8"
+ x="324.48026"
+ y="146.86"
+ id="use114"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g116">
+ <use
+ xlink:href="#glyph1-9"
+ x="329.28027"
+ y="146.86"
+ id="use118"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 335.86719,146.39062 3,0 0,0.48047 -3,0 z m 0,0"
+ id="path120"
+ inkscape:connector-curvature="0" />
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g122">
+ <use
+ xlink:href="#glyph1-10"
+ x="338.76001"
+ y="146.86"
+ id="use124"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g126">
+ <use
+ xlink:href="#glyph1-4"
+ x="343.92001"
+ y="146.86"
+ id="use128"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g130">
+ <use
+ xlink:href="#glyph1-5"
+ x="348.60001"
+ y="146.86"
+ id="use132"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g134">
+ <use
+ xlink:href="#glyph1-6"
+ x="351.84009"
+ y="146.86"
+ id="use136"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g138">
+ <use
+ xlink:href="#glyph1-1"
+ x="355.44009"
+ y="146.86"
+ id="use140"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g142">
+ <use
+ xlink:href="#glyph0-1"
+ x="360.72021"
+ y="146.86"
+ id="use144"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-4.svg b/specs/XKBproto-4.svg
new file mode 100644
index 0000000..f5578d3
--- /dev/null
+++ b/specs/XKBproto-4.svg
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="140"
+ height="25"
+ viewBox="0 0 112 20"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-4.svg">
+ <metadata
+ id="metadata146">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview144"
+ showgrid="false"
+ inkscape:zoom="3.4035714"
+ inkscape:cx="70"
+ inkscape:cy="12.5"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.671875,-3.703125 c 0,-0.546875 -0.265625,-0.703125 -0.4375,-0.703125 -0.25,0 -0.5,0.265625 -0.5,0.484375 0,0.125 0.046875,0.1875 0.15625,0.296875 0.21875,0.203125 0.34375,0.453125 0.34375,0.8125 0,0.421875 -0.609375,2.703125 -1.765625,2.703125 -0.515625,0 -0.75,-0.34375 -0.75,-0.875 0,-0.546875 0.28125,-1.28125 0.578125,-2.109375 0.078125,-0.171875 0.125,-0.3125 0.125,-0.5 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.9375,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.296875,-1 0.71875,-1.234375 1.015625,-1.234375 0.078125,0 0.25,0 0.25,0.3125 0,0.25 -0.109375,0.53125 -0.171875,0.703125 -0.4375,1.15625 -0.5625,1.609375 -0.5625,2.046875 0,1.078125 0.875,1.234375 1.328125,1.234375 1.671875,0 2.25,-3.296875 2.25,-3.8125 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.71875,-3.765625 C 3.53125,-4.140625 3.25,-4.40625 2.796875,-4.40625 c -1.15625,0 -2.390625,1.46875 -2.390625,2.921875 0,0.9375 0.546875,1.59375 1.3125,1.59375 0.203125,0 0.703125,-0.046875 1.296875,-0.75 0.078125,0.421875 0.4375,0.75 0.90625,0.75 0.359375,0 0.578125,-0.234375 0.75,-0.546875 0.15625,-0.359375 0.296875,-0.96875 0.296875,-0.984375 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.1875 -0.171875,0.640625 -0.34375,1.234375 -0.75,1.234375 -0.28125,0 -0.296875,-0.265625 -0.296875,-0.453125 0,-0.21875 0.015625,-0.3125 0.125,-0.75 C 3.890625,-1.71875 3.90625,-1.828125 4,-2.203125 L 4.359375,-3.59375 c 0.0625,-0.28125 0.0625,-0.296875 0.0625,-0.34375 0,-0.171875 -0.109375,-0.265625 -0.28125,-0.265625 -0.25,0 -0.390625,0.21875 -0.421875,0.4375 z M 3.078125,-1.1875 C 3.015625,-1 3.015625,-0.984375 2.875,-0.8125 2.4375,-0.265625 2.03125,-0.109375 1.75,-0.109375 c -0.5,0 -0.640625,-0.546875 -0.640625,-0.9375 0,-0.5 0.3125,-1.71875 0.546875,-2.1875 0.3125,-0.578125 0.75,-0.953125 1.15625,-0.953125 0.640625,0 0.78125,0.8125 0.78125,0.875 0,0.0625 -0.015625,0.125 -0.03125,0.171875 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.578125,-6.8125 c 0,0 0,-0.109375 -0.140625,-0.109375 -0.21875,0 -0.953125,0.078125 -1.21875,0.109375 -0.078125,0 -0.1875,0.015625 -0.1875,0.203125 0,0.109375 0.109375,0.109375 0.25,0.109375 0.484375,0 0.5,0.09375 0.5,0.171875 L 1.75,-6.125 0.484375,-1.140625 C 0.453125,-1.03125 0.4375,-0.96875 0.4375,-0.8125 c 0,0.578125 0.4375,0.921875 0.90625,0.921875 0.328125,0 0.578125,-0.203125 0.75,-0.5625 0.171875,-0.375 0.296875,-0.953125 0.296875,-0.96875 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.125,0.1875 C 1.96875,-0.703125 1.78125,-0.109375 1.375,-0.109375 c -0.296875,0 -0.296875,-0.3125 -0.296875,-0.453125 0,-0.25 0.015625,-0.296875 0.0625,-0.484375 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.609375 -0.484375,1.890625 -0.640625,2.3125 C 3.578125,-0.9375 3.5625,-0.8125 3.5625,-0.703125 c 0,0.46875 0.359375,0.8125 0.828125,0.8125 0.9375,0 1.296875,-1.453125 1.296875,-1.53125 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.109375,0 -0.109375,0.03125 -0.15625,0.1875 -0.203125,0.671875 -0.53125,1.234375 -1.015625,1.234375 -0.171875,0 -0.234375,-0.09375 -0.234375,-0.328125 0,-0.25 0.078125,-0.484375 0.171875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.65625 -0.421875,-1.0625 -1.140625,-1.0625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.5625 -0.453125,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 C 0.421875,-3.5 0.296875,-2.90625 0.296875,-2.875 c 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.1875,0 0.296875,0.125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path18"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 6.265625,-5.671875 C 6.75,-6.453125 7.171875,-6.484375 7.53125,-6.5 c 0.125,-0.015625 0.140625,-0.171875 0.140625,-0.1875 0,-0.078125 -0.0625,-0.125 -0.140625,-0.125 -0.25,0 -0.546875,0.03125 -0.8125,0.03125 -0.328125,0 -0.671875,-0.03125 -0.984375,-0.03125 -0.0625,0 -0.1875,0 -0.1875,0.1875 0,0.109375 0.078125,0.125 0.15625,0.125 0.265625,0.015625 0.453125,0.125 0.453125,0.328125 0,0.15625 -0.140625,0.375 -0.140625,0.375 l -3.0625,4.875 -0.6875,-5.28125 C 2.265625,-6.375 2.5,-6.5 2.953125,-6.5 c 0.140625,0 0.25,0 0.25,-0.203125 0,-0.078125 -0.078125,-0.109375 -0.125,-0.109375 -0.40625,0 -0.828125,0.03125 -1.25,0.03125 -0.171875,0 -0.359375,0 -0.546875,0 -0.171875,0 -0.359375,-0.03125 -0.53125,-0.03125 -0.078125,0 -0.1875,0 -0.1875,0.1875 0,0.125 0.078125,0.125 0.25,0.125 0.546875,0 0.5625,0.09375 0.59375,0.34375 L 2.1875,-0.015625 C 2.21875,0.1875 2.265625,0.21875 2.390625,0.21875 c 0.15625,0 0.203125,-0.046875 0.28125,-0.171875 z m 0,0"
+ id="path21"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.484375,-0.5625 C 3.59375,-0.15625 3.953125,0.109375 4.375,0.109375 4.71875,0.109375 4.953125,-0.125 5.109375,-0.4375 5.28125,-0.796875 5.40625,-1.40625 5.40625,-1.421875 c 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.109375,0 -0.109375,0.046875 -0.140625,0.1875 -0.140625,0.5625 -0.328125,1.234375 -0.75,1.234375 -0.203125,0 -0.3125,-0.125 -0.3125,-0.453125 0,-0.21875 0.125,-0.6875 0.203125,-1.046875 L 4.578125,-2.6875 C 4.609375,-2.828125 4.703125,-3.203125 4.75,-3.359375 4.796875,-3.59375 4.890625,-3.96875 4.890625,-4.03125 c 0,-0.171875 -0.140625,-0.265625 -0.28125,-0.265625 -0.046875,0 -0.3125,0.015625 -0.390625,0.34375 -0.1875,0.734375 -0.625,2.484375 -0.75,3 -0.015625,0.046875 -0.40625,0.84375 -1.140625,0.84375 -0.515625,0 -0.609375,-0.453125 -0.609375,-0.8125 0,-0.5625 0.28125,-1.34375 0.53125,-2.03125 0.125,-0.3125 0.171875,-0.453125 0.171875,-0.640625 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.953125,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.25,-0.859375 0.640625,-1.234375 1.015625,-1.234375 0.09375,0 0.25,0.015625 0.25,0.328125 0,0.234375 -0.109375,0.53125 -0.171875,0.671875 -0.375,1 -0.578125,1.609375 -0.578125,2.09375 0,0.953125 0.6875,1.203125 1.21875,1.203125 0.65625,0 1.015625,-0.453125 1.1875,-0.671875 z m 0,0"
+ id="path24"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.859375,-2.296875 c 0.296875,0 1.03125,-0.03125 1.53125,-0.234375 0.703125,-0.296875 0.75,-0.890625 0.75,-1.03125 0,-0.4375 -0.375,-0.84375 -1.0625,-0.84375 -1.109375,0 -2.625,0.96875 -2.625,2.71875 0,1.015625 0.59375,1.796875 1.578125,1.796875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.78125,0 -0.875,-0.84375 -0.875,-1.15625 0,-0.125 0.015625,-0.421875 0.15625,-1.03125 z m -0.46875,-0.21875 C 1.78125,-4.03125 2.8125,-4.1875 3.078125,-4.1875 c 0.453125,0 0.734375,0.296875 0.734375,0.625 0,1.046875 -1.59375,1.046875 -2.015625,1.046875 z m 0,0"
+ id="path27"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.875,-2.765625 1.890625,-4.75 C 1.765625,-4.875 1.75,-4.890625 1.671875,-4.890625 1.5625,-4.890625 1.46875,-4.8125 1.46875,-4.6875 c 0,0.0625 0.015625,0.078125 0.125,0.1875 l 2,2 -2,2.015625 c -0.109375,0.109375 -0.125,0.125 -0.125,0.1875 0,0.125 0.09375,0.203125 0.203125,0.203125 0.078125,0 0.09375,-0.015625 0.21875,-0.140625 L 3.875,-2.21875 l 2.0625,2.0625 c 0.015625,0.015625 0.078125,0.0625 0.140625,0.0625 0.125,0 0.203125,-0.078125 0.203125,-0.203125 0,-0.015625 0,-0.046875 -0.03125,-0.109375 C 6.234375,-0.421875 4.65625,-1.984375 4.15625,-2.5 l 1.828125,-1.8125 c 0.046875,-0.0625 0.203125,-0.1875 0.25,-0.25 0,-0.015625 0.046875,-0.0625 0.046875,-0.125 0,-0.125 -0.078125,-0.203125 -0.203125,-0.203125 C 6,-4.890625 5.96875,-4.859375 5.859375,-4.75 z m 0,0"
+ id="path30"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph2-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.265625,-0.765625 1.0625,-1.03125 c 1.546875,-1.375 2.140625,-1.90625 2.140625,-2.90625 0,-1.140625 -0.890625,-1.9375 -2.109375,-1.9375 -1.125,0 -1.859375,0.921875 -1.859375,1.8125 0,0.546875 0.5,0.546875 0.53125,0.546875 0.171875,0 0.515625,-0.109375 0.515625,-0.53125 0,-0.25 -0.1875,-0.515625 -0.53125,-0.515625 -0.078125,0 -0.09375,0 -0.125,0.015625 0.21875,-0.65625 0.765625,-1.015625 1.34375,-1.015625 0.90625,0 1.328125,0.8125 1.328125,1.625 C 3.5625,-3.90625 3.078125,-3.125 2.515625,-2.5 l -1.90625,2.125 C 0.5,-0.265625 0.5,-0.234375 0.5,0 l 3.703125,0 0.265625,-1.734375 -0.234375,0 C 4.171875,-1.4375 4.109375,-1 4,-0.84375 3.9375,-0.765625 3.28125,-0.765625 3.0625,-0.765625 z m 0,0"
+ id="path33"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph2-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path36"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.71875,-2.53125 c 0,-0.546875 -0.328125,-0.546875 -0.34375,-0.546875 -0.1875,0 -0.375,0.1875 -0.375,0.375 0,0.109375 0.0625,0.171875 0.109375,0.203125 0.125,0.109375 0.265625,0.28125 0.265625,0.5625 0,0.3125 -0.46875,1.8125 -1.296875,1.8125 -0.5625,0 -0.5625,-0.5 -0.5625,-0.625 0,-0.3125 0.125,-0.703125 0.390625,-1.359375 C 1.953125,-2.25 2,-2.359375 2,-2.46875 2,-2.84375 1.6875,-3.078125 1.34375,-3.078125 0.640625,-3.078125 0.328125,-2.125 0.328125,-2 c 0,0.078125 0.09375,0.078125 0.125,0.078125 0.09375,0 0.09375,-0.03125 0.125,-0.109375 C 0.734375,-2.59375 1.03125,-2.875 1.3125,-2.875 c 0.125,0 0.171875,0.078125 0.171875,0.234375 0,0.171875 -0.046875,0.3125 -0.125,0.46875 -0.296875,0.78125 -0.375,1.078125 -0.375,1.328125 0,0.6875 0.546875,0.90625 1.078125,0.90625 1.171875,0 1.65625,-2.015625 1.65625,-2.59375 z m 0,0"
+ id="path39"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-2.65625 c -0.140625,-0.234375 -0.375,-0.421875 -0.71875,-0.421875 -0.890625,0 -1.796875,0.984375 -1.796875,1.984375 0,0.6875 0.453125,1.15625 1.0625,1.15625 0.375,0 0.703125,-0.203125 0.984375,-0.484375 C 2.59375,0 3,0.0625 3.1875,0.0625 c 0.25,0 0.421875,-0.140625 0.546875,-0.359375 0.15625,-0.28125 0.25,-0.671875 0.25,-0.703125 0,-0.09375 -0.09375,-0.09375 -0.109375,-0.09375 -0.109375,0 -0.109375,0.03125 -0.15625,0.21875 C 3.625,-0.53125 3.5,-0.125 3.203125,-0.125 3.03125,-0.125 2.96875,-0.28125 2.96875,-0.46875 c 0,-0.109375 0.0625,-0.375 0.109375,-0.546875 0.046875,-0.1875 0.125,-0.46875 0.15625,-0.625 L 3.375,-2.171875 C 3.421875,-2.359375 3.5,-2.6875 3.5,-2.71875 3.5,-2.875 3.375,-2.9375 3.265625,-2.9375 c -0.125,0 -0.28125,0.078125 -0.328125,0.28125 z M 2.5,-0.875 C 2.453125,-0.671875 2.296875,-0.53125 2.140625,-0.40625 2.078125,-0.34375 1.796875,-0.125 1.5,-0.125 c -0.265625,0 -0.515625,-0.1875 -0.515625,-0.671875 0,-0.375 0.203125,-1.140625 0.375,-1.421875 0.3125,-0.5625 0.671875,-0.65625 0.859375,-0.65625 0.484375,0 0.625,0.53125 0.625,0.609375 0,0.015625 -0.015625,0.078125 -0.015625,0.09375 z m 0,0"
+ id="path42"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 1.96875,-4.625 C 1.96875,-4.640625 2,-4.734375 2,-4.734375 2,-4.78125 1.96875,-4.84375 1.875,-4.84375 c -0.140625,0 -0.71875,0.0625 -0.890625,0.078125 -0.046875,0 -0.140625,0.015625 -0.140625,0.15625 0,0.09375 0.09375,0.09375 0.171875,0.09375 0.34375,0 0.34375,0.0625 0.34375,0.109375 0,0.046875 -0.015625,0.09375 -0.03125,0.15625 l -0.875,3.4375 C 0.4375,-0.734375 0.4375,-0.65625 0.4375,-0.59375 c 0,0.453125 0.390625,0.65625 0.71875,0.65625 0.171875,0 0.390625,-0.046875 0.5625,-0.359375 C 1.875,-0.5625 1.96875,-0.96875 1.96875,-1 c 0,-0.09375 -0.09375,-0.09375 -0.109375,-0.09375 -0.109375,0 -0.125,0.046875 -0.140625,0.171875 C 1.625,-0.578125 1.484375,-0.125 1.1875,-0.125 1,-0.125 0.953125,-0.296875 0.953125,-0.46875 0.953125,-0.546875 0.96875,-0.671875 1,-0.75 z m 0,0"
+ id="path45"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.84375,-0.4375 c -0.015625,0.09375 -0.0625,0.265625 -0.0625,0.28125 0,0.15625 0.125,0.21875 0.234375,0.21875 0.125,0 0.234375,-0.078125 0.28125,-0.140625 0.03125,-0.0625 0.078125,-0.296875 0.125,-0.4375 0.03125,-0.125 0.109375,-0.453125 0.140625,-0.625 0.046875,-0.15625 0.09375,-0.3125 0.125,-0.46875 0.078125,-0.28125 0.09375,-0.34375 0.296875,-0.625 C 2.171875,-2.515625 2.5,-2.875 3.03125,-2.875 c 0.390625,0 0.40625,0.359375 0.40625,0.484375 0,0.421875 -0.296875,1.1875 -0.40625,1.484375 -0.078125,0.203125 -0.109375,0.265625 -0.109375,0.375 0,0.375 0.296875,0.59375 0.65625,0.59375 0.703125,0 1,-0.953125 1,-1.0625 0,-0.09375 -0.078125,-0.09375 -0.109375,-0.09375 -0.09375,0 -0.09375,0.046875 -0.125,0.125 C 4.1875,-0.40625 3.875,-0.125 3.609375,-0.125 c -0.15625,0 -0.1875,-0.09375 -0.1875,-0.25 0,-0.15625 0.046875,-0.25 0.171875,-0.5625 0.078125,-0.21875 0.359375,-0.953125 0.359375,-1.34375 0,-0.671875 -0.53125,-0.796875 -0.90625,-0.796875 -0.578125,0 -0.96875,0.359375 -1.171875,0.640625 -0.046875,-0.484375 -0.453125,-0.640625 -0.75,-0.640625 -0.296875,0 -0.453125,0.21875 -0.546875,0.375 -0.15625,0.265625 -0.25,0.65625 -0.25,0.703125 0,0.078125 0.09375,0.078125 0.125,0.078125 0.09375,0 0.09375,-0.015625 0.140625,-0.203125 0.109375,-0.40625 0.25,-0.75 0.515625,-0.75 0.1875,0 0.234375,0.15625 0.234375,0.34375 0,0.125 -0.0625,0.390625 -0.125,0.578125 -0.046875,0.1875 -0.109375,0.46875 -0.140625,0.625 z m 0,0"
+ id="path48"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.953125,-4.8125 c 0,-0.03125 -0.03125,-0.09375 -0.09375,-0.09375 -0.046875,0 -0.046875,0.015625 -0.140625,0.109375 L 4.375,-4.40625 c -0.265625,-0.375 -0.703125,-0.5 -1.125,-0.5 -0.984375,0 -1.859375,0.796875 -1.859375,1.609375 0,0.09375 0.03125,0.375 0.234375,0.640625 0.234375,0.265625 0.5,0.328125 0.96875,0.453125 0.140625,0.03125 0.484375,0.109375 0.59375,0.140625 0.21875,0.046875 0.640625,0.203125 0.640625,0.71875 0,0.5625 -0.59375,1.234375 -1.375,1.234375 -0.625,0 -1.359375,-0.21875 -1.359375,-0.984375 0,-0.078125 0.015625,-0.234375 0.046875,-0.359375 0,-0.03125 0,-0.03125 0,-0.03125 0,-0.09375 -0.078125,-0.09375 -0.109375,-0.09375 -0.09375,0 -0.109375,0.015625 -0.125,0.140625 l -0.359375,1.390625 c -0.015625,0.03125 -0.03125,0.0625 -0.03125,0.109375 0,0.03125 0.03125,0.078125 0.109375,0.078125 0.03125,0 0.046875,-0.015625 0.140625,-0.09375 0.078125,-0.09375 0.25,-0.3125 0.328125,-0.390625 C 1.46875,0.0625 2,0.140625 2.421875,0.140625 c 1.0625,0 1.90625,-0.90625 1.90625,-1.734375 0,-0.296875 -0.125,-0.578125 -0.28125,-0.734375 -0.234375,-0.25 -0.34375,-0.28125 -1.25,-0.5 C 2.65625,-2.859375 2.421875,-2.90625 2.359375,-2.9375 2.1875,-3 1.890625,-3.171875 1.890625,-3.5625 c 0,-0.5625 0.625,-1.109375 1.34375,-1.109375 0.765625,0 1.125,0.421875 1.125,1.078125 0,0.09375 -0.03125,0.25 -0.03125,0.3125 0,0.109375 0.078125,0.109375 0.125,0.109375 0.09375,0 0.109375,-0.046875 0.125,-0.15625 z m 0,0"
+ id="path51"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.046875,-2.671875 c -0.25,0.046875 -0.34375,0.234375 -0.34375,0.390625 0,0.1875 0.140625,0.265625 0.265625,0.265625 0.15625,0 0.390625,-0.109375 0.390625,-0.453125 0,-0.46875 -0.53125,-0.609375 -0.90625,-0.609375 -1.046875,0 -2.015625,0.96875 -2.015625,1.9375 0,0.59375 0.40625,1.203125 1.28125,1.203125 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 c -0.5,0 -0.71875,-0.34375 -0.71875,-0.78125 0,-0.1875 0.09375,-0.953125 0.453125,-1.4375 0.265625,-0.34375 0.625,-0.53125 0.984375,-0.53125 0.09375,0 0.421875,0.015625 0.59375,0.203125 z m 0,0"
+ id="path54"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.5625,-1.59375 c 0.1875,0 0.75,-0.015625 1.125,-0.140625 0.515625,-0.1875 0.609375,-0.515625 0.609375,-0.71875 0,-0.390625 -0.390625,-0.625 -0.859375,-0.625 -0.84375,0 -1.96875,0.640625 -1.96875,1.84375 0,0.703125 0.4375,1.296875 1.25,1.296875 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 1.3125,-0.125 1.03125,-0.40625 1.03125,-0.96875 c 0,-0.09375 0,-0.234375 0.09375,-0.625 z M 1.171875,-1.78125 C 1.46875,-2.796875 2.234375,-2.875 2.4375,-2.875 2.734375,-2.875 3,-2.71875 3,-2.453125 3,-1.78125 1.8125,-1.78125 1.515625,-1.78125 z m 0,0"
+ id="path57"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ id="g3165"
+ transform="translate(-250.95492,-132.41625)">
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g60">
+ <use
+ xlink:href="#glyph0-0"
+ x="255.84"
+ y="146.86"
+ id="use62"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g64">
+ <use
+ xlink:href="#glyph0-1"
+ x="261.00015"
+ y="146.86"
+ id="use66"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g68">
+ <use
+ xlink:href="#glyph0-2"
+ x="266.28015"
+ y="146.86"
+ id="use70"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g72">
+ <use
+ xlink:href="#glyph0-3"
+ x="269.52005"
+ y="146.86"
+ id="use74"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g76">
+ <use
+ xlink:href="#glyph0-4"
+ x="275.52005"
+ y="146.86"
+ id="use78"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g80">
+ <use
+ xlink:href="#glyph0-1"
+ x="283.43997"
+ y="146.86"
+ id="use82"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g84">
+ <use
+ xlink:href="#glyph0-2"
+ x="288.71997"
+ y="146.86"
+ id="use86"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g88">
+ <use
+ xlink:href="#glyph0-5"
+ x="291.95987"
+ y="146.86"
+ id="use90"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g92">
+ <use
+ xlink:href="#glyph0-6"
+ x="297.71988"
+ y="146.86"
+ id="use94"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g96">
+ <use
+ xlink:href="#glyph1-0"
+ x="304.44"
+ y="146.86"
+ id="use98"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g100">
+ <use
+ xlink:href="#glyph2-0"
+ x="314.40015"
+ y="146.86"
+ id="use102"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g104">
+ <use
+ xlink:href="#glyph3-0"
+ x="319.44"
+ y="142.66"
+ id="use106"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g108">
+ <use
+ xlink:href="#glyph3-1"
+ x="323.64001"
+ y="142.66"
+ id="use110"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g112">
+ <use
+ xlink:href="#glyph3-2"
+ x="327.95999"
+ y="142.66"
+ id="use114"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g116">
+ <use
+ xlink:href="#glyph3-3"
+ x="330.48001"
+ y="142.66"
+ id="use118"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g120">
+ <use
+ xlink:href="#glyph3-4"
+ x="335.40002"
+ y="142.66"
+ id="use122"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g124">
+ <use
+ xlink:href="#glyph3-5"
+ x="340.67984"
+ y="142.66"
+ id="use126"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g128">
+ <use
+ xlink:href="#glyph3-1"
+ x="344.27985"
+ y="142.66"
+ id="use130"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g132">
+ <use
+ xlink:href="#glyph3-2"
+ x="348.59985"
+ y="142.66"
+ id="use134"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(1.6,0)"
+ style="fill:#000000;fill-opacity:1"
+ id="g136">
+ <use
+ xlink:href="#glyph3-6"
+ x="351.11984"
+ y="142.66"
+ id="use138"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-5.svg b/specs/XKBproto-5.svg
new file mode 100644
index 0000000..0deeacc
--- /dev/null
+++ b/specs/XKBproto-5.svg
@@ -0,0 +1,468 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="140"
+ height="25"
+ viewBox="0 0 112 20"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-5.svg">
+ <metadata
+ id="metadata146">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview144"
+ showgrid="false"
+ inkscape:zoom="3.4035714"
+ inkscape:cx="70"
+ inkscape:cy="12.5"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.671875,-3.703125 c 0,-0.546875 -0.265625,-0.703125 -0.4375,-0.703125 -0.25,0 -0.5,0.265625 -0.5,0.484375 0,0.125 0.046875,0.1875 0.15625,0.296875 0.21875,0.203125 0.34375,0.453125 0.34375,0.8125 0,0.421875 -0.609375,2.703125 -1.765625,2.703125 -0.515625,0 -0.75,-0.34375 -0.75,-0.875 0,-0.546875 0.28125,-1.28125 0.578125,-2.109375 0.078125,-0.171875 0.125,-0.3125 0.125,-0.5 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.9375,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.296875,-1 0.71875,-1.234375 1.015625,-1.234375 0.078125,0 0.25,0 0.25,0.3125 0,0.25 -0.109375,0.53125 -0.171875,0.703125 -0.4375,1.15625 -0.5625,1.609375 -0.5625,2.046875 0,1.078125 0.875,1.234375 1.328125,1.234375 1.671875,0 2.25,-3.296875 2.25,-3.8125 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.71875,-3.765625 C 3.53125,-4.140625 3.25,-4.40625 2.796875,-4.40625 c -1.15625,0 -2.390625,1.46875 -2.390625,2.921875 0,0.9375 0.546875,1.59375 1.3125,1.59375 0.203125,0 0.703125,-0.046875 1.296875,-0.75 0.078125,0.421875 0.4375,0.75 0.90625,0.75 0.359375,0 0.578125,-0.234375 0.75,-0.546875 0.15625,-0.359375 0.296875,-0.96875 0.296875,-0.984375 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.140625,0.1875 -0.171875,0.640625 -0.34375,1.234375 -0.75,1.234375 -0.28125,0 -0.296875,-0.265625 -0.296875,-0.453125 0,-0.21875 0.015625,-0.3125 0.125,-0.75 C 3.890625,-1.71875 3.90625,-1.828125 4,-2.203125 L 4.359375,-3.59375 c 0.0625,-0.28125 0.0625,-0.296875 0.0625,-0.34375 0,-0.171875 -0.109375,-0.265625 -0.28125,-0.265625 -0.25,0 -0.390625,0.21875 -0.421875,0.4375 z M 3.078125,-1.1875 C 3.015625,-1 3.015625,-0.984375 2.875,-0.8125 2.4375,-0.265625 2.03125,-0.109375 1.75,-0.109375 c -0.5,0 -0.640625,-0.546875 -0.640625,-0.9375 0,-0.5 0.3125,-1.71875 0.546875,-2.1875 0.3125,-0.578125 0.75,-0.953125 1.15625,-0.953125 0.640625,0 0.78125,0.8125 0.78125,0.875 0,0.0625 -0.015625,0.125 -0.03125,0.171875 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.578125,-6.8125 c 0,0 0,-0.109375 -0.140625,-0.109375 -0.21875,0 -0.953125,0.078125 -1.21875,0.109375 -0.078125,0 -0.1875,0.015625 -0.1875,0.203125 0,0.109375 0.109375,0.109375 0.25,0.109375 0.484375,0 0.5,0.09375 0.5,0.171875 L 1.75,-6.125 0.484375,-1.140625 C 0.453125,-1.03125 0.4375,-0.96875 0.4375,-0.8125 c 0,0.578125 0.4375,0.921875 0.90625,0.921875 0.328125,0 0.578125,-0.203125 0.75,-0.5625 0.171875,-0.375 0.296875,-0.953125 0.296875,-0.96875 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.109375,0.046875 -0.125,0.1875 C 1.96875,-0.703125 1.78125,-0.109375 1.375,-0.109375 c -0.296875,0 -0.296875,-0.3125 -0.296875,-0.453125 0,-0.25 0.015625,-0.296875 0.0625,-0.484375 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.609375 -0.484375,1.890625 -0.640625,2.3125 C 3.578125,-0.9375 3.5625,-0.8125 3.5625,-0.703125 c 0,0.46875 0.359375,0.8125 0.828125,0.8125 0.9375,0 1.296875,-1.453125 1.296875,-1.53125 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.109375,0 -0.109375,0.03125 -0.15625,0.1875 -0.203125,0.671875 -0.53125,1.234375 -1.015625,1.234375 -0.171875,0 -0.234375,-0.09375 -0.234375,-0.328125 0,-0.25 0.078125,-0.484375 0.171875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.65625 -0.421875,-1.0625 -1.140625,-1.0625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.5625 -0.453125,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 C 0.421875,-3.5 0.296875,-2.90625 0.296875,-2.875 c 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.1875,0 0.296875,0.125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path18"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 6.265625,-5.671875 C 6.75,-6.453125 7.171875,-6.484375 7.53125,-6.5 c 0.125,-0.015625 0.140625,-0.171875 0.140625,-0.1875 0,-0.078125 -0.0625,-0.125 -0.140625,-0.125 -0.25,0 -0.546875,0.03125 -0.8125,0.03125 -0.328125,0 -0.671875,-0.03125 -0.984375,-0.03125 -0.0625,0 -0.1875,0 -0.1875,0.1875 0,0.109375 0.078125,0.125 0.15625,0.125 0.265625,0.015625 0.453125,0.125 0.453125,0.328125 0,0.15625 -0.140625,0.375 -0.140625,0.375 l -3.0625,4.875 -0.6875,-5.28125 C 2.265625,-6.375 2.5,-6.5 2.953125,-6.5 c 0.140625,0 0.25,0 0.25,-0.203125 0,-0.078125 -0.078125,-0.109375 -0.125,-0.109375 -0.40625,0 -0.828125,0.03125 -1.25,0.03125 -0.171875,0 -0.359375,0 -0.546875,0 -0.171875,0 -0.359375,-0.03125 -0.53125,-0.03125 -0.078125,0 -0.1875,0 -0.1875,0.1875 0,0.125 0.078125,0.125 0.25,0.125 0.546875,0 0.5625,0.09375 0.59375,0.34375 L 2.1875,-0.015625 C 2.21875,0.1875 2.265625,0.21875 2.390625,0.21875 c 0.15625,0 0.203125,-0.046875 0.28125,-0.171875 z m 0,0"
+ id="path21"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.484375,-0.5625 C 3.59375,-0.15625 3.953125,0.109375 4.375,0.109375 4.71875,0.109375 4.953125,-0.125 5.109375,-0.4375 5.28125,-0.796875 5.40625,-1.40625 5.40625,-1.421875 c 0,-0.109375 -0.078125,-0.109375 -0.109375,-0.109375 -0.109375,0 -0.109375,0.046875 -0.140625,0.1875 -0.140625,0.5625 -0.328125,1.234375 -0.75,1.234375 -0.203125,0 -0.3125,-0.125 -0.3125,-0.453125 0,-0.21875 0.125,-0.6875 0.203125,-1.046875 L 4.578125,-2.6875 C 4.609375,-2.828125 4.703125,-3.203125 4.75,-3.359375 4.796875,-3.59375 4.890625,-3.96875 4.890625,-4.03125 c 0,-0.171875 -0.140625,-0.265625 -0.28125,-0.265625 -0.046875,0 -0.3125,0.015625 -0.390625,0.34375 -0.1875,0.734375 -0.625,2.484375 -0.75,3 -0.015625,0.046875 -0.40625,0.84375 -1.140625,0.84375 -0.515625,0 -0.609375,-0.453125 -0.609375,-0.8125 0,-0.5625 0.28125,-1.34375 0.53125,-2.03125 0.125,-0.3125 0.171875,-0.453125 0.171875,-0.640625 0,-0.4375 -0.3125,-0.8125 -0.8125,-0.8125 -0.953125,0 -1.3125,1.453125 -1.3125,1.53125 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.03125 0.15625,-0.1875 0.25,-0.859375 0.640625,-1.234375 1.015625,-1.234375 0.09375,0 0.25,0.015625 0.25,0.328125 0,0.234375 -0.109375,0.53125 -0.171875,0.671875 -0.375,1 -0.578125,1.609375 -0.578125,2.09375 0,0.953125 0.6875,1.203125 1.21875,1.203125 0.65625,0 1.015625,-0.453125 1.1875,-0.671875 z m 0,0"
+ id="path24"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph0-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.859375,-2.296875 c 0.296875,0 1.03125,-0.03125 1.53125,-0.234375 0.703125,-0.296875 0.75,-0.890625 0.75,-1.03125 0,-0.4375 -0.375,-0.84375 -1.0625,-0.84375 -1.109375,0 -2.625,0.96875 -2.625,2.71875 0,1.015625 0.59375,1.796875 1.578125,1.796875 1.421875,0 2.25,-1.0625 2.25,-1.171875 0,-0.0625 -0.046875,-0.140625 -0.109375,-0.140625 -0.0625,0 -0.078125,0.03125 -0.140625,0.109375 -0.78125,0.984375 -1.875,0.984375 -1.984375,0.984375 -0.78125,0 -0.875,-0.84375 -0.875,-1.15625 0,-0.125 0.015625,-0.421875 0.15625,-1.03125 z m -0.46875,-0.21875 C 1.78125,-4.03125 2.8125,-4.1875 3.078125,-4.1875 c 0.453125,0 0.734375,0.296875 0.734375,0.625 0,1.046875 -1.59375,1.046875 -2.015625,1.046875 z m 0,0"
+ id="path27"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 3.875,-2.765625 1.890625,-4.75 C 1.765625,-4.875 1.75,-4.890625 1.671875,-4.890625 1.5625,-4.890625 1.46875,-4.8125 1.46875,-4.6875 c 0,0.0625 0.015625,0.078125 0.125,0.1875 l 2,2 -2,2.015625 c -0.109375,0.109375 -0.125,0.125 -0.125,0.1875 0,0.125 0.09375,0.203125 0.203125,0.203125 0.078125,0 0.09375,-0.015625 0.21875,-0.140625 L 3.875,-2.21875 l 2.0625,2.0625 c 0.015625,0.015625 0.078125,0.0625 0.140625,0.0625 0.125,0 0.203125,-0.078125 0.203125,-0.203125 0,-0.015625 0,-0.046875 -0.03125,-0.109375 C 6.234375,-0.421875 4.65625,-1.984375 4.15625,-2.5 l 1.828125,-1.8125 c 0.046875,-0.0625 0.203125,-0.1875 0.25,-0.25 0,-0.015625 0.046875,-0.0625 0.046875,-0.125 0,-0.125 -0.078125,-0.203125 -0.203125,-0.203125 C 6,-4.890625 5.96875,-4.859375 5.859375,-4.75 z m 0,0"
+ id="path30"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph2-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.265625,-0.765625 1.0625,-1.03125 c 1.546875,-1.375 2.140625,-1.90625 2.140625,-2.90625 0,-1.140625 -0.890625,-1.9375 -2.109375,-1.9375 -1.125,0 -1.859375,0.921875 -1.859375,1.8125 0,0.546875 0.5,0.546875 0.53125,0.546875 0.171875,0 0.515625,-0.109375 0.515625,-0.53125 0,-0.25 -0.1875,-0.515625 -0.53125,-0.515625 -0.078125,0 -0.09375,0 -0.125,0.015625 0.21875,-0.65625 0.765625,-1.015625 1.34375,-1.015625 0.90625,0 1.328125,0.8125 1.328125,1.625 C 3.5625,-3.90625 3.078125,-3.125 2.515625,-2.5 l -1.90625,2.125 C 0.5,-0.265625 0.5,-0.234375 0.5,0 l 3.703125,0 0.265625,-1.734375 -0.234375,0 C 4.171875,-1.4375 4.109375,-1 4,-0.84375 3.9375,-0.765625 3.28125,-0.765625 3.0625,-0.765625 z m 0,0"
+ id="path33"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph2-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path36"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.71875,-2.53125 c 0,-0.546875 -0.328125,-0.546875 -0.34375,-0.546875 -0.1875,0 -0.375,0.1875 -0.375,0.375 0,0.109375 0.0625,0.171875 0.109375,0.203125 0.125,0.109375 0.265625,0.28125 0.265625,0.5625 0,0.3125 -0.46875,1.8125 -1.296875,1.8125 -0.5625,0 -0.5625,-0.5 -0.5625,-0.625 0,-0.3125 0.125,-0.703125 0.390625,-1.359375 C 1.953125,-2.25 2,-2.359375 2,-2.46875 2,-2.84375 1.6875,-3.078125 1.34375,-3.078125 0.640625,-3.078125 0.328125,-2.125 0.328125,-2 c 0,0.078125 0.09375,0.078125 0.125,0.078125 0.09375,0 0.09375,-0.03125 0.125,-0.109375 C 0.734375,-2.59375 1.03125,-2.875 1.3125,-2.875 c 0.125,0 0.171875,0.078125 0.171875,0.234375 0,0.171875 -0.046875,0.3125 -0.125,0.46875 -0.296875,0.78125 -0.375,1.078125 -0.375,1.328125 0,0.6875 0.546875,0.90625 1.078125,0.90625 1.171875,0 1.65625,-2.015625 1.65625,-2.59375 z m 0,0"
+ id="path39"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-2.65625 c -0.140625,-0.234375 -0.375,-0.421875 -0.71875,-0.421875 -0.890625,0 -1.796875,0.984375 -1.796875,1.984375 0,0.6875 0.453125,1.15625 1.0625,1.15625 0.375,0 0.703125,-0.203125 0.984375,-0.484375 C 2.59375,0 3,0.0625 3.1875,0.0625 c 0.25,0 0.421875,-0.140625 0.546875,-0.359375 0.15625,-0.28125 0.25,-0.671875 0.25,-0.703125 0,-0.09375 -0.09375,-0.09375 -0.109375,-0.09375 -0.109375,0 -0.109375,0.03125 -0.15625,0.21875 C 3.625,-0.53125 3.5,-0.125 3.203125,-0.125 3.03125,-0.125 2.96875,-0.28125 2.96875,-0.46875 c 0,-0.109375 0.0625,-0.375 0.109375,-0.546875 0.046875,-0.1875 0.125,-0.46875 0.15625,-0.625 L 3.375,-2.171875 C 3.421875,-2.359375 3.5,-2.6875 3.5,-2.71875 3.5,-2.875 3.375,-2.9375 3.265625,-2.9375 c -0.125,0 -0.28125,0.078125 -0.328125,0.28125 z M 2.5,-0.875 C 2.453125,-0.671875 2.296875,-0.53125 2.140625,-0.40625 2.078125,-0.34375 1.796875,-0.125 1.5,-0.125 c -0.265625,0 -0.515625,-0.1875 -0.515625,-0.671875 0,-0.375 0.203125,-1.140625 0.375,-1.421875 0.3125,-0.5625 0.671875,-0.65625 0.859375,-0.65625 0.484375,0 0.625,0.53125 0.625,0.609375 0,0.015625 -0.015625,0.078125 -0.015625,0.09375 z m 0,0"
+ id="path42"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-2"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="M 1.96875,-4.625 C 1.96875,-4.640625 2,-4.734375 2,-4.734375 2,-4.78125 1.96875,-4.84375 1.875,-4.84375 c -0.140625,0 -0.71875,0.0625 -0.890625,0.078125 -0.046875,0 -0.140625,0.015625 -0.140625,0.15625 0,0.09375 0.09375,0.09375 0.171875,0.09375 0.34375,0 0.34375,0.0625 0.34375,0.109375 0,0.046875 -0.015625,0.09375 -0.03125,0.15625 l -0.875,3.4375 C 0.4375,-0.734375 0.4375,-0.65625 0.4375,-0.59375 c 0,0.453125 0.390625,0.65625 0.71875,0.65625 0.171875,0 0.390625,-0.046875 0.5625,-0.359375 C 1.875,-0.5625 1.96875,-0.96875 1.96875,-1 c 0,-0.09375 -0.09375,-0.09375 -0.109375,-0.09375 -0.109375,0 -0.125,0.046875 -0.140625,0.171875 C 1.625,-0.578125 1.484375,-0.125 1.1875,-0.125 1,-0.125 0.953125,-0.296875 0.953125,-0.46875 0.953125,-0.546875 0.96875,-0.671875 1,-0.75 z m 0,0"
+ id="path45"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-3"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.84375,-0.4375 c -0.015625,0.09375 -0.0625,0.265625 -0.0625,0.28125 0,0.15625 0.125,0.21875 0.234375,0.21875 0.125,0 0.234375,-0.078125 0.28125,-0.140625 0.03125,-0.0625 0.078125,-0.296875 0.125,-0.4375 0.03125,-0.125 0.109375,-0.453125 0.140625,-0.625 0.046875,-0.15625 0.09375,-0.3125 0.125,-0.46875 0.078125,-0.28125 0.09375,-0.34375 0.296875,-0.625 C 2.171875,-2.515625 2.5,-2.875 3.03125,-2.875 c 0.390625,0 0.40625,0.359375 0.40625,0.484375 0,0.421875 -0.296875,1.1875 -0.40625,1.484375 -0.078125,0.203125 -0.109375,0.265625 -0.109375,0.375 0,0.375 0.296875,0.59375 0.65625,0.59375 0.703125,0 1,-0.953125 1,-1.0625 0,-0.09375 -0.078125,-0.09375 -0.109375,-0.09375 -0.09375,0 -0.09375,0.046875 -0.125,0.125 C 4.1875,-0.40625 3.875,-0.125 3.609375,-0.125 c -0.15625,0 -0.1875,-0.09375 -0.1875,-0.25 0,-0.15625 0.046875,-0.25 0.171875,-0.5625 0.078125,-0.21875 0.359375,-0.953125 0.359375,-1.34375 0,-0.671875 -0.53125,-0.796875 -0.90625,-0.796875 -0.578125,0 -0.96875,0.359375 -1.171875,0.640625 -0.046875,-0.484375 -0.453125,-0.640625 -0.75,-0.640625 -0.296875,0 -0.453125,0.21875 -0.546875,0.375 -0.15625,0.265625 -0.25,0.65625 -0.25,0.703125 0,0.078125 0.09375,0.078125 0.125,0.078125 0.09375,0 0.09375,-0.015625 0.140625,-0.203125 0.109375,-0.40625 0.25,-0.75 0.515625,-0.75 0.1875,0 0.234375,0.15625 0.234375,0.34375 0,0.125 -0.0625,0.390625 -0.125,0.578125 -0.046875,0.1875 -0.109375,0.46875 -0.140625,0.625 z m 0,0"
+ id="path48"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-4"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.953125,-4.8125 c 0,-0.03125 -0.03125,-0.09375 -0.09375,-0.09375 -0.046875,0 -0.046875,0.015625 -0.140625,0.109375 L 4.375,-4.40625 c -0.265625,-0.375 -0.703125,-0.5 -1.125,-0.5 -0.984375,0 -1.859375,0.796875 -1.859375,1.609375 0,0.09375 0.03125,0.375 0.234375,0.640625 0.234375,0.265625 0.5,0.328125 0.96875,0.453125 0.140625,0.03125 0.484375,0.109375 0.59375,0.140625 0.21875,0.046875 0.640625,0.203125 0.640625,0.71875 0,0.5625 -0.59375,1.234375 -1.375,1.234375 -0.625,0 -1.359375,-0.21875 -1.359375,-0.984375 0,-0.078125 0.015625,-0.234375 0.046875,-0.359375 0,-0.03125 0,-0.03125 0,-0.03125 0,-0.09375 -0.078125,-0.09375 -0.109375,-0.09375 -0.09375,0 -0.109375,0.015625 -0.125,0.140625 l -0.359375,1.390625 c -0.015625,0.03125 -0.03125,0.0625 -0.03125,0.109375 0,0.03125 0.03125,0.078125 0.109375,0.078125 0.03125,0 0.046875,-0.015625 0.140625,-0.09375 0.078125,-0.09375 0.25,-0.3125 0.328125,-0.390625 C 1.46875,0.0625 2,0.140625 2.421875,0.140625 c 1.0625,0 1.90625,-0.90625 1.90625,-1.734375 0,-0.296875 -0.125,-0.578125 -0.28125,-0.734375 -0.234375,-0.25 -0.34375,-0.28125 -1.25,-0.5 C 2.65625,-2.859375 2.421875,-2.90625 2.359375,-2.9375 2.1875,-3 1.890625,-3.171875 1.890625,-3.5625 c 0,-0.5625 0.625,-1.109375 1.34375,-1.109375 0.765625,0 1.125,0.421875 1.125,1.078125 0,0.09375 -0.03125,0.25 -0.03125,0.3125 0,0.109375 0.078125,0.109375 0.125,0.109375 0.09375,0 0.109375,-0.046875 0.125,-0.15625 z m 0,0"
+ id="path51"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-5"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 3.046875,-2.671875 c -0.25,0.046875 -0.34375,0.234375 -0.34375,0.390625 0,0.1875 0.140625,0.265625 0.265625,0.265625 0.15625,0 0.390625,-0.109375 0.390625,-0.453125 0,-0.46875 -0.53125,-0.609375 -0.90625,-0.609375 -1.046875,0 -2.015625,0.96875 -2.015625,1.9375 0,0.59375 0.40625,1.203125 1.28125,1.203125 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 c -0.5,0 -0.71875,-0.34375 -0.71875,-0.78125 0,-0.1875 0.09375,-0.953125 0.453125,-1.4375 0.265625,-0.34375 0.625,-0.53125 0.984375,-0.53125 0.09375,0 0.421875,0.015625 0.59375,0.203125 z m 0,0"
+ id="path54"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph3-6"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 1.5625,-1.59375 c 0.1875,0 0.75,-0.015625 1.125,-0.140625 0.515625,-0.1875 0.609375,-0.515625 0.609375,-0.71875 0,-0.390625 -0.390625,-0.625 -0.859375,-0.625 -0.84375,0 -1.96875,0.640625 -1.96875,1.84375 0,0.703125 0.4375,1.296875 1.25,1.296875 1.1875,0 1.734375,-0.6875 1.734375,-0.78125 0,-0.046875 -0.0625,-0.125 -0.125,-0.125 -0.03125,0 -0.046875,0.015625 -0.109375,0.078125 C 2.671875,-0.125 1.859375,-0.125 1.734375,-0.125 1.3125,-0.125 1.03125,-0.40625 1.03125,-0.96875 c 0,-0.09375 0,-0.234375 0.09375,-0.625 z M 1.171875,-1.78125 C 1.46875,-2.796875 2.234375,-2.875 2.4375,-2.875 2.734375,-2.875 3,-2.71875 3,-2.453125 3,-1.78125 1.8125,-1.78125 1.515625,-1.78125 z m 0,0"
+ id="path57"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ id="g3247">
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g60">
+ <use
+ xlink:href="#glyph0-0"
+ x="255.84"
+ y="146.86"
+ id="use62"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g64">
+ <use
+ xlink:href="#glyph0-1"
+ x="261.00015"
+ y="146.86"
+ id="use66"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g68">
+ <use
+ xlink:href="#glyph0-2"
+ x="266.28015"
+ y="146.86"
+ id="use70"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g72">
+ <use
+ xlink:href="#glyph0-3"
+ x="269.52005"
+ y="146.86"
+ id="use74"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g76">
+ <use
+ xlink:href="#glyph0-4"
+ x="275.52005"
+ y="146.86"
+ id="use78"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.95492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g80">
+ <use
+ xlink:href="#glyph0-1"
+ x="283.43997"
+ y="146.86"
+ id="use82"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.95492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g84">
+ <use
+ xlink:href="#glyph0-2"
+ x="288.71997"
+ y="146.86"
+ id="use86"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.95492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g88">
+ <use
+ xlink:href="#glyph0-5"
+ x="291.95987"
+ y="146.86"
+ id="use90"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.95492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g92">
+ <use
+ xlink:href="#glyph0-6"
+ x="297.71988"
+ y="146.86"
+ id="use94"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.95492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g96">
+ <use
+ xlink:href="#glyph1-0"
+ x="304.44"
+ y="146.86"
+ id="use98"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.95492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g100">
+ <use
+ xlink:href="#glyph2-0"
+ x="314.40015"
+ y="146.86"
+ id="use102"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g104">
+ <use
+ xlink:href="#glyph3-0"
+ x="319.44"
+ y="142.66"
+ id="use106"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g108">
+ <use
+ xlink:href="#glyph3-1"
+ x="323.64001"
+ y="142.66"
+ id="use110"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g112">
+ <use
+ xlink:href="#glyph3-2"
+ x="327.95999"
+ y="142.66"
+ id="use114"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g116">
+ <use
+ xlink:href="#glyph3-3"
+ x="330.48001"
+ y="142.66"
+ id="use118"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-249.35492,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g120">
+ <use
+ xlink:href="#glyph3-4"
+ x="335.40002"
+ y="142.66"
+ id="use122"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.15494,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g124">
+ <use
+ xlink:href="#glyph3-5"
+ x="340.67984"
+ y="142.66"
+ id="use126"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.15494,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g128">
+ <use
+ xlink:href="#glyph3-1"
+ x="344.27985"
+ y="142.66"
+ id="use130"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.15494,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g132">
+ <use
+ xlink:href="#glyph3-2"
+ x="348.59985"
+ y="142.66"
+ id="use134"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ transform="translate(-250.15494,-132.41625)"
+ style="fill:#000000;fill-opacity:1"
+ id="g136">
+ <use
+ xlink:href="#glyph3-6"
+ x="351.11984"
+ y="142.66"
+ id="use138"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-6.svg b/specs/XKBproto-6.svg
new file mode 100644
index 0000000..a274f2b
--- /dev/null
+++ b/specs/XKBproto-6.svg
@@ -0,0 +1,558 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="550"
+ height="150"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-6.svg"
+ style="display:inline"
+ inkscape:export-filename="/home/fcarrijo/Desktop/XKBlib-14.png"
+ inkscape:export-xdpi="156.71965"
+ inkscape:export-ydpi="156.71965">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend"
+ style="overflow:visible">
+ <path
+ id="path4715"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend-7"
+ style="overflow:visible">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4715-3"
+ style="font-size:12px;fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.7327273"
+ inkscape:cx="288.60377"
+ inkscape:cy="28.83001"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Vetorial">
+ <g
+ id="g3181">
+ <rect
+ ry="0"
+ rx="8.6568727"
+ y="48.001095"
+ x="413.22141"
+ height="24.81637"
+ width="100.41972"
+ id="rect4240"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3086-4-1"
+ y="119.98951"
+ x="418.81"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="119.98951"
+ x="418.81"
+ id="tspan3134"
+ sodipodi:role="line">Core Symbols</tspan></text>
+ <g
+ transform="matrix(1.163736,0,0,1.163736,187.4481,-154.55402)"
+ id="text3086-4-1-7-4"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ inkscape:connector-curvature="0"
+ id="path3234-7"
+ d="m 268.03934,181.84424 -1.5,3.57422 2.20898,0 0,-3.57422 -0.70898,0 m -1.5586,-1.5 8.34961,0 0,1.70508 -3.82617,0 0,1.6289 3.59766,0 0,1.70508 -3.59766,0 0,2.00391 3.96094,0 0,1.70508 -6.2168,0 0,-2.05079 -2.89453,0 -0.86133,2.05079 -2.17383,0 3.66211,-8.74805" />
+ </g>
+ <g
+ transform="translate(330.99227,-128.81083)"
+ id="text3086-4-1-7-2-3"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ inkscape:connector-curvature="0"
+ id="path3267-7"
+ d="m 148.543,188.37929 c -1e-5,-0.46484 -0.13673,-0.83854 -0.41016,-1.1211 -0.26889,-0.2871 -0.62208,-0.43065 -1.05957,-0.43066 -0.46941,1e-5 -0.84994,0.13445 -1.1416,0.40332 -0.29167,0.26433 -0.47397,0.64714 -0.54687,1.14844 l 3.1582,0 m -6.87012,1.21679 c -0.51042,1e-5 -0.89551,0.0866 -1.15527,0.25977 -0.25521,0.17318 -0.38282,0.42839 -0.38281,0.76563 -1e-5,0.30989 0.10253,0.55371 0.30761,0.73144 0.20964,0.17318 0.49902,0.25977 0.86817,0.25977 0.46028,0 0.84765,-0.16406 1.16211,-0.49219 0.31444,-0.33268 0.47167,-0.74739 0.47168,-1.24414 l 0,-0.28028 -1.27149,0 m -3.33594,-4.00585 c 0.54232,-0.1276 1.06641,-0.2233 1.57227,-0.28711 0.51041,-0.0684 0.98665,-0.10254 1.42871,-0.10254 0.68359,0 1.27148,0.0889 1.76367,0.2666 0.49674,0.17318 0.9069,0.43978 1.23047,0.7998 0.35091,-0.3509 0.75878,-0.61522 1.22363,-0.79297 0.46484,-0.18228 0.97526,-0.27343 1.53125,-0.27343 1.20768,0 2.17154,0.36231 2.89161,1.08691 0.72459,0.72462 1.0869,1.69304 1.08691,2.90527 l 0,0.69727 -5.72852,0 c 0.0638,0.57422 0.27115,1.00488 0.62207,1.29199 0.35546,0.28711 0.85449,0.43067 1.49708,0.43067 0.51496,0 1.04132,-0.0752 1.5791,-0.22559 0.5423,-0.15495 1.09829,-0.38737 1.66797,-0.69727 l 0,1.88672 c -0.57879,0.21875 -1.15985,0.38282 -1.74317,0.49219 -0.57879,0.11393 -1.15528,0.1709 -1.72949,0.1709 -0.81577,0 -1.5267,-0.12077 -2.13281,-0.36231 -0.60157,-0.24609 -1.06642,-0.597 -1.39453,-1.05273 -0.4603,0.48763 -0.94565,0.84538 -1.45606,1.07324 -0.50586,0.22787 -1.07552,0.3418 -1.70898,0.3418 -0.88412,0 -1.58366,-0.22331 -2.09864,-0.66992 -0.51497,-0.45117 -0.77246,-1.05957 -0.77246,-1.8252 0,-0.89778 0.30762,-1.55631 0.92285,-1.97558 0.61979,-0.41927 1.5905,-0.62891 2.91211,-0.62891 l 1.44239,0 0,-0.19141 c -1e-5,-0.38736 -0.15268,-0.66991 -0.45801,-0.84765 -0.30535,-0.18229 -0.78158,-0.27343 -1.42871,-0.27344 -0.52409,1e-5 -1.01172,0.0524 -1.46289,0.15723 -0.45118,0.10482 -0.87045,0.26205 -1.25782,0.47168 l 0,-1.86621" />
+ </g>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353-9-87"
+ y="65.512306"
+ x="444.93228"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="65.512306"
+ x="444.93228"
+ id="tspan3378-31"
+ sodipodi:role="line">A</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353-3"
+ y="64.230568"
+ x="420.86691"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="64.230568"
+ x="420.86691"
+ id="tspan3355-1"
+ sodipodi:role="line">a</tspan></text>
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="rect4240-7"
+ d="m 437.84541,72.817465 0,-24.81637"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="rect4240-7-9"
+ d="m 462.85412,72.817465 0,-24.81637"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="rect4240-7-1"
+ d="m 487.86287,72.817465 0,-24.81637"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325"
+ y="43.961224"
+ x="417.83841"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="43.961224"
+ x="417.83841"
+ id="tspan4327"
+ sodipodi:role="line">L1</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-5"
+ y="44.040325"
+ x="444.11926"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="44.040325"
+ x="444.11926"
+ id="tspan4350"
+ sodipodi:role="line">L2</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-9"
+ y="43.961224"
+ x="468.35852"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="43.961224"
+ x="468.35852"
+ id="tspan4327-1"
+ sodipodi:role="line">L1</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-5-8"
+ y="44.040325"
+ x="492.64462"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ id="tspan4350-8"
+ sodipodi:role="line"
+ x="492.64462"
+ y="44.040325">L2</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79"
+ y="85.848366"
+ x="429.69113"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="85.848366"
+ x="429.69113"
+ id="tspan4457"
+ sodipodi:role="line">G1</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79-6"
+ y="85.848366"
+ x="479.41757"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="85.848366"
+ x="479.41757"
+ id="tspan4480"
+ sodipodi:role="line">G2</tspan></text>
+ </g>
+ <g
+ id="g3158">
+ <rect
+ rx="0"
+ y="43.961231"
+ x="317.41867"
+ height="48.478489"
+ width="48.478489"
+ id="rect4286"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3086-4-1-6"
+ y="119.98951"
+ x="289.94351"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="119.98951"
+ x="289.94351"
+ id="tspan3157"
+ sodipodi:role="line">Xkb Symbols</tspan></text>
+ <g
+ transform="matrix(1.163736,0,0,1.163736,40.85837,-134.06608)"
+ id="text3086-4-1-7-8"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ inkscape:connector-curvature="0"
+ id="path3234-6"
+ d="m 268.03934,181.84424 -1.5,3.57422 2.20898,0 0,-3.57422 -0.70898,0 m -1.5586,-1.5 8.34961,0 0,1.70508 -3.82617,0 0,1.6289 3.59766,0 0,1.70508 -3.59766,0 0,2.00391 3.96094,0 0,1.70508 -6.2168,0 0,-2.05079 -2.89453,0 -0.86133,2.05079 -2.17383,0 3.66211,-8.74805" />
+ </g>
+ <g
+ transform="translate(185.17206,-107.25221)"
+ id="text3086-4-1-7-2-3-7"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ inkscape:connector-curvature="0"
+ id="path3267-7-2"
+ d="m 148.543,188.37929 c -1e-5,-0.46484 -0.13673,-0.83854 -0.41016,-1.1211 -0.26889,-0.2871 -0.62208,-0.43065 -1.05957,-0.43066 -0.46941,1e-5 -0.84994,0.13445 -1.1416,0.40332 -0.29167,0.26433 -0.47397,0.64714 -0.54687,1.14844 l 3.1582,0 m -6.87012,1.21679 c -0.51042,1e-5 -0.89551,0.0866 -1.15527,0.25977 -0.25521,0.17318 -0.38282,0.42839 -0.38281,0.76563 -1e-5,0.30989 0.10253,0.55371 0.30761,0.73144 0.20964,0.17318 0.49902,0.25977 0.86817,0.25977 0.46028,0 0.84765,-0.16406 1.16211,-0.49219 0.31444,-0.33268 0.47167,-0.74739 0.47168,-1.24414 l 0,-0.28028 -1.27149,0 m -3.33594,-4.00585 c 0.54232,-0.1276 1.06641,-0.2233 1.57227,-0.28711 0.51041,-0.0684 0.98665,-0.10254 1.42871,-0.10254 0.68359,0 1.27148,0.0889 1.76367,0.2666 0.49674,0.17318 0.9069,0.43978 1.23047,0.7998 0.35091,-0.3509 0.75878,-0.61522 1.22363,-0.79297 0.46484,-0.18228 0.97526,-0.27343 1.53125,-0.27343 1.20768,0 2.17154,0.36231 2.89161,1.08691 0.72459,0.72462 1.0869,1.69304 1.08691,2.90527 l 0,0.69727 -5.72852,0 c 0.0638,0.57422 0.27115,1.00488 0.62207,1.29199 0.35546,0.28711 0.85449,0.43067 1.49708,0.43067 0.51496,0 1.04132,-0.0752 1.5791,-0.22559 0.5423,-0.15495 1.09829,-0.38737 1.66797,-0.69727 l 0,1.88672 c -0.57879,0.21875 -1.15985,0.38282 -1.74317,0.49219 -0.57879,0.11393 -1.15528,0.1709 -1.72949,0.1709 -0.81577,0 -1.5267,-0.12077 -2.13281,-0.36231 -0.60157,-0.24609 -1.06642,-0.597 -1.39453,-1.05273 -0.4603,0.48763 -0.94565,0.84538 -1.45606,1.07324 -0.50586,0.22787 -1.07552,0.3418 -1.70898,0.3418 -0.88412,0 -1.58366,-0.22331 -2.09864,-0.66992 -0.51497,-0.45117 -0.77246,-1.05957 -0.77246,-1.8252 0,-0.89778 0.30762,-1.55631 0.92285,-1.97558 0.61979,-0.41927 1.5905,-0.62891 2.91211,-0.62891 l 1.44239,0 0,-0.19141 c -1e-5,-0.38736 -0.15268,-0.66991 -0.45801,-0.84765 -0.30535,-0.18229 -0.78158,-0.27343 -1.42871,-0.27344 -0.52409,1e-5 -1.01172,0.0524 -1.46289,0.15723 -0.45118,0.10482 -0.87045,0.26205 -1.25782,0.47168 l 0,-1.86621" />
+ </g>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353-9-0"
+ y="61.18388"
+ x="348.36005"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="61.18388"
+ x="348.36005"
+ id="tspan3378-0"
+ sodipodi:role="line">A</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353-8"
+ y="60.985638"
+ x="322.75568"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="60.985638"
+ x="322.75568"
+ id="tspan3355-01"
+ sodipodi:role="line">a</tspan></text>
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="rect4286-0"
+ d="m 366.47428,68.200476 -48.47849,0"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="rect4286-0-3"
+ d="m 341.65791,91.862594 0,-48.47849"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-7"
+ y="39.678383"
+ x="321.7688"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="39.678383"
+ x="321.7688"
+ id="tspan4327-0"
+ sodipodi:role="line">L1</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-5-5"
+ y="39.180359"
+ x="345.47778"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ id="tspan4350-2"
+ sodipodi:role="line"
+ x="345.47778"
+ y="39.180359">L2</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79-68"
+ y="61.532513"
+ x="297.04611"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="61.532513"
+ x="297.04611"
+ id="tspan4457-4"
+ sodipodi:role="line">G1</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79-6-6"
+ y="86.336067"
+ x="297.09299"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="86.336067"
+ x="297.09299"
+ id="tspan4480-6"
+ sodipodi:role="line">G2</tspan></text>
+ </g>
+ <g
+ id="g4663"
+ transform="translate(0,-1.002037)">
+ <text
+ sodipodi:linespacing="125%"
+ id="text3086-4"
+ y="120.99155"
+ x="176.48442"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="120.99155"
+ x="176.48442"
+ id="tspan3111"
+ sodipodi:role="line">Symbols</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353-5"
+ y="39.859066"
+ x="221.81828"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="39.859066"
+ x="221.81828"
+ id="tspan3355-0"
+ sodipodi:role="line">a</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79-7"
+ y="40.405941"
+ x="173.5414"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="40.405941"
+ x="173.5414"
+ id="tspan4457-2"
+ sodipodi:role="line">G1L1 =</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353-9-8"
+ y="58.23595"
+ x="222.35149"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="58.23595"
+ x="222.35149"
+ id="tspan3378-3"
+ sodipodi:role="line">A</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79-74"
+ y="57.501087"
+ x="173.5414"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="57.501087"
+ x="173.5414"
+ id="tspan4457-1"
+ sodipodi:role="line">G1L2 =</tspan></text>
+ <g
+ transform="translate(84.752833,-118.99205)"
+ id="text3086-4-1-7-2"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ inkscape:connector-curvature="0"
+ id="path3267"
+ d="m 148.543,188.37929 c -1e-5,-0.46484 -0.13673,-0.83854 -0.41016,-1.1211 -0.26889,-0.2871 -0.62208,-0.43065 -1.05957,-0.43066 -0.46941,1e-5 -0.84994,0.13445 -1.1416,0.40332 -0.29167,0.26433 -0.47397,0.64714 -0.54687,1.14844 l 3.1582,0 m -6.87012,1.21679 c -0.51042,1e-5 -0.89551,0.0866 -1.15527,0.25977 -0.25521,0.17318 -0.38282,0.42839 -0.38281,0.76563 -1e-5,0.30989 0.10253,0.55371 0.30761,0.73144 0.20964,0.17318 0.49902,0.25977 0.86817,0.25977 0.46028,0 0.84765,-0.16406 1.16211,-0.49219 0.31444,-0.33268 0.47167,-0.74739 0.47168,-1.24414 l 0,-0.28028 -1.27149,0 m -3.33594,-4.00585 c 0.54232,-0.1276 1.06641,-0.2233 1.57227,-0.28711 0.51041,-0.0684 0.98665,-0.10254 1.42871,-0.10254 0.68359,0 1.27148,0.0889 1.76367,0.2666 0.49674,0.17318 0.9069,0.43978 1.23047,0.7998 0.35091,-0.3509 0.75878,-0.61522 1.22363,-0.79297 0.46484,-0.18228 0.97526,-0.27343 1.53125,-0.27343 1.20768,0 2.17154,0.36231 2.89161,1.08691 0.72459,0.72462 1.0869,1.69304 1.08691,2.90527 l 0,0.69727 -5.72852,0 c 0.0638,0.57422 0.27115,1.00488 0.62207,1.29199 0.35546,0.28711 0.85449,0.43067 1.49708,0.43067 0.51496,0 1.04132,-0.0752 1.5791,-0.22559 0.5423,-0.15495 1.09829,-0.38737 1.66797,-0.69727 l 0,1.88672 c -0.57879,0.21875 -1.15985,0.38282 -1.74317,0.49219 -0.57879,0.11393 -1.15528,0.1709 -1.72949,0.1709 -0.81577,0 -1.5267,-0.12077 -2.13281,-0.36231 -0.60157,-0.24609 -1.06642,-0.597 -1.39453,-1.05273 -0.4603,0.48763 -0.94565,0.84538 -1.45606,1.07324 -0.50586,0.22787 -1.07552,0.3418 -1.70898,0.3418 -0.88412,0 -1.58366,-0.22331 -2.09864,-0.66992 -0.51497,-0.45117 -0.77246,-1.05957 -0.77246,-1.8252 0,-0.89778 0.30762,-1.55631 0.92285,-1.97558 0.61979,-0.41927 1.5905,-0.62891 2.91211,-0.62891 l 1.44239,0 0,-0.19141 c -1e-5,-0.38736 -0.15268,-0.66991 -0.45801,-0.84765 -0.30535,-0.18229 -0.78158,-0.27343 -1.42871,-0.27344 -0.52409,1e-5 -1.01172,0.0524 -1.46289,0.15723 -0.45118,0.10482 -0.87045,0.26205 -1.25782,0.47168 l 0,-1.86621" />
+ </g>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79-0"
+ y="74.59623"
+ x="173.5414"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="74.59623"
+ x="173.5414"
+ id="tspan4457-0"
+ sodipodi:role="line">G2L1 =</tspan></text>
+ <g
+ transform="matrix(1.163736,0,0,1.163736,-83.431648,-127.64009)"
+ id="text3086-4-1-7"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ inkscape:connector-curvature="0"
+ id="path3234"
+ d="m 268.03934,181.84424 -1.5,3.57422 2.20898,0 0,-3.57422 -0.70898,0 m -1.5586,-1.5 8.34961,0 0,1.70508 -3.82617,0 0,1.6289 3.59766,0 0,1.70508 -3.59766,0 0,2.00391 3.96094,0 0,1.70508 -6.2168,0 0,-2.05079 -2.89453,0 -0.86133,2.05079 -2.17383,0 3.66211,-8.74805" />
+ </g>
+ <text
+ sodipodi:linespacing="125%"
+ id="text4325-79-64"
+ y="91.691368"
+ x="173.5414"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="91.691368"
+ x="173.5414"
+ id="tspan4457-43"
+ sodipodi:role="line">G2L2 =</tspan></text>
+ </g>
+ <g
+ id="g3138">
+ <rect
+ rx="8.6568727"
+ ry="8.6568727"
+ y="19.569786"
+ x="57.712486"
+ height="73.871986"
+ width="63.483734"
+ id="rect3458"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ ry="8.6568727"
+ rx="8.6568727"
+ y="24.186779"
+ x="64.06086"
+ height="50.786987"
+ width="50.786987"
+ id="rect3460"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3086"
+ y="119.98951"
+ x="40.975864"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="119.98951"
+ x="40.975864"
+ id="tspan3088"
+ sodipodi:role="line">Physical Key</tspan></text>
+ <text
+ transform="matrix(0,-1,1,0,0,0)"
+ sodipodi:linespacing="125%"
+ id="text3086-2"
+ y="53.643921"
+ x="-92.862938"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="53.643921"
+ x="-92.862938"
+ id="tspan3210"
+ sodipodi:role="line">Shift Level</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3086-2-1"
+ y="105.41803"
+ x="62.852604"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ xml:space="preserve"><tspan
+ y="105.41803"
+ x="62.852604"
+ id="tspan3210-2"
+ sodipodi:role="line">Group</tspan></text>
+ <g
+ transform="translate(-45.888592,-129.55559)"
+ id="text3086-4-1-7-2-3-3"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ style="fill:#999999"
+ inkscape:connector-curvature="0"
+ id="path3267-7-7"
+ d="m 148.543,188.37929 c -1e-5,-0.46484 -0.13673,-0.83854 -0.41016,-1.1211 -0.26889,-0.2871 -0.62208,-0.43065 -1.05957,-0.43066 -0.46941,1e-5 -0.84994,0.13445 -1.1416,0.40332 -0.29167,0.26433 -0.47397,0.64714 -0.54687,1.14844 l 3.1582,0 m -6.87012,1.21679 c -0.51042,1e-5 -0.89551,0.0866 -1.15527,0.25977 -0.25521,0.17318 -0.38282,0.42839 -0.38281,0.76563 -1e-5,0.30989 0.10253,0.55371 0.30761,0.73144 0.20964,0.17318 0.49902,0.25977 0.86817,0.25977 0.46028,0 0.84765,-0.16406 1.16211,-0.49219 0.31444,-0.33268 0.47167,-0.74739 0.47168,-1.24414 l 0,-0.28028 -1.27149,0 m -3.33594,-4.00585 c 0.54232,-0.1276 1.06641,-0.2233 1.57227,-0.28711 0.51041,-0.0684 0.98665,-0.10254 1.42871,-0.10254 0.68359,0 1.27148,0.0889 1.76367,0.2666 0.49674,0.17318 0.9069,0.43978 1.23047,0.7998 0.35091,-0.3509 0.75878,-0.61522 1.22363,-0.79297 0.46484,-0.18228 0.97526,-0.27343 1.53125,-0.27343 1.20768,0 2.17154,0.36231 2.89161,1.08691 0.72459,0.72462 1.0869,1.69304 1.08691,2.90527 l 0,0.69727 -5.72852,0 c 0.0638,0.57422 0.27115,1.00488 0.62207,1.29199 0.35546,0.28711 0.85449,0.43067 1.49708,0.43067 0.51496,0 1.04132,-0.0752 1.5791,-0.22559 0.5423,-0.15495 1.09829,-0.38737 1.66797,-0.69727 l 0,1.88672 c -0.57879,0.21875 -1.15985,0.38282 -1.74317,0.49219 -0.57879,0.11393 -1.15528,0.1709 -1.72949,0.1709 -0.81577,0 -1.5267,-0.12077 -2.13281,-0.36231 -0.60157,-0.24609 -1.06642,-0.597 -1.39453,-1.05273 -0.4603,0.48763 -0.94565,0.84538 -1.45606,1.07324 -0.50586,0.22787 -1.07552,0.3418 -1.70898,0.3418 -0.88412,0 -1.58366,-0.22331 -2.09864,-0.66992 -0.51497,-0.45117 -0.77246,-1.05957 -0.77246,-1.8252 0,-0.89778 0.30762,-1.55631 0.92285,-1.97558 0.61979,-0.41927 1.5905,-0.62891 2.91211,-0.62891 l 1.44239,0 0,-0.19141 c -1e-5,-0.38736 -0.15268,-0.66991 -0.45801,-0.84765 -0.30535,-0.18229 -0.78158,-0.27343 -1.42871,-0.27344 -0.52409,1e-5 -1.01172,0.0524 -1.46289,0.15723 -0.45118,0.10482 -0.87045,0.26205 -1.25782,0.47168 l 0,-1.86621" />
+ </g>
+ <g
+ transform="matrix(1.163736,0,0,1.163736,-214.44151,-178.38377)"
+ id="text3086-4-1-7-25"
+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold">
+ <path
+ inkscape:connector-curvature="0"
+ id="path3234-3"
+ d="m 268.03934,181.84424 -1.5,3.57422 2.20898,0 0,-3.57422 -0.70898,0 m -1.5586,-1.5 8.34961,0 0,1.70508 -3.82617,0 0,1.6289 3.59766,0 0,1.70508 -3.59766,0 0,2.00391 3.96094,0 0,1.70508 -6.2168,0 0,-2.05079 -2.89453,0 -0.86133,2.05079 -2.17383,0 3.66211,-8.74805" />
+ </g>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353"
+ y="63.485809"
+ x="74.238411"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="63.485809"
+ x="74.238411"
+ id="tspan3355"
+ sodipodi:role="line">a</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text3353-9"
+ y="41.682552"
+ x="73.295052"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ xml:space="preserve"><tspan
+ y="41.682552"
+ x="73.295052"
+ id="tspan3378"
+ sodipodi:role="line">A</tspan></text>
+ <path
+ inkscape:connector-curvature="0"
+ id="path4683"
+ d="m 105.03673,101.52151 11.54249,0"
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4683-4"
+ d="m 51.950847,27.215961 0,-11.54249"
+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow2Mend)" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-7.svg b/specs/XKBproto-7.svg
new file mode 100644
index 0000000..82b80a6
--- /dev/null
+++ b/specs/XKBproto-7.svg
@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="720"
+ height="160"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-7.svg"
+ inkscape:export-filename="/home/fcarrijo/Desktop/XKBproto-7.png"
+ inkscape:export-xdpi="156.71965"
+ inkscape:export-ydpi="156.71965">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.68071429"
+ inkscape:cx="402.88363"
+ inkscape:cy="182.08043"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Vetorial"
+ style="display:inline">
+ <rect
+ rx="8.814271"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-3-80"
+ width="98.974358"
+ height="85.20462"
+ x="595.8656"
+ y="20.440712"
+ ry="8.814271" />
+ <rect
+ rx="8.814271"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-3-85"
+ width="71.983215"
+ height="85.20462"
+ x="511.51794"
+ y="20.440712"
+ ry="8.814271" />
+ <rect
+ rx="8.814271"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-3-4"
+ width="71.983215"
+ height="85.20462"
+ x="427.17029"
+ y="20.440712"
+ ry="8.814271" />
+ <rect
+ rx="8.814271"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-3-8"
+ width="71.983215"
+ height="85.20462"
+ x="342.82263"
+ y="20.440712"
+ ry="8.814271" />
+ <rect
+ rx="8.814271"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-3-5"
+ width="71.983215"
+ height="85.20462"
+ x="258.47498"
+ y="20.440712"
+ ry="8.814271" />
+ <rect
+ rx="8.814271"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-3-2"
+ width="71.983215"
+ height="85.20462"
+ x="174.1273"
+ y="20.440712"
+ ry="8.814271" />
+ <rect
+ rx="8.814271"
+ style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-3"
+ width="71.983215"
+ height="85.20462"
+ x="89.77964"
+ y="20.440712"
+ ry="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="27.054842"
+ y="70.057137"
+ id="text3051"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053"
+ x="27.054842"
+ y="70.057137">Key:</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="7.179842"
+ y="131.84898"
+ id="text3051-4"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6"
+ x="7.179842"
+ y="131.84898">Keycode:</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="537.08771"
+ y="133.25914"
+ id="text3051-4-1-4"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-7"
+ x="537.08771"
+ y="133.25914">13</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-35"
+ width="58.761806"
+ height="58.761806"
+ x="518.12866"
+ y="27.051416"
+ ry="8.814271"
+ rx="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="528.65259"
+ y="54.889793"
+ id="text3051-4-1-6-2-9-1-0-6-9"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-2-0-3-0"
+ x="528.65259"
+ y="54.889793">Num</tspan><tspan
+ sodipodi:role="line"
+ x="528.65259"
+ y="72.389793"
+ id="tspan3406">Lock</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="634.9895"
+ y="133.15367"
+ id="text3051-4-1-8"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-6"
+ x="634.9895"
+ y="133.15367">15</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-9"
+ width="80.795395"
+ height="58.761806"
+ x="604.95508"
+ y="27.051416"
+ ry="8.814271"
+ rx="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="623.40942"
+ y="62.170746"
+ id="text3051-4-1-6-2-9-1-0-6-9-8"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="623.40942"
+ y="62.170746"
+ id="tspan3406-8">Enter</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="452.90018"
+ y="133.37242"
+ id="text3051-4-1-28"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-12"
+ x="452.90018"
+ y="133.37242">12</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-36"
+ width="58.761806"
+ height="58.761806"
+ x="433.78098"
+ y="27.051416"
+ ry="8.814271"
+ rx="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="457.17151"
+ y="47.026733"
+ id="text3051-4-1-6-2-9-1-0-6"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-2-0-3"
+ x="457.17151"
+ y="47.026733">1</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="447.50891"
+ y="72.454063"
+ id="text3051-4-1-6-2-9-1-0-6-9-8-7"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="447.50891"
+ y="72.454063"
+ id="tspan3406-8-3">End</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="205.08766"
+ y="133.25914"
+ id="text3051-4-1-6"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1"
+ x="205.08766"
+ y="133.25914">9</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-7"
+ width="58.761806"
+ height="58.761806"
+ x="180.73801"
+ y="27.051416"
+ ry="8.814271"
+ rx="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="192.18912"
+ y="47.423218"
+ id="text3051-4-1-6-2-9"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0"
+ x="192.18912"
+ y="47.423218">è</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="192.09"
+ y="72.553185"
+ id="text3051-4-1-6-2-9-10"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-0"
+ x="192.09"
+ y="72.553185">ö</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="120.68531"
+ y="133.25914"
+ id="text3051-4-1"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5"
+ x="120.68531"
+ y="133.25914">8</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163"
+ width="58.761806"
+ height="58.761806"
+ x="96.390343"
+ y="27.051416"
+ ry="8.814271"
+ rx="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="106.78407"
+ y="46.097046"
+ id="text3051-4-1-6-2"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4"
+ x="106.78407"
+ y="46.097046">Q</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="107.99403"
+ y="69.692345"
+ id="text3051-4-1-6-2-9-10-5-3"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-0-0-1"
+ x="107.99403"
+ y="69.692345">q</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="127.64465"
+ y="70.939903"
+ id="text3051-4-1-6-2-9-10-5-3-8"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-0-0-1-0"
+ x="127.64465"
+ y="70.939903">@</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="283.93536"
+ y="133.25914"
+ id="text3051-4-1-7"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-2"
+ x="283.93536"
+ y="133.25914">10</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-72"
+ width="58.761806"
+ height="58.761806"
+ x="265.08569"
+ y="27.051416"
+ ry="8.814271"
+ rx="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="276.45502"
+ y="47.026733"
+ id="text3051-4-1-6-2-9-1"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-2"
+ x="276.45502"
+ y="47.026733">A</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="277.39838"
+ y="71.056114"
+ id="text3051-4-1-6-2-9-10-5-3-1"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-0-0-1-7"
+ x="277.39838"
+ y="71.056114">a</tspan></text>
+ <g
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ id="text3051-4-1-6-2-9-1-9"
+ transform="translate(38.649176,-147.4572)">
+ <path
+ d="m 265.10147,186.02788 -1.75,4.16992 2.57715,0 0,-4.16992 -0.82715,0 m -1.81836,-1.75 9.74121,0 0,1.98926 -4.46386,0 0,1.90039 4.19726,0 0,1.98925 -4.19726,0 0,2.33789 4.62109,0 0,1.98926 -7.25293,0 0,-2.39258 -3.37695,0 -1.00489,2.39258 -2.53613,0 4.27246,-10.20605"
+ id="path4350"
+ inkscape:connector-curvature="0" />
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="297.44449"
+ y="71.056114"
+ id="text3051-4-1-6-2-9-10-5-3-1-0"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-0-0-1-7-3"
+ x="297.44449"
+ y="71.056114">æ</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+ x="368.49002"
+ y="133.26695"
+ id="text3051-4-1-2"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-9"
+ x="368.49002"
+ y="133.26695">11</tspan></text>
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect3163-6"
+ width="58.761806"
+ height="58.761806"
+ x="349.43335"
+ y="27.051416"
+ ry="8.814271"
+ rx="8.814271" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="360.83109"
+ y="47.119019"
+ id="text3051-4-1-6-2-9-1-0"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-2-0"
+ x="360.83109"
+ y="47.119019">?</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="385.02301"
+ y="71.688438"
+ id="text3051-4-1-6-2-9-10-5"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-0-0"
+ x="385.02301"
+ y="71.688438">\</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="-391.66754"
+ y="-36.728394"
+ id="text3051-4-1-6-2-9-1-0-5"
+ sodipodi:linespacing="125%"
+ transform="scale(-1,-1)"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-2-0-9"
+ x="-391.66754"
+ y="-36.728394">?</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#999999;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
+ x="359.97318"
+ y="72.529259"
+ id="text3051-4-1-6-2-9-10-5-3-1-4"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3053-6-5-1-4-0-0-0-1-7-8"
+ x="359.97318"
+ y="72.529259">ϐ</tspan></text>
+ </g>
+</svg>
diff --git a/specs/XKBproto-8.svg b/specs/XKBproto-8.svg
new file mode 100644
index 0000000..8baa3e3
--- /dev/null
+++ b/specs/XKBproto-8.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="25"
+ height="25"
+ viewBox="0 0 20 20"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-9.svg">
+ <metadata
+ id="metadata42">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview40"
+ showgrid="false"
+ inkscape:zoom="10.84"
+ inkscape:cx="12.5"
+ inkscape:cy="12.5"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.25 -0.0625,0.53125 -0.140625,0.828125 L 3.890625,-1.5 3.6875,-0.75 c -0.03125,0.203125 -0.125,0.546875 -0.125,0.59375 0,0.171875 0.140625,0.265625 0.28125,0.265625 0.3125,0 0.375,-0.25 0.453125,-0.5625 0.140625,-0.5625 0.515625,-2.015625 0.59375,-2.40625 0.03125,-0.125 0.5625,-1.328125 1.65625,-1.328125 0.421875,0 0.53125,0.34375 0.53125,0.703125 0,0.5625 -0.421875,1.703125 -0.625,2.234375 -0.078125,0.234375 -0.125,0.34375 -0.125,0.546875 0,0.46875 0.34375,0.8125 0.8125,0.8125 0.9375,0 1.3125,-1.453125 1.3125,-1.53125 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.09375,0.03125 -0.140625,0.1875 -0.15625,0.53125 -0.46875,1.234375 -1.015625,1.234375 -0.171875,0 -0.25,-0.09375 -0.25,-0.328125 0,-0.25 0.09375,-0.484375 0.1875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.640625 -0.40625,-1.0625 -1.15625,-1.0625 -0.734375,0 -1.25,0.4375 -1.625,0.96875 0,-0.125 -0.03125,-0.46875 -0.3125,-0.703125 -0.25,-0.21875 -0.5625,-0.265625 -0.8125,-0.265625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.578125 -0.46875,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 -0.171875,0.359375 -0.296875,0.9375 -0.296875,0.96875 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.15625,0 0.296875,0.078125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.578125,-3.1875 c 0,-0.796875 -0.046875,-1.59375 -0.390625,-2.328125 -0.453125,-0.96875 -1.28125,-1.125 -1.6875,-1.125 -0.609375,0 -1.328125,0.265625 -1.75,1.1875 -0.3125,0.6875 -0.359375,1.46875 -0.359375,2.265625 0,0.75 0.03125,1.640625 0.453125,2.40625 0.421875,0.796875 1.15625,1 1.640625,1 0.53125,0 1.296875,-0.203125 1.734375,-1.15625 0.3125,-0.6875 0.359375,-1.46875 0.359375,-2.25 z M 2.484375,0 C 2.09375,0 1.5,-0.25 1.328125,-1.203125 1.21875,-1.796875 1.21875,-2.71875 1.21875,-3.3125 c 0,-0.640625 0,-1.296875 0.078125,-1.828125 0.1875,-1.1875 0.9375,-1.28125 1.1875,-1.28125 0.328125,0 0.984375,0.1875 1.171875,1.171875 0.109375,0.5625 0.109375,1.3125 0.109375,1.9375 0,0.75 0,1.421875 -0.109375,2.0625 C 3.5,-0.296875 2.9375,0 2.484375,0 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ id="g3030"
+ transform="translate(-295.62695,-134.76625)">
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g18">
+ <use
+ xlink:href="#glyph0-0"
+ x="296.88"
+ y="140.02"
+ id="use20"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g22">
+ <use
+ xlink:href="#glyph0-0"
+ x="305.64001"
+ y="140.02"
+ id="use24"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 296.86719,144.11328 17.51953,0 0,0.48047 -17.51953,0 z m 0,0"
+ id="path26"
+ inkscape:connector-curvature="0" />
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g28">
+ <use
+ xlink:href="#glyph1-0"
+ x="300.60001"
+ y="153.7"
+ id="use30"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g32">
+ <use
+ xlink:href="#glyph1-1"
+ x="305.63998"
+ y="153.7"
+ id="use34"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/XKBproto-9.svg b/specs/XKBproto-9.svg
new file mode 100644
index 0000000..8baa3e3
--- /dev/null
+++ b/specs/XKBproto-9.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="25"
+ height="25"
+ viewBox="0 0 20 20"
+ version="1.1"
+ id="svg2"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="XKBproto-9.svg">
+ <metadata
+ id="metadata42">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1016"
+ inkscape:window-height="718"
+ id="namedview40"
+ showgrid="false"
+ inkscape:zoom="10.84"
+ inkscape:cx="12.5"
+ inkscape:cy="12.5"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <g
+ id="g6">
+ <symbol
+ overflow="visible"
+ id="glyph0-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 0.875,-0.59375 c -0.03125,0.15625 -0.09375,0.390625 -0.09375,0.4375 0,0.171875 0.140625,0.265625 0.296875,0.265625 0.125,0 0.296875,-0.078125 0.375,-0.28125 0,-0.015625 0.125,-0.484375 0.1875,-0.734375 l 0.21875,-0.890625 C 1.90625,-2.03125 1.96875,-2.25 2.03125,-2.46875 c 0.03125,-0.171875 0.109375,-0.46875 0.125,-0.5 0.140625,-0.3125 0.671875,-1.21875 1.625,-1.21875 0.453125,0 0.53125,0.375 0.53125,0.703125 0,0.25 -0.0625,0.53125 -0.140625,0.828125 L 3.890625,-1.5 3.6875,-0.75 c -0.03125,0.203125 -0.125,0.546875 -0.125,0.59375 0,0.171875 0.140625,0.265625 0.28125,0.265625 0.3125,0 0.375,-0.25 0.453125,-0.5625 0.140625,-0.5625 0.515625,-2.015625 0.59375,-2.40625 0.03125,-0.125 0.5625,-1.328125 1.65625,-1.328125 0.421875,0 0.53125,0.34375 0.53125,0.703125 0,0.5625 -0.421875,1.703125 -0.625,2.234375 -0.078125,0.234375 -0.125,0.34375 -0.125,0.546875 0,0.46875 0.34375,0.8125 0.8125,0.8125 0.9375,0 1.3125,-1.453125 1.3125,-1.53125 0,-0.109375 -0.09375,-0.109375 -0.125,-0.109375 -0.09375,0 -0.09375,0.03125 -0.140625,0.1875 -0.15625,0.53125 -0.46875,1.234375 -1.015625,1.234375 -0.171875,0 -0.25,-0.09375 -0.25,-0.328125 0,-0.25 0.09375,-0.484375 0.1875,-0.703125 0.1875,-0.53125 0.609375,-1.625 0.609375,-2.203125 0,-0.640625 -0.40625,-1.0625 -1.15625,-1.0625 -0.734375,0 -1.25,0.4375 -1.625,0.96875 0,-0.125 -0.03125,-0.46875 -0.3125,-0.703125 -0.25,-0.21875 -0.5625,-0.265625 -0.8125,-0.265625 -0.90625,0 -1.390625,0.640625 -1.5625,0.875 -0.046875,-0.578125 -0.46875,-0.875 -0.921875,-0.875 -0.453125,0 -0.640625,0.390625 -0.734375,0.5625 -0.171875,0.359375 -0.296875,0.9375 -0.296875,0.96875 0,0.109375 0.09375,0.109375 0.109375,0.109375 0.109375,0 0.109375,-0.015625 0.171875,-0.234375 0.171875,-0.703125 0.375,-1.1875 0.734375,-1.1875 0.15625,0 0.296875,0.078125 0.296875,0.453125 0,0.21875 -0.03125,0.328125 -0.15625,0.84375 z m 0,0"
+ id="path9"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-0"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 2.9375,-6.375 c 0,-0.25 0,-0.265625 -0.234375,-0.265625 C 2.078125,-6 1.203125,-6 0.890625,-6 l 0,0.3125 c 0.203125,0 0.78125,0 1.296875,-0.265625 l 0,5.171875 c 0,0.359375 -0.03125,0.46875 -0.921875,0.46875 l -0.3125,0 0,0.3125 c 0.34375,-0.03125 1.203125,-0.03125 1.609375,-0.03125 0.390625,0 1.265625,0 1.609375,0.03125 l 0,-0.3125 -0.3125,0 c -0.90625,0 -0.921875,-0.109375 -0.921875,-0.46875 z m 0,0"
+ id="path12"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ <symbol
+ overflow="visible"
+ id="glyph1-1"
+ style="overflow:visible">
+ <path
+ style="stroke:none"
+ d="m 4.578125,-3.1875 c 0,-0.796875 -0.046875,-1.59375 -0.390625,-2.328125 -0.453125,-0.96875 -1.28125,-1.125 -1.6875,-1.125 -0.609375,0 -1.328125,0.265625 -1.75,1.1875 -0.3125,0.6875 -0.359375,1.46875 -0.359375,2.265625 0,0.75 0.03125,1.640625 0.453125,2.40625 0.421875,0.796875 1.15625,1 1.640625,1 0.53125,0 1.296875,-0.203125 1.734375,-1.15625 0.3125,-0.6875 0.359375,-1.46875 0.359375,-2.25 z M 2.484375,0 C 2.09375,0 1.5,-0.25 1.328125,-1.203125 1.21875,-1.796875 1.21875,-2.71875 1.21875,-3.3125 c 0,-0.640625 0,-1.296875 0.078125,-1.828125 0.1875,-1.1875 0.9375,-1.28125 1.1875,-1.28125 0.328125,0 0.984375,0.1875 1.171875,1.171875 0.109375,0.5625 0.109375,1.3125 0.109375,1.9375 0,0.75 0,1.421875 -0.109375,2.0625 C 3.5,-0.296875 2.9375,0 2.484375,0 z m 0,0"
+ id="path15"
+ inkscape:connector-curvature="0" />
+ </symbol>
+ </g>
+ </defs>
+ <g
+ id="g3030"
+ transform="translate(-295.62695,-134.76625)">
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g18">
+ <use
+ xlink:href="#glyph0-0"
+ x="296.88"
+ y="140.02"
+ id="use20"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g22">
+ <use
+ xlink:href="#glyph0-0"
+ x="305.64001"
+ y="140.02"
+ id="use24"
+ width="595"
+ height="842" />
+ </g>
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 296.86719,144.11328 17.51953,0 0,0.48047 -17.51953,0 z m 0,0"
+ id="path26"
+ inkscape:connector-curvature="0" />
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g28">
+ <use
+ xlink:href="#glyph1-0"
+ x="300.60001"
+ y="153.7"
+ id="use30"
+ width="595"
+ height="842" />
+ </g>
+ <g
+ style="fill:#000000;fill-opacity:1"
+ id="g32">
+ <use
+ xlink:href="#glyph1-1"
+ x="305.63998"
+ y="153.7"
+ id="use34"
+ width="595"
+ height="842" />
+ </g>
+ </g>
+</svg>
diff --git a/specs/acknowledgements.xml b/specs/acknowledgements.xml
new file mode 100644
index 0000000..95b9521
--- /dev/null
+++ b/specs/acknowledgements.xml
@@ -0,0 +1,41 @@
+<preface>
+<title>Acknowledgments</title>
+
+<para>
+I am grateful for all of the comments and suggestions I have received over the years. I could not possibly list everyone who has helped, but a few people have gone well above and beyond the call of duty and simply must be listed here.
+</para>
+
+<para>
+My managers here at SGI, Tom Paquin (now at Netscape) and Gianni Mariani were wonderful. Rather than insisting on some relatively quick, specialized proprietary solution to the keyboard problems we were having, both Tom and Gianni understood the importance of solving them in a general way and for the community as a whole. That was a difficult position to take and it was even harder to maintain when the scope of the project expanded beyond anything we imagined was possible. Gianni and Tom were unflagging in their support and their desire to “do the right thing” despite the schedule and budget pressure that intervened from time to time.
+</para>
+
+<para>
+Will Walker, at Digital Equipment Corporation, has been a longtime supporter of XKB. His help and input was essential to ensure that the extension as a whole fits and works together well. His focus was AccessX but the entire extension has benefited from his input and hard work. Without his unflagging good cheer and willingness to lend a hand, XKB would not be where it is today.
+</para>
+
+<para>
+Matt Landau, at the X Consortium, stood behind XKB during some tough spots in the release and standardization process. Without Matt’s support, XKB would likely not be a standard for a long time to come. When it became clear that we had too much to do for the amount of time we had remaining, Matt did a fantastic job of finding people to help finish the work needed for standardization.
+</para>
+
+<para>
+One of those people was George Sachs, at Hewlett-Packard, who jumped in to help out. His help was essential in getting the extension into this release. Another was Donna Converse, who helped figure out how to explain all of this stuff to someone who hadn’t had their head buried in it for years.
+</para>
+
+<para>
+Amber Benson and Gary Aitken were simply phenomenal. They jumped into a huge and complicated project with good cheer and unbelievable energy. They were “up to speed” and contributing within days. I stand in awe of the amount that they managed to achieve in such a short time. Thanks to Gary and Amber, the XKB library specification is a work of art and a thousand times easier to use and more useful than it would otherwise be.
+</para>
+
+<para>
+I truly cannot express my gratitude to all of you, without whom this would not have been possible.
+</para>
+
+<para>
+Erik Fortune
+</para>
+<para>
+Silicon Graphics, Inc.
+</para>
+<para>
+5 February 1996
+</para>
+</preface>
diff --git a/specs/appA.xml b/specs/appA.xml
new file mode 100644
index 0000000..fd26bac
--- /dev/null
+++ b/specs/appA.xml
@@ -0,0 +1,916 @@
+<appendix id='default_symbol_transformations'>
+<title>Default Symbol Transformations</title>
+
+<sect1 id='Interpreting_the_Control_Modifier'>
+<title>Interpreting the Control Modifier</title>
+
+<para>
+If the <emphasis>
+Control</emphasis>
+ modifier is not consumed by the symbol lookup process, routines that determine
+the symbol and string that correspond to an event should convert the symbol to
+a string as defined in the table below. Only the string to be returned is
+affected by the <emphasis>
+Control</emphasis>
+ modifier; the symbol is not changed.
+</para>
+
+
+<para>
+This table lists the decimal value of the standard control characters that
+correspond to some keysyms for ASCII characters. Control characters for symbols
+not listed in this table are application-specific.
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='8' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='2.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='2.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<colspec colname='c5' colwidth='2.0*'/>
+<colspec colname='c6' colwidth='1.0*'/>
+<colspec colname='c7' colwidth='2.0*'/>
+<colspec colname='c8' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Keysyms</entry>
+ <entry>Value</entry>
+ <entry>Keysyms</entry>
+ <entry>Value</entry>
+ <entry>Keysyms</entry>
+ <entry>Value</entry>
+ <entry>Keysyms</entry>
+ <entry>Value</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>atsign</entry>
+ <entry>0</entry>
+ <entry>h, H</entry>
+ <entry>8</entry>
+ <entry>p, P</entry>
+ <entry>16</entry>
+ <entry>x, X</entry>
+ <entry>24</entry>
+ </row>
+ <row>
+ <entry>a, A</entry>
+ <entry>1</entry>
+ <entry>i, I</entry>
+ <entry>9</entry>
+ <entry>q, Q</entry>
+ <entry>17</entry>
+ <entry>y, Y</entry>
+ <entry>25</entry>
+ </row>
+ <row>
+ <entry>b, B</entry>
+ <entry>2</entry>
+ <entry>j, J</entry>
+ <entry>10</entry>
+ <entry>r, R</entry>
+ <entry>18</entry>
+ <entry>z, Z</entry>
+ <entry>26</entry>
+ </row>
+ <row>
+ <entry>c, C</entry>
+ <entry>3</entry>
+ <entry>k, K</entry>
+ <entry>11</entry>
+ <entry>s, S</entry>
+ <entry>19</entry>
+ <entry>left_bracket</entry>
+ <entry>27</entry>
+ </row>
+ <row>
+ <entry>d, D</entry>
+ <entry>4</entry>
+ <entry>l, L</entry>
+ <entry>12</entry>
+ <entry>t, T</entry>
+ <entry>20</entry>
+ <entry>backslash</entry>
+ <entry>28</entry>
+ </row>
+ <row>
+ <entry>e, E</entry>
+ <entry>5</entry>
+ <entry>m, M</entry>
+ <entry>13</entry>
+ <entry>u, U</entry>
+ <entry>21</entry>
+ <entry>right_bracket</entry>
+ <entry>29</entry>
+ </row>
+ <row>
+ <entry>f, F</entry>
+ <entry>6</entry>
+ <entry>n, N</entry>
+ <entry>14</entry>
+ <entry>v, V</entry>
+ <entry>22</entry>
+ <entry>asciicircum</entry>
+ <entry>30</entry>
+ </row>
+ <row>
+ <entry>g, G</entry>
+ <entry>8</entry>
+ <entry>o, O</entry>
+ <entry>15</entry>
+ <entry>w, W</entry>
+ <entry>23</entry>
+ <entry>underbar</entry>
+ <entry>31</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect1>
+<sect1 id='Interpreting_the_Lock_Modifier'>
+<title>Interpreting the Lock Modifier</title>
+
+<para>
+If the <emphasis>
+Lock</emphasis>
+ modifier is not consumed by the symbol lookup process, routines that determine
+the symbol and string that correspond to an event should capitalize the result.
+Unlike the transformation for <emphasis>
+Control</emphasis>
+, the capitalization transformation changes both the symbol and the string
+returned by the event.
+</para>
+
+<sect2 id='Locale_Sensitive_Capitalization'>
+<title>Locale-Sensitive Capitalization</title>
+
+<para>
+If <emphasis>
+Lock</emphasis>
+ is set in an event and not consumed, applications should capitalize the string
+and symbols that result from an event according to the capitalization rules in
+effect for the system on which the application is running, taking the current
+state of the user environment (e.g. locale) into account.
+</para>
+
+
+</sect2>
+<sect2 id='Locale_Insensitive_Capitalization'>
+<title>Locale-Insensitive Capitalization</title>
+
+<para>
+XKB recommends but does not require locale-sensitive capitalization. In cases
+where the locale is unknown or where locale-sensitive capitalization is
+prohibitively expensive, applications can capitalize according to the rules
+defined in this extension.
+</para>
+
+
+<para>
+The following tables list all of the keysyms for which XKB defines
+capitalization behavior. Any keysyms not explicitly listed in these tables are
+not capitalized by XKB when locale-insensitive capitalization is in effect and
+are not automatically assigned the <emphasis>
+ALPHABETIC</emphasis>
+ type as described in the <link linkend='The_ALPHABETIC_Key_Type'>Alphabetic Key Type</link>.
+</para>
+
+
+<sect3 id='Capitalization_Rules_for_Latin_1_Keysyms'>
+<title>Capitalization Rules for Latin-1 Keysyms</title>
+
+<para>
+This table lists the Latin-11 keysyms for which XKB defines upper and lower
+case:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="auto" ?>
+<tgroup cols='8' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<colspec colname='c5' colwidth='2.0*'/>
+<colspec colname='c6' colwidth='2.0*'/>
+<colspec colname='c7' colwidth='2.0*'/>
+<colspec colname='c8' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>a</entry>
+ <entry>A</entry>
+ <entry>o</entry>
+ <entry>O</entry>
+ <entry>acircumflex</entry>
+ <entry>Acircumflex</entry>
+ <entry>eth</entry>
+ <entry>ETH</entry>
+ </row>
+ <row>
+ <entry>b</entry>
+ <entry>B</entry>
+ <entry>p</entry>
+ <entry>P</entry>
+ <entry>adiaeresis</entry>
+ <entry>Adiaeresis</entry>
+ <entry>ntilde</entry>
+ <entry>Ntilde</entry>
+ </row>
+ <row>
+ <entry>c</entry>
+ <entry>C</entry>
+ <entry>q</entry>
+ <entry>Q</entry>
+ <entry>atilde</entry>
+ <entry>Atilde</entry>
+ <entry>ograve</entry>
+ <entry>Ograve</entry>
+ </row>
+ <row>
+ <entry>d</entry>
+ <entry>D</entry>
+ <entry>r</entry>
+ <entry>R</entry>
+ <entry>aring</entry>
+ <entry>Aring</entry>
+ <entry>oacute</entry>
+ <entry>Oacute</entry>
+ </row>
+ <row>
+ <entry>e</entry>
+ <entry>E</entry>
+ <entry>s</entry>
+ <entry>S</entry>
+ <entry>ae</entry>
+ <entry>AE</entry>
+ <entry>ocircumflex</entry>
+ <entry>Ocircumflex</entry>
+ </row>
+ <row>
+ <entry>f</entry>
+ <entry>F</entry>
+ <entry>t</entry>
+ <entry>T</entry>
+ <entry>ccedilla</entry>
+ <entry>Ccedilla</entry>
+ <entry>otilde</entry>
+ <entry>Otilde</entry>
+ </row>
+ <row>
+ <entry>g</entry>
+ <entry>G</entry>
+ <entry>u</entry>
+ <entry>U</entry>
+ <entry>egrave</entry>
+ <entry>Egrave</entry>
+ <entry>odiaeresis</entry>
+ <entry>Odiaeresis</entry>
+ </row>
+ <row>
+ <entry>h</entry>
+ <entry>H</entry>
+ <entry>v</entry>
+ <entry>V</entry>
+ <entry>eacute</entry>
+ <entry>Eacute</entry>
+ <entry>oslash</entry>
+ <entry>Ooblique</entry>
+ </row>
+ <row>
+ <entry>i</entry>
+ <entry>I</entry>
+ <entry>w</entry>
+ <entry>W</entry>
+ <entry>ecircumflex</entry>
+ <entry>Ecircumflex</entry>
+ <entry>ugrave</entry>
+ <entry>Ugrave</entry>
+ </row>
+ <row>
+ <entry>j</entry>
+ <entry>J</entry>
+ <entry>x</entry>
+ <entry>X</entry>
+ <entry>ediaeresis</entry>
+ <entry>Ediaeresis</entry>
+ <entry>uacute</entry>
+ <entry>Uacute</entry>
+ </row>
+ <row>
+ <entry>k</entry>
+ <entry>K</entry>
+ <entry>y</entry>
+ <entry>Y</entry>
+ <entry>igrave</entry>
+ <entry>Igrave</entry>
+ <entry>ucircumflex</entry>
+ <entry>Ucircumflex</entry>
+ </row>
+ <row>
+ <entry>l</entry>
+ <entry>L</entry>
+ <entry>z</entry>
+ <entry>Z</entry>
+ <entry>iacute</entry>
+ <entry>Iacute</entry>
+ <entry>udiaeresis</entry>
+ <entry>Udiaeresis</entry>
+ </row>
+ <row>
+ <entry>m</entry>
+ <entry>M</entry>
+ <entry>agrave</entry>
+ <entry>Agrave</entry>
+ <entry>icircumflex</entry>
+ <entry>Icircumflex</entry>
+ <entry>yacute</entry>
+ <entry>Yacute</entry>
+ </row>
+ <row>
+ <entry>n</entry>
+ <entry>N</entry>
+ <entry>aacute</entry>
+ <entry>Aacute</entry>
+ <entry>idiaeresis</entry>
+ <entry>Idiaeresis</entry>
+ <entry>thorn</entry>
+ <entry>THORN</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect3>
+<sect3 id='Capitalization_Rules_for_Latin_2_Keysyms'>
+<title>Capitalization Rules for Latin-2 Keysyms</title>
+
+<para>
+This table lists the Latin-2 keysyms for which XKB defines upper and lower case:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='6' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<colspec colname='c5' colwidth='1.0*'/>
+<colspec colname='c6' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>aogonek</entry>
+ <entry>Aogonek</entry>
+ <entry>zabovedot</entry>
+ <entry>Zabovedot</entry>
+ <entry>dstroke</entry>
+ <entry>Dstroke</entry>
+ </row>
+ <row>
+ <entry>lstroke</entry>
+ <entry>Lstroke</entry>
+ <entry>racute</entry>
+ <entry>Racute</entry>
+ <entry>nacute</entry>
+ <entry>Nacute</entry>
+ </row>
+ <row>
+ <entry>lcaron</entry>
+ <entry>Lcaron</entry>
+ <entry>abreve</entry>
+ <entry>Abreve</entry>
+ <entry>ncaron</entry>
+ <entry>Ncaron</entry>
+ </row>
+ <row>
+ <entry>sacute</entry>
+ <entry>Sacute</entry>
+ <entry>lacute</entry>
+ <entry>Lacute</entry>
+ <entry>odoubleacute</entry>
+ <entry>Odoubleacute</entry>
+ </row>
+ <row>
+ <entry>scaron</entry>
+ <entry>Scaron</entry>
+ <entry>cacute</entry>
+ <entry>Cacute</entry>
+ <entry>rcaron</entry>
+ <entry>Rcaron</entry>
+ </row>
+ <row>
+ <entry>scedilla</entry>
+ <entry>Scedilla</entry>
+ <entry>ccaron</entry>
+ <entry>Ccaron</entry>
+ <entry>uabovering</entry>
+ <entry>Uabovering</entry>
+ </row>
+ <row>
+ <entry>tcaron</entry>
+ <entry>Tcaron</entry>
+ <entry>eogonek</entry>
+ <entry>Eogonek</entry>
+ <entry>udoubleacute</entry>
+ <entry>Udoubleacute</entry>
+ </row>
+ <row>
+ <entry>zacute</entry>
+ <entry>Zacute</entry>
+ <entry>ecaron</entry>
+ <entry>Ecaron</entry>
+ <entry>tcedilla</entry>
+ <entry>Tcedilla</entry>
+ </row>
+ <row>
+ <entry>zcaron</entry>
+ <entry>Zcaron</entry>
+ <entry>dcaron</entry>
+ <entry>Dcaron</entry>
+ <entry>&#x0020;</entry>
+ <entry>&#x0020;</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect3>
+<sect3 id='Capitalization_Rules_for_Latin_3_Keysyms'>
+<title>Capitalization Rules for Latin-3 Keysyms</title>
+
+<para>
+This table lists the Latin-3 keysyms for which XKB defines upper and lower case:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='6' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<colspec colname='c5' colwidth='1.0*'/>
+<colspec colname='c6' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>hstroke</entry>
+ <entry>Hstroke</entry>
+ <entry>jcircumflex</entry>
+ <entry>Jcircumflex</entry>
+ <entry>gcircumflex</entry>
+ <entry>Gcircumflex</entry>
+ </row>
+ <row>
+ <entry>hcircumflex</entry>
+ <entry>Hcircumflex</entry>
+ <entry>cabovedot</entry>
+ <entry>Cabovedot</entry>
+ <entry>ubreve</entry>
+ <entry>Ubreve</entry>
+ </row>
+ <row>
+ <entry>idotless</entry>
+ <entry>Iabovedot</entry>
+ <entry>ccircumflex</entry>
+ <entry>Ccircumflex</entry>
+ <entry>scircumflex</entry>
+ <entry>Scircumflex</entry>
+ </row>
+ <row>
+ <entry>gbreve</entry>
+ <entry>Gbreve</entry>
+ <entry>gabovedot</entry>
+ <entry>Gabovedot</entry>
+ <entry>&#x0020;</entry>
+ <entry>&#x0020;</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect3>
+<sect3 id='Capitalization_Rules_for_Latin_4_Keysyms'>
+<title>Capitalization Rules for Latin-4 Keysyms</title>
+
+<para>
+This table lists the Latin-4 keysyms for which XKB defines upper and lower case:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='6' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<colspec colname='c5' colwidth='1.0*'/>
+<colspec colname='c6' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>rcedilla</entry>
+ <entry>Rcedilla</entry>
+ <entry>eng</entry>
+ <entry>ENG</entry>
+ <entry>omacron</entry>
+ <entry>Omacron</entry>
+ </row>
+ <row>
+ <entry>itilde</entry>
+ <entry>Itilde</entry>
+ <entry>amacron</entry>
+ <entry>Amacron</entry>
+ <entry>kcedilla</entry>
+ <entry>Kcedilla</entry>
+ </row>
+ <row>
+ <entry>lcedilla</entry>
+ <entry>Lcedilla</entry>
+ <entry>iogonek</entry>
+ <entry>Iogonek</entry>
+ <entry>uogonek</entry>
+ <entry>Uogonek</entry>
+ </row>
+ <row>
+ <entry>emacron</entry>
+ <entry>Emacron</entry>
+ <entry>eabovedot</entry>
+ <entry>eabovedot</entry>
+ <entry>utilde</entry>
+ <entry>Utilde</entry>
+ </row>
+ <row>
+ <entry>gcedilla</entry>
+ <entry>Gcedilla</entry>
+ <entry>imacron</entry>
+ <entry>Imacron</entry>
+ <entry>umacron</entry>
+ <entry>Umacron</entry>
+ </row>
+ <row>
+ <entry>tslash</entry>
+ <entry>Tslash</entry>
+ <entry>ncedilla</entry>
+ <entry>Ncedilla</entry>
+ <entry>&#x0020;</entry>
+ <entry>&#x0020;</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect3>
+<sect3 id='Capitalization_Rules_for_Cyrillic_Keysyms'>
+<title>Capitalization Rules for Cyrillic Keysyms</title>
+
+<para>
+This table lists the Cyrillic keysyms for which XKB defines upper and lower
+case:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>Serbian_dje</entry>
+ <entry>Serbian_DJE</entry>
+ <entry>Cyrillic_i</entry>
+ <entry>Cyrillic_I</entry>
+ </row>
+ <row>
+ <entry>Macedonia_gje</entry>
+ <entry>Macedonia_GJE</entry>
+ <entry>Cyrillic_shorti</entry>
+ <entry>Cyrillic_SHORTI</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_io</entry>
+ <entry>Cyrillic_IO</entry>
+ <entry>Cyrillic_ka</entry>
+ <entry>Cyrillic_KA</entry>
+ </row>
+ <row>
+ <entry>Ukrainian_ie</entry>
+ <entry>Ukrainian_IE</entry>
+ <entry>Cyrillic_el</entry>
+ <entry>Cyrillic_EL</entry>
+ </row>
+ <row>
+ <entry>Macedonia_dse</entry>
+ <entry>Macedonia_DSE</entry>
+ <entry>Cyrillic_em</entry>
+ <entry>Cyrillic_EM</entry>
+ </row>
+ <row>
+ <entry>Ukrainian_i</entry>
+ <entry>Ukrainian_I</entry>
+ <entry>Cyrillic_en</entry>
+ <entry>Cyrillic_EN</entry>
+ </row>
+ <row>
+ <entry>Ukrainian_yi</entry>
+ <entry>Ukrainian_YI</entry>
+ <entry>Cyrillic_o</entry>
+ <entry>Cyrillic_O</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_je</entry>
+ <entry>Cyrillic_JE</entry>
+ <entry>Cyrillic_pe</entry>
+ <entry>Cyrillic_PE</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_lje</entry>
+ <entry>Cyrillic_LJE</entry>
+ <entry>Cyrillic_ya</entry>
+ <entry>Cyrillic_YA</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_nje</entry>
+ <entry>Cyrillic_NJE</entry>
+ <entry>Cyrillic_er</entry>
+ <entry>Cyrillic_ER</entry>
+ </row>
+ <row>
+ <entry>Serbian_tshe</entry>
+ <entry>Serbian_TSHE</entry>
+ <entry>Cyrillic_es</entry>
+ <entry>Cyrillic_ES</entry>
+ </row>
+ <row>
+ <entry>Macedonia_kje</entry>
+ <entry>Macedonia_KJE</entry>
+ <entry>Cyrillic_te</entry>
+ <entry>Cyrillic_TE</entry>
+ </row>
+ <row>
+ <entry>Byelorussian_shortu</entry>
+ <entry>Byelorussian_SHORTU</entry>
+ <entry>Cyrillic_u</entry>
+ <entry>Cyrillic_U</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_dzhe</entry>
+ <entry>Cyrillic_DZHE</entry>
+ <entry>Cyrillic_zhe</entry>
+ <entry>Cyrillic_ZHE</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_yu</entry>
+ <entry>Cyrillic_YU</entry>
+ <entry>Cyrillic_ve</entry>
+ <entry>Cyrillic_VE</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_a</entry>
+ <entry>Cyrillic_A</entry>
+ <entry>Cyrillic_softsign</entry>
+ <entry>Cyrillic_SOFTSIGN</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_be</entry>
+ <entry>Cyrillic_BE</entry>
+ <entry>Cyrillic_yeru</entry>
+ <entry>Cyrillic_YERU</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_tse</entry>
+ <entry>Cyrillic_TSE</entry>
+ <entry>Cyrillic_ze</entry>
+ <entry>Cyrillic_ZE</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_de</entry>
+ <entry>Cyrillic_DE</entry>
+ <entry>Cyrillic_sha</entry>
+ <entry>Cyrillic_SHA</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_ie</entry>
+ <entry>Cyrillic_IE</entry>
+ <entry>Cyrillic_e</entry>
+ <entry>Cyrillic_E</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_ef</entry>
+ <entry>Cyrillic_EF</entry>
+ <entry>Cyrillic_shcha</entry>
+ <entry>Cyrillic_SHCHA</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_ghe</entry>
+ <entry>Cyrillic_GHE</entry>
+ <entry>Cyrillic_che</entry>
+ <entry>Cyrillic_CHE</entry>
+ </row>
+ <row>
+ <entry>Cyrillic_ha</entry>
+ <entry>Cyrillic_HA</entry>
+ <entry>Cyrillic_hardsign</entry>
+ <entry>Cyrillic_HARDSIGN</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect3>
+<sect3 id='Capitalization_Rules_for_Greek_Keysyms'>
+<title>Capitalization Rules for Greek Keysyms</title>
+
+<para>
+This table lists the Greek keysyms for which XKB defines upper and lower case:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.8*'/>
+<colspec colname='c2' colwidth='1.8*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ <entry>Lower Case</entry>
+ <entry>Upper Case</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>Greek_omegaaccent</entry>
+ <entry>Greek_OMEGAACCENT</entry>
+ <entry>Greek_iota</entry>
+ <entry>Greek_IOTA</entry>
+ </row>
+ <row>
+ <entry>Greek_alphaaccent</entry>
+ <entry>Greek_ALPHAACCENT</entry>
+ <entry>Greek_kappa</entry>
+ <entry>Greek_KAPPA</entry>
+ </row>
+ <row>
+ <entry>Greek_epsilonaccent</entry>
+ <entry>Greek_EPSILONACCENT</entry>
+ <entry>Greek_lamda</entry>
+ <entry>Greek_LAMDA</entry>
+ </row>
+ <row>
+ <entry>Greek_etaaccent</entry>
+ <entry>Greek_ETAACCENT</entry>
+ <entry>Greek_lambda</entry>
+ <entry>Greek_LAMBDA</entry>
+ </row>
+ <row>
+ <entry>Greek_iotaaccent</entry>
+ <entry>Greek_IOTAACCENT</entry>
+ <entry>Greek_mu</entry>
+ <entry>Greek_MU</entry>
+ </row>
+ <row>
+ <entry>Greek_iotadieresis</entry>
+ <entry>Greek_IOTADIERESIS</entry>
+ <entry>Greek_nu</entry>
+ <entry>Greek_NU</entry>
+ </row>
+ <row>
+ <entry>Greek_omicronaccent</entry>
+ <entry>Greek_OMICRONACCENT</entry>
+ <entry>Greek_xi</entry>
+ <entry>Greek_XI</entry>
+ </row>
+ <row>
+ <entry>Greek_upsilonaccent</entry>
+ <entry>Greek_UPSILONACCENT</entry>
+ <entry>Greek_omicron</entry>
+ <entry>Greek_OMICRON</entry>
+ </row>
+ <row>
+ <entry>Greek_upsilondieresis</entry>
+ <entry>Greek_UPSILONDIERESIS</entry>
+ <entry>Greek_pi</entry>
+ <entry>Greek_PI</entry>
+ </row>
+ <row>
+ <entry>Greek_alpha</entry>
+ <entry>Greek_ALPHA</entry>
+ <entry>Greek_rho</entry>
+ <entry>Greek_RHO</entry>
+ </row>
+ <row>
+ <entry>Greek_beta</entry>
+ <entry>Greek_BETA</entry>
+ <entry>Greek_sigma</entry>
+ <entry>Greek_SIGMA</entry>
+ </row>
+ <row>
+ <entry>Greek_gamma</entry>
+ <entry>Greek_GAMMA</entry>
+ <entry>Greek_tau</entry>
+ <entry>Greek_TAU</entry>
+ </row>
+ <row>
+ <entry>Greek_delta</entry>
+ <entry>Greek_DELTA</entry>
+ <entry>Greek_upsilon</entry>
+ <entry>Greek_UPSILON</entry>
+ </row>
+ <row>
+ <entry>Greek_epsilon</entry>
+ <entry>Greek_EPSILON</entry>
+ <entry>Greek_phi</entry>
+ <entry>Greek_PHI</entry>
+ </row>
+ <row>
+ <entry>Greek_zeta</entry>
+ <entry>Greek_ZETA</entry>
+ <entry>Greek_chi</entry>
+ <entry>Greek_CHI</entry>
+ </row>
+ <row>
+ <entry>Greek_eta</entry>
+ <entry>Greek_ETA</entry>
+ <entry>Greek_psi</entry>
+ <entry>Greek_PSI</entry>
+ </row>
+ <row>
+ <entry>Greek_theta</entry>
+ <entry>Greek_THETA</entry>
+ <entry>Greek_omega</entry>
+ <entry>Greek_OMEGA</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect3>
+<sect3 id='Capitalization_Rules_for_Other_Keysyms'>
+<title>Capitalization Rules for Other Keysyms</title>
+
+<para>
+XKB defines no capitalization rules for symbols in any other set of keysyms
+provided by the consortium. Applications are free to apply additional rules for
+private keysyms or for other keysyms not covered by XKB.
+</para>
+</sect3>
+</sect2>
+</sect1>
+</appendix>
diff --git a/specs/appB.xml b/specs/appB.xml
new file mode 100644
index 0000000..85137cf
--- /dev/null
+++ b/specs/appB.xml
@@ -0,0 +1,129 @@
+<appendix id='canonical_key_types'>
+<title>Canonical Key Types</title>
+
+<sect1 id='Canonical_Key_Types'>
+<title>Canonical Key Types</title>
+<sect2 id='The_ONE_LEVEL_Key_Type'>
+<title>The ONE_LEVEL Key Type</title>
+
+<para>
+The <emphasis>
+ONE_LEVEL</emphasis>
+ key type describes groups that have only one symbol. The default <emphasis>
+ONE_LEVEL</emphasis>
+ type has no map entries and does not pay attention to any modifiers.
+</para>
+
+</sect2>
+<sect2 id='The_TWO_LEVEL_Key_Type'>
+<title>The TWO_LEVEL Key Type</title>
+
+<para>
+The <emphasis>
+TWO_LEVEL</emphasis>
+ key type describes groups that have two symbols but are neither alphabetic nor
+numeric keypad keys. The default <emphasis>
+TWO_LEVEL</emphasis>
+ type uses only the <emphasis>
+Shift</emphasis>
+ modifier. It returns level two if <emphasis>
+Shift</emphasis>
+ is set, level one if it is not.
+</para>
+
+
+</sect2>
+<sect2 id='The_ALPHABETIC_Key_Type'>
+<title>The ALPHABETIC Key Type</title>
+
+<para>
+The <emphasis>
+ALPHABETIC</emphasis>
+ key type describes groups that consist of two symbols — the lowercase form
+of a symbol followed by the uppercase form of the same symbol. The default
+<emphasis>
+ALPHABETIC</emphasis>
+ type implements locale-sensitive "shift cancels caps lock" behavior using both
+the <emphasis>
+Shift</emphasis>
+ and <emphasis>
+Lock</emphasis>
+ modifiers as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+Shift</emphasis>
+ and <emphasis>
+Lock</emphasis>
+ are both set, the default <emphasis>
+ALPHABETIC</emphasis>
+ type yields level one.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+Shift</emphasis>
+ alone is set, it yields level two.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+Lock</emphasis>
+ alone is set, it yields level one but preserves the <emphasis>
+Lock</emphasis>
+ modifier.
+ </para>
+</listitem>
+<listitem>
+ <para>If neither <emphasis>
+Shift</emphasis>
+ nor <emphasis>
+Lock</emphasis>
+ are set, it yields level one.
+ </para>
+</listitem>
+</itemizedlist>
+
+</sect2>
+<sect2 id='The_KEYPAD_Key_Type'>
+<title>The KEYPAD Key Type</title>
+
+<para>
+The <emphasis>
+KEYPAD</emphasis>
+ key type describes that consist of two symbols, at least one of which is a
+numeric keypad symbol. The default <emphasis>
+KEYPAD</emphasis>
+ type implements "shift cancels numeric lock" behavior using the <emphasis>
+Shift</emphasis>
+ modifier and the real modifier bound to the virtual modifier named "NumLock"
+(the "NumLock" modifier) as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+Shift</emphasis>
+ and the "NumLock" modifier are both set, the default <emphasis>
+KEYPAD </emphasis>
+type yields level one.
+ </para>
+</listitem>
+<listitem>
+ <para>If either <emphasis>
+Shift</emphasis>
+ or the "NumLock" modifier alone are set, it yields level two.
+ </para>
+</listitem>
+<listitem>
+ <para>If neither <emphasis>
+Shift</emphasis>
+ nor the "NumLock" modifier are set, it yields level one.
+ </para>
+</listitem>
+</itemizedlist>
+</sect2>
+</sect1>
+</appendix>
diff --git a/specs/appC.xml b/specs/appC.xml
new file mode 100644
index 0000000..6e47cae
--- /dev/null
+++ b/specs/appC.xml
@@ -0,0 +1,715 @@
+<appendix id='new_keysyms'>
+<title>New KeySyms</title>
+
+<sect1 id='New_KeySyms'>
+<title>New KeySyms</title>
+<sect2 id='KeySyms_Used_by_the_ISO9995_Standard'>
+<title>KeySyms Used by the ISO9995 Standard</title>
+<informaltable frame='topbot'>
+<?dbfo keep-together="auto" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Byte 3</entry>
+ <entry>Byte 4</entry>
+ <entry>Character</entry>
+ <entry>Name</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>254</entry>
+ <entry>1</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LOCK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>2</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LATCHING LEVEL TWO SHIFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>3</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LEVEL THREE SHIFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>4</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LATCHING LEVEL THREE SHIFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>5</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LEVEL THREE SHIFT LOCK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>6</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LATCHING GROUP SHIFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>7</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO GROUP SHIFT LOCK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>8</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO NEXT GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>9</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LOCK NEXT GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>10</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO PREVIOUS GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>11</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LOCK PREVIOUS GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>12</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO FIRST GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>13</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LOCK FIRST GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>14</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LAST GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>15</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO LOCK LAST GROUP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>32</entry>
+ <entry>&#x0020;</entry>
+ <entry>LEFT TAB</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>33</entry>
+ <entry>&#x0020;</entry>
+ <entry>MOVE LINE UP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>34</entry>
+ <entry>&#x0020;</entry>
+ <entry>MOVE LINE DOWN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>35</entry>
+ <entry>&#x0020;</entry>
+ <entry>PARTIAL LINE UP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>36</entry>
+ <entry>&#x0020;</entry>
+ <entry>PARTIAL LINE DOWN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>37</entry>
+ <entry>&#x0020;</entry>
+ <entry>PARTIAL SPACE LEFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>38</entry>
+ <entry>&#x0020;</entry>
+ <entry>PARTIAL SPACE RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>39</entry>
+ <entry>&#x0020;</entry>
+ <entry>SET MARGIN LEFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>40</entry>
+ <entry>&#x0020;</entry>
+ <entry>SET MARGIN RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>41</entry>
+ <entry>&#x0020;</entry>
+ <entry>RELEASE MARGIN LEFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>42</entry>
+ <entry>&#x0020;</entry>
+ <entry>RELEASE MARGIN RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>43</entry>
+ <entry>&#x0020;</entry>
+ <entry>RELEASE MARGIN LEFT AND RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>44</entry>
+ <entry>&#x0020;</entry>
+ <entry>FAST CURSOR LEFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>45</entry>
+ <entry>&#x0020;</entry>
+ <entry>FAST CURSOR RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>46</entry>
+ <entry>&#x0020;</entry>
+ <entry>FAST CURSOR UP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>47</entry>
+ <entry>&#x0020;</entry>
+ <entry>FAST CURSOR DOWN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>48</entry>
+ <entry>&#x0020;</entry>
+ <entry>CONTINUOUS UNDERLINE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>49</entry>
+ <entry>&#x0020;</entry>
+ <entry>DISCONTINUOUS UNDERLINE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>50</entry>
+ <entry>&#x0020;</entry>
+ <entry>EMPHASIZE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>51</entry>
+ <entry>&#x0020;</entry>
+ <entry>CENTER OBJECT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>52</entry>
+ <entry>&#x0020;</entry>
+ <entry>ISO_ENTER</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect2>
+<sect2 id='KeySyms_Used_to_Control_The_Core_Pointer'>
+<title>KeySyms Used to Control The Core Pointer</title>
+<informaltable frame='topbot'>
+<?dbfo keep-together="auto" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Byte 3</entry>
+ <entry>Byte 4</entry>
+ <entry>Character</entry>
+ <entry>Name</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>254</entry>
+ <entry>224</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER LEFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>225</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>226</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER UP</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>227</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER DOWN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>228</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER UP AND LEFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>229</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER UP AND RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>230</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER DOWN AND LEFT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>231</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER DOWN AND RIGHT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>232</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEFAULT POINTER BUTTON</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>233</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON ONE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>234</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON TWO</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>235</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON THREE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>236</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON FOUR</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>237</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON FIVE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>238</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEFAULT POINTER BUTTON DOUBLE CLICK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>239</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON ONE DOUBLE CLICK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>240</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON TWO DOUBLE CLICK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>241</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON THREE DOUBLE CLICK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>242</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON FOUR DOUBLE CLICK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>243</entry>
+ <entry>&#x0020;</entry>
+ <entry>POINTER BUTTON FIVE DOUBLE CLICK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>244</entry>
+ <entry>&#x0020;</entry>
+ <entry>DRAG DEFAULT POINTER BUTTON</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>245</entry>
+ <entry>&#x0020;</entry>
+ <entry>DRAG POINTER BUTTON ONE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>246</entry>
+ <entry>&#x0020;</entry>
+ <entry>DRAG POINTER BUTTON TWO</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>247</entry>
+ <entry>&#x0020;</entry>
+ <entry>DRAG POINTER BUTTON THREE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>248</entry>
+ <entry>&#x0020;</entry>
+ <entry>DRAG POINTER BUTTON FOUR</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>249</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE POINTER FROM KEYBOARD</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>250</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE KEYBOARD POINTER ACCEL</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>251</entry>
+ <entry>&#x0020;</entry>
+ <entry>SET DEFAULT POINTER BUTTON NEXT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>252</entry>
+ <entry>&#x0020;</entry>
+ <entry>SET DEFAULT POINTER BUTTON PREVIOUS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>253</entry>
+ <entry>&#x0020;</entry>
+ <entry>DRAG POINTER BUTTON FIVE</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect2>
+<sect2 id='KeySyms_Used_to_Change_Keyboard_Controls'>
+<title>KeySyms Used to Change Keyboard Controls</title>
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Byte 3</entry>
+ <entry>Byte 4</entry>
+ <entry>Character</entry>
+ <entry>Name</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>254</entry>
+ <entry>112</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE ACCESSX KEYS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>113</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE ACCESSX FEEDBACK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>114</entry>
+ <entry>&#x0020;</entry>
+ <entry>TOGGLE REPEAT KEYS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>115</entry>
+ <entry>&#x0020;</entry>
+ <entry>TOGGLE SLOW KEYS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>116</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE BOUNCE KEYS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>117</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE STICKY KEYS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>118</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE MOUSE KEYS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>119</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE MOUSE KEYS ACCELERATION</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>120</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE OVERLAY1</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>121</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE OVERLAY2</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>122</entry>
+ <entry>&#x0020;</entry>
+ <entry>ENABLE AUDIBLE BELL</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect2>
+<sect2 id='KeySyms_Used_To_Control_The_Server'>
+<title>KeySyms Used To Control The Server</title>
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Byte</entry>
+ <entry>Byte</entry>
+ <entry>Character</entry>
+ <entry>Name</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>254</entry>
+ <entry>208</entry>
+ <entry>&#x0020;</entry>
+ <entry>FIRST SCREEN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>209</entry>
+ <entry>&#x0020;</entry>
+ <entry>PREVIOUS SCREEN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>210</entry>
+ <entry>&#x0020;</entry>
+ <entry>NEXT SCREEN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>211</entry>
+ <entry>&#x0020;</entry>
+ <entry>LAST SCREEN</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>212</entry>
+ <entry>&#x0020;</entry>
+ <entry>TERMINATE SERVER</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect2>
+<sect2 id='KeySyms_for_Non_Spacing_Diacritical_Keys'>
+<title>KeySyms for Non-Spacing Diacritical Keys</title>
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Byte</entry>
+ <entry>Byte</entry>
+ <entry>Character</entry>
+ <entry>Name</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>254</entry>
+ <entry>80</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD GRAVE ACCENT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>81</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD ACUTE ACCENT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>82</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD CIRCUMFLEX</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>83</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD TILDE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>84</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD MACRON</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>85</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD BREVE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>86</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD DOT ABOVE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>87</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD DIAERESIS</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>88</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD RING ABOVE</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>89</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD DOUBLE ACUTE ACCENT</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>90</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD CARON</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>91</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD CEDILLA</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>92</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD OGONEK</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>93</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD IOTA</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>94</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD VOICED SOUND</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>95</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD SEMI VOICED SOUND</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>96</entry>
+ <entry>&#x0020;</entry>
+ <entry>DEAD DOT BELOW</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+</sect2>
+</sect1>
+</appendix>
diff --git a/specs/appD.xml b/specs/appD.xml
new file mode 100644
index 0000000..23aed05
--- /dev/null
+++ b/specs/appD.xml
@@ -0,0 +1,2096 @@
+<appendix id='protocol_encoding'>
+<title>Protocol Encoding</title>
+
+<sect1 id='Syntactic_Conventions'>
+<title>Syntactic Conventions</title>
+
+<para>
+This document uses the same syntactic conventions as the encoding of the core X
+protocol, with the following additions:
+</para>
+
+<para>
+A LISTofITEMs contains zero or more items of variable type and size. The encode
+form for a LISTofITEMs is:
+</para>
+
+<literallayout class='monospaced'>
+v LISTofITEMs NAME
+
+ TYPE MASK-EXPRESSION
+ value1 corresponding field(s)
+ ...
+ valuen corresponding field(s)
+</literallayout>
+
+<para>
+The MASK-EXPRESSION is an expression using C-style boolean operators and fields
+of the request which specifies the bitmask used to determine whether or not a
+mem ber of the LISTofITEMs is present. If present, TYPE specifies the
+interpretation of the resulting bitmask and the values are listed using the
+symbolic names of the members of the set. If TYPE is blank, the values are
+numeric constants.
+</para>
+
+
+<para>
+It is possible for a single bit in the MASK-EXPRESSION to control more than one
+ITEM — if the bit is set, all listed ITEMs are present. It is also possible
+for multiple bits in the MASK-EXPRESSION to control a single ITEM — if any of
+the bits associated with an ITEM are set, it is present in the LISTofITEMs.
+</para>
+
+
+<para>
+The size of a LISTofITEMS is derived from the items that are present in the
+list, so it is always given as a variable in the request description, and the
+request is followed by a section of the form:
+</para>
+
+<literallayout class='monospaced'>
+ITEMs
+encode-form
+...
+encode-form
+</literallayout>
+
+<para>
+listing an encode-form for each ITEM. The NAME in each encode-form keys to the
+fields listed as corresponding to each bit in the MASK-EXPRESSION. Items are
+not necessarily the same size, and the size specified in the encoding form is
+the size that the item occupies if it is present.
+</para>
+
+
+<para>
+Some types are of variable size. The encode-form for a list of items of a
+single type but variable size is:
+</para>
+
+<literallayout class='monospaced'>
+S0+..Ss LISTofTYPE name
+</literallayout>
+
+<para>
+Which indicates that the list has <emphasis>
+s</emphasis>
+ elements of variable size and that the size of the list is the sum of the
+sizes of all of the elements that make up the list. The notation Sn refers to
+the size of the <emphasis>
+n</emphasis>
+th element of the list and the notation S* refers to the size of the list as a
+whole.
+</para>
+
+
+<para>
+The definition of a type of variable size includes an expression which
+specifies the size. The size is specified as a constant plus a variable
+expression; the constant specifies the size of the fields that are always
+present and the variables which make up the variable expression are defined in
+the constant portion of the structure. For example, the following definition
+specifies a counted string with a two-byte length field preceding the string:
+</para>
+
+
+<literallayout class='monospaced'>
+TYPE 2+n+p
+2 n length
+n STRING8 string
+p unused,p=pad(n)
+</literallayout>
+
+<para>
+Some fields are optional. The size of an optional field has the form:
+"[<emphasis>
+expr</emphasis>
+]" where expr specifies the size of the field if it is present. An explanation
+of the conditions under which the field is present follows the name in the
+encode form:
+</para>
+
+<literallayout class='monospaced'>
+1 BOOL more
+3 unused
+[4] CARD32 optData, if more==TRUE
+</literallayout>
+
+<para>
+This portion of the structure is four bytes long if more is FALSE or eight
+bytes long if more is TRUE. This notation can also be used in size expressions;
+for example, the size of the previous structure is written as "4+[4]" bytes.
+</para>
+
+
+</sect1>
+<sect1 id='appD::Common_Types'>
+<title>Common Types</title>
+<literallayout class='monospaced'>
+SETofKB_EVENTTYPE
+ #x0001 XkbNewKeyboardNotify
+ #x0002 XkbMapNotify
+ #x0004 XkbStateNotify
+ #x0008 XkbControlsNotify
+ #x0010 XkbIndicatorStateNotify
+ #x0020 XkbIndicatorMapNotify
+ #x0040 XkbNamesNotify
+ #x0080 XkbCompatMapNotify
+ #x0100 XkbBellNotify
+ #x0200 XkbActionMessage
+ #x0400 XkbAccessXNotify
+ #x0800 XkbExtensionDeviceNotify
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_NKNDETAIL
+ #x01 XkbNKN_Keycodes
+ #x02 XkbNKN_Geometry
+ #x04 XkbNKN_DeviceID
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_AXNDETAIL
+ #x01 XkbAXN_SKPress
+ #x02 XkbAXN_SKAccept
+ #x04 XkbAXN_SKReject
+ #x08 XkbAXN_SKRelease
+ #x10 XkbAXN_BKAccept
+ #x20 XkbAXN_BKReject
+ #x40 XkbAXN_AXKWarning
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_MAPPART
+ #x0001 XkbKeyTypes
+ #x0002 XkbKeySyms
+ #x0004 XkbModifierMap
+ #x0008 XkbExplicitComponents
+ #x0010 XkbKeyActions
+ #x0020 XkbKeyBehaviors
+ #x0040 XkbVirtualMods
+ #x0080 XkbVirtualModMap
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_STATEPART
+ #x0001 XkbModifierState
+ #x0002 XkbModifierBase
+ #x0004 XkbModifierLatch
+ #x0008 XkbModifierLock
+ #x0010 XkbGroupState
+ #x0020 XkbGroupBase
+ #x0040 XkbGroupLatch
+ #x0080 XkbGroupLock
+ #x0100 XkbCompatState
+ #x0200 XkbGrabMods
+ #x0400 XkbCompatGrabMods
+ #x0800 XkbLookupMods
+ #x1000 XkbCompatLookupMods
+ #x2000 XkbPointerButtons
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_BOOLCTRL
+ #x00000001 XkbRepeatKeys
+ #x00000002 XkbSlowKeys
+ #x00000004 XkbBounceKeys
+ #x00000008 XkbStickyKeys
+ #x00000010 XkbMouseKeys
+ #x00000020 XkbMouseKeysAccel
+ #x00000040 XkbAccessXKeys
+ #x00000080 XkbAccessXTimeoutMask
+ #x00000100 XkbAccessXFeedbackMask
+ #x00000200 XkbAudibleBellMask
+ #x00000400 XkbOverlay1Mask
+ #x00000800 XkbOverlay2Mask
+ #x00001000 XkbIgnoreGroupLockMask
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_CONTROL
+ Encodings are the same as for SETofKB_BOOLCTRL, with the addition of:
+ #x080000000 XkbGroupsWrap
+ #x100000000 XkbInternalMods
+ #x200000000 XkbIgnoreLockMods
+ #x400000000 XkbPerKeyRepeat
+ #x800000000 XkbControlsEnabled
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_AXFBOPT
+ #x0001 XkbAX_SKPressFB
+ #x0002 XkbAX_SKAcceptFB
+ #x0004 XkbAX_FeatureFB
+ #x0008 XkbAX_SlowWarnFB
+ #x0010 XkbAX_IndicatorFB
+ #x0020 XkbAX_StickyKeysFB
+ #x0100 XkbAX_SKReleaseFB
+ #x0200 XkbAX_SKRejectFB
+ #x0400 XkbAX_BKRejectFB
+ #x0800 XkbAX_DumbBell
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_AXSKOPT
+ #x0040 XkbAX_TwoKeys
+ #x0080 XkbAX_LatchToLock
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_AXOPTION
+ Encoding same as the bitwise union of :
+ SETofKB_AXFBOPT
+ SETofKB_AXSKOPT
+</literallayout>
+
+<literallayout class='monospaced'>KB_DEVICESPEC
+ 0..255 input extension device id
+ #x100 XkbUseCoreKbd
+ #x200 XkbUseCorePtr
+</literallayout>
+
+<literallayout class='monospaced'>KB_LEDCLASSRESULT
+ 0 KbdFeedbackClass
+ 4 LedFeedbackClass
+</literallayout>
+
+<literallayout class='monospaced'>KB_LEDCLASSSPEC
+ Encoding same as KB_LEDCLASSRESULT, with the addition of:
+ #x0300 XkbDfltXIClass
+ #x0500 XkbAllXIClasses
+</literallayout>
+
+<literallayout class='monospaced'>KB_BELLCLASSRESULT
+ 0 KbdFeedbackClass
+ 5 BellFeedbackClass
+</literallayout>
+
+<literallayout class='monospaced'>KB_BELLCLASSSPEC
+ Encoding same as KB_BELLCLASSRESULT, with the addition of:
+ #x0300 XkbDfltXIClass
+</literallayout>
+
+<literallayout class='monospaced'>KB_IDSPEC
+ 0..255 input extension feedback id
+ #x0400 XkbDfltXIId
+</literallayout>
+
+<literallayout class='monospaced'>KB_IDRESULT
+ Encoding same as KB_IDSPEC, with the addition of:
+ #xff00 XkbXINone
+</literallayout>
+
+<literallayout class='monospaced'>KB_MULTIIDSPEC
+ encodings same as KB_IDSPEC, with the addition of:
+ #x0500 XkbAllXIIds
+</literallayout>
+
+<literallayout class='monospaced'>KB_GROUP
+ 0 XkbGroup1
+ 1 XkbGroup2
+ 2 XkbGroup3
+ 3 XkbGroup4
+</literallayout>
+
+<literallayout class='monospaced'>KB_GROUPS
+ Encoding same as KB_GROUP, with the addition of:
+ 254 XkbAnyGroup
+ 255 XkbAllGroups
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_GROUP
+ #x01 XkbGroup1
+ #x02 XkbGroup2
+ #x04 XkbGroup3
+ #x08 XkbGroup4
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_GROUPS
+ Encoding same as SETofKB_GROUP, with the addition of:
+ #x80 XkbAnyGroup
+</literallayout>
+
+<literallayout class='monospaced'>KB_GROUPSWRAP
+ #x00 XkbWrapIntoRange
+ #x40 XkbClampIntoRange
+ #x80 XkbRedirectIntoRange
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_VMODSHIGH
+ #x80 virtual modifier 15
+ #x40 virtual modifier 14
+ #x20 virtual modifier 13
+ #x10 virtual modifier 12
+ #x08 virtual modifier 11
+ #x04 virtual modifier 10
+ #x02 virtual modifier 9
+ #x01 virtual modifier 8
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_VMODSLOW
+ #x80 virtual modifier 7
+ #x40 virtual modifier 6
+ #x20 virtual modifier 5
+ #x10 virtual modifier 4
+ #x08 virtual modifier 3
+ #x04 virtual modifier 2
+ #x02 virtual modifier 1
+ #x01 virtual modifier 0
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_VMOD
+ #x8000 virtual modifier 15
+ #x4000 virtual modifier 14
+ #x2000 virtual modifier 13
+ #x1000 virtual modifier 12
+ #x0800 virtual modifier 11
+ #x0400 virtual modifier 10
+ #x0200 virtual modifier 9
+ #x0100 virtual modifier 8
+ #x0080 virtual modifier 7
+ #x0040 virtual modifier 6
+ #x0020 virtual modifier 5
+ #x0010 virtual modifier 4
+ #x0008 virtual modifier 3
+ #x0004 virtual modifier 2
+ #x0002 virtual modifier 1
+ #x0001 virtual modifier 0
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_EXPLICIT
+ #x80 XkbExplicitVModMap
+ #x40 XkbExplicitBehavior
+ #x20 XkbExplicitAutoRepeat
+ #x10 XkbExplicitInterpret
+ #x08 XkbExplicitKeyType4
+ #x04 XkbExplicitKeyType3
+ #x02 XkbExplicitKeyType2
+ #x01 XkbExplicitKeyType1
+</literallayout>
+
+<literallayout class='monospaced'>KB_SYMINTERPMATCH
+ #x80 XkbSI_LevelOneOnly
+ #x7f operation, one of the following:
+ 0 XkbSI_NoneOf
+ 1 XkbSI_AnyOfOrNone
+ 2 XkbSI_AnyOf
+ 3 XkbSI_AllOf
+ 4 XkbSI_Exactly
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_IMFLAG
+ #x80 XkbIM_NoExplicit
+ #x40 XkbIM_NoAutomatic
+ #x20 XkbIM_LEDDrivesKB
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_IMMODSWHICH
+ #x10 XkbIM_UseCompat
+ #x08 XkbIM_UseEffective
+ #x04 XkbIM_UseLocked
+ #x02 XkbIM_UseLatched
+ #x01 XkbIM_UseBase
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_IMGROUPSWHICH
+ #x10 XkbIM_UseCompat
+ #x08 XkbIM_UseEffective
+ #x04 XkbIM_UseLocked
+ #x02 XkbIM_UseLatched
+ #x01 XkbIM_UseBase
+</literallayout>
+
+<literallayout class='monospaced'>KB_INDICATORMAP
+1 SETofKB_IMFLAGS flags
+1 SETofKB_IMGROUPSWHICH whichGroups
+1 SETofKB_GROUP groups
+1 SETofKB_IMMODSWHICH whichMods
+1 SETofKEYMASK mods
+1 SETofKEYMASK realMods
+2 SETofKB_VMOD vmods
+4 SETofKB_BOOLCTRL ctrls
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_CMDETAIL
+ #x01 XkbSymInterp
+ #x02 XkbGroupCompat
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_NAMEDETAIL
+ #x0001 XkbKeycodesName
+ #x0002 XkbGeometryName
+ #x0004 XkbSymbolsName
+ #x0008 XkbPhysSymbolsName
+ #x0010 XkbTypesName
+ #x0020 XkbCompatName
+ #x0040 XkbKeyTypeNames
+ #x0080 XkbKTLevelNames
+ #x0100 XkbIndicatorNames
+ #x0200 XkbKeyNames
+ #x0400 XkbKeyAliases
+ #x0800 XkbVirtualModNames
+ #x1000 XkbGroupNames
+ #x2000 XkbRGNames
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_GBNDETAIL
+ #x01 XkbGBN_Types
+ #x02 XkbGBN_CompatMap
+ #x04 XkbGBN_ClientSymbols
+ #x08 XkbGBN_ServerSymbols
+ #x10 XkbGBN_IndicatorMaps
+ #x20 XkbGBN_KeyNames
+ #x40 XkbGBN_Geometry
+ #x80 XkbGBN_OtherNames
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_XIEXTDEVFEATURE
+ #x02 XkbXI_ButtonActions
+ #x04 XkbXI_IndicatorNames
+ #x08 XkbXI_IndicatorMaps
+ #x10 XkbXI_IndicatorState
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_XIFEATURE
+ Encoding same as SETofKB_XIEXTDEVFEATURE, with the addition of:
+ #x01 XkbXI_Keyboards
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_XIDETAIL
+ Encoding same as SETofKB_XIFEATURE, with the addition of:
+ #x8000 XkbXI_UnsupportedFeature
+</literallayout>
+
+<literallayout class='monospaced'>SETofKB_PERCLIENTFLAG
+ #x01 XkbDetectableAutorepeat
+ #x02 XkbGrabsUseXKBState
+ #x04 XkbAutoResetControls
+ #x08 XkbLookupStateWhenGrabbed
+ #x10 XkbSendEventUsesXKBState
+</literallayout>
+
+<literallayout class='monospaced'>KB_MODDEF
+1 SETofKEYMASK mask
+1 SETofKEYMASK realMods
+2 SETofVMOD vmods
+</literallayout>
+
+<literallayout class='monospaced'>KB_COUNTED_STRING8
+1 l length
+l STRING8 string
+</literallayout>
+
+<literallayout class='monospaced'>KB_COUNTED_STRING16
+2 l length
+l STRING8 string
+</literallayout>
+
+<literallayout class='monospaced'>KB_COUNTED_STRING16
+p unused,p=pad(2+l)
+</literallayout>
+
+</sect1>
+<sect1 id='appD::Errors'>
+<title>Errors</title>
+
+<literallayout class='monospaced'>1 0 Error
+2 ?? code
+2 CARD16 sequence
+4 CARD32 error value
+ most significant 8 bits of error value have the meaning:
+ 0xff XkbErrBadDevice
+ 0xfe XkbErrBadClass
+ 0xfd XkbErrBadId
+ the least significant 8 bits of the error value contain the device id,
+class, or feedback
+ id which failed.
+2 CARD16 minor opcode
+1 CARD8 major opcode
+21 unused
+</literallayout>
+
+</sect1>
+<sect1 id='appD::Key_Actions'>
+<title>Key Actions</title>
+
+<literallayout class='monospaced'>1 0 type
+7 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 1 type
+1 BITMASK flags
+ #x01 XkbSA_ClearLocks
+ #x02 XkbSA_LatchToLock
+ #x04 XkbSA_UseModMapMods
+1 SETofKEYMASK mask
+1 SETofKEYMASK real modifiers
+1 SETofKB_VMODSHIGH virtual modifiers high
+1 SETofKB_VMODSLOW virtual modifiers low
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 2 type
+1 BITMASK flags
+ #x01 XkbSA_ClearLocks
+ #x02 XkbSA_LatchToLock
+ #x04 XkbSA_UseModMapMods
+1 SETofKEYMASK mask
+1 SETofKEYMASK real modifiers
+1 SETofKB_VMODSHIGH virtual modifiers high
+1 SETofKB_VMODSLOW virtual modifiers low
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 3 type
+1 BITMASK flags
+ #x01 XkbSA_LockNoLock
+ #x02 XkbSA_LockNoUnlock
+ #x04 XkbSA_UseModMapMods
+1 SETofKEYMASK mask
+1 SETofKEYMASK real modifiers
+1 SETofKB_VMODSHIGH virtual modifiers high
+1 SETofKB_VMODSLOW virtual modifiers low
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 4 type
+1 BITMASK flags
+ #x01 XkbSA_ClearLocks
+ #x02 XkbSA_LatchToLock
+ #x04 XkbSA_GroupAbsolute
+1 INT8 group
+5 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 5 type
+1 BITMASK flags
+ #x01 XkbSA_ClearLocks
+ #x02 XkbSA_LatchToLock
+ #x04 XkbSA_GroupAbsolute
+1 INT8 group
+5 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 6 type
+1 BITMASK flags
+ #x01 XkbSA_LockNoLock
+ #x02 XkbSA_LockNoUnlock
+ #x04 XkbSA_GroupAbsolute
+1 INT8 group
+5 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 7 type
+1 BITMASK flags
+ #x01 XkbSA_NoAcceleration
+ #x02 XkbSA_MoveAbsoluteX
+ #x04 XkbSA_MoveAbsoluteY
+1 INT8 x high
+1 CARD8 x low
+1 INT8 y high
+1 CARD8 y low
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 8 type
+1 BITMASK flags
+1 CARD8 count
+1 CARD8 button
+4 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 9 type
+1 BITMASK flags
+1 unused
+1 CARD8 button
+4 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 10 type
+1 BITMASK flags
+ #x04 XkbSA_DfltBtnAbsolute
+1 BITMASK affect
+ #x01 XkbSA_AffectDfltBtn
+1 INT8 value
+4 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 11 type
+1 BITMASK flags
+ #x01 XkbSA_LockNoLock
+ #x02 XkbSA_LockNoUnlock
+ #x04 XkbSA_UseModMapMods (if SA_ISODfltIsGroup is 0)
+ #x04 XkbSA_GroupAbsolute (if SA_ISODfltIsGroup is 1)
+ #x80 XkbSA_ISODfltIsGroup
+1 SETofKEYMASK mask
+1 SETofKEYMASK real modifiers
+1 INT8 group
+1 BITMASK affect
+ #x08 XkbSA_ISONoAffectCtrls
+ #x10 XkbSA_ISONoAffectPtr
+ #x20 XkbSA_ISONoAffectGroup
+ #x40 XkbSA_ISONoAffectMods
+1 SETofKB_VMODSHIGH virtual modifiers high
+1 SETofKB_VMODSLOW virtual modifiers low
+</literallayout>
+
+<literallayout class='monospaced'>1 12 type
+7 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 13 type
+1 BITMASK flags
+ #x01 XkbSA_SwitchApplication
+ #x04 XkbSA_SwitchAbsolute
+1 INT8 new screen
+5 unused (must be 0)
+</literallayout>
+
+<literallayout class='monospaced'>1 14 type
+3 unused (must be 0)
+1 BITMASK boolean controls high
+ #x01 XkbAccessXFeedbackMask
+ #x02 XkbAudibleBellMask
+ #x04 XkbOverlay1Mask
+ #x08 XkbOverlay2Mask
+ #x10 XkbIgnoreGroupLockMask
+1 BITMASK boolean controls low
+ #x01 XkbRepeatKeys
+ #x02 XkbSlowKeys
+ #x04 XkbBounceKeys
+ #x08 XkbStickyKeys
+ #x10 XkbMouseKeys
+ #x20 XkbMouseKeysAccel
+ #x40 XkbAccessXKeys
+ #x80 XkbAccessXTimeoutMask
+2 unused (must be 0)
+</literallayout>
+
+<literallayout class='monospaced'>1 15 type
+3 unused (must be 0)
+1 BITMASK boolean controls high
+ #x01 XkbAccessXFeedbackMask
+ #x02 XkbAudibleBellMask
+ #x04 XkbOverlay1Mask
+ #x08 XkbOverlay2Mask
+ #x10 XkbIgnoreGroupLockMask
+1 BITMASK boolean controls low
+ #x01 XkbRepeatKeys
+ #x02 XkbSlowKeys
+ #x04 XkbBounceKeys
+ #x08 XkbStickyKeys
+ #x10 XkbMouseKeys
+ #x20 XkbMouseKeysAccel
+ #x40 XkbAccessXKeys
+ #x80 XkbAccessXTimeoutMask
+</literallayout>
+
+<literallayout class='monospaced'>1 16 type
+2 unused (must be 0)
+</literallayout>
+
+<literallayout class='monospaced'>1 16 type
+1 BITMASK flags
+ #x01 XkbSA_MessageOnPress
+ #x02 XkbSA_MessageOnRelease
+ #x04 XkbSA_MessageGenKeyEvent
+6 STRING message
+</literallayout>
+
+<literallayout class='monospaced'>1 17 type
+1 KEYCODE new key
+1 SETofKEYMASK mask
+1 SETofKEYMASK real modifiers
+1 SETofKB_VMODSHIGH virtual modfiiers mask high
+1 SETofKB_VMODSLOW virtual modifiers mask low
+1 SETofKB_VMODSHIGH virtual modifiers high
+1 SETofKB_VMODSLOW virtual modfiers low
+</literallayout>
+
+<literallayout class='monospaced'>1 18 type
+1 0 flags
+1 CARD8 count
+1 CARD8 button
+1 CARD8 device
+3 unused (must be 0)
+</literallayout>
+
+<literallayout class='monospaced'>1 19 type
+1 BITMASK flags
+ #x01 XkbSA_LockNoLock
+ #x02 XkbSA_LockNoUnlock
+1 unused
+1 CARD8 button
+1 CARD8 device
+</literallayout>
+
+<literallayout class='monospaced'>1 20 type
+1 CARD8 device
+1 KB_SA_VALWHAT valuator 1 what
+ #x00 XkbSA_IgnoreVal
+ #x01 XkbSA_SetValMin
+ #x02 XkbSA_SetValCenter
+ #x03 XkbSA_SetValMax
+ #x04 XkbSA_SetValRelative
+ #x05 XkbSA_SetValAbsolute
+1 CARD8 valuator 1 index
+1 CARD8 valuator 1 value
+1 KB_SA_VALWHAT valuator 2 what
+ Encodings as for "valuator 1 what" above
+1 CARD8 valuator 2 index
+1 CARD8 valuator 2 value
+</literallayout>
+
+</sect1>
+<sect1 id='Key_Behaviors'>
+<title>Key Behaviors</title>
+
+<literallayout class='monospaced'>1 #x00 type
+1 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 #x01 type
+1 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 #x02 type
+1 0..31 group
+</literallayout>
+
+<literallayout class='monospaced'>1 #x03 type
+1 KEYCODE key
+</literallayout>
+
+<literallayout class='monospaced'>1 #x04 type
+1 CARD8 key
+</literallayout>
+
+<literallayout class='monospaced'>1 #x81 type
+1 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 #x82 type
+1 0..31 group
+</literallayout>
+
+<literallayout class='monospaced'>1 #x83 type
+1 KEYCODE key
+</literallayout>
+
+<literallayout class='monospaced'>1 #x84 type
+1 KEYCODE key
+</literallayout>
+
+</sect1>
+<sect1 id='appD::Requests'>
+<title>Requests</title>
+
+<literallayout class='monospaced'>1 ?? opcode
+1 0 xkb-opcode
+2 2 request-length
+2 CARD16 wantedMajor
+2 CARD16 wantedMinor
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 BOOL supported
+2 CARD16 sequence number
+4 0 reply length
+2 1 serverMajor
+2 0 serverMinor
+20 unused
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 1 xkb-opcode
+2 4+(V+p)/4 request-length
+2 KB_DEVICESPEC deviceSpec
+2 SETofKB_EVENTTYPE affectWhich
+2 SETofKB_EVENTTYPE clear
+2 SETofKB_EVENTTYPE selectAll
+2 SETofKB_MAPDETAILS affectMap
+2 SETofKB_MAPDETAILS map
+V LISTofITEMs details
+ SETofKB_EVENTTYPE
+(affectWhich&amp;(~clear)&amp;(~selectAll))
+ XkbNewKeyboardNotify affectNewKeyboard, newKeyboardDetails
+ XkbStateNotify affectState, stateDetails
+ XkbControlsNotify affectCtrls, ctrlDetails
+ XkbIndicatorStateNotify affectIndicatorState, indicatorStateDetails
+ XkbIndicatorMapNotify affectIndicatorMap, indicatorMapDetails
+ XkbNamesNotify affectNames, namesDetails
+ XkbCompatMapNotify affectCompat, compatDetails
+ XkbBellNotify affectBell, bellDetails
+ XkbActionMessage affectMsgDetails, msgDetails
+ XkbExtensionDeviceNotify affectExtDev, extdevDetails
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+p unused, p=pad(V)
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+2 SETofKB_NKNDETAIL affectNewKeyboard
+2 SETofKB_NKNDETAIL newKeyboardDetails
+2 SETofKB_STATEPART affectState
+2 SETofKB_STATEPART stateDetails
+4 SETofKB_CONTROL affectCtrls
+4 SETofKB_CONTROL ctrlDetails
+4 SETofKB_INDICATOR affectIndicatorState
+4 SETofKB_INDICATOR indicatorStateDetails
+4 SETofKB_INDICATOR affectIndicatorMaps
+4 SETofKB_INDICATOR indicatorMapDetails
+2 SETofKB_NAME_DETAIL affectNames
+2 SETofKB_NAME_DETAIL namesDetails
+1 SETofKB_CMDETAIL affectCompat
+1 SETofKB_CMDETAIL compatDetails
+1 SETofKB_BELLDETAIL affectBell
+1 SETofKB_BELLDETAIL bellDetails
+1 SETofKB_MSGDETAIL affectMsgDetails
+1 SETofKB_MSGDETAIL msgDetails
+2 SETofKB_AXNDETAIL affectAccessX
+2 SETofKB_AXNDETAIL accessXDetails
+2 SETofKB_XIDETAIL affectExtDev
+2 SETofKB_XIDETAIL extdevDetails
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 3 xkb-opcode
+2 7 request-length
+2 KB_DEVICESPEC deviceSpec
+2 KB_BELLCLASSSPEC bellClass
+2 KB_IDSPEC bellID
+1 INT8 percent
+1 BOOL forceSound
+1 BOOL eventOnly
+1 unused
+2 INT16 pitch
+2 INT16 duration
+2 unused
+4 ATOM name
+4 WINDOW window
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? opcode
+1 4 xkb-opcode
+2 2 request-length
+2 KB_DEVICESPEC deviceSpec
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 0 length
+1 SETofKEYMASK mods
+1 SETofKEYMASK baseMods
+1 SETofKEYMASK latchedMods
+1 SETofKEYMASK lockedMods
+1 KP_GROUP group
+1 KP_GROUP lockedGroup
+2 INT16 baseGroup
+2 INT16 latchedGroup
+1 SETofKEYMASK compatState
+1 SETofKEYMASK grabMods
+1 SETofKEYMASK compatGrabMods
+1 SETofKEYMASK lookupMods
+1 SETofKEYMASK compatLookupMods
+1 unused
+2 SETofBUTMASK ptrBtnState
+6 unused
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 5 xkb-opcode
+2 4 request-length
+2 KB_DEVICESPEC deviceSpec
+1 SETofKEYMASK affectModLocks
+1 SETofKEYMASK modLocks
+1 BOOL lockGroup
+1 KB_GROUP groupLock
+1 SETofKEYMASK affectModLatches
+1 SETofKEYMASK modLatches
+1 unused
+1 BOOL latchGroup
+2 INT16 groupLatch
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? opcode
+1 6 xkb-opcode
+2 2 request-length
+2 KB_DEVICESPEC deviceSpec
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 15 length
+1 CARD8 mouseKeysDfltBtn
+1 CARD8 numGroups
+1 CARD8 groupsWrap
+1 SETofKEYMASK internalMods.mask
+1 SETofKEYMASK ignoreLockMods.mask
+1 SETofKEYMASK internalMods.realMods
+1 SETofKEYMASK ignoreLockMods.realMods
+1 unused
+2 SETofKB_VMOD internalMods.vmods
+2 SETofKB_VMOD ignoreLockMods.vmods
+2 CARD16 repeatDelay
+2 CARD16 repeatInterval
+2 CARD16 slowKeysDelay
+2 CARD16 debounceDelay
+2 CARD16 mouseKeysDelay
+2 CARD16 mouseKeysInterval
+2 CARD16 mouseKeysTimeToMax
+2 CARD16 mouseKeysMaxSpeed
+2 INT16 mouseKeysCurve
+2 SETofKB_AXOPTION accessXOptions
+2 CARD16 accessXTimeout
+2 SETofKB_AXOPTION accessXTimeoutOptionsMask
+2 SETofKB_AXOPTION accessXTimeoutOptionValues
+2 unused
+4 SETofKB_BOOLCTRL accessXTimeoutMask
+4 SETofKB_BOOLCTRL accessXTimeoutValues
+4 SETofKB_BOOLCTRL enabledControls
+32 LISTofCARD8 perKeyRepeat
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 7 xkb-opcode
+2 25 request-length
+2 KB_DEVICESPEC deviceSpec
+1 SETofKEYMASK affectInternalRealMods
+1 SETofKEYMASK internalRealMods
+1 SETofKEYMASK affectIgnoreLockRealMods
+1 SETofKEYMASK ignoreLockRealMods
+2 SETofKB_VMOD affectInternalVirtualMods
+2 SETofKB_VMOD internalVirtualMods
+2 SETofKB_VMOD affectIgnoreLockVirtualMods
+2 SETofKB_VMOD ignoreLockVirtualMods
+1 CARD8 mouseKeysDfltBtn
+1 CARD8 groupsWrap
+2 SETofKB_AXOPTION accessXOptions
+2 unused
+4 SETofKB_BOOLCTRL affectEnabledControls
+4 SETofKB_BOOLCTRL enabledControls
+4 SETofKB_CONTROL changeControls
+2 CARD16 repeatDelay
+2 CARD16 repeatInterval
+2 CARD16 slowKeysDelay
+2 CARD16 debounceDelay
+2 CARD16 mouseKeysDelay
+2 CARD16 mouseKeysInterval
+2 CARD16 mouseKeysTimeToMax
+2 CARD16 mouseKeysMaxSpeed
+2 INT16 mouseKeysCurve
+2 CARD16 accessXTimeout
+4 SETofKB_BOOLCTRL accessXTimeoutMask
+4 SETofKB_BOOLCTRL accessXTimeoutValues
+2 SETofKB_AXOPTION accessXTimeoutOptionsMask
+2 SETofKB_AXOPTION accessXTimeoutOptionsValues
+32 LISTofCARD8 perKeyRepeat
+</literallayout>
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 8 xkb-opcode
+2 7 request-length
+2 KB_DEVICESPEC deviceSpec
+2 SETofKB_MAPPART full
+2 SETofKB_MAPPART partial
+1 CARD8 firstType
+1 CARD8 nTypes
+1 KEYCODE firstKeySym
+1 CARD8 nKeySyms
+1 KEYCODE firstKeyAction
+1 CARD8 nKeyActions
+1 KEYCODE firstKeyBehavior
+1 CARD8 nKeyBehaviors
+2 SETofKB_VMOD virtualMods
+1 KEYCODE firstKeyExplicit
+1 CARD8 nKeyExplicit
+1 KEYCODE firstModMapKey
+1 CARD8 nModMapKeys
+1 KEYCODE firstVModMapKey
+1 CARD8 nVModMapKeys
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 2+(I/4) length
+2 unused
+1 KEYCODE minKeyCode
+1 KEYCODE maxKeyCode
+2 SETofKB_MAPPART present
+1 CARD8 firstType
+1 t nTypes
+1 CARD8 totalTypes
+1 KEYCODE firstKeySym
+2 S totalSyms
+1 s nKeySyms
+1 KEYCODE firstKeyAction
+2 A totalActions
+1 a nKeyActions
+1 KEYCODE firstKeyBehavior
+1 b nKeyBehaviors
+1 B totalKeyBehaviors
+1 KEYCODE firstKeyExplicit
+1 e nKeyExplicit
+1 E totalKeyExplicit
+1 KEYCODE firstModMapKey
+1 m nModMapKeys
+1 M totalModMapKeys
+1 KEYCODE firstVModMapKey
+1 0 nVModMapKeys
+1 V totalVModMapKeys
+1 unused
+2 SETofKB_VMOD virtualMods (has v bits set to 1)
+I LISTofITEMs map
+ SETofKB_MAPPART (present)
+ XkbKeyTypes typesRtrn
+ XkbKeySyms symsRtrn
+ XkbKeyActions actsRtrn.count, actsRtrn.acts
+ XkbKeyBehaviors behaviorsRtrn
+ XkbVirtualMods vmodsRtrn
+ XkbExplicitComponents explicitRtrn
+ XkbModifierMap modmapRtrn
+ XkbVirtualModMap vmodMapRtrn
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+T1+..Tt LISTofKB_KEYTYPE typesRtrn
+8s+4S LISTofKB_KEYSYMMAP symsRtrn
+a LISTofCARD8 actsRtrn.count
+p unused,p=pad(a)
+8A LISTofKB_ACTION actsRtrn.acts
+4B LISTofKB_SETBEHAVIOR behaviorsRtrn
+v LISTofSETofKEYMASK vmodsRtrn
+p unused, p=pad(v)
+2E LISTofKB_SETEXPLICIT explicitRtrn
+p unused,p=pad(2E)
+2M LISTofKB_KEYMODMAP modmapRtrn
+p unused, p=pad(2M)
+4V LISTofKB_KEYVMODMAP vmodMapRtrn
+</literallayout>
+
+<literallayout class='monospaced'>KB_KEYTYPE 8+8m+[4m]
+1 SETofKEYMASK mods.mask
+1 SETofKEYMASK mods.mods
+2 SETofKB_VMOD mods.vmods
+1 CARD8 numLevels
+1 m nMapEntries
+1 BOOL hasPreserve
+1 unused
+8m LISTofKB_KTMAPENTRY map
+[4m] LISTofKB_MODDEF preserve
+</literallayout>
+
+<literallayout class='monospaced'>KB_KTMAPENTRY
+1 BOOL active
+1 SETofKEYMASK mods.mask
+1 CARD8 level
+1 SETofKEYMASK mods.mods
+2 SETofKB_VMOD mods.vmods
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>KB_KEYSYMMAP 8+4n
+4 LISTofCARD8 ktIndex
+1 CARD8 groupInfo
+1 CARD8 width
+2 n nSyms
+4n LISTofKEYSYM syms
+</literallayout>
+
+<literallayout class='monospaced'>KB_SETBEHAVIOR
+1 KEYCODE keycode
+2 KB_BEHAVIOR behavior
+1 unused
+</literallayout>
+
+<literallayout class='monospaced'>KB_SETEXPLICIT
+1 KEYCODE keycode
+1 SETofKB_EXPLICIT explicit
+</literallayout>
+
+<literallayout class='monospaced'>KB_KEYMODMAP
+1 KEYCODE keycode
+1 SETofKB_KEYMASK mods
+</literallayout>
+
+<literallayout class='monospaced'>KB_KEYVMODMAP
+1 KEYCODE keycode
+1 unused
+2 SETofKB_VMOD vmods
+</literallayout>
+
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 9 xkb-opcode
+2 9+(I/4) request-length
+2 KB_DEVICESPEC deviceSpec
+2 SETofKB_MAPPART present
+2 SETofKB_SETMAPFLAGS flags
+ #0001 SetMapResizeTypes
+ #0002 SetMapRecomputeActions
+1 KEYCODE minKeyCode
+1 KEYCODE maxKeyCode
+1 CARD8 firstType
+1 t nTypes
+1 KEYCODE firstKeySym
+1 s nKeySyms
+2 S totalSyms
+1 KEYCODE firstKeyAction
+1 a nKeyActions
+2 A totalActions
+1 KEYCODE firstKeyBehavior
+1 b nKeyBehaviors
+1 B totalKeyBehaviors
+1 KEYCODE firstKeyExplicit
+1 e nKeyExplicit
+1 E totalKeyExplicit
+1 KEYCODE firstModMapKey
+1 m nModMapKeys
+1 M totalModMapKeys
+1 KEYCODE firstVModMapKey
+1 v nVModMapKeys
+1 V totalVModMapKeys
+2 SETofKB_VMOD virtualMods (has n bits set to 1)
+I LISTofITEMs values
+ SETofKB_MAPPART (present)
+ XkbKeyTypes types
+ XkbKeySymbols syms
+ XkbKeyActions actions.count,actions.actions
+ XkbKeyBehaviors behaviors
+ XkbVirtualMods vmods
+ XkbExplicitComponents explicit
+ XkbModifierMap modmap
+ XkbVirtualModMap vmodmap
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+T0+..Tt LISTofKB_SETKEYTYPE types
+8s+4S LISTofKB_KEYSYMMAP syms
+a LISTofCARD8 actions.count
+p unused,p=pad(a)
+8A LISTofKB_ACTION actions.actions
+4B LISTofKB_SETBEHAVIOR behaviors
+v LISTofSETofKEYMASK vmods
+p unused, p=pad(v)
+2E LISTofKB_SETEXPLICIT explicit
+p unused,p=pad(2E)
+2M LISTofKB_KEYMODMAP modmap
+P unused, p=pad(2M)
+4V LISTofKB_KEYVMODMAP vmodmap
+</literallayout>
+
+<literallayout class='monospaced'>KB_SETKEYTYPE 8+4m+[4m]
+1 SETofKEYMASK mask
+1 SETofKEYMASK realMods
+2 SETofKB_VMOD virtualMods
+1 CARD8 numLevels
+1 m nMapEntries
+1 BOOL preserve
+1 unused
+4m LISTofKB_KTSETMAPENTRY entries
+[4m] LISTofKB_MODDEF preserveEntries (if preserve==TRUE)
+</literallayout>
+
+<literallayout class='monospaced'>KB_KTSETMAPENTRY
+1 CARD8 level
+1 SETofKEYMASK realMods
+2 SETofKB_VMOD virtualMods
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 10 xkb-opcode
+2 3 request-length
+2 KB_DEVICESPEC deviceSpec
+1 SETofKB_GROUP groups
+1 BOOL getAllSI
+2 CARD16 firstSI
+2 CARD16 nSI
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 (16n+4g)/4 length
+1 SETofKB_GROUP groupsRtrn (has g bits set to 1)
+1 unused
+2 CARD16 firstSIRtrn
+2 n nSIRtrn
+2 CARD16 nTotalSI
+16 unused
+16n LISTofKB_SYMINTERPRET siRtrn
+4g LISTofKB_MODDEF groupRtrn
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 11 xkb-opcode
+2 4+(16n+4g) request-length
+2 KB_DEVICESPEC deviceSpec
+1 unused
+1 BOOL recomputeActions
+1 BOOL truncateSI
+1 SETofKB_GROUP groups (has g bits set to 1)
+2 CARD16 firstSI
+2 n nSI
+2 unused
+16n LISTofKB_SYMINTERPRET si
+4g LISTofKB_MODDEF groupMaps
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? opcode
+1 12 xkb-opcode
+2 2 request-length
+2 KB_DEVICESPEC deviceSpec
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 0 length
+4 SETofKB_INDICATOR state
+20 unused
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 13 xkb-opcode
+2 3 request-length
+2 KB_DEVICESPEC deviceSpec
+2 unused
+4 SETofKB_INDICATOR which
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 12n/4 length
+4 SETofKB_INDICATOR which (has n bits set to 1)
+4 SETofKB_INDICATOR realIndicators
+1 n nIndicators
+15 unused
+12n LISTofKB_INDICATORMAP maps
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 14 xkb-opcode
+2 3+3n request-length
+2 KB_DEVICESPEC deviceSpec
+2 unused
+4 SETofKB_INDICATOR which (has n bits set to 1)
+12n LISTofKB_INDICATORMAP maps
+</literallayout>
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 15 xkb-opcode
+2 4 request-length
+2 KB_DEVICESPEC deviceSpec
+2 KB_LEDCLASSSPEC ledClass
+2 KB_IDSPEC ledID
+2 unused
+4 ATOM indicator
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 0 length
+4 ATOM indicator
+1 BOOL found
+1 BOOL on
+1 BOOL realIndicator
+1 KB_INDICATOR ndx
+1 SETofKB_IMFLAGS map.flags
+1 SETofKB_IMGROUPSWHICH map.whichGroups
+1 SETofKB_GROUPS map.groups
+1 SETofKB_IMMODSWHICH map.whichMods
+1 SETofKEYMASK map.mods
+1 SETofKEYMASK map.realMods
+2 SETofKB_VMOD map.vmods
+4 SETofKB_BOOLCTRL map.ctrls
+1 BOOL supported
+3 unused
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 16 xkb-opcode
+2 8 request-length
+2 KB_DEVICESPEC deviceSpec
+2 KB_LEDCLASSSPEC ledClass
+2 KB_IDSPEC ledID
+2 unused
+4 ATOM indicator
+1 BOOL setState
+1 BOOL on
+1 BOOL setMap
+1 BOOL createMap
+1 unused
+1 SETofKB_IMFLAGS map.flags
+1 SETofKB_IMGROUPSWHICH map.whichGroups
+1 SETofKB_GROUP map.groups
+1 SETofKB_IMMODSWHICH map.whichMods
+1 SETofKEYMASK map.realMods
+2 SETofKB_VMOD map.vmods
+4 SETofKB_BOOLCTRL map.ctrls
+</literallayout>
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 17 xkb-opcode
+2 3 request-length
+2 KB_DEVICESPEC deviceSpec
+2 unused
+4 SETofKB_NAMEDETAIL which
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 V/4 length
+4 SETofKB_NAMEDETAIL which
+1 KEYCODE minKeyCode
+1 KEYCODE maxKeyCode
+1 t nTypes
+1 SETofKB_GROUP groupNames (has g bits set to 1)
+2 SETofKB_VMOD virtualMods (has v bits set to 1)
+1 KEYCODE firstKey
+1 k nKeys
+4 SETofKB_INDICATOR indicators (has i bits set to 1)
+1 r nRadioGroups
+1 a nKeyAliases
+2 l nKTLevels
+4 unused
+V LISTofITEMs valueList
+ SETofKB_NAMEDETAIL (which)
+ XkbKeycodesName keycodesName
+ XkbGeometryName geometryName
+ XkbSymbolsName symbolsName
+ XkbPhySymbolsName physSymbolsName
+ XkbTypesName typesName
+ XkbCompatName compatName
+ XkbKeyTypeNames typeNames
+ XkbKTLevelNames nLevelsPerType, ktLevelNames
+ XkbIndicatorNames indicatorNames
+ XkbVirtualModNames virtualModNames
+ XkbGroupNames groupNames
+ XkbKeyNames keyNames
+ XkbKeyAliases keyAliases
+ XkbRGNames radioGroupNames
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+4 ATOM keycodesName
+4 ATOM geometryName
+4 ATOM symbolsName
+4 ATOM physSymbolsName
+4 ATOM typesName
+4 ATOM compatName
+4t LISTofATOM typeNames
+l LISTofCARD8 nLevelsPerType, sum of all elements=L
+p unused, p=pad(l)
+4L LISTofATOM ktLevelNames
+4i LISTofATOM indicatorNames
+4v LISTofATOM virtualModNames
+4g LISTofATOM groupNames
+4k LISTofKB_KEYNAME keyNames
+8a LISTofKB_KEYALIAS keyAliases
+4r LISTofATOM radioGroupNames
+</literallayout>
+
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 18 xkb-opcode
+2 7+(V/4) request-length
+2 KB_DEVICESPEC deviceSpec
+2 SETofKB_VMOD virtualMods
+4 SETofKB_NAMEDETAIL which
+1 CARD8 firstType
+1 t nTypes
+1 CARD8 firstKTLevel
+1 l nKTLevels
+4 SETofKB_INDICATOR indicators (has i bits set to 1)
+1 SETofKB_GROUP groupNames (has g bits set to 1)
+1 r nRadioGroups
+1 KEYCODE firstKey
+1 k nKeys
+1 a nKeyAliases
+1 unused
+2 L totalKTLevelNames
+V LISTofITEMs values
+ SETofKB_NAMEDETAIL (which)
+ XkbKeycodesName keycodesName
+ XkbGeometryName geometryName
+ XkbSymbolsName symbolsName
+ XkbPhySymbolsName physSymbolsName
+ XkbTypesName typesName
+ XkbCompatName compatName
+ XkbKeyTypeNames typeNames
+ XkbKTLevelNames nLevelsPerType, ktLevelNames
+ XkbIndicatorNames indicatorNames
+ XkbVirtualModNames virtualModNames
+ XkbGroupNames groupNames
+ XkbKeyNames keyNames
+ XkbKeyAliases keyAliases
+ XkbRGNames radioGroupNames
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+4 ATOM keycodesName
+4 ATOM geometryName
+4 ATOM symbolsName
+4 ATOM physSymbolsName
+4 ATOM typesName
+4 ATOM compatName
+4t LISTofATOM typeNames
+l LISTofCARD8 nLevelsPerType
+p unused, p=pad(l)
+4L LISTofATOM ktLevelNames
+4i LISTofATOM indicatorNames
+4v LISTofATOM virtualModNames
+4g LISTofATOM groupNames
+4k LISTofKB_KEYNAME keyNames
+8a LISTofKB_KEYALIAS keyAliases
+4r LISTofATOM radioGroupNames
+</literallayout>
+
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 19 xkb-opcode
+2 3 request-length
+2 KB_DEVICESPEC deviceSpec
+2 unused
+4 ATOM name
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 (f+8p+C*+H*+S*+D*+A*)/4 length
+4 ATOM name
+1 BOOL found
+1 unused
+2 CARD16 widthMM
+2 CARD16 heightMM
+2 p nProperties
+2 c nColors
+2 h nShapes
+2 s nSections
+2 d nDoodads
+2 a nKeyAliases
+1 CARD8 baseColorNdx
+1 CARD8 labelColorNdx
+f KB_COUNTED_STRING16 labelFont
+8p LISTofKB_PROPERTY properties
+C0+..Cc LISTofKB_COUNTED_STRING16 colors
+H0+..Hh LISTofKB_SHAPE shapes
+S0+..Ss LISTofKB_SECTION sections
+D0+..Dd LISTofKB_DOODAD doodads
+A0+..Aa LISTofKB_KEYALIAS keyAliases
+</literallayout>
+
+<literallayout class='monospaced'>KB_PROPERTY 4+n+v
+2 n nameLength
+n STRING8 name
+2 v valueLength
+v STRING8 value
+</literallayout>
+
+<literallayout class='monospaced'>KB_SHAPE 8+O*
+4 ATOM name
+1 o nOutlines
+1 CARD8 primaryNdx
+1 CARD8 approxNdx
+1 unused
+O0+..Oo LISTofKB_OUTLINE outlines
+</literallayout>
+
+<literallayout class='monospaced'>KB_OUTLINE 4+4p
+1 p nPoints
+1 CARD8 cornerRadius
+2 unused
+4p LISTofKB_POINT points
+</literallayout>
+
+<literallayout class='monospaced'>KB_POINT
+2 INT16 x
+2 INT16 y
+</literallayout>
+
+<literallayout class='monospaced'>KB_SECTION 20+R*+D*+O*
+4 ATOM name
+2 INT16 top
+2 INT16 left
+2 CARD16 width
+2 CARD16 height
+2 INT16 angle
+1 CARD8 priority
+1 r nRows
+1 d nDoodads
+1 o nOverlays
+2 unused
+R0+..Rr LISTofKB_ROW rows
+D0+..Dd LISTofKB_DOODAD doodads
+O0+..Oo LISTofKB_OVERLAY overlays
+</literallayout>
+
+<literallayout class='monospaced'>KB_ROW 8+8k
+2 INT16 top
+2 INT16 left
+1 k nKeys
+1 BOOL vertical
+2 unused
+8k LISTofKB_KEY keys
+</literallayout>
+
+<literallayout class='monospaced'>KB_KEY
+4 STRING8 name
+2 INT16 gap
+1 CARD8 shapeNdx
+1 CARD8 colorNdx
+</literallayout>
+
+<literallayout class='monospaced'>KB_OVERLAY 8+R*
+4 ATOM name
+1 r nRows
+3 unused
+R0+..Rr LISTofKB_OVERLAYROW rows
+</literallayout>
+
+<literallayout class='monospaced'>KB_OVERLAYROW 4+8k
+1 CARD8 rowUnder
+1 k nKeys
+2 unused
+8k LISTofKB_OVERLAYKEY keys
+</literallayout>
+
+<literallayout class='monospaced'>KB_OVERLAYKEY
+4 STRING8 over
+4 STRING8 under
+</literallayout>
+
+<literallayout class='monospaced'>KB_SHAPEDOODAD
+4 ATOM name
+1 CARD8 type
+</literallayout>
+
+<literallayout class='monospaced'>KB_SHAPEDOODAD
+ #1 XkbOutlineDoodad
+ #2 XkbSolidDoodad
+1 CARD8 priority
+2 INT16 top
+2 INT16 left
+2 INT16 angle
+1 CARD8 colorNdx
+1 CARD8 shapeNdx
+6 unused
+</literallayout>
+
+<literallayout class='monospaced'>KB_TEXTDOODAD 20+t+f
+4 ATOM name
+1 CARD8 type
+ #3 XkbTextDoodad
+1 CARD8 priority
+2 INT16 top
+2 INT16 left
+2 INT16 angle
+2 CARD16 width
+2 CARD16 height
+1 CARD8 colorNdx
+3 unused
+t KB_COUNTED_STRING16 text
+f KB_COUNTED_STRING16 font
+</literallayout>
+
+<literallayout class='monospaced'>KB_INDICATORDOODAD
+4 ATOM name
+1 CARD8 type
+ #4 XkbIndicatorDoodad
+1 CARD8 priority
+2 INT16 top
+2 INT16 left
+2 INT16 angle
+1 CARD8 shapeNdx
+1 CARD8 onColorNdx
+1 CARD8 offColorNdx
+5 unused
+</literallayout>
+
+<literallayout class='monospaced'>KB_LOGODOODAD 20+n
+4 ATOM name
+1 CARD8 type
+ #5 XkbLogoDoodad
+1 CARD8 priority
+2 INT16 top
+2 INT16 left
+2 INT16 angle
+1 CARD8 colorNdx
+1 CARD8 shapeNdx
+6 unused
+n KB_COUNTED_STRING16 logoName
+</literallayout>
+
+<literallayout class='monospaced'>KB_DOODAD:
+ KB_SHAPEDOODAD, or KB_TEXTDOODAD, or
+ KB_INDICATORDOODAD, or KB_LOGODOODAD
+</literallayout>
+
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 20 xkb-opcode
+2 7+(f+8p+C*+H*+S*+D*+A*)/4 request-length
+2 KB_DEVICESPEC deviceSpec
+1 h nShapes
+1 s nSections
+4 ATOM name
+2 CARD16 widthMM
+2 CARD16 heightMM
+2 p nProperties
+2 c nColors
+2 d nDoodads
+2 a nKeyAliases
+1 CARD8 baseColorNdx
+1 CARD8 labelColorNdx
+2 unused
+f KB_COUNTED_STRING16 labelFont
+8p LISTofKB_PROPERTY properties
+C0+..Cc LISTofKB_COUNTED_STRING16 colors
+H0+..Hh LISTofKB_SHAPE shapes
+S0+..Ss LISTofKB_SECTION sections
+D0+..Dd LISTofKB_DOODAD doodads
+A0+..Aa LISTofKB_KEYALIAS keyAliases
+</literallayout>
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 21 xkb-opcode
+2 7 request-length
+2 KB_DEVICESPEC deviceSpec
+2 unused
+4 SETofKB_PERCLIENTFLAG change
+4 SETofKB_PERCLIENTFLAG value
+4 SETofKB_BOOLCTRL ctrlsToChange
+4 SETofKB_BOOLCTRL autoCtrls
+4 SETofKB_BOOLCTRL autoCtrlValues
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 0 length
+4 SETofKB_PERCLIENTFLAG supported
+4 SETofKB_PERCLIENTFLAG value
+4 SETofKB_BOOLCTRL autoCtrls
+4 SETofKB_BOOLCTRL autoCtrlValues
+8 unused
+</literallayout>
+
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 22 xkb-opcode
+2 2+(6+m+k+t+c+s+g+p)/4 request-length
+2 KB_DEVICESPEC deviceSpec
+2 CARD16 maxNames
+1 m keymapsSpecLen
+m STRING keymapsSpec
+1 k keycodesSpecLen
+k STRING keycodesSpec
+1 t typesSpecLen
+t STRING typesSpec
+1 c compatMapSpecLen
+c STRING compatMapSpec
+1 s symbolsSpecLen
+s STRING symbolsSpec
+1 g geometrySpecLen
+g STRING geometrySpec
+p unused,p=pad(6+m+k+t+c+s+g)
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 (M*+K*+T*+C*+S*+G*+p)/4 length
+2 m nKeymaps
+2 k nKeycodes
+2 t nTypes
+2 c nCompatMaps
+2 s nSymbols
+2 g nGeometries
+2 CARD16 extra
+10 unused
+M0+..Mm LISTofKB_LISTING keymaps
+K0+..Kk LISTofKB_LISTING keycodes
+T0+..Tt LISTofKB_LISTING types
+C0+..Cc LISTofKB_LISTING compatMaps
+S0+..Ss LISTofKB_LISTING symbols
+G0+..Gg LISTofKB_LISTING geometries
+p unused,p=pad(M*+K*+T*+C*+S*+G*)
+</literallayout>
+
+<literallayout class='monospaced'>KB_LISTING 4+n+p
+2 CARD16 flags
+2 n length
+n STRING8 string
+p unused,p=pad(n) to a 2-byte boundary
+</literallayout>
+
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 23 xkb-opcode
+2 3+(6+m+k+t+c+s+g+p)/4 request-length
+2 KB_DEVICESPEC deviceSpec
+2 SETofKB_GBNDETAILMASK need
+2 SETofKB_GBNDETAILMASK want
+1 BOOL load
+1 unused
+1 m keymapsSpecLen
+m STRING8 keymapsSpec
+1 k keycodesSpecLen
+k STRING8 keycodesSpec
+1 t typesSpecLen
+t STRING8 typesSpec
+1 c compatMapSpecLen
+c STRING8 compatMapSpec
+1 s symbolsSpecLen
+s STRING8 symbolsSpec
+1 g geometrySpecLen
+g STRING8 geometrySpec
+p unused,p=pad(6+m+k+t+c+s+g)
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 V/4 length
+1 KEYCODE minKeyCode
+1 KEYCODE maxKeyCode
+1 BOOL loaded
+1 BOOL newKeyboard
+2 SETofKB_GBNDETAILMASK found
+2 SETofKB_GBNDETAILMASK reported
+16 unused
+V LISTofITEMs replies
+ SETofKB_GBNDETAILMASK (reported)
+ XkbGBN_Types map
+ XkbGBN_CompatMap compat
+ XkbGBN_ClientSymbols map
+ XkbGBN_ServerSymbols map
+ XkbGBN_IndicatorMap indicators
+ XkbGBN_KeyNames names
+ XkbGBN_OtherNames names
+ XkbGBN_Geometry geometry
+</literallayout>
+
+<literallayout class='monospaced'>ITEMs
+M XkbGetMap reply map
+C XkbGetCompatMap reply compat
+I XkbGetIndicatorMap reply indicators
+N XkbGetNames reply names
+G XkbGetGeometry reply geometry
+</literallayout>
+
+
+<literallayout class='monospaced'>1 CARD8 opcode
+1 24 xkb-opcode
+2 4 request-length
+2 KB_DEVICESPEC deviceSpec
+2 SETofKB_DEVFEATURE wanted
+1 BOOL allButtons
+1 CARD8 firstButton
+1 CARD8 nButtons
+1 unused
+2 KB_LEDCLASSSPEC ledClass
+2 KB_IDSPEC ledID
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 CARD8 deviceID
+2 CARD16 sequence number
+4 (2+n+p+8b+L*)/4 length
+2 SETofKB_DEVFEATURE present
+2 SETofKB_FEATURE supported
+2 SETofKB_FEATURE unsupported
+2 l nDeviceLedFBs
+1 CARD8 firstBtnWanted
+1 CARD8 nBtnsWanted
+1 CARD8 firstBtnRtrn
+1 b nBtnsRtrn
+1 CARD8 totalBtns
+1 BOOL hasOwnState
+2 SETofKB_IDRESULT dfltKbdFB
+2 SETofKB_IDRESULT dfltLedFB
+2 unused
+4 ATOM devType
+2 n nameLen
+n STRING8 name
+p unused,p=pad(2+n)
+8b LISTofKB_ACTION btnActions
+L0+..Ll LISTofKB_DEVICELEDINFO leds
+</literallayout>
+
+<literallayout class='monospaced'>KB_DEVICELEDINFO 20+4n+12m
+2 KB_LEDCLASSSPEC ledClass
+2 KB_IDSPEC ledID
+4 SETofKB_INDICATOR namesPresent (has n bits set to 1)
+4 SETofKB_INDICATOR mapsPresent (has m bits set to 1)
+4 SETofKB_INDICATOR physIndicators
+4 SETofKB_INDICATOR state
+4n LISTofATOM names
+12m LISTofKB_INDICATORMAP maps
+</literallayout>
+
+
+<literallayout class='monospaced'>1 ?? opcode
+1 25 xkb-opcode
+2 3+(8b+L*)/4 request-length
+2 KB_DEVICESPEC deviceSpec
+1 CARD8 firstBtn
+1 b nBtns
+2 SETofKB_DEVFEATURE change
+2 l nDeviceLedFBs
+8b LISTofKB_ACTION btnActions
+L0+..Ll LISTofKB_DEVICELEDINFO leds
+ Encoding of KB_DEVICELEDINFO is as for XkbGetDeviceInfo
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? opcode
+1 101 xkb-opcode
+2 6+(n+p)/4 request-length
+2 n msgLength
+2 unused
+4 CARD32 affectFlags
+4 CARD32 flags
+4 CARD32 affectCtrls
+4 CARD32 ctrls
+n STRING8 message
+p unused, p=pad(n)
+</literallayout>
+
+<literallayout class='monospaced'>1 1 Reply
+1 unused
+2 CARD16 sequence number
+4 0 length
+4 CARD32 currentFlags
+4 CARD32 currentCtrls
+4 CARD32 supportedFlags
+4 CARD32 supportedCtrls
+8 unused
+</literallayout>
+
+
+</sect1>
+<sect1 id='appD::Events'>
+<title>Events</title>
+
+<literallayout class='monospaced'>1 ?? code
+1 0 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 CARD8 oldDeviceID
+1 KEYCODE minKeyCode
+1 KEYCODE maxKeyCode
+1 KEYCODE oldMinKeyCode
+1 KEYCODE oldMaxKeyCode
+1 CARD8 requestMajor
+1 CARD8 requestMinor
+2 SETofKB_NKNDETAIL changed
+14 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 1 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 SETofBUTMASK ptrBtnActions
+2 SETofKB_MAPPART changed
+1 KEYCODE minKeyCode
+1 KEYCODE maxKeyCode
+1 CARD8 firstType
+1 CARD8 nTypes
+1 KEYCODE firstKeySym
+1 CARD8 nKeySyms
+1 KEYCODE firstKeyAct
+1 CARD8 nKeyActs
+1 KEYCODE firstKeyBehavior
+1 CARD8 nKeyBehavior
+1 KEYCODE firstKeyExplicit
+1 CARD8 nKeyExplicit
+1 KEYCODE firstModMapKey
+1 CARD8 nModMapKeys
+1 KEYCODE firstVModMapKey
+1 CARD8 nVModMapKeys
+2 SETofKB_VMOD virtualMods
+2 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 2 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 SETofKEYMASK mods
+1 SETofKEYMASK baseMods
+1 SETofKEYMASK latchedMods
+1 SETofKEYMASK lockedMods
+1 KB_GROUP group
+2 INT16 baseGroup
+2 INT16 latchedGroup
+1 KB_GROUP lockedGroup
+1 SETofKEYMASK compatState
+1 SETofKEYMASK grabMods
+1 SETofKEYMASK compatGrabMods
+1 SETofKEYMASK lookupMods
+1 SETofKEYMASK compatLookupMods
+2 SETofBUTMASK ptrBtnState
+2 SETofKB_STATEPART changed
+1 KEYCODE keycode
+1 CARD8 eventType
+1 CARD8 requestMajor
+1 CARD8 requestMinor
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 3 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 CARD8 numGroups
+2 unused
+4 SETofKB_CONTROL changedControls
+4 SETofKB_BOOLCTRL enabledControls
+4 SETofKB_BOOLCTRL enabledControlChanges
+1 KEYCODE keycode
+1 CARD8 eventType
+1 CARD8 requestMajor
+1 CARD8 requestMinor
+4 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 4 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+3 unused
+4 SETofKB_INDICATOR state
+4 SETofKB_INDICATOR stateChanged
+12 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 5 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+3 unused
+4 SETofKB_INDICATOR state
+4 SETofKB_INDICATOR mapChanged
+12 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 6 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 unused
+2 SETofKB_NAMEDETAIL changed
+1 CARD8 firstType
+1 CARD8 nTypes
+1 CARD8 firstLevelName
+1 CARD8 nLevelNames
+1 unused
+1 CARD8 nRadioGroups
+1 CARD8 nKeyAliases
+1 SETofKB_GROUP changedGroupNames
+2 SETofKB_VMOD changedVirtualMods
+1 KEYCODE firstKey
+1 CARD8 nKeys
+4 SETofKB_INDICATOR changedIndicators
+4 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 7 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 SETofKB_GROUP changedGroups
+2 CARD16 firstSI
+2 CARD16 nSI
+2 CARD16 nTotalSI
+16 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 8 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 KB_BELLCLASSRESULT bellClass
+1 CARD8 bellID
+1 CARD8 percent
+2 CARD16 pitch
+2 CARD16 duration
+4 ATOM name
+4 WINDOW window
+1 BOOL eventOnly
+7 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 9 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 KEYCODE keycode
+1 BOOL press
+1 BOOL keyEventFollows
+1 SETofKEYMASK mods
+1 KB_GROUP group
+8 STRING8 message
+10 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 10 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 KEYCODE keycode
+2 SETofKB_AXNDETAIL detail
+2 CARD16 slowKeysDelay
+2 CARD16 debounceDelay
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+16 unused
+</literallayout>
+
+<literallayout class='monospaced'>1 ?? code
+1 11 xkb code
+2 CARD16 sequence number
+4 TIMESTAMP time
+1 CARD8 deviceID
+1 unused
+2 SETofKB_XIDETAIL reason
+2 KB_LEDCLASSRESULT ledClass
+2 CARD8 ledID
+4 SETofKB_INDICATOR ledsDefined
+4 SETofKB_INDICATOR ledState
+1 CARD8 firstButton
+1 CARD8 nButtons
+2 SETofKB_XIFEATURE supported
+2 SETofKB_XIFEATURE unsupported
+2 unused
+</literallayout>
+
+</sect1>
+</appendix>
diff --git a/specs/bigreq.xml b/specs/bigreq.xml
new file mode 100644
index 0000000..1d1d84d
--- /dev/null
+++ b/specs/bigreq.xml
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
+
+<!-- lifted from troff+ms+XMan by doclifter -->
+<book id="bigreq">
+
+<bookinfo>
+ <title>Big Requests Extension</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
+ <releaseinfo>Version 2.0</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Bob</firstname><surname>Scheifler</surname>
+ <affiliation><orgname>X Consortium</orgname></affiliation>
+ </author>
+ </authorgroup>
+ <copyright><year>1993</year><year>1994</year><holder>X Consortium</holder></copyright>
+
+<legalnotice>
+<para>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &ldquo;Software&rdquo;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</para>
+
+<para>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</para>
+
+<para>THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</para>
+
+<para>Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.</para>
+
+<para>X Window System is a trademark of The Open Group.</para>
+</legalnotice>
+
+</bookinfo>
+
+<chapter id='Overview'>
+<title>Overview</title>
+
+<para>This extension enables the use of protocol requests that exceed 262140 bytes in length.</para>
+
+<para>The core protocol restricts the maximum length of a protocol request to 262140 bytes, in that it uses a 16-bit length field specifying the number of 4-byte units in the request. This is a problem in the core protocol when joining large numbers of lines (<symbol role='Pn'>PolyLine</symbol>) or arcs (<symbol role='Pn'>PolyArc</symbol>), since these requests cannot be broken up into smaller requests without disturbing the rendering of the join points. It is also much more of a problem for protocol extensions, such as the PEX extension for 3D graphics and the XIE extension for imaging, that need to send long data lists in output commands.</para>
+
+<para>This extension defines a mechanism for extending the length field beyond 16 bits. If the normal 16-bit length field of the protocol request is zero, then an additional 32-bit field containing the actual length (in 4-byte units) is inserted into the request, immediately following the 16-bit length field.</para>
+
+<para>For example, a normal <function>PolyLine</function> encoding is:</para>
+
+<informaltable id='PolyLine' frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='4' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='3.0*'/>
+ <colspec colname='c3' colwidth='2.0*'/>
+ <colspec colname='c4' colwidth='11.0*'/>
+ <thead>
+ <row>
+ <entry namest="c1" nameend="c4"><function>PolyLine</function></entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>1</entry>
+ <entry>65</entry>
+ <entry></entry>
+ <entry>opcode</entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>coordinate-mode</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>0</entry>
+ <entry>Origin</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>1</entry>
+ <entry>Previous</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry>3+n</entry>
+ <entry></entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>DRAWABLE</entry>
+ <entry></entry>
+ <entry>drawable</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>GCONTEXT</entry>
+ <entry></entry>
+ <entry>gc</entry>
+ </row>
+ <row>
+ <entry>4n</entry>
+ <entry>LISTofPOINT</entry>
+ <entry></entry>
+ <entry>points</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>An extended-length <function>PolyLine</function> encoding is:</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='4' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='3.0*'/>
+ <colspec colname='c3' colwidth='2.0*'/>
+ <colspec colname='c4' colwidth='11.0*'/>
+ <thead>
+ <row>
+ <entry namest="c1" nameend="c4"><function>PolyLine</function></entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>1</entry>
+ <entry>65</entry>
+ <entry></entry>
+ <entry>opcode</entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry></entry>
+ <entry></entry>
+ <entry>coordinate-mode</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>0</entry>
+ <entry>Origin</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>1</entry>
+ <entry>Previous</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry>0</entry>
+ <entry></entry>
+ <entry>extended length flag</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>4+n</entry>
+ <entry></entry>
+ <entry>request length</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>DRAWABLE</entry>
+ <entry></entry>
+ <entry>drawable</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>GCONTEXT</entry>
+ <entry></entry>
+ <entry>gc</entry>
+ </row>
+ <row>
+ <entry>4n</entry>
+ <entry>LISTofPOINT</entry>
+ <entry></entry>
+ <entry>points</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>Extended-length protocol encodings, once enabled, can be used on all protocol requests, including all extensions.</para>
+</chapter>
+
+<chapter id='Requests'>
+<title>Requests</title>
+
+<para><function>BigReqEnable</function></para>
+
+<para> =&gt;</para>
+
+<para><emphasis remap='I'>maximum-request-length</emphasis>: CARD32</para>
+
+<para>This request enables extended-length protocol requests for the requesting client. It also returns the maximum length of a request, in 4-byte units, that can be used in extended-length protocol requests. This value will always be greater than the maximum-request-length returned in the connection setup information.</para>
+</chapter>
+
+<chapter id='Events_and_Errors'>
+<title>Events and Errors</title>
+
+<para>No new events or errors are defined by this extension.</para>
+</chapter>
+
+<chapter id='Encoding'>
+<title>Encoding</title>
+
+<para>Please refer to the X11 Protocol Encoding document as this document uses conventions established there.</para>
+
+<para>The name of this extension is &ldquo;BIG-REQUESTS&rdquo;.</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <colspec colname='c3' colwidth='15.0*'/>
+ <thead>
+ <row>
+ <entry namest="c1" nameend="c3">BigReqEnable</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>1</entry>
+ <entry>Card8</entry>
+ <entry>opcode</entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry>0</entry>
+ <entry>bigreq opcode</entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry>1</entry>
+ <entry>request length</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <colspec colname='c3' colwidth='15.0*'/>
+ <thead>
+ <row>
+ <entry namest="c1" nameend="c3">=&gt;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>1</entry>
+ <entry>1</entry>
+ <entry>Reply</entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry></entry>
+ <entry>unused</entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry>CARD16</entry>
+ <entry>sequence number</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>0</entry>
+ <entry>length</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>CARD32</entry>
+ <entry>maximum-request-length</entry>
+ </row>
+ <row>
+ <entry>20</entry>
+ <entry></entry>
+ <entry>unused</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</chapter>
+
+<chapter id='C_Language_Binding'>
+<title>C language binding</title>
+
+<para>It is desirable for core Xlib, and other extensions, to use this extension internally when necessary. It is also desirable to make the use of this extension as transparent as possible to the X client. For example, if enabling of the extension were delayed until the first time it was needed, an application that used
+<olink targetdoc='libX11' targetptr='XNextRequest'><function>XNextRequest</function></olink>
+to determine the sequence number of a request would no longer get the correct sequence number. As such,
+<olink targetdoc='libX11' targetptr='XOpenDisplay'><function>XOpenDisplay</function></olink>
+will determine if the extension is supported by the server and, if it is, enable extended-length encodings.</para>
+
+<para>The core Xlib functions
+<olink targetdoc='libX11' targetptr='XDrawLines'><function>XDrawLines</function></olink>,
+<olink targetdoc='libX11' targetptr='XDrawArcs'><function>XDrawArcs</function></olink>,
+<olink targetdoc='libX11' targetptr='XFillPolygon'><function>XFillPolygon</function></olink>,
+<olink targetdoc='libX11' targetptr='XChangeProperty'><function>XChangeProperty</function></olink>,
+<olink targetdoc='libX11' targetptr='XSetClipRectangles'><function>XSetClipRectangles</function></olink>, and
+<olink targetdoc='libX11' targetptr='XSetRegion'><function>XSetRegion</function></olink>.
+are required to use extended-length encodings when necessary, if supported by the server. Use of extended-length encodings in other core Xlib functions
+(<olink targetdoc='libX11' targetptr='XDrawPoints'><function>XDrawPoints</function></olink>,
+<olink targetdoc='libX11' targetptr='XDrawRectangles'><function>XDrawRectangles</function></olink>,
+<olink targetdoc='libX11' targetptr='XDrawSegments'><function>XDrawSegments</function></olink>.
+<olink targetdoc='libX11' targetptr='XFillArcs'><function>XFillArcs</function></olink>,
+<olink targetdoc='libX11' targetptr='XFillRectangles'><function>XFillRectangles</function></olink>,
+<olink targetdoc='libX11' targetptr='XPutImage'><function>XPutImage</function></olink>
+is permitted but not required; an Xlib implementation may choose to split the data across multiple smaller requests instead.</para>
+
+<para>To permit clients to know what the maximum-request-length for extended-length encodings is, the following function is added to Xlib:
+
+<funcsynopsis id='XExtendedMaxRequestSize'>
+<funcprototype>
+ <funcdef>long <function>XExtendedMaxRequestSize</function></funcdef>
+ <paramdef>Display <parameter> *display</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+Returns zero (0) if the specified display does not support this extension, otherwise returns the maximum-request-length (in 4-byte units) supported by the server through the extended-length encoding.</para>
+</chapter>
+
+<chapter id='Acknowledgements'>
+<title>Acknowledgements</title>
+
+<para>Clive Feather (IXI) originated the extended-length encoding used in this extension proposal.</para>
+</chapter>
+</book>
diff --git a/specs/ch01.xml b/specs/ch01.xml
new file mode 100644
index 0000000..27dcc88
--- /dev/null
+++ b/specs/ch01.xml
@@ -0,0 +1,101 @@
+<chapter id='Overview'>
+<title>Overview</title>
+<para>
+This extension provides a number of new capabilities and controls for
+text keyboards.
+</para>
+
+<para>
+The core X protocol specifies the ways that the <emphasis>
+Shift</emphasis>
+, <emphasis>
+Control</emphasis>
+ and <emphasis>
+Lock</emphasis>
+ modifiers and the modifiers bound to the <emphasis>
+Mode_switch</emphasis>
+ or <emphasis>
+Num_Lock</emphasis>
+ keysyms interact to generate keysyms and characters. The core protocol also
+allows users to specify that a key affects one or more modifiers. This behavior
+is simple and fairly flexible, but it has a number of limitations that make it
+difficult or impossible to properly support many common varieties of keyboard
+behavior. The limitations of core protocol support for keyboards include:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Use of a single, uniform, four-symbol mapping for all keyboard keys
+makes it difficult to properly support keyboard overlays, PC-style break keys
+or keyboards that comply with ISO9995 or a host of other national and
+international standards.
+ </para>
+</listitem>
+<listitem>
+ <para>Use of a modifier to specify a second keyboard group has side-effects
+that wreak havoc with client grabs and X toolkit translations and limit us to
+two keyboard groups.
+ </para>
+</listitem>
+<listitem>
+ <para>Poorly specified locking key behavior requires X servers to look for a
+few "magic" keysyms to determine which keys should lock when pressed. This
+leads to incompatibilities between X servers with no way for clients to detect
+implementation differences.
+ </para>
+</listitem>
+<listitem>
+ <para>Poorly specified capitalization and control behavior requires
+modifications to X library source code to support new character sets or locales
+and can lead to incompatibilities between system-wide and X library
+capitalization behavior.
+ </para>
+</listitem>
+<listitem>
+ <para>Limited interactions between modifiers specified by the core protocol
+make many common keyboard behaviors difficult or impossible to implement. For
+example, there is no reliable way to indicate whether or not using shift should
+"cancel" the lock modifier.
+ </para>
+</listitem>
+<listitem>
+ <para>The lack of any explicit descriptions for indicators, most modifiers
+and other aspects of the keyboard appearance requires clients that wish to
+clearly describe the keyboard to a user to resort to a mishmash of prior
+knowledge and heuristics.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+This extension makes it possible to clearly and explicitly specify most aspects
+of keyboard behavior on a per-key basis. It adds the notion of a numeric
+keyboard group to the global keyboard state and provides mechanisms to more
+closely track the logical and physical state of the keyboard. For keyboard
+control clients, this extension provides descriptions and symbolic names for
+many aspects of keyboard appearance and behavior. It also includes a number of
+keyboard controls designed to make keyboards more accessible to people with
+movement impairments.
+</para>
+
+
+<para>
+The X Keyboard Extension essentially replaces the core protocol definition of a
+keyboard. The following sections describe the new capabilities of the extension
+and the effect of the extension on core protocol requests, events and errors.
+</para>
+
+<sect1 id='Conventions_and_Assumptions'>
+<title>Conventions and Assumptions</title>
+<para>
+This document uses the syntactic
+conventions, common types, and errors defined in sections two through four of
+the specification of the X Window System Protocol. This document assumes
+familiarity with the fundamental concepts of X, especially those related to the
+way that X handles keyboards. Readers who are not familiar with the meaning or
+use of keycodes, keysyms or modifiers should consult (at least) the first five
+chapters of the protocol specification of the X Window System before
+continuing.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch02.xml b/specs/ch02.xml
new file mode 100644
index 0000000..0234297
--- /dev/null
+++ b/specs/ch02.xml
@@ -0,0 +1,441 @@
+<chapter id='Keyboard_State'>
+<title>Keyboard State</title>
+<para>
+The core protocol description of
+keyboard state consists of eight <emphasis>
+modifiers</emphasis>
+(<emphasis>
+Shift</emphasis>
+, <emphasis>
+Lock</emphasis>
+, <emphasis>
+Control</emphasis>
+, and <emphasis>
+Mod1</emphasis>
+-<emphasis>
+Mod5</emphasis>
+). A modifier reports the state of one or modifier keys, which are similar to
+qualifier keys as defined by the ISO9995 standard:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term>Qualifier key</term>
+ <listitem>
+ <para>
+A key whose operation
+has no immediate effect, but which, for as long as it is held down, modifies
+the effect of other keys. A qualifier key may be, for example, a shift key or a
+control key.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+Whenever a modifier key is physically or logically depressed, the modifier it
+controls is set in the keyboard state. The protocol implies that certain
+modifier keys lock (i.e. affect modifier state after they have been physically
+released) but does not explicitly discuss locking keys or their behavior. The
+current modifier state is reported to clients in a number of core protocol
+events and can be determined using the <emphasis>
+QueryPointer</emphasis>
+ request.
+</para>
+
+<para>
+The XKB extension retains the eight "real" modifiers defined by the core
+protocol but extends the core protocol notion of <emphasis>
+keyboard state</emphasis>
+ to include up to four <emphasis>
+keysym groups</emphasis>
+, as defined by the ISO9995 standard:
+</para>
+
+
+<variablelist>
+ <varlistentry>
+ <term>Group:</term>
+ <listitem>
+ <para>
+A logical state of a keyboard providing
+access to a collection of characters. A group usually contains a set of
+characters which logically belong together and which may be arranged on several
+shift levels within that group.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+For example, keyboard group can be used to select between multiple alphabets on
+a single keyboard, or to access less-commonly used symbols within a character
+set.
+</para>
+
+<sect1 id='Locking_and_Latching_Modifiers_and_Groups'>
+<title>Locking and Latching Modifiers and Groups</title>
+<para>
+With the core protocol, there is no way to
+tell whether a modifier is set due to a lock or because the user is actually
+holding down a key; this can make for a clumsy user-interface as locked
+modifiers or group state interfere with accelerators and translations.
+</para>
+<para>
+XKB adds explicit support for locking
+and latching modifiers and groups. Locked modifiers or groups apply to all
+future key events until they are explicitly changed. Latched modifiers or
+groups apply only to the next key event that does not change keyboard state.
+</para>
+
+</sect1>
+<sect1 id='Fundamental_Components_of_XKB_Keyboard_State'>
+<title>Fundamental Components of XKB Keyboard State</title>
+<para>
+The fundamental components of XKB keyboard state include:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The locked modifiers and group</para>
+</listitem>
+<listitem>
+ <para>The latched modifiers and group</para>
+</listitem>
+<listitem>
+ <para>The base modifiers and group (for which keys are physically or
+logically down)
+ </para>
+</listitem>
+<listitem>
+ <para>The effective modifiers and group (the cumulative effect of the base,
+locked and latched modifier and group states).
+ </para>
+</listitem>
+<listitem>
+ <para>State of the core pointer buttons.</para>
+</listitem>
+</itemizedlist>
+
+<para>
+The latched and locked state of modifiers and groups can be changed in response
+to keyboard activity or under application control using the <emphasis>
+XkbLatchLockState</emphasis>
+ request. The base modifier, base group
+and pointer button states always reflect the logical state of the keyboard and
+pointer and change <emphasis>
+only</emphasis>
+ in response to keyboard or pointer activity.
+</para>
+
+<sect2 id='Computing_Effective_Modifier_and_Group'>
+<title>Computing Effective Modifier and Group</title>
+<para>
+The effective modifiers and group
+report the cumulative effects of the base, latched and locked modifiers and
+group respectively, and cannot be directly changed. Note that the effective
+modifiers and effective group are computed differently.
+</para>
+
+<para>
+The effective modifiers are simply the bitwise union of the base, latched and
+locked modifiers.
+</para>
+
+
+<para>
+The effective group is the arithmetic sum of the base, latched and locked
+groups. The locked and effective keyboard group must fall in the range
+<emphasis>
+Group1</emphasis>
+-<emphasis>
+Group4</emphasis>
+, so they are adjusted into range as specified by the global <emphasis>
+GroupsWrap </emphasis>
+control as follows:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+If the <emphasis>
+RedirectIntoRange</emphasis>
+ flag is set, the four least significant
+bits of the groups wrap control specify the index of a group to which all
+illegal groups correspond. If the specified group is also out of range, all
+illegal groups map to <emphasis>
+Group1</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If the <emphasis>
+ClampIntoRange</emphasis>
+ flag is set, out-of-range groups
+correspond to the nearest legal group. Effective groups larger than the highest
+supported group are mapped to the highest supported group; effective groups
+less than <emphasis>
+Group1</emphasis>
+ are mapped to <emphasis>
+Group1</emphasis>
+. For example, a key with two groups of symbols uses <emphasis>
+Group2</emphasis>
+ type and symbols if the global effective group is either <emphasis>
+Group3</emphasis>
+ or <emphasis>
+Group4</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If neither flag is set, group is
+wrapped into range using integer modulus. For example, a key with two groups of
+symbols for which groups wrap uses <emphasis>
+Group1</emphasis>
+ symbols if the global effective group is <emphasis>
+Group3</emphasis>
+ or <emphasis>
+Group2</emphasis>
+ symbols if the global effective group is <emphasis>
+Group4</emphasis>.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+The base and latched keyboard groups are unrestricted eight-bit integer values
+and are not affected by the <emphasis>
+GroupsWrap</emphasis>
+ control.
+</para>
+
+</sect2>
+
+<sect2 id='Computing_A_State_Field_from_an_XKB_State'>
+<title>Computing A State Field from an XKB State</title>
+<para>
+Many events report the keyboard state
+in a single <emphasis>
+state</emphasis>
+ field. Using XKB, a state field combines modifiers, group and the pointer
+button state into a single sixteen bit value as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Bits 0 through 7 (the least significant eight bits) of the effective
+state comprise a mask of type KEYMASK which reports the state modifiers.
+ </para>
+</listitem>
+<listitem>
+ <para>Bits 8 through 12 comprise a mask of type BUTMASK which reports pointer
+button state.
+ </para>
+</listitem>
+<listitem>
+ <para>Bits 13 and 14 are interpreted as a two-bit unsigned numeric value and
+report the state keyboard group.
+ </para>
+</listitem>
+<listitem>
+ <para>Bit 15 (the most significant bit) is reserved and must be zero.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+It is possible to assemble a state field from any of the components of the XKB
+keyboard state. For example, the effective keyboard state would be assembled as
+described above using the effective keyboard group, the effective keyboard
+modifiers and the pointer button state.
+</para>
+
+</sect2>
+</sect1>
+
+<sect1 id='Derived_Components_of_XKB_Keyboard_State'>
+<title>Derived Components of XKB Keyboard State</title>
+<para>
+In addition to the fundamental state
+components, XKB keeps track of and reports a number of state components which
+are derived from the fundamental components but stored and reported separately
+to make it easier to track changes in the keyboard state. These derived
+components are updated automatically whenever any of the fundamental components
+change but cannot be changed directly.
+</para>
+
+<para>
+The first pair of derived state components control the way that passive grabs
+are activated and the way that modifiers are reported in core protocol events
+that report state. The server uses the <emphasis>
+ServerInternalModifiers</emphasis>
+, <emphasis>
+IgnoreLocksModifiers</emphasis>
+ and <emphasis>
+IgnoreGroupLock</emphasis>
+ controls, described in <link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>Server
+Internal Modifiers and Ignore Locks Behavior</link>, to derive these two
+states as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The lookup state is the state used to determine the symbols associated
+with a key event and consists of the effective state minus any server internal
+modifiers.
+ </para>
+</listitem>
+<listitem>
+ <para>The grab state is the state used to decide whether a particular event
+triggers a passive grab and consists of the lookup state minus any members of
+the ignore locks modifiers that are not either latched or logically depressed.
+If the ignore group locks control is set, the grab state does not include the
+effects of any locked groups.
+ </para>
+</listitem>
+</itemizedlist>
+
+<sect2 id='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>
+<title>Server Internal Modifiers and Ignore Locks Behavior</title>
+<para>
+The core protocol does not provide any
+way to exclude certain modifiers from client events, so there is no way to set
+up a modifier which affects only the server.
+</para>
+
+<para>
+The modifiers specified in the mask of the <emphasis>
+InternalMods</emphasis>
+ control are not reported in any core
+protocol events, are not used to determine grabs and are not used to calculate
+compatibility state for XKB-unaware clients. Server internal modifiers affect
+only the action applied when a key is pressed.
+</para>
+
+
+<para>
+The core protocol does not provide any way to exclude certain modifiers from
+grab calculations, so locking modifiers often have unanticipated and
+unfortunate side-effects. XKB provides another mask which can help avoid some
+of these problems.
+</para>
+
+
+<para>
+The locked state of the modifiers specified in mask of the <emphasis>
+IgnoreLockMods</emphasis>
+ control is not reported in most core
+protocol events and is not used to activate grabs. The only core events which
+include the locked state of the modifiers in the ignore locks mask are key
+press and release events that do not activate a passive grab and which do not
+occur while a grab is active. If the <emphasis>
+IgnoreGroupLock</emphasis>
+ control is set, the locked state of the
+keyboard group is not considered when activating passive grabs.
+</para>
+
+
+<para>
+Without XKB, the passive grab set by a translation (e.g. <emphasis>
+Alt&lt;KeyPress&gt;space</emphasis>
+) does not trigger if any modifiers other than those specified by the
+translation are set, with the result that many user interface components do not
+react when either Num Lock or when the secondary keyboard group are active. The
+ignore locks mask and the ignore group locks control make it possible to avoid
+this behavior without exhaustively grabbing every possible modifier combination.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='Compatibility_Components_of_Keyboard_State'>
+<title>Compatibility Components of Keyboard State</title>
+<para>
+The core protocol interpretation of
+keyboard modifiers does not include direct support for multiple groups, so XKB
+reports the effective keyboard group to XKB-aware clients using some of the
+reserved bits in the state field of some core protocol events, as described in
+<link linkend='Computing_A_State_Field_from_an_XKB_State'>Computing A State Field from an
+XKB State</link>.
+</para>
+
+<para>
+This modified state field would not be interpreted correctly by XKB-unaware
+clients, so XKB provides a <emphasis>
+group compatibility mapping</emphasis>
+(see <link linkend='Group_Compatibility_Map'>Group Compatibility Map</link>) which
+remaps the keyboard group into a core modifier mask that has similar effects,
+when possible. XKB maintains three compatibility state components that are used
+to make non-XKB clients work as well as possible:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The <emphasis>
+compatibility state</emphasis>
+ corresponds to the effective modifier
+and effective group state.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The <emphasis>
+compatibility lookup state</emphasis>
+ is the core-protocol equivalent of the
+lookup state.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The <emphasis>
+compatibility grab state</emphasis>
+ is the nearest core-protocol equivalent
+of the grab state.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+Compatibility states are essentially the corresponding XKB state, but with
+keyboard group possibly encoded as one or more modifiers; <link linkend='Group_Compatibility_Map'>Group Compatibility Map</link> describes
+the group compatibility map, which specifies the modifier(s) that correspond to
+each keyboard group.
+</para>
+
+
+<para>
+The compatibility state reported to XKB-unaware
+ clients for any given core protocol event
+is computed from the modifier state that XKB-capable clients would see for that
+same event. For example, if the ignore group locks control is set and group 2
+is locked, the modifier bound to <emphasis>
+Mode_switch</emphasis>
+ is not reported in any event except (Device)KeyPress and (Device)KeyRelease
+events that do not trigger a passive grab.
+</para>
+
+<note>
+<para>
+Referring to clients as "XKB-capable
+ is somewhat misleading in this context.
+The sample implementation of XKB invisibly extends the X library to use the
+keyboard extension if it is present. This means that most clients can take
+advantage of all of XKB without modification, but it also means that the XKB
+state can be reported to clients that have not explicitly requested the
+keyboard extension. Clients that <emphasis>
+directly</emphasis>
+ interpret the state field of core protocol events or that interpret the keymap
+directly may be affected by some of the XKB differences; clients that use
+library or toolkit routines to interpret keyboard events automatically use all
+of the XKB features.
+</para>
+</note>
+
+<para>
+XKB-aware clients can query the keyboard state at any time or request immediate
+notification of a change to any of the fundamental or derived components of the
+keyboard state.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch03.xml b/specs/ch03.xml
new file mode 100644
index 0000000..d71f353
--- /dev/null
+++ b/specs/ch03.xml
@@ -0,0 +1,220 @@
+<chapter id='Virtual_Modifiers'>
+<title>Virtual Modifiers</title>
+<para>
+The core protocol specifies that
+certain keysyms, when bound to modifiers, affect the rules of keycode to keysym
+interpretation for all keys; for example, when <emphasis>
+Num_Lock</emphasis>
+ is bound to some modifier, that modifier is used to choose shifted or
+unshifted state for the numeric keypad keys. The core protocol does not provide
+a convenient way to determine the mapping of modifier bits, in particular
+<emphasis>
+Mod1</emphasis>
+ through <emphasis>
+Mod5</emphasis>
+, to keysyms such as <emphasis>
+Num_Lock</emphasis>
+ and <emphasis>
+Mode_switch</emphasis>
+. Clients must retrieve and search the modifier map to determine the keycodes
+bound to each modifier, and then retrieve and search the keyboard mapping to
+determine the keysyms bound to the keycodes. They must repeat this process for
+all modifiers whenever any part of the modifier mapping is changed.
+</para>
+
+<para>
+XKB provides a set of sixteen named virtual modifiers, each of which can be
+bound to any set of the eight "real" modifiers (<emphasis>
+Shift</emphasis>
+, <emphasis>
+Lock</emphasis>
+, <emphasis>
+Control</emphasis>
+ and <emphasis>
+Mod1</emphasis>
+-<emphasis>
+Mod5</emphasis>
+ as reported in the keyboard state). This makes it easier for applications and
+keyboard layout designers to specify to the function a modifier key or data
+structure should fulfill without having to worry about which modifier is bound
+to a particular keysym.
+</para>
+
+
+<para>
+The use of a single, server-driven mechanism for reporting changes to all data
+structures makes it easier for clients to stay synchronized. For example, the
+core protocol specifies a special interpretation for the modifier bound to the
+<emphasis>
+Num_Lock</emphasis>
+ key. Whenever any keys or modifiers are rebound, every application has to
+check the keyboard mapping to make sure that the binding for <emphasis>
+Num_Lock</emphasis>
+ has not changed. If <emphasis>
+Num_Lock</emphasis>
+ is remapped when XKB is in use, the keyboard description is automatically
+updated to reflect the new binding, and clients are notified immediately and
+explicitly if there is a change they need to consider.
+</para>
+
+
+<para>
+The separation of function from physical modifier bindings also makes it easier
+to specify more clearly the intent of a binding. X servers do not all assign
+modifiers the same way — for example, <emphasis>
+Num_Lock</emphasis>
+ might be bound to <emphasis>
+Mod2</emphasis>
+ for one vendor and to <emphasis>
+Mod4</emphasis>
+ for another. This makes it cumbersome to automatically remap the keyboard to a
+desired configuration without some kind of prior knowledge about the keyboard
+layout and bindings. With XKB, applications simply use virtual modifiers to
+specify the behavior they want, without regard for the actual physical bindings
+in effect.
+</para>
+
+
+<para>
+XKB puts most aspects of the keyboard under user or program control, so it is
+even more important to clearly and uniformly refer to modifiers by function.
+</para>
+
+<sect1 id='Modifier_Definitions'>
+<title>Modifier Definitions</title>
+<para>
+Use an <emphasis>
+XKB modifier definition</emphasis>
+ to specify the modifiers affected by any XKB control or data structure. An XKB
+modifier definition consists of a set of real modifiers, a set of virtual
+modifiers, and an effective mask. The mask is derived from the real and virtual
+modifiers and cannot be explicitly changed — it contains all of the real
+modifiers specified in the definition <emphasis>
+plus</emphasis>
+ any real modifiers that are bound to the virtual modifiers specified in the
+definition. For example, this modifier definition specifies the numeric lock
+modifier if the <emphasis>
+Num_Lock</emphasis>
+ keysym is not bound to any real modifier:
+</para>
+<literallayout class='monospaced'>
+{ real_mods= None, virtual_mods= NumLock, mask= None }
+</literallayout>
+
+<para>
+If we assign <emphasis>
+Mod2</emphasis>
+ to the <emphasis>
+Num_Lock</emphasis>
+ key, the definition changes to:
+</para>
+
+<literallayout class='monospaced'>
+{ real_mods= None, virtual_mods= NumLock, mask= Mod2 }
+</literallayout>
+
+<para>
+Using this kind of modifier definition makes it easy to specify the desired
+behavior in such a way that XKB can automatically update all of the data
+structures that make up a keymap to reflect user or application specified
+changes in any one aspect of the keymap.
+</para>
+
+
+<para>
+The use of modifier definitions also makes it possible to unambiguously specify
+the reason that a modifier is of interest. On a system for which the <emphasis>
+Alt</emphasis>
+ and <emphasis>
+Meta</emphasis>
+ keysyms are bound to the same modifier, the following definitions behave
+identically:
+</para>
+
+<literallayout class='monospaced'>
+{ real_mods= None, virtual_mods= Alt, mask= Mod1 }
+{ real_mods= None, virtual_mods= Meta, mask= Mod1 }
+</literallayout>
+
+<para>
+If we rebind one of the modifiers, the modifier definitions automatically
+reflect the change:
+</para>
+
+<literallayout class='monospaced'>
+{ real_mods= None, virtual_mods= Alt, mask= Mod1 }
+{ real_mods= None, virtual_mods= Meta, mask= Mod4 }
+</literallayout>
+
+<para>
+Without the level of indirection provided by virtual modifier maps and modifier
+definitions, we would have no way to tell which of the two definitions is
+concerned with <emphasis>
+Alt</emphasis>
+ and which is concerned with <emphasis>
+Meta</emphasis>.
+</para>
+
+
+<sect2 id='Inactive_Modifier_Definitions'>
+<title>Inactive Modifier Definitions</title>
+<para>
+Some XKB structures ignore modifier
+definitions in which the virtual modifiers are unbound. Consider this
+example:
+</para>
+<literallayout class='monospaced'>
+if ( state matches { Shift } ) Do OneThing;
+if ( state matches { Shift+NumLock } ) Do Another;
+</literallayout>
+
+<para>
+If the <emphasis>
+NumLock</emphasis>
+ virtual modifier is not bound to any real modifiers, these effective masks for
+these two cases are identical (i.e. they contain only <emphasis>
+Shift</emphasis>
+). When it is essential to distinguish between <emphasis>
+OneThing</emphasis>
+ and Another, XKB considers only those modifier definitions for which all
+virtual modifiers are bound.
+</para>
+</sect2>
+</sect1>
+
+<sect1 id='Virtual_Modifier_Mapping'>
+<title>Virtual Modifier Mapping</title>
+<para>
+XKB maintains a <emphasis>
+virtual modifier mapping</emphasis>
+, which lists the virtual modifiers associated with each key. The real
+modifiers bound to a virtual modifier always include all of the modifiers bound
+to any of the keys that specify that virtual modifier in their virtual modifier
+mapping.
+</para>
+
+<para>
+For example, if <emphasis>
+Mod3</emphasis>
+ is bound to the <emphasis>
+Num_Lock</emphasis>
+ key by the core protocol modifier mapping, and the <emphasis>
+NumLock</emphasis>
+ virtual modifier is bound to they <emphasis>
+Num_Lock</emphasis>
+ key by the virtual modifier mapping, <emphasis>
+Mod3</emphasis>
+ is added to the set of modifiers associated with the <emphasis>
+NumLock</emphasis>
+ virtual modifier.
+</para>
+
+
+<para>
+The virtual modifier mapping is normally updated automatically whenever actions
+are assigned to keys (see <link linkend='Changing_the_Keyboard_Mapping_Using_the_Core_Protocol'>Changing
+the Keyboard Mapping Using the Core Protocol</link> for details) and few
+applications should need to change the virtual modifier mapping explicitly.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch04.xml b/specs/ch04.xml
new file mode 100644
index 0000000..d35e2b4
--- /dev/null
+++ b/specs/ch04.xml
@@ -0,0 +1,865 @@
+<chapter id='Global_Keyboard_Controls'>
+<title>Global Keyboard Controls</title>
+
+<para>
+The X Keyboard Extension supports a number of <emphasis>
+global key controls</emphasis>
+, which affect the way that XKB handles the keyboard as a whole. Many of these
+controls make the keyboard more accessible to the physically impaired and are
+based on the AccessDOS package<footnote><para>
+AccessDOS provides access to the DOS operating system for people with physical
+impairments and was developed by the Trace R&amp;D Center at the University of
+Wisconsin. For more information on AccessDOS, contact the Trace R&amp;D Center,
+Waisman Center and Department of Industrial Engineering, University of
+Wisconsin-Madison WI 53705-2280. Phone: 608-262-6966. e-mail:
+info@trace.wisc.edu.</para></footnote>.
+</para>
+
+<sect1 id='The_RepeatKeys_Control'>
+<title>The RepeatKeys Control</title>
+
+<para>
+The core protocol only allows control over whether or not the entire keyboard
+or individual keys should autorepeat when held down. The <emphasis>
+RepeatKeys</emphasis>
+ control extends this capability by adding control over the delay until a key
+begins to repeat and the rate at which it repeats. <emphasis>
+RepeatKeys</emphasis>
+ is also coupled with the core autorepeat control; changes to one are always
+reflected in the other.
+</para>
+
+
+<para>
+The <emphasis>
+RepeatKeys</emphasis>
+ control has two parameters. The <emphasis>
+autorepeat delay</emphasis>
+ specifies the delay between the initial press of an autorepeating key and the
+first generated repeat event in milliseconds. The <emphasis>
+autorepeat interval</emphasis>
+ specifies the delay between all subsequent generated repeat events in
+milliseconds.
+</para>
+
+
+<sect2 id='The_PerKeyRepeat_Control'>
+<title>The PerKeyRepeat Control</title>
+
+<para>
+When <emphasis>
+RepeatKeys</emphasis>
+ are active, the <emphasis>
+PerKeyRepeat</emphasis>
+ control specifies whether or not individual keys should autorepeat when held
+down. XKB provides the <emphasis>
+PerKeyRepeat</emphasis>
+ for convenience only, and it always parallels the <emphasis>
+auto-repeats</emphasis>
+ field of the core protocol <emphasis>
+GetKeyboardControl</emphasis>
+ request — changes to one are always reflected in the other.
+</para>
+
+
+</sect2>
+<sect2 id='Detectable_Autorepeat'>
+<title>Detectable Autorepeat</title>
+
+<para>
+The X server usually generates both press and release events whenever an
+autorepeating key is held down. If an XKB-aware client enables the <emphasis>
+DetectableAutorepeat</emphasis>
+ per-client option for a keyboard, the server sends that client a key release
+event only when the key is <emphasis>
+physically</emphasis>
+ released. For example, holding down a key to generate three characters without
+detectable autorepeat yields:
+</para>
+
+<literallayout class='monospaced'>
+Press <emphasis>-></emphasis> Release <emphasis>-></emphasis> Press <emphasis>-></emphasis> Release <emphasis>-></emphasis> Press <emphasis>-></emphasis> Release
+</literallayout>
+
+<para>
+If detectable autorepeat is enabled, the client instead receives:
+</para>
+
+<literallayout class='monospaced'>
+Press<emphasis>-></emphasis> Press <emphasis>-></emphasis> Press <emphasis>-></emphasis> Release
+</literallayout>
+
+<para>
+Note that only clients that request detectable autorepeat are affected; other
+clients continue to receive both press and release events for autorepeating
+keys. Also note that support for detectable autorepeat is optional; servers are
+not required to support detectable autorepeat, but they must correctly report
+whether or not it is supported.
+</para>
+
+
+<para>
+<link linkend='Querying_and_Changing_Per_Client_Flags'>Querying and Changing Per-Client
+Flags</link> describes the <emphasis>
+XkbPerClientFlags</emphasis>
+ request, which reports or changes values for all of the per-client flags, and
+which lists the per-client flags that are supported.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='The_SlowKeys_Control'>
+<title>The SlowKeys Control</title>
+
+<para>
+Some users often bump keys accidentally while moving their hand or typing stick
+toward the key they want. Usually, the keys that are bumped accidentally are
+hit only for a very short period of time. The <emphasis>
+SlowKeys</emphasis>
+ control helps filter these accidental bumps by telling the server to wait a
+specified period, called the <emphasis>
+SlowKeys acceptance delay</emphasis>
+, before delivering key events. If the key is released before this period
+elapses, no key events are generated. The user can then bump any number of keys
+on their way to the one they want without generating unwanted characters. Once
+they have reached the key they want, they can then hold it long enough for
+<emphasis>
+SlowKeys</emphasis>
+ to accept it.
+</para>
+
+
+<para>
+The <emphasis>
+SlowKeys</emphasis>
+ control has one parameter; the <emphasis>
+slow keys delay</emphasis>
+ specifies the length of time, in milliseconds, that a key must be held down
+before it is accepted.
+</para>
+
+
+<para>
+When <emphasis>
+SlowKeys</emphasis>
+ are active, the X Keyboard Extension reports the initial press, acceptance,
+rejection or release of any key to interested clients using <emphasis>
+AccessXNotify</emphasis>
+ events. The <emphasis>
+AccessXNotify</emphasis>
+ event is described in more detail in <link linkend='Events'>Events</link>.
+</para>
+
+</sect1>
+<sect1 id='The_BounceKeys_Control'>
+<title>The BounceKeys Control</title>
+
+<para>
+Some people with physical impairments accidentally "bounce" on a key when they
+press it. That is, they press it once, then accidentally press it again
+immediately. The <emphasis>
+BounceKeys</emphasis>
+ control temporarily disables a key after it has been pressed, effectively
+"debouncing" the keyboard.
+</para>
+
+
+<para>
+The <emphasis>
+BounceKeys</emphasis>
+ has a single parameter. The <emphasis>
+BounceKeys delay</emphasis>
+ specifies the period of time, in milliseconds, that the key is disabled after
+it is pressed.
+</para>
+
+
+<para>
+When <emphasis>
+BounceKeys</emphasis>
+ are active, the server reports the acceptance or rejection of any key to
+interested clients by sending an <emphasis>
+AccessXNotify</emphasis>
+ event. The <emphasis>
+AccessXNotify</emphasis>
+ event is described in more detail in <link linkend='Events'>Events</link>.
+</para>
+
+</sect1>
+<sect1 id='The_StickyKeys_Control'>
+<title>The StickyKeys Control</title>
+
+<para>
+Some people find it difficult or impossible to press two keys at once. The
+<emphasis>
+StickyKeys</emphasis>
+ control makes it easier for them to type by changing the behavior of the
+modifier keys. When <emphasis>
+StickyKeys</emphasis>
+ are enabled, a modifier is latched when the user presses it just once, so the
+user can first press a modifier, release it, then press another key. For
+example, to get an exclamation point (!) on a PC-style keyboard, the user can
+press the <emphasis>
+Shift</emphasis>
+ key, release it, then press the <emphasis>
+1</emphasis>
+ key.
+</para>
+
+
+<para>
+By default, <emphasis>
+StickyKeys</emphasis>
+ also allows users to lock modifier keys without requiring special locking
+keys. The user can press a modifier twice in a row to lock it, and then unlock
+it by pressing it one more time.
+</para>
+
+
+<para>
+Modifiers are automatically unlatched when the user presses a non-modifier key.
+For instance, to enter the sequence <emphasis>
+Shift</emphasis>
++<emphasis>
+Ctrl</emphasis>
++<emphasis>
+Z</emphasis>
+ the user could press and release the <emphasis>
+Shift</emphasis>
+ key to latch the <emphasis>
+Shift</emphasis>
+ modifier, then press and release the <emphasis>
+Ctrl</emphasis>
+ key to latch the <emphasis>
+Control</emphasis>
+ modifier — the <emphasis>
+Ctrl</emphasis>
+ key is a modifier key, so pressing it does not unlatch the <emphasis>
+Shift</emphasis>
+ modifier, but leaves both the <emphasis>
+Shift</emphasis>
+ and <emphasis>
+Control</emphasis>
+ modifiers latched, instead. When the user presses the <emphasis>
+Z</emphasis>
+ key, it will be as though the user pressed <emphasis>
+Shift</emphasis>
++<emphasis>
+Ctrl</emphasis>
++<emphasis>
+Z</emphasis>
+ simultaneously. The <emphasis>
+Z</emphasis>
+ key is not a modifier key, so the <emphasis>
+Shift</emphasis>
+ and <emphasis>
+Control</emphasis>
+ modifiers are unlatched after the event is generated.
+</para>
+
+
+<para>
+A locked a modifier remains in effect until the user unlocks it. For example,
+to enter the sequence ("XKB") on a PC-style keyboard with a typical US/ASCII
+layout, the user could press and release the <emphasis>
+Shift</emphasis>
+ key twice to lock the <emphasis>
+Shift</emphasis>
+ modifier. Then, when the user presses the <emphasis>
+9</emphasis>
+, <emphasis>
+‘</emphasis>
+, <emphasis>
+x</emphasis>
+, <emphasis>
+k</emphasis>
+, <emphasis>
+b</emphasis>
+, <emphasis>
+‘</emphasis>
+, and <emphasis>
+0</emphasis>
+ keys in sequence, it will generate ("XKB"). To unlock the <emphasis>
+Shift</emphasis>
+ modifier, the user can press and release the <emphasis>
+Shift</emphasis>
+ key.
+</para>
+
+
+<para>
+Two option flags modify the behavior of the <emphasis>
+StickyKeys</emphasis>
+ control:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If the <emphasis>
+XkbAX_TwoKeys</emphasis>
+ flag is set, XKB automatically turns <emphasis>
+StickyKeys</emphasis>
+ off if the user presses two or more keys at once. This serves to automatically
+disable StickyKeys when a user who does not require sticky keys is using the
+keyboard.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+XkbAX_LatchToLock</emphasis>
+ controls the locking behavior of <emphasis>
+StickyKeys</emphasis>
+; the <emphasis>
+StickyKeys</emphasis>
+ control only locks modifiers as described above if the <emphasis>
+XkbAX_LatchToLock</emphasis>
+ flag is set.
+ </para>
+</listitem>
+</itemizedlist>
+
+</sect1>
+<sect1 id='The_MouseKeys_Control'>
+<title>The MouseKeys Control</title>
+
+<para>
+The <emphasis>
+MouseKeys</emphasis>
+ control lets a user control all the mouse functions from the keyboard. When
+<emphasis>
+MouseKeys</emphasis>
+ are enabled, all keys with <emphasis>
+MouseKeys</emphasis>
+ actions bound to them generate core pointer events instead of normal key press
+and release events.
+</para>
+
+
+<para>
+The <emphasis>
+MouseKeys</emphasis>
+ control has a single parameter, the <emphasis>
+mouse keys default button</emphasis>
+, which specifies the core pointer button to be used by mouse keys actions that
+do not explicitly specify a button.
+</para>
+
+
+</sect1>
+<sect1 id='The_MouseKeysAccel_Control'>
+<title>The MouseKeysAccel Control</title>
+
+<para>
+If the <emphasis>
+MouseKeysAccel</emphasis>
+ control is enabled, the effect of a pointer motion action changes as a key is
+held down. The <emphasis>
+mouse keys delay</emphasis>
+ specifies the amount of time between the initial key press and the first
+repeated motion event. The <emphasis>
+mouse keys interval</emphasis>
+ specifies the amount of time between repeated mouse keys events. The <emphasis>
+steps to maximum acceleration</emphasis>
+ field specifies the total number of events before the key is travelling at
+maximum speed. The <emphasis>
+maximum acceleration</emphasis>
+ field specifies the maximum acceleration. The <emphasis>
+curve</emphasis>
+ parameter controls the ramp used to reach maximum acceleration.
+</para>
+
+
+<para>
+When <emphasis>
+MouseKeys</emphasis>
+ are active and a <emphasis>
+SA_MovePtr</emphasis>
+ key action (see <link linkend='Key_Actions'>Key
+Actions</link>) is activated, a pointer motion event is generated immediately.
+If <emphasis>
+MouseKeysAccel</emphasis>
+ is enabled and if acceleration is enabled for the key in question, a second
+event is generated after <emphasis>
+mouse keys delay </emphasis>
+milliseconds, and additional events are generated every <emphasis>
+mouse keys interval</emphasis>
+ milliseconds for as long as the key is held down.
+</para>
+
+
+<sect2 id='Relative_Pointer_Motion'>
+<title>Relative Pointer Motion</title>
+
+<para>
+If the <emphasis>
+SA_MovePtr</emphasis>
+ action specifies relative motion, events are generated as follows: The initial
+event always moves the cursor the distance specified in the action; after
+<emphasis>
+steps to maximum acceleration</emphasis>
+ events have been generated, all subsequent events move the pointer the
+distance specified in the action times the <emphasis>
+maximum acceleration.</emphasis>
+ Events after the first but before maximum acceleration has been achieved are
+accelerated according to the formula:
+</para>
+
+<mediaobject>
+ <imageobject>
+ <imagedata format="SVG" fileref="XKBproto-1.svg"/>
+ </imageobject>
+</mediaobject>
+
+
+<para>
+Where <emphasis>
+action_delta</emphasis>
+ is the offset specified by the mouse keys action, <emphasis>
+max_accel </emphasis>
+and <emphasis>
+steps_to_max</emphasis>
+ are parameters to the <emphasis>
+MouseKeysAccel</emphasis>
+ ctrl, and the curveFactor is computed using the <emphasis>
+MouseKeysAccel</emphasis>
+ <emphasis>
+curve</emphasis>
+ parameter as follows:
+</para>
+
+<mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-2.svg"/>
+ </imageobject>
+ </mediaobject>
+
+
+<para>
+With the result that a <emphasis>
+curve</emphasis>
+ of <emphasis>
+0</emphasis>
+ causes the distance moved to increase linearly from <emphasis>
+action_delta</emphasis>
+ to <mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-3.svg"/>
+ </imageobject>
+ </mediaobject>
+
+, and the minimum legal <emphasis>
+curve</emphasis>
+ of -<emphasis>
+1000</emphasis>
+ causes all events after the first move at <emphasis>
+max_accel</emphasis>
+. A negative <emphasis>
+curve</emphasis>
+ causes an initial sharp increase in acceleration which tapers off, while a
+positive curve yields a slower initial increase in acceleration followed by a
+sharp increase as the number of pointer events generated by the action
+approaches <emphasis>
+steps_to_max</emphasis>
+.
+</para>
+
+
+</sect2>
+<sect2 id='Absolute_Pointer_Motion'>
+<title>Absolute Pointer Motion</title>
+
+<para>
+If an <emphasis>
+SA_MovePtr</emphasis>
+ action specifies an absolute position for one of the coordinates but still
+allows acceleration, all repeated events contain any absolute coordinates
+specified in the action.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='The_AccessXKeys_Control'>
+<title>The AccessXKeys Control</title>
+
+<para>
+If <emphasis>
+AccessXKeys</emphasis>
+ is enabled many controls can also be turned on or off from the keyboard by
+entering the following standard key sequences:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Holding down a shift key by itself for eight seconds toggles the
+<emphasis>
+SlowKeys</emphasis>
+ control.
+ </para>
+</listitem>
+<listitem>
+ <para>Pressing and releasing a shift key five times in a row without any
+intervening key events and with less than 30 seconds delay between consecutive
+presses toggles the state of the <emphasis>
+StickyKeys</emphasis>
+ control.
+ </para>
+</listitem>
+<listitem>
+ <para>Simultaneously operating two or more modifier keys deactivates the
+<emphasis>
+StickyKeys</emphasis>
+ control.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Some of these key sequences optionally generate audible feedback of the change
+in state, as described in <link linkend='The_AccessXFeedback_Control'>The
+AccessXFeedback Control</link>, or cause <emphasis>
+XkbAccessXNotify</emphasis>
+ events as described in <link linkend='Events'>Events</link>.
+</para>
+
+
+</sect1>
+<sect1 id='The_AccessXTimeout_Control'>
+<title>The AccessXTimeout Control</title>
+
+<para>
+In environments where computers are shared, features such as <emphasis>
+SlowKeys</emphasis>
+ present a problem: if <emphasis>
+SlowKeys</emphasis>
+ is on, the keyboard can appear to be unresponsive because keys have no effect
+unless they are held for a certain period of time. To help address this
+problem, XKB provides an <emphasis>
+AccessXTimeout</emphasis>
+ control to automatically change the value of any global controls or AccessX
+options if the keyboard is idle for a specified period of time.
+</para>
+
+
+<para>
+The AccessXTimeout control has a number of parameters which affect the duration
+of the timeout and the features changed when the timeout expires.
+</para>
+
+
+<para>
+The <emphasis>
+AccessX Timeout</emphasis>
+ field specifies the number of seconds the keyboard must be idle before the
+global controls and AccessX options are modified. The <emphasis>
+AccessX Options Mask</emphasis>
+ field specifies which values in the <emphasis>
+AccessX Options</emphasis>
+ field are to be changed, and the <emphasis>
+AccessX Options Values</emphasis>
+ field specifies the new values for those options. The <emphasis>
+AccessX Controls Mask</emphasis>
+ field specifies which controls are to be changed in the global set of
+<emphasis>
+enabled controls</emphasis>
+, and the <emphasis>
+AccessX Controls Values</emphasis>
+ field specifies the new values for those controls.
+</para>
+
+
+</sect1>
+<sect1 id='The_AccessXFeedback_Control'>
+<title>The AccessXFeedback Control</title>
+
+<para>
+If <emphasis>
+AccessXFeedback</emphasis>
+ is enabled, special beep-codes indicate changes in keyboard controls (or some
+key events when <emphasis>
+SlowKeys</emphasis>
+ or <emphasis>
+StickyKeys</emphasis>
+ are active). Many beep codes sound as multiple tones, but XKB reports a single
+<emphasis>
+XkbBellNotify</emphasis>
+ event for the entire sequence of tones.
+</para>
+
+
+<para>
+All feedback tones are governed by the <emphasis>
+AudibleBell</emphasis>
+ control. Individual feedback tones can be explicitly enabled or disabled using
+the <emphasis>
+accessX options mask</emphasis>
+ or set to deactivate after an idle period using the <emphasis>
+accessX timeout options mask</emphasis>
+. XKB defines the following feedback tones:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.5*'/>
+<colspec colname='c3' colwidth='1.5*'/>
+<colspec colname='c4' colwidth='1.5*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Feedback Name</entry>
+ <entry>Bell Name</entry>
+ <entry>Default Sound</entry>
+ <entry>Indicates</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>FeatureFB</entry>
+ <entry>AX_FeatureOn</entry>
+ <entry>rising tone</entry>
+ <entry>Keyboard control enabled</entry>
+ </row>
+ <row>
+ <entry>&#x0020;</entry>
+ <entry>AX_FeatureOff</entry>
+ <entry>falling tone</entry>
+ <entry>Keyboard control disabled</entry>
+ </row>
+ <row>
+ <entry>&#x0020;</entry>
+ <entry>AX_FeatureChange</entry>
+ <entry>two tones</entry>
+ <entry>Several controls changed state</entry>
+ </row>
+ <row>
+ <entry>IndicatorFB</entry>
+ <entry>AX_IndicatorOn</entry>
+ <entry>high tone</entry>
+ <entry>Indicator Lit</entry>
+ </row>
+ <row>
+ <entry>&#x0020;</entry>
+ <entry>AX_IndicatorOff</entry>
+ <entry>low tone</entry>
+ <entry>Indicator Extinguished</entry>
+ </row>
+ <row>
+ <entry>&#x0020;</entry>
+ <entry>AX_IndicatorChange</entry>
+ <entry>two high tones</entry>
+ <entry>Several indicators changed state</entry>
+ </row>
+ <row>
+ <entry>SlowWarnFB</entry>
+ <entry>AX_SlowKeysWarning</entry>
+ <entry>three high tones</entry>
+ <entry>Shift key held for four seconds</entry>
+ </row>
+ <row>
+ <entry>SKPressFB</entry>
+ <entry>AX_SlowKeyPress</entry>
+ <entry>single tone</entry>
+ <entry>Key press while <emphasis>
+SlowKeys</emphasis>
+ are on</entry>
+ </row>
+ <row>
+ <entry>SKReleaseFB</entry>
+ <entry>AX_SlowKeyRelease</entry>
+ <entry>single tone</entry>
+ <entry>Key release while <emphasis>
+SlowKeys</emphasis>
+ are on</entry>
+ </row>
+ <row>
+ <entry>SKAcceptFB</entry>
+ <entry>AX_SlowKeyAccept</entry>
+ <entry>single tone</entry>
+ <entry>Key event accepted by <emphasis>
+SlowKeys</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>SKRejectFB</entry>
+ <entry>AX_SlowKeyReject</entry>
+ <entry>low tone</entry>
+ <entry>Key event rejected by <emphasis>
+SlowKeys</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>StickyKeysFB</entry>
+ <entry>AX_StickyLatch</entry>
+ <entry>low tone then high tone</entry>
+ <entry>Modifier latched by <emphasis>
+StickyKeys</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>&#x0020;</entry>
+ <entry>AX_StickyLock</entry>
+ <entry>high tone</entry>
+ <entry>Modifier locked by <emphasis>
+StickyKeys</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>&#x0020;</entry>
+ <entry>AX_StickyUnlock</entry>
+ <entry>low tone</entry>
+ <entry>Modifier unlocked by <emphasis>
+StickyKeys</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>BKRejectFB</entry>
+ <entry>AX_BounceKeysReject</entry>
+ <entry>low tone</entry>
+ <entry>Key event rejected by <emphasis>
+BounceKeys</emphasis>
+</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Implementations that cannot generate continuous tones may generate multiple
+beeps instead of falling and rising tones; for example, they can generate a
+high-pitched beep followed by a low-pitched beep instead of a continuous
+falling tone.
+</para>
+
+
+<para>
+If the physical keyboard bell is not very capable, attempts to simulate a
+continuous tone with multiple bells can sound horrible. Set the <emphasis>
+DumbBellFB</emphasis>
+ AccessX option to inform the server that the keyboard bell is not very capable
+and that XKB should use only simple bell combinations. Keyboard capabilities
+vary wildly, so the sounds generated for the individual bells when the
+<emphasis>
+DumbBellFB</emphasis>
+ option is set are implementation specific.
+</para>
+
+
+</sect1>
+<sect1 id='The_Overlay1_and_Overlay2_Controls'>
+<title>The Overlay1 and Overlay2 Controls</title>
+
+<para>
+A keyboard overlay allows some subset of the keyboard to report alternate
+keycodes when the overlay is enabled. For example a keyboard overlay can be
+used to simulate a numeric or editing keypad on keyboard that does not actually
+have one by generating alternate of keycodes for some keys when the overlay is
+enabled. This technique is very common on portable computers and embedded
+systems with small keyboards.
+</para>
+
+
+<para>
+XKB includes direct support for two keyboard overlays, using the <emphasis>
+Overlay1</emphasis>
+ and <emphasis>
+Overlay2</emphasis>
+ controls. When <emphasis>
+Overlay1</emphasis>
+ is enabled, all of the keys that are members of the first keyboard overlay
+generate an alternate keycode. When <emphasis>
+Overlay2</emphasis>
+ is enabled, all of the keys that are members of the second keyboard overlay
+generate an alternate keycode.
+</para>
+
+
+<para>
+To specify the overlay to which a key belongs and the alternate keycode it
+should generate when that overlay is enabled, assign it either the <emphasis>
+KB_Overlay1</emphasis>
+ or <emphasis>
+KB_Overlay2</emphasis>
+ key behaviors, as described in <link linkend='Key_Behavior'>
+Key Behavior</link>.
+</para>
+
+
+</sect1>
+<sect1 id='Boolean_Controls_and_The_EnabledControls_Control'>
+<title>"Boolean" Controls and The EnabledControls Control</title>
+
+<para>
+All of the controls described above, along with the <emphasis>
+AudibleBell</emphasis>
+ control (described in <link linkend='Disabling_Server_Generated_Bells'>Disabling
+Server Generated Bells</link>) and the <emphasis>
+IgnoreGroupLock</emphasis>
+ control (described in <link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>Server
+Internal Modifiers and Ignore Locks Behavior</link>) comprise the <emphasis>
+boolean controls</emphasis>
+. In addition to any parameters listed in the descriptions of the individual
+controls, the boolean controls can be individually enabled or disabled by
+changing the value of the <emphasis>
+EnabledControls</emphasis>
+ control.
+</para>
+
+
+<para>
+The following <emphasis>
+non-boolean</emphasis>
+ controls are always active and cannot be changed using the <emphasis>
+EnabledControls</emphasis>
+ control or specified in any context that accepts only boolean controls:
+<emphasis>
+GroupsWrap</emphasis>
+ (<link linkend='Computing_Effective_Modifier_and_Group'>Computing Effective Modifier and
+Group</link>), <emphasis>
+EnabledControls</emphasis>
+, <emphasis>
+InternalMods</emphasis>
+ (<link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>Server Internal Modifiers and
+Ignore Locks Behavior</link>), and <emphasis>
+IgnoreLockMods</emphasis>
+ (<link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>Server Internal Modifiers and
+Ignore Locks Behavior</link>) and <emphasis>
+PerKeyRepeat</emphasis>
+ (<link linkend='The_RepeatKeys_Control'>The RepeatKeys Control</link>)
+</para>
+
+
+</sect1>
+<sect1 id='Automatic_Reset_of_Boolean_Controls'>
+<title>Automatic Reset of Boolean Controls</title>
+
+<para>
+The <emphasis>
+auto-reset controls</emphasis>
+ are a per-client value which consist of two masks that can contain any of the
+boolean controls (see <link linkend='Boolean_Controls_and_The_EnabledControls_Control'>"Boolean"
+Controls and The EnabledControls Control</link>). Whenever the client exits
+for any reason, any boolean controls specified in the <emphasis>
+auto-reset mask</emphasis>
+ are set to the corresponding value from the <emphasis>
+auto-reset values</emphasis>
+ mask. This makes it possible for clients to "clean up after themselves"
+automatically, even if abnormally terminated.
+</para>
+
+
+<para>
+For example, a client that replace the keyboard bell with some other audible
+cue might want to turn off the <emphasis>
+AudibleBell</emphasis>
+ control (<link linkend='Disabling_Server_Generated_Bells'>Disabling Server
+Generated Bells</link>) to prevent the server from also generating a sound and
+thus avoid cacophony. If the client were to exit without resetting the
+<emphasis>
+AudibleBell </emphasis>
+control, the user would be left without any feedback at all. Setting <emphasis>
+AudibleBell</emphasis>
+ in both the auto-reset mask and auto-reset values guarantees that the audible
+bell will be turned back on when the client exits.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch05.xml b/specs/ch05.xml
new file mode 100644
index 0000000..5669a39
--- /dev/null
+++ b/specs/ch05.xml
@@ -0,0 +1,86 @@
+
+<chapter id='Key_Event_Processing_Overview'>
+<title>Key Event Processing Overview</title>
+
+<para>
+There are three steps to processing each key event in the X server, and at
+least three in the client. This section describes each of these steps briefly;
+the following sections describe each step in more detail.
+</para>
+
+<orderedlist>
+<listitem>
+ <para>First, the server applies global keyboard controls to determine whether
+the key event should be processed immediately, deferred, or ignored. For
+example, the <emphasis>
+SlowKeys</emphasis>
+ control can cause a key event to be deferred until the slow keys delay has
+elapsed while the <emphasis>
+RepeatKeys</emphasis>
+ control can cause multiple X events from a single physical key press if the
+key is held down for an extended period. The global keyboard controls affect
+all of the keys on the keyboard and are described in
+<link linkend='Global_Keyboard_Controls'>Global Keyboard Controls</link>.
+ </para>
+</listitem>
+<listitem>
+ <para>Next, the server applies per-key behavior. Per key-behavior can be used
+to simulate or indicate some special kinds of key behavior. For example,
+keyboard overlays, in which a key generates an alternate keycode under certain
+circumstances, can be implemented using per-key behavior. Every key has a
+single behavior, so the effect of key behavior does not depend on keyboard
+modifier or group state, though it might depend on global keyboard controls.
+Per-key behaviors are described in detail in
+<link linkend='Key_Behavior'>Key Behavior</link>.
+ </para>
+</listitem>
+<listitem>
+ <para>Finally, the server applies key actions. Logically, every keysym on the
+keyboard has some action associated with it. The key action tells the server
+what to do when an event which yields the corresponding keysym is generated.
+Key actions might change or suppress the event, generate some other event, or
+change some aspect of the server. Key actions are described in <link linkend='Key_Actions'>Key Actions</link>.
+ </para>
+</listitem>
+</orderedlist>
+
+<para>
+If the global controls, per-key behavior and key action combine to cause a key
+event, the client which receives the event processes it in several steps.
+</para>
+
+<orderedlist>
+<listitem>
+ <para>First the client extracts the effective keyboard group and a set of
+modifiers from the state field of the event. See <link linkend='Computing_A_State_Field_from_an_XKB_State'>Computing A State Field from an XKB
+State</link> for details.
+ </para>
+</listitem>
+<listitem>
+ <para>Using the modifiers and effective keyboard group, the client selects a
+symbol from the list of keysyms bound to the key. <link linkend='Determining_the_KeySym_Associated_with_a_Key_Event'>Determining the KeySym Associated with a
+Key Event</link> discusses symbol selection.
+ </para>
+</listitem>
+<listitem>
+ <para>If necessary, the client transforms the symbol and resulting string
+using any modifiers that are "left over" from the process of looking up a
+symbol. For example, if the <emphasis>
+Lock</emphasis>
+ modifier is left over, the resulting keysym is capitalized according to the
+capitalization rules specified by the system. See
+<link linkend='Transforming_the_KeySym_Associated_with_a_Key_Event'>
+Transforming the KeySym Associated with a
+Key Event</link> for a more detailed discussion of the transformations defined
+by XKB.
+ </para>
+</listitem>
+<listitem>
+ <para>Finally, the client uses the keysym and remaining modifiers in an
+application-specific way. For example, applications based on the X toolkit
+might apply translations based on the symbol and modifiers reported by the
+first three steps.
+ </para>
+</listitem>
+</orderedlist>
+</chapter>
diff --git a/specs/ch06.xml b/specs/ch06.xml
new file mode 100644
index 0000000..ec6a5f2
--- /dev/null
+++ b/specs/ch06.xml
@@ -0,0 +1,1767 @@
+<chapter id='Key_Event_Processing_in_the_Server'>
+<title>Key Event Processing in the Server</title>
+
+<para>
+This section describes the steps involved in processing a key event within the
+server when XKB is present. Key events can be generated due to keyboard
+activity and passed to XKB by the DDX layer, or they can be synthesized by
+another extension, such as XTEST.
+</para>
+
+<sect1 id='Applying_Global_Controls'>
+<title>Applying Global Controls</title>
+
+<para>
+When the X Keyboard Extension receives a key event, it first checks the global
+key controls to decide whether to process the event immediately or at all. The
+global key controls which might affect the event, in descending order of
+priority, are:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If a key is pressed while the <emphasis>
+BounceKeys</emphasis>
+ control is enabled, the extension generates the event only if the key is
+active. When a key is released, the server deactivates the key and starts a
+<emphasis>
+bounce keys timer</emphasis>
+ with an interval specified by the debounce delay.
+ </para>
+ <para>
+If the bounce keys timer expires or if some other key is pressed before the
+timer expires, the server reactivates the corresponding key and deactivates the
+timer. Neither expiration nor deactivation of a bounce keys timer causes an
+event.</para>
+</listitem>
+<listitem>
+ <para>If the <emphasis>
+SlowKeys</emphasis>
+ control is enabled, the extension sets a <emphasis>
+slow keys timer</emphasis>
+ with an interval specified by the slow keys delay, but does not process the
+key event immediately. The corresponding key release deactivates this timer.
+ </para>
+ <para>
+If the slow keys timer expires, the server generates a key press for the
+corresponding key, sends an <emphasis>
+XkbAccessXNotify</emphasis>
+ and deactivates the timer.
+ </para>
+</listitem>
+<listitem>
+ <para>The extension processes key press events normally whether or not the
+<emphasis>
+RepeatKeys</emphasis>
+ control is active, but if <emphasis>
+RepeatKeys</emphasis>
+ are enabled and per-key autorepeat is enabled for the event key, the extension
+processes key press events normally, but it also initiates an <emphasis>
+autorepeat timer</emphasis>
+ with an interval specified by the autorepeat delay. The corresponding key
+release deactivates the timer.
+ </para>
+ <para>
+If the autorepeat timer expires, the server generates a key release and a key
+press for the corresponding key and reschedules the timer according to the
+autorepeat interval.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Key events are processed by each global control in turn: if the <emphasis>
+BounceKeys</emphasis>
+ control accepts a key event, <emphasis>
+SlowKeys</emphasis>
+ considers it. Once <emphasis>
+SlowKeys</emphasis>
+ allows or synthesizes an event, the <emphasis>
+RepeatKeys</emphasis>
+ control acts on it.
+</para>
+
+
+</sect1>
+<sect1 id='Key_Behavior'>
+<title>Key Behavior</title>
+
+<para>
+Once an event is accepted by all of the controls or generated by a timer, the
+server checks the per-key behavior of the corresponding key. This extension
+currently defines the following key behaviors:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Behavior</entry>
+ <entry>Effect</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+KB_Default</emphasis>
+ </entry>
+ <entry>Press and release events are processed normally.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+KB_Lock</emphasis>
+ </entry>
+ <entry>If a key is logically up (i.e. the corresponding bit of the core key
+map is cleared) when it is pressed, the key press is processed normally and the
+corresponding release is ignored. If the key is logically down when pressed,
+the key press is ignored but the corresponding release is processed normally.
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+KB_RadioGroup
+</emphasis>
+ </para>
+ <para>
+ flags: CARD8
+ </para>
+ <para>
+ index: CARD8
+ </para>
+ </entry>
+ <entry><para>If another member of the radio group specified by <emphasis>
+index</emphasis>
+ is logically down when a key is pressed, the server synthesizes a key release
+for the member that is logically down and then processes the new key press
+event normally. </para>
+<para>
+If the key itself is logically down when pressed, the key press event is
+ignored, but the processing of the corresponding key release depends on the
+value of the <emphasis>
+RGAllowNone</emphasis>
+ bit in <emphasis>
+flags</emphasis>
+. If it is set, the key release is processed normally; otherwise the key
+release is also ignored.
+</para>
+<para>
+All other key release events are ignored.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+KB_Overlay1
+</emphasis>
+ </para>
+ <para>
+ key: KEYCODE
+ </para>
+ </entry>
+ <entry>If the <emphasis>
+Overlay1</emphasis>
+ control is enabled, events from this key are reported as if they came from the
+key specified in <emphasis>
+key</emphasis>
+. Otherwise, press and release events are processed normally.</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+KB_Overlay2
+</emphasis>
+ </para>
+ <para>
+ key: KEYCODE
+ </para>
+ </entry>
+ <entry>If the <emphasis>
+Overlay2</emphasis>
+ control is enabled, events from this key are reported as if they came from the
+key specified in <emphasis>
+key</emphasis>
+. Otherwise, press and release events are processed normally.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The X server uses key behavior to determine whether to process or filter out
+any given key event; key behavior is independent of keyboard modifier or group
+state (each key has exactly one behavior.
+</para>
+
+<para>
+Key behaviors can be used to simulate any of these types of keys or to indicate
+an unmodifiable physical, electrical or software driver characteristic of a
+key. An optional <emphasis>
+permanent</emphasis>
+ flag can modify any of the supported behaviors and indicates that behavior
+describes an unalterable physical, electrical or software aspect of the
+keyboard. Permanent behaviors cannot be changed or set by the <emphasis>
+XkbSetMap</emphasis>
+ request. The <emphasis>
+permanent</emphasis>
+ flag indicates a characteristic of the underlying system that XKB cannot
+affect, so XKB treats all permanent behaviors as if they were <emphasis>
+KB_Default</emphasis>
+ and does not filter key events described in the table above.
+</para>
+
+
+</sect1>
+<sect1 id='Key_Actions'>
+<title>Key Actions</title>
+
+<para>
+Once the server has applied the global controls and per-key behavior and has
+decided to process a key event, it applies <emphasis>
+key actions</emphasis>
+ to determine the effects of the key on the internal state of the server. A key
+action consists of an operator and some optional data. XKB supports actions
+which:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>change base, latched or locked modifiers or group
+ </para>
+</listitem>
+<listitem>
+ <para>move the core pointer or simulate core pointer button events
+ </para>
+</listitem>
+<listitem>
+ <para>change most aspects of keyboard behavior
+ </para>
+</listitem>
+<listitem>
+ <para>terminate or suspend the server
+ </para>
+</listitem>
+<listitem>
+ <para>send a message to interested clients
+ </para>
+</listitem>
+<listitem>
+ <para>simulate events on other keys
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Each key has an optional list of actions. If present, this list parallels the
+list of symbols associated with the key (i.e. it has one action per symbol
+associated with the key). For key press events, the server looks up the action
+to be applied from this list using the key symbol mapping associated with the
+event key, just as a client looks up symbols as described in <link
+linkend='Determining_the_KeySym_Associated_with_a_Key_Event'>Determining the KeySym Associated with a
+Key Event</link>; if the event key does not have any actions, the server uses
+the <emphasis>
+SA_NoAction</emphasis>
+ event for that key regardless of modifier or group state.
+</para>
+
+
+<para>
+Key actions have essentially two halves; the effects on the server when the key
+is pressed and the effects when the key is released. The action applied for a
+key press event determines the further actions, if any, that are applied to the
+corresponding release event or to events that occur while the key is held down.
+Clients can change the actions associated with a key while the key is down
+without changing the action applied next time the key is released; subsequent
+press-release pairs will use the newly bound key action.
+</para>
+
+
+<para>
+Most actions directly change the state of the keyboard or server; some actions
+also modify other actions that occur simultaneously with them. Two actions
+occur simultaneously if the keys which invoke the actions are both logically
+down at the same time, regardless of the order in which they are pressed or
+delay between the activation of one and the other.
+</para>
+
+
+<para>
+Most actions which affect keyboard modifier state accept a modifier definition
+(see <link linkend='Virtual_Modifiers'>Virtual Modifiers</link>)
+named <emphasis>
+mods</emphasis>
+ and a boolean flag name <emphasis>
+useModMap</emphasis>
+ among their arguments. These two fields combine to specify the modifiers
+affected by the action as follows: If <emphasis>
+useModMap</emphasis>
+ is <emphasis>
+True</emphasis>
+, the action sets any modifiers bound by the modifier mapping to the key that
+initiated the action; otherwise, the action sets the modifiers specified by
+<emphasis>
+mods</emphasis>
+. For brevity in the text of the following definitions, we refer to this
+combination of <emphasis>
+useModMap</emphasis>
+ and <emphasis>
+mods</emphasis>
+ as the "action modifiers."
+</para>
+
+
+<para>
+The X Keyboard Extension supports the following actions:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="auto" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Action</entry>
+ <entry>Effect</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>SA_NoAction</emphasis></entry>
+ <entry>
+ <itemizedlist>
+ <listitem>
+ <para>
+No direct effect, though <emphasis>SA_NoAction</emphasis>
+ events may change the effect of other server actions (see below).
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>SA_SetMods</emphasis>
+ </para>
+ <para>
+ mods: MOD_DEF
+ </para>
+ <para>
+ useModMap: BOOL
+ </para>
+ <para>
+ clearLocks: BOOL
+ </para>
+ </entry>
+ <entry>
+ <itemizedlist>
+ <listitem>
+ <para>
+Key press adds any action modifiers to the keyboard’s base modifiers<emphasis>.</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Key release clears any action modifiers in the keyboard’s base
+modifiers, provided that no other key which affects the same modifiers is
+logically down.
+ </para>
+ </listitem>
+ <listitem>
+ <para>If no keys were operated simultaneously with this key and <emphasis>
+clearLocks</emphasis>
+ is set, release unlocks any action modifiers.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_LatchMods
+</emphasis>
+ </para>
+ <para>
+ mods: MOD_DEF
+ </para>
+ <para>
+ useModMap: BOOL
+ </para>
+ <para>
+ clearLocks: BOOL
+ </para>
+ <para>
+ latchToLock: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>Key press and release events have the same effect as for <emphasis>
+SA_SetMods</emphasis>
+; if no keys were operated simultaneously with the latching modifier key, key
+release events have the following additional effects:
+ </para>
+</listitem>
+<listitem>
+ <para>Modifiers that were unlocked due to <emphasis>
+clearLocks</emphasis>
+ have no further effect.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+latchToLock</emphasis>
+ is set, key release locks and then unlatches any remaining action modifiers
+that are already latched.
+ </para>
+</listitem>
+<listitem>
+ <para>Finally, key release latches any action modifiers that were not used by
+the <emphasis>
+clearLocks</emphasis>
+ or <emphasis>
+latchToLock</emphasis>
+ flags.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_LockMods
+ </emphasis>
+ </para>
+ <para>
+ mods: MOD_DEF
+ </para>
+ <para>
+ useModMap: BOOL
+ </para>
+ <para>
+ noLock: BOOL
+ </para>
+ <para>
+ noUnlock: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>Key press sets the base and possibly the locked state of any action
+modifiers. If <emphasis>
+noLock</emphasis>
+ is <emphasis>
+True</emphasis>
+, only the base state is changed.
+ </para>
+</listitem>
+<listitem>
+ <para>For key release events, clears any action modifiers in the keyboard’s
+base modifiers, provided that no other key which affects the same modifiers is
+down. If <emphasis>
+noUnlock</emphasis>
+ is <emphasis>
+False</emphasis>
+ and any of the action modifiers were locked before the corresponding key press
+occurred, key release unlocks them.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_SetGroup
+</emphasis>
+ </para>
+ <para>
+ group: INT8
+ </para>
+ <para>
+ groupAbsolute: BOOL
+ </para>
+ <para>
+ clearLocks: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+groupAbsolute</emphasis>
+ is set, key press events change the base keyboard group to <emphasis>
+group</emphasis>
+; otherwise, they add <emphasis>
+group</emphasis>
+ to the base keyboard group. In either case, the resulting effective keyboard
+group is brought back into range depending on the value of the <emphasis>
+GroupsWrap</emphasis>
+ control for the keyboard.
+ </para>
+</listitem>
+<listitem>
+ <para>If an <emphasis>
+SA_ISOLock</emphasis>
+ key is pressed while this key is held down, key release has no effect,
+otherwise it cancels the effects of the press.
+ </para>
+</listitem>
+<listitem>
+ <para>If no keys were operated simultaneously with this key and <emphasis>
+clearLocks</emphasis>
+ is set, key release also sets the locked keyboard group to <emphasis>
+Group1</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_LatchGroup
+ </emphasis>
+ </para>
+ <para>
+ group: INT8
+ </para>
+ <para>
+ groupAbsolute: BOOL
+ </para>
+ <para>
+ clearLocks: BOOL
+ </para>
+ <para>
+ latchToLock: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>Key press and release events have the same effect as an <emphasis>
+SA_SetGroup</emphasis>
+ action; if no keys were operated simultaneously with the latching group key
+and the <emphasis>
+clearLocks</emphasis>
+ flag was not set or had no effect, key release has the following additional
+effects:
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+latchToLock</emphasis>
+ is set and the latched keyboard group is non-zero, the key release adds the
+delta applied by the corresponding key press to the locked keyboard group and
+subtracts it from the latched keyboard group. The locked and effective keyboard
+group are brought back into range according to the value of the global
+<emphasis>
+GroupsWrap</emphasis>
+ control for the keyboard.
+ </para>
+</listitem>
+<listitem>
+ <para>Otherwise, key release adds the key press delta to the latched keyboard
+group.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_LockGroup
+ </emphasis>
+ </para>
+ <para>
+ group: INT8
+ </para>
+ <para>
+ groupAbsolute: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+groupAbsolute</emphasis>
+ is set, key press sets the locked keyboard group to <emphasis>
+group</emphasis>
+. Otherwise, key press adds <emphasis>
+group</emphasis>
+ to the locked keyboard group. In either case, the resulting locked and
+effective group is brought back into range depending on the value of the
+<emphasis>
+GroupsWrap</emphasis>
+ control for the keyboard.
+ </para>
+</listitem>
+<listitem>
+ <para>Key release has no effect.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_MovePtr
+</emphasis>
+ </para>
+ <para>
+ x, y: INT16
+ </para>
+ <para>
+ noAccel: BOOL
+ </para>
+ <para>
+ absoluteX: BOOL
+ </para>
+ <para>
+ absoluteY: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+MouseKeys</emphasis>
+ are not enabled, this action behaves like <emphasis>
+SA_NoAction</emphasis>
+, otherwise this action cancels any pending repeat key timers for this key and
+has the following additional effects.
+ </para>
+</listitem>
+<listitem>
+ <para>Key press generates a core pointer <emphasis>
+MotionNotify</emphasis>
+ event instead of the usual <emphasis>
+KeyPress</emphasis>
+. If <emphasis>
+absoluteX</emphasis>
+ is <emphasis>
+True</emphasis>
+, <emphasis>
+x</emphasis>
+ specifies the new pointer X coordinate, otherwise <emphasis>
+x</emphasis>
+ is added to the current pointer X coordinate; <emphasis>
+absoluteY</emphasis>
+ and <emphasis>
+y</emphasis>
+ specify the new Y coordinate in the same way.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+noAccel</emphasis>
+ is <emphasis>
+False</emphasis>
+, and the <emphasis>
+MouseKeysAccel</emphasis>
+ keyboard control is enabled, key press also initiates the mouse keys timer for
+this key; every time this timer expires, the cursor moves again. The distance
+the cursor moves in these subsequent events is determined by the mouse keys
+acceleration as described in <link linkend='The_MouseKeysAccel_Control'>The
+MouseKeysAccel Control</link>.
+ </para>
+</listitem>
+<listitem>
+ <para>Key release disables the mouse keys timer (if it was initiated by the
+corresponding key press) but has no other effect and is ignored (does not
+generate an event of any type).
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_PtrBtn
+ </emphasis>
+ </para>
+ <para>
+ button: CARD8
+ </para>
+ <para>
+ count: CARD8
+ </para>
+ <para>
+ useDfltBtn: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+MouseKeys</emphasis>
+ are not enabled, this action behaves like <emphasis>
+SA_NoAction</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+useDfltBtn</emphasis>
+ is set, the event is generated for the current default core button. Otherwise,
+the event is generated for the button specified by <emphasis>
+button</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>If the mouse button specified for this action is logically down, the
+key press and corresponding release are ignored and have no effect.
+ </para>
+</listitem>
+<listitem>
+ <para>Otherwise, key press causes one or more core pointer button events
+instead of the usual key press. If <emphasis>
+count</emphasis>
+ is <emphasis>
+0</emphasis>
+, key press generates a single <emphasis>
+ButtonPress</emphasis>
+ event; if <emphasis>
+count</emphasis>
+ is greater than <emphasis>
+0</emphasis>
+, key press generates <emphasis>
+count</emphasis>
+ pairs of <emphasis>
+ButtonPress</emphasis>
+ and <emphasis>
+ButtonRelease</emphasis>
+ events.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+count</emphasis>
+ is <emphasis>
+0</emphasis>
+, key release generates a core pointer <emphasis>
+ButtonRelease</emphasis>
+ which matches the event generated by the corresponding key press; if count is
+non-zero, key release does not cause a <emphasis>
+ButtonRelease</emphasis>
+ event. Key release never causes a key release event.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_LockPtrBtn
+</emphasis>
+ </para>
+ <para>
+ button: BUTTON
+ </para>
+ <para>
+ noLock: BOOL
+ </para>
+ <para>
+ noUnlock: BOOL
+ </para>
+ <para>
+ useDfltBtn: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+MouseKeys</emphasis>
+ are not enabled, this action behaves like <emphasis>
+SA_NoAction</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>Otherwise, if the button specified by <emphasis>
+useDfltBtn</emphasis>
+ and <emphasis>
+button</emphasis>
+ is not locked, key press causes a <emphasis>
+ButtonPress</emphasis>
+ instead of a key press and locks the button. If the button is already locked
+or if <emphasis>
+noLock</emphasis>
+ is <emphasis>
+True</emphasis>
+, key press is ignored and has no effect.
+ </para>
+</listitem>
+<listitem>
+ <para>If the corresponding key press was ignored, and if <emphasis>
+noUnlock</emphasis>
+ is <emphasis>
+False</emphasis>
+, key release generates a <emphasis>
+ButtonRelease</emphasis>
+ event instead of a key release event and unlocks the specified button. If the
+corresponding key press locked a button, key release is ignored and has no
+effect.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_SetPtrDflt
+</emphasis>
+ </para>
+ <para>
+ affect: CARD8
+ </para>
+ <para>
+ value: CARD8
+ </para>
+ <para>
+ dfltBtnAbs: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+MouseKeys</emphasis>
+ are not enabled, this action behaves like <emphasis>
+SA_NoAction</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>Otherwise, both key press and key release are ignored, but key press
+changes the pointer value specified by <emphasis>
+affect </emphasis>
+to <emphasis>
+value</emphasis>
+, as follows:
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+which</emphasis>
+ is <emphasis>
+SA_AffectDfltBtn</emphasis>
+, <emphasis>
+value</emphasis>
+ and <emphasis>
+dfltBtnAbs</emphasis>
+ specify the default pointer button used by the various pointer actions as
+follow: If <emphasis>
+dfltBtnAbs </emphasis>
+is True, value specifies the button to be used, otherwise, <emphasis>
+value</emphasis>
+ specifies the amount to be added to the current default button. In either
+case, illegal button choices are wrapped back into range.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_ISOLock
+</emphasis>
+ </para>
+ <para>
+ dfltIsGroup: <emphasis>
+False
+</emphasis>
+ </para>
+ <para>
+ mods: MOD_DEF
+ </para>
+ <para>
+ useModMap: BOOL
+ </para>
+ <para>
+ noLock: BOOL
+ </para>
+ <para>
+ noUnlock: BOOL
+ </para>
+ <para>
+ noAffectMods: BOOL
+ </para>
+ <para>
+ noAffectGrp: BOOL
+ </para>
+ <para>
+ noAffectPtr: BOOL
+ </para>
+ <para>
+ noAffectCtrls: BOOL
+ </para>
+ <para>
+or
+ </para>
+ <para>
+ dfltIsGroup: <emphasis>
+True
+</emphasis>
+ </para>
+ <para>
+ group: INT8
+ </para>
+ <para>
+ groupAbsolute: BOOL
+ </para>
+ <para>
+ noAffectMods: BOOL
+ </para>
+ <para>
+ noAffectGrp: BOOL
+ </para>
+ <para>
+ noAffectPtr: BOOL
+ </para>
+ <para>
+ noAffectCtrls: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+dfltIsGroup</emphasis>
+ is <emphasis>
+True</emphasis>
+, key press sets the base group specified by <emphasis>
+groupAbsolute</emphasis>
+ and <emphasis>
+group</emphasis>
+. Otherwise, key press sets the action modifiers in the keyboard’s base
+modifiers.
+ </para>
+</listitem>
+<listitem>
+ <para>Key release clears the base modifiers or group that were set by the key
+press; it may have additional effects if no other appropriate actions occur
+simultaneously with the <emphasis>
+SA_ISOLock</emphasis>
+ operation.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+noAffectMods</emphasis>
+ is <emphasis>
+False</emphasis>
+, any <emphasis>
+SA_SetMods</emphasis>
+ or <emphasis>
+SA_LatchMods</emphasis>
+ actions that occur simultaneously with the <emphasis>
+ISOLock</emphasis>
+ action are treated as <emphasis>
+SA_LockMods</emphasis>
+ instead.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+noAffectGrp</emphasis>
+ is <emphasis>
+False</emphasis>
+, any <emphasis>
+SA_SetGroup</emphasis>
+ or <emphasis>
+SA_LatchGroup</emphasis>
+ actions that occur simultaneously with this action are treated as <emphasis>
+SA_LockGroup</emphasis>
+ actions instead.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+noAffectPtr</emphasis>
+ is <emphasis>
+False</emphasis>
+, <emphasis>
+SA_PtrBtn</emphasis>
+ actions that occur simultaneously with the <emphasis>
+SA_ISOLock</emphasis>
+ action are treated as <emphasis>
+SA_LockPtrBtn</emphasis>
+ actions instead.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+noAffectCtrls</emphasis>
+ is <emphasis>
+False</emphasis>
+, any <emphasis>
+SA_SetControls</emphasis>
+ actions that occur simultaneously with the <emphasis>
+SA_ISOLock</emphasis>
+ action are treated as <emphasis>
+SA_LockControls</emphasis>
+ actions instead.
+ </para>
+</listitem>
+<listitem>
+ <para>If no other actions were transformed by the <emphasis>
+SA_ISOLock</emphasis>
+ action, key release locks the group or modifiers specified by the action
+arguments.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+SA_TerminateServer</emphasis>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>Key press terminates the server. Key release is ignored.
+ </para>
+</listitem>
+<listitem>
+ <para>This action is optional; servers are free to ignore it. If ignored, it
+behaves like <emphasis>
+SA_NoAction</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_SwitchScreen
+</emphasis>
+ </para>
+ <para>
+ num: INT8
+ </para>
+ <para>
+ switchApp: BOOL
+ </para>
+ <para>
+ screenAbs: BOOL
+ </para>
+</entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>If the server supports this action and multiple screens or displays
+(either virtual or real), this action changes to the active screen indicated by
+<emphasis>
+num</emphasis>
+ and <emphasis>
+screenAbs</emphasis>
+. If <emphasis>
+screenAbs</emphasis>
+ is <emphasis>
+True</emphasis>
+, num specifies the index of the new screen; otherwise, num specifies an offset
+from the current screen to the new screen.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+switchApp</emphasis>
+ is <emphasis>
+False</emphasis>
+, it should switch to another screen on the same server. Otherwise it should
+switch to another X server or application which shares the same physical
+display.
+ </para>
+</listitem>
+<listitem>
+ <para>This action is optional; servers are free to ignore the action or any
+of its flags if they do not support the requested behavior. If the action is
+ignored, it behaves like <emphasis>
+SA_NoAction</emphasis>
+, otherwise neither key press nor release generate an event.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para><emphasis>SA_SetControls</emphasis></para>
+ <para>controls: KB_BOOLCTRLMASK</para>
+ </entry>
+ <entry>
+ <itemizedlist>
+ <listitem>
+ <para>
+Key press enables any boolean controls that are specified in <emphasis>
+controls</emphasis>
+ and not already enabled at the time of the key press. Key release disables any
+controls that were enabled by the corresponding key press. This action can
+cause <emphasis>
+XkbControlsNotify</emphasis>
+ events.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><emphasis>SA_LockControls</emphasis></para>
+ <para>
+ controls: KB_BOOLCTRLMASK
+ </para>
+ <para>
+ noLock: BOOL
+ </para>
+ <para>
+ noUnlock: BOOL
+ </para>
+ </entry>
+ <entry>
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+noLock</emphasis>
+ is <emphasis>
+False</emphasis>
+, key press locks and enables any controls that are specified in <emphasis>
+controls</emphasis>
+ and not already locked at the time of the key press.
+</para>
+<para>
+If <emphasis>
+noUnlock</emphasis>
+ is <emphasis>
+False</emphasis>
+, key release unlocks and disables any controls that are specified in <emphasis>
+controls</emphasis>
+ and were not enabled at the time of the corresponding key press.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_ActionMessage</emphasis>
+:
+ pressMsg: BOOL
+ </para>
+ <para>
+ releaseMsg: BOOL
+ </para>
+ <para>
+ genEvent: BOOL
+ </para>
+ <para>
+ message: STRING
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>if <emphasis>
+pressMsg</emphasis>
+ is <emphasis>
+True</emphasis>
+, key press generates an <emphasis>
+XkbActionMessage</emphasis>
+ event which reports the keycode, event type and the contents of <emphasis>
+message</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+releaseMsg</emphasis>
+ is <emphasis>
+True</emphasis>
+, key release generates an <emphasis>
+XkbActionMessage</emphasis>
+ event which reports the keycode, event type and contents of <emphasis>
+message</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+genEvent</emphasis>
+ is <emphasis>
+True</emphasis>
+, both press and release generate key press and key release events, regardless
+of whether they also cause an <emphasis>
+XkbActionMessage</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_RedirectKey
+</emphasis>
+ </para>
+ <para>
+ newKey: KEYCODE
+ </para>
+ <para>
+ modsMask: KEYMASK
+ </para>
+ <para>
+ mods: KEYMASK
+ </para>
+ <para>
+ vmodsMask: CARD16
+ </para>
+ <para>
+ vmods: CARD16
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>Key press causes a key press event for the key specified by <emphasis>
+newKey</emphasis>
+ instead of for the actual key. The state reported in this event reports of the
+current effective modifiers changed as follow: Any real modifiers specified in
+<emphasis>
+modsMask</emphasis>
+ are set to corresponding values from <emphasis>
+mods</emphasis>
+. Any real modifiers bound to the virtual modifiers specified in <emphasis>
+vmodsMask</emphasis>
+ are either set or cleared, depending on the corresponding value in <emphasis>
+vmods</emphasis>
+. If the real and virtual modifier definitions specify conflicting values for a
+single modifier, the real modifier definition has priority.
+ </para>
+</listitem>
+<listitem>
+ <para>Key release causes a key release event for the key specified by
+<emphasis>
+newKey</emphasis>
+; the state field for this event consists of the effective keyboard modifiers
+at the time of the release, changed as described above.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+SA_RedirectKey</emphasis>
+ action normally redirects to another key on the same device as the key or
+button which caused the event, unless that device does not belong to the input
+extension KEYCLASS, in which case this action causes an event on the core
+keyboard device.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_DeviceBtn
+</emphasis>
+ </para>
+ <para>
+ count: CARD8
+ </para>
+ <para>
+ button: BUTTON
+ </para>
+ <para>
+ device: CARD8
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+device</emphasis>
+ field specifies the ID of an extension device; the <emphasis>
+button</emphasis>
+ field specifies the index of a button on that device. If the button specified
+by this action is logically down, the key press and corresponding release are
+ignored and have no effect. If the device or button specified by this action
+are illegal, this action behaves like <emphasis>
+SA_NoAction</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>Otherwise, key press causes one or more input extension device button
+events instead of the usual key press event. If <emphasis>
+count</emphasis>
+ is <emphasis>
+0</emphasis>
+, key press generates a single <emphasis>
+DeviceButtonPress</emphasis>
+ event; if <emphasis>
+count</emphasis>
+ is greater than <emphasis>
+0</emphasis>
+, key press generates <emphasis>
+count</emphasis>
+ pairs of <emphasis>
+DeviceButtonPress</emphasis>
+ and <emphasis>
+DeviceButtonRelease</emphasis>
+ events.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+count</emphasis>
+ is <emphasis>
+0</emphasis>
+, key release generates an input extension <emphasis>
+DeviceButtonRelease</emphasis>
+ which matches the event generated by the corresponding key press; if count is
+non-zero, key release does not cause a <emphasis>
+DeviceButtonRelease</emphasis>
+ event. Key release never causes a key release event.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+SA_LockDeviceBtn
+</emphasis>
+ </para>
+ <para>
+ button: BUTTON
+ </para>
+ <para>
+ device: CARD8
+ </para>
+ <para>
+ noLock: BOOL
+ </para>
+ <para>
+ noUnlock: BOOL
+ </para>
+ </entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+device</emphasis>
+ field specifies the ID of an extension device; the <emphasis>
+button</emphasis>
+ field specifies the index of a button on that device. If the device or button
+specified by this action are illegal, it behaves like <emphasis>
+SA_NoAction</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>Otherwise, if the specified button is not locked and if <emphasis>
+noLock</emphasis>
+ is <emphasis>
+False</emphasis>
+, key press causes an input extension <emphasis>
+DeviceButtonPress</emphasis>
+ event instead of a key press event and locks the button. If the button is
+already locked or if <emphasis>
+noLock</emphasis>
+ is <emphasis>
+True</emphasis>
+, key press is ignored and has no effect.
+ </para>
+</listitem>
+<listitem>
+ <para>If the corresponding key press was ignored, and if <emphasis>
+noUnlock</emphasis>
+ is <emphasis>
+False</emphasis>
+, key release generates an input extension <emphasis>
+DeviceButtonRelease</emphasis>
+ event instead of a core protocol or input extension key release event and
+unlocks the specified button. If the corresponding key press locked a button,
+key release is ignored and has no effect.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+ <row>
+ <entry>
+<para>
+ <emphasis>
+SA_DeviceValuator
+</emphasis>
+</para>
+<para>
+ <emphasis>
+device</emphasis>
+: CARD8
+</para>
+<para>
+ <emphasis>
+val1What</emphasis>
+: SA_DVOP
+</para>
+<para>
+ <emphasis>
+val1</emphasis>
+: CARD8
+</para>
+<para>
+ <emphasis>
+val1Value</emphasis>
+: INT8
+</para>
+<para>
+ <emphasis>
+val1Scale</emphasis>
+: 0...7
+</para>
+<para>
+ <emphasis>
+val2What</emphasis>
+: BOOL
+</para>
+<para>
+ <emphasis>
+val2</emphasis>
+: CARD8
+</para>
+<para>
+ <emphasis>
+val2Value</emphasis>
+: INT8
+</para>
+<para>
+ <emphasis>
+val2Scale</emphasis>
+: 0...7
+</para>
+</entry>
+<entry>
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+device</emphasis>
+ field specifies the ID of an extension device; <emphasis>
+val1</emphasis>
+ and <emphasis>
+val2</emphasis>
+ specify valuators on that device. If <emphasis>
+device</emphasis>
+ is illegal or if neither <emphasis>
+val1</emphasis>
+ nor <emphasis>
+val2</emphasis>
+ specifies a legal valuator, this action behaves like <emphasis>
+SA_NoAction</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+valn</emphasis>
+ specifies a legal valuator and <emphasis>
+valnWhat</emphasis>
+ is not <emphasis>
+SA_IgnoreVal</emphasis>
+, the specified value is adjusted as specified by <emphasis>
+valnWhat</emphasis>
+:
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+valnWhat</emphasis>
+ is <emphasis>
+SA_SetValMin</emphasis>
+, <emphasis>
+valn</emphasis>
+ is set to its minimum legal value.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+valnWhat</emphasis>
+ is <emphasis>
+SA_SetValCenter</emphasis>
+, <emphasis>
+valn</emphasis>
+ is centered (to (max-min)/2).
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+valnWhat</emphasis>
+ is <emphasis>
+SA_SetValMax</emphasis>
+, <emphasis>
+valn</emphasis>
+ is set to its maximum legal value.
+ </para>
+</listitem>
+<listitem>
+ <para>if <emphasis>
+valnWhat</emphasis>
+ is <emphasis>
+SA_SetValRelative</emphasis>
+, <mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-4.svg"/>
+ </imageobject>
+ </mediaobject>
+
+ is added to <emphasis>
+valn</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>if <emphasis>
+valnWhat</emphasis>
+ is <emphasis>
+SA_SetValAbsolute</emphasis>
+, <emphasis>
+valn</emphasis>
+ is set to <mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-5.svg"/>
+ </imageobject>
+ </mediaobject>
+
+.
+ </para>
+</listitem>
+<listitem>
+ <para>Illegal values for <emphasis>
+SA_SetValRelative</emphasis>
+ or <emphasis>
+SA_SetValAbsolute</emphasis>
+ are clamped into range.
+ </para>
+</listitem>
+</itemizedlist>
+</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+If <emphasis>
+StickyKeys</emphasis>
+ are enabled, all <emphasis>
+SA_SetMods</emphasis>
+ and <emphasis>
+SA_SetGroup</emphasis>
+ actions act like <emphasis>
+SA_LatchMods</emphasis>
+ and <emphasis>
+SA_LatchGroup</emphasis>
+ respectively. If the <emphasis>
+LatchToLock</emphasis>
+ AccessX option is set, either action behaves as if both the <emphasis>
+SA_ClearLocks</emphasis>
+ and <emphasis>
+SA_LatchToLock</emphasis>
+ flags are set.
+</para>
+
+
+<para>
+Actions which cause an event from another key or from a button on another
+device immediately generate the specified event. These actions do not consider
+the behavior or actions (if any) that are bound to the key or button to which
+the event is redirected.
+</para>
+
+
+<para>
+Core events generated by server actions contain the keyboard state that was in
+effect at the time the key event occurred; the reported state does not reflect
+any changes in state that occur as a result of the actions bound to the key
+event that caused them.
+</para>
+
+
+<para>
+Events sent to clients that have not issued an <emphasis>
+XkbUseExtension</emphasis>
+ request contain a compatibility state in place of the actual XKB keyboard
+state. See <link linkend='Effects_of_XKB_on_Core_Protocol_Events'>Effects of XKB on Core
+Protocol Events</link> for a description of this compatibility mapping.
+</para>
+
+
+</sect1>
+<sect1 id='Delivering_a_Key_or_Button_Event_to_a_Client'>
+<title>Delivering a Key or Button Event to a Client</title>
+
+<para>
+The window and client that receive core protocol and input extension key or
+button events are determined using the focus policy, window hierarchy and
+passive grabs as specified by the core protocol and the input extension, with
+the following changes:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>A passive grab triggers if the modifier state specified in the grab
+matches the grab compatibility state (described in <link
+linkend='Compatibility_Components_of_Keyboard_State'>Compatibility Components of Keyboard
+State</link>). Clients can choose to use the XKB grab state instead by setting
+the <emphasis>
+GrabsUseXKBState</emphasis>
+ per-client flag. This flag affects all passive grabs that are requested by the
+client which sets it but does not affect passive grabs that are set by any
+other client.
+ </para>
+</listitem>
+<listitem>
+ <para>The state field of events which trigger a passive grab reports the XKB
+or compatibility grab state in effect at the time the grab is triggered; the
+state field of the corresponding release event reports the corresponding grab
+state in effect when the key or button is released.
+ </para>
+</listitem>
+<listitem>
+ <para>If the <emphasis>
+LookupStateWhenGrabbed</emphasis>
+ per-client flag is set, all key or button events that occur while a keyboard
+or pointer grab is active contain the XKB or compatibility lookup state,
+depending on the value of the <emphasis>
+GrabsUseXKBState</emphasis>
+ per-client flag. If <emphasis>
+LookupStateWhenGrabbed</emphasis>
+ is not set, they include the XKB or compatibility grab state, instead.
+ </para>
+</listitem>
+<listitem>
+ <para>Otherwise, the state field of events that do not trigger a passive grab
+report is derived from the XKB effective modifiers and group, as described in
+<link linkend='Computing_A_State_Field_from_an_XKB_State'>Computing A State Field from an
+XKB State</link>.
+ </para>
+</listitem>
+<listitem>
+ <para>If a key release event is the result of an autorepeating key that is
+being held down, and the client to which the event is reported has requested
+detectable autorepeat (see <link linkend='Detectable_Autorepeat'>
+Detectable Autorepeat</link>), the event is not delivered to the client.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+The following section explains the intent of the XKB interactions with core
+protocol grabs and the reason that the per-client flags are needed.
+</para>
+
+
+<sect2 id='XKB_Interactions_With_Core_Protocol_Grabs'>
+<title>XKB Interactions With Core Protocol Grabs</title>
+
+<para>
+XKB provides the separate lookup and grab states to help work around some
+difficulties with the way the core protocol specifies passive grabs.
+Unfortunately, many clients work around those problems differently, and the way
+that XKB handles grabs and reports keyboard state can sometimes interact with
+those client workarounds in unexpected and unpleasant ways.
+</para>
+
+
+<para>
+To provide more reasonable behavior for clients that are aware of XKB without
+causing problems for clients that are unaware of XKB, this extension provides
+two per-client flags that specify the way that XKB and the core protocol should
+interact.
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The largest problems arise from the fact that an XKB state field
+encodes an explicit keyboard group in bits 13-14 (as described in <link
+linkend='Computing_A_State_Field_from_an_XKB_State'>Computing A State Field from an XKB
+State</link>), while pre-XKB clients use one of the eight keyboard modifiers
+to select an alternate keyboard group. To make existing clients behave
+reasonably, XKB normally uses the compatibility grab state instead of the XKB
+grab state to determine whether or not a passive grab is triggered. XKB-aware
+clients can set the <emphasis>
+GrabsUseXKBState</emphasis>
+ per-client flag to indicate that they are specifying passive grabs using an
+XKB state.
+ </para>
+</listitem>
+<listitem>
+ <para>Some toolkits start an active grab when a passive grab is triggered, in
+order to have more control over the conditions under which the grab is
+terminated. Unfortunately, the fact that XKB reports a different state in
+events that trigger or terminate grabs means that this grab simulation can fail
+to terminate the grab under some conditions. To work around this problem, XKB
+normally reports the grab state in all events whenever a grab is active.
+Clients which do not use active grabs like this can set the <emphasis>
+LookupStateWhenGrabbed</emphasis>
+ per-client flag in order to receive the same state component whether or not a
+grab is active.
+ </para>
+<para>
+The <emphasis>
+GrabsUseXKBState</emphasis>
+ per-client flag also applies to the state of events sent while a grab is
+active. If it is set, events during a grab contain the XKB lookup or grab
+state; by default, events during a grab contain the compatibility lookup or
+grab state.</para>
+</listitem>
+</itemizedlist>
+
+<para>
+The state used to trigger a passive grab is controlled by the setting of the
+<emphasis>
+GrabsUseXKBState</emphasis>
+ per-client flag at the time the grab is registered. Changing this flag does
+not affect existing passive grabs.
+</para>
+</sect2>
+</sect1>
+</chapter>
diff --git a/specs/ch07.xml b/specs/ch07.xml
new file mode 100644
index 0000000..b5ffc68
--- /dev/null
+++ b/specs/ch07.xml
@@ -0,0 +1,688 @@
+<chapter id='Key_Event_Processing_in_the_Client'>
+<title>Key Event Processing in the Client</title>
+
+<para>
+The XKB <emphasis>
+client map</emphasis>
+ for a keyboard is the collection of information a client needs to interpret
+key events that come from that keyboard. It contains a global list of <emphasis>
+key types</emphasis>
+, described in <link linkend='Key_Types'>Key Types</link>,
+and an array of <emphasis>
+key symbol map</emphasis>
+s, each of which describes the symbols bound to one particular key and the
+rules to be used to interpret those symbols.
+</para>
+
+<sect1 id='Notation_and_Terminology'>
+<title>Notation and Terminology</title>
+
+<para>
+XKB associates a two-dimensional array of symbols with each key. Symbols are
+addressed by keyboard group (see <link linkend='Keyboard_State'>
+Keyboard State</link>) and shift level, where level is defined as in the
+ISO9995 standard:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term>Level</term>
+ <listitem>
+ <para>
+One of several states (normally 2 or 3) which govern which graphic
+character is produced when a graphic key is actuated. In certain cases the
+level may also affect function keys.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+Note that shift level is derived from the modifier state, but not necessarily
+in the same way for all keys. For example, the <emphasis>
+Shift</emphasis>
+ modifier selects shift level 2 on most keys, but for keypad keys the modifier
+bound to <emphasis>
+Num_Lock</emphasis>
+ (i.e. the <emphasis>
+NumLock</emphasis>
+ virtual modifier) also selects shift level 2.gray symbols on a key
+</para>
+
+<para>
+We use the notation G<emphasis>
+n</emphasis>
+L<emphasis>
+n</emphasis>
+ to specify the position of a symbol on a key or in memory:
+</para>
+
+<mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-6.svg"/>
+ </imageobject>
+ </mediaobject>
+
+
+<para>
+The gray characters indicate symbols that are implied or expected but are not
+actually engraved on the key.
+</para>
+
+<note><para>Unfortunately, the "natural" orientation of symbols on a key and
+the natural orientation in memory are reversed from one another, so keyboard
+group refers to a column on the key and a row in memory. There’s no real help
+for it, but we try to minimize confusion by using "group" and "level" (or
+"shift level") to refer to symbols regardless of context.</para></note>
+
+</sect1>
+<sect1 id='Determining_the_KeySym_Associated_with_a_Key_Event'>
+<title>Determining the KeySym Associated with a Key Event</title>
+
+<para>
+To look up the symbol associated with an XKB key event, we need to know the
+group and shift level that correspond to the event.
+</para>
+
+
+<para>
+Group is reported in bits 13-14 of the state field of the key event, as
+described in <link linkend='Computing_A_State_Field_from_an_XKB_State'>Computing A State
+Field from an XKB State</link>. The keyboard group reported in the event might
+be out-of-range for any particular key because the number of groups can vary
+from key to key. The XKB description of each key contains a <emphasis>
+group info</emphasis>
+ field which is interpreted identically to the global groups wrap control (see
+<link linkend='Computing_Effective_Modifier_and_Group'>Computing Effective Modifier and
+Group</link>) and which specifies the interpretation of groups that are
+out-of-range for that key.
+</para>
+
+
+<para>
+Once we have determined the group to be used for the event, we have to
+determine the shift level. The description of a key includes a <emphasis>
+key type</emphasis>
+ for each group of symbols bound to the key. Given the modifiers from the key
+event, this key type yields a shift level and a set of "leftover" modifiers, as
+described in <link linkend='Key_Types'>Key Types</link>
+below.
+</para>
+
+
+<para>
+Finally, we can use the effective group and the shift level returned by the
+type of that group to look up a symbol in a two-dimensional array of symbols
+associated with the key.
+</para>
+
+
+<sect2 id='Key_Types'>
+<title>Key Types</title>
+
+<para>
+Each entry of a key type’s <emphasis>
+map</emphasis>
+ field specifies the shift level that corresponds to some XKB modifier
+definition; any combination of modifiers that is not explicitly listed
+somewhere in the map yields shift level one. Map entries which specify unbound
+virtual modifiers (see <link linkend='Inactive_Modifier_Definitions'>Inactive
+Modifier Definitions</link>) are not considered; each entry contains an
+automatically-updated <emphasis>
+active</emphasis>
+ field which indicates whether or not it should be used.
+</para>
+
+
+<para>
+Each key type includes a few fields that are derived from the contents of the
+map and which report some commonly used values so they don’t have to be
+constantly recalculated. The <emphasis>
+numLevels</emphasis>
+ field contains the highest shift level reported by any of its map entries; XKB
+uses <emphasis>
+numLevels</emphasis>
+ to insure that the array of symbols bound to a key is large enough (the number
+of levels reported by a key type is also referred to as its width). The
+<emphasis>
+modifiers</emphasis>
+ field reports all real modifiers considered by any of the map entries for the
+type. Both <emphasis>
+modifiers</emphasis>
+<emphasis>
+ </emphasis>
+and <emphasis>
+numLevels</emphasis>
+ are updated automatically by XKB and neither can be changed explicitly.
+</para>
+
+
+<para>
+Any modifiers specified in <emphasis>
+modifiers</emphasis>
+ are normally <emphasis>
+consumed</emphasis>
+ (see <link linkend='Transforming_the_KeySym_Associated_with_a_Key_Event'>Transforming the KeySym
+Associated with a Key Event</link>), which means that they are not considered
+during any of the later stages of event processing. For those rare occasions
+that a modifier <emphasis>
+should</emphasis>
+ be considered despite having been used to look up a symbol, key types include
+an optional <emphasis>
+preserve</emphasis>
+ field. If a <emphasis>
+preserve</emphasis>
+ list is present, each entry corresponds to one of the key type’s map entries
+and lists the modifiers that should <emphasis>
+not</emphasis>
+ be consumed if the matching map entry is used to determine shift level.
+</para>
+
+
+<para>
+For example, the following key type implements caps lock as defined by the core
+protocol (using the second symbol bound to the key):
+</para>
+
+<literallayout class='monospaced'>
+type "ALPHABETIC" {
+ modifiers = Shift+Lock;
+ map[Shift]= Level2;
+ map[Lock]= Level2;
+ map[Shift+Lock]= Level2;
+};
+</literallayout>
+
+<para>
+The problem with this kind of definition is that we could assign completely
+unrelated symbols to the two shift levels, and "Caps Lock" would choose the
+second symbol. Another definition for alphabetic keys uses system routines to
+capitalize the keysym:
+</para>
+
+<literallayout class='monospaced'>
+type "ALPHABETIC" {
+ modifiers= Shift;
+ map[Shift]= Level2;
+};
+</literallayout>
+
+<para>
+When caps lock is applied using this definition, we take the symbol from shift
+level one and capitalize it using system-specific capitalization rules. If
+shift and caps lock are both set, we take the symbol from shift level two and
+try to capitalize it, which usually has no effect.
+</para>
+
+
+<para>
+The following key type implements shift-cancels-caps lock behavior for
+alphabetic keys:
+</para>
+
+<literallayout class='monospaced'>
+type "ALPHABETIC" {
+ modifiers = Shift+Lock;
+ map[Shift] = Level2;
+ preserve[Lock]= Lock;
+};
+</literallayout>
+
+<para>
+Consider the four possible states that can affect alphabetic keys: no
+modifiers, shift alone, caps lock alone or shift and caps lock together. The
+map contains no explicit entry for <emphasis>
+None</emphasis>
+ (no modifiers), so if no modifiers are set, any group with this type returns
+the first keysym. The map entry for <emphasis>
+Shift</emphasis>
+ reports <emphasis>
+Level2</emphasis>
+, so any group with this type returns the second symbol when <emphasis>
+Shift</emphasis>
+ is set. There is no map entry for <emphasis>
+Lock</emphasis>
+ alone, but the type specifies that the <emphasis>
+Lock</emphasis>
+ modifier should be preserved in this case, so <emphasis>
+Lock</emphasis>
+ alone returns the first symbol in the group but first applies the
+capitalization transformation, yielding the capital form of the symbol. In the
+final case, there is no map entry for <emphasis>
+Shift+Lock</emphasis>
+, so it returns the first symbol in the group; there is no preserve entry, so
+the <emphasis>
+Lock</emphasis>
+ modifier is consumed and the symbol is not capitalized.
+</para>
+
+
+</sect2>
+<sect2 id='Key_Symbol_Map'>
+<title>Key Symbol Map</title>
+
+<para>
+The <emphasis>
+key symbol map</emphasis>
+ for a key contains all of the information that a client needs to process
+events generated by that key. Each key symbol mapping reports:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The number of groups of symbols bound to the key (<emphasis>
+numGroups</emphasis>
+).
+ </para>
+</listitem>
+<listitem>
+ <para>The treatment of out-of-range groups (<emphasis>
+groupInfo</emphasis>
+).
+ </para>
+</listitem>
+<listitem>
+ <para>The index of the key type to for each <emphasis>
+possible</emphasis>
+ group (<emphasis>
+kt_index[MaxKbdGroups]</emphasis>
+).
+ </para>
+</listitem>
+<listitem>
+ <para>The width of the widest type associated with the key (<emphasis>
+groupsWidth</emphasis>
+).
+ </para>
+</listitem>
+<listitem>
+ <para>The two-dimensional (numGroups <emphasis>
+×</emphasis>
+ groupsWidth) array of symbols bound to the key.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+It is legal for a key to have zero groups, in which case it also has zero
+symbols and all events from that key yield <emphasis>
+NoSymbol</emphasis>
+. The array of key types is of fixed width and is large enough to hold key
+types for the maximum legal number of groups (<emphasis>
+MaxKbdGroups</emphasis>
+, currently four); if a key has fewer than <emphasis>
+MaxKbdGroups</emphasis>
+ groups, the extra key types are reported but ignored. The <emphasis>
+groupsWidth</emphasis>
+ field cannot be explicitly changed; it is updated automatically whenever the
+symbols or set of types bound to a key are changed.
+</para>
+
+
+<para>
+If, when looking up a symbol, the effective keyboard group is out-of-range for
+the key, the <emphasis>
+groupInfo</emphasis>
+ field of the key symbol map specifies the rules for determining the
+corresponding legal group as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If the <emphasis>
+RedirectIntoRange</emphasis>
+ flag is set, the two least significant bits of <emphasis>
+groupInfo</emphasis>
+ specify the index of a group to which all illegal groups correspond. If the
+specified group is also out of range, all illegal groups map to <emphasis>
+Group1</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+ClampIntoRange</emphasis>
+ flag is set, out-of-range groups correspond to the nearest legal group.
+Effective groups larger than the highest supported group are mapped to the
+highest supported group; effective groups less than <emphasis>
+Group1</emphasis>
+ are mapped to <emphasis>
+Group1</emphasis>
+. For example, a key with two groups of symbols uses <emphasis>
+Group2</emphasis>
+ type and symbols if the global effective group is either <emphasis>
+Group3</emphasis>
+ or <emphasis>
+Group4</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>If neither flag is set, group is wrapped into range using integer
+modulus. For example, a key with two groups of symbols for which groups wrap
+uses <emphasis>
+Group1</emphasis>
+ symbols if the global effective group is <emphasis>
+Group3</emphasis>
+ or <emphasis>
+Group2</emphasis>
+ symbols if the global effective group is <emphasis>
+Group4</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+The client map contains an array of key symbol mappings, with one entry for
+each key between the minimum and maximum legal keycodes, inclusive. All
+keycodes which fall in that range have key symbol mappings, whether or not any
+key actually yields that code.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='Transforming_the_KeySym_Associated_with_a_Key_Event'>
+<title>Transforming the KeySym Associated with a Key Event</title>
+
+<para>
+Any modifiers that were not used to look up the keysym, or which were
+explicitly preserved, might indicate further transformations to be performed on
+the keysym or the character string that is derived from it. For example, If the
+<emphasis>
+Lock</emphasis>
+ modifier is set, the symbol and corresponding string should be capitalized
+according to the locale-sensitive capitalization rules specified by the system.
+If the <emphasis>
+Control</emphasis>
+ modifier is set, the keysym is not affected, but the corresponding character
+should be converted to a control character as described in <link
+linkend="default_symbol_transformations">Default Symbol Transformations</link>.
+</para>
+
+
+<para>
+This extension specifies the transformations to be applied when the <emphasis>
+Control</emphasis>
+ or <emphasis>
+Lock</emphasis>
+ modifiers are active but were not used to determine the keysym to be used:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Modifier</entry>
+ <entry>Transformation</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+Control</emphasis>
+ </entry>
+ <entry>Report the control character associated with the symbol. This
+extension defines the control characters associated with the ASCII alphabetic
+characters (both upper and lower case) and for a small set of punctuation
+characters (see
+<link linkend="default_symbol_transformations">Default Symbol Transformations</link>).
+Applications are
+free to associate control characters with any symbols that are not specified by
+this extension.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+Lock</emphasis>
+ </entry>
+ <entry>Capitalize the symbol either according to capitalization rules
+appropriate to the application locale or using the capitalization rules defined
+by this extension (see <link linkend="default_symbol_transformations">Default Symbol Transformations</link>).</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Interpretation of other modifiers is application dependent.
+</para>
+
+<note><para>This definition of capitalization is fundamentally different from
+the core protocol’s, which uses the lock modifier to select from the symbols
+bound to the key. Consider key 9 in the
+<link linkend='Client_Map_Example'>client map example</link>;
+the core protocol provides no way to generate the capital form
+of either symbol bound to this key. XKB specifies that we first look up the
+symbol and then capitalize, so XKB yields the capital form of the two symbols
+when caps lock is active. </para></note>
+
+<para>
+XKB specifies the behavior of <emphasis>
+Lock</emphasis>
+ and <emphasis>
+Control</emphasis>
+, but interpretation of other modifiers is left to the application.
+</para>
+
+
+</sect1>
+<sect1 id='Client_Map_Example'>
+<title>Client Map Example</title>
+
+<para>
+Consider a simple, if unlikely, keyboard with the following keys (gray
+characters indicate symbols that are implied or expected but are not actually
+engraved on the key):
+</para>
+
+<mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-7.svg"/>
+ </imageobject>
+ </mediaobject>
+
+
+<para>
+The core protocol represents this keyboard as a simple array with one row per
+key and four columns (the widest key, key 10, determines the width of the
+entire array).
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='5' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='2.0*'/>
+<colspec colname='c3' colwidth='2.0*'/>
+<colspec colname='c4' colwidth='2.0*'/>
+<colspec colname='c5' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Key</entry>
+ <entry>G1L1</entry>
+ <entry>G1L2</entry>
+ <entry>G2L1</entry>
+ <entry>G2L2</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>8</entry>
+ <entry>Q</entry>
+ <entry>NoSymbol</entry>
+ <entry>at</entry>
+ <entry>NoSymbol</entry>
+ </row>
+ <row>
+ <entry>9</entry>
+ <entry>odiaeresis</entry>
+ <entry>egrave</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ </row>
+ <row>
+ <entry>10</entry>
+ <entry>A</entry>
+ <entry>NoSymbol</entry>
+ <entry>Æ</entry>
+ <entry>NoSymbol</entry>
+ </row>
+ <row>
+ <entry>11</entry>
+ <entry>ssharp</entry>
+ <entry>question</entry>
+ <entry>backslash</entry>
+ <entry>questiondown</entry>
+ </row>
+ <row>
+ <entry>12</entry>
+ <entry>KP_End</entry>
+ <entry>KP_1</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ </row>
+ <row>
+ <entry>13</entry>
+ <entry>Num_Lock</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ </row>
+ <row>
+ <entry>14</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ </row>
+ <row>
+ <entry>15</entry>
+ <entry>Return</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ <entry>NoSymbol</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The row to be used for a given key event is determined by keycode; the column
+to be used is determined by the symbols bound to the key, the state of the
+<emphasis>
+Shift</emphasis>
+ and <emphasis>
+Lock</emphasis>
+ Modifiers and the state of the modifiers bound to the <emphasis>
+Num_Lock</emphasis>
+ and <emphasis>
+Mode_switch</emphasis>
+ keys as specified by the core protocol.
+</para>
+
+
+<para>
+The XKB description of this keyboard consists of six key symbol maps, each of
+which specifies the types and symbols associated with each keyboard group for
+one key:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<colspec colname='c4' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Key</entry>
+ <entry>Group: Type</entry>
+ <entry>L1</entry>
+ <entry>L2</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>8</entry>
+ <entry>G1: ALPHABETIC</entry>
+ <entry>q</entry>
+ <entry>Q</entry>
+ </row>
+ <row>
+ <entry>G2: ONE_LEVEL</entry>
+ <entry>@</entry>
+ <entry>NoSymbol</entry>
+ </row>
+ <row>
+ <entry>9</entry>
+ <entry>G1: TWO_LEVEL</entry>
+ <entry>odiaeresis</entry>
+ <entry>egrave</entry>
+ </row>
+ <row>
+ <entry>10</entry>
+ <entry>G1: ALPHABETIC</entry>
+ <entry>a</entry>
+ <entry>A</entry>
+ </row>
+ <row>
+ <entry>G2: ALPHABETIC</entry>
+ <entry>ae</entry>
+ <entry>AE</entry>
+ </row>
+ <row>
+ <entry>11</entry>
+ <entry>G1: TWO_LEVEL</entry>
+ <entry>ssharp</entry>
+ <entry>question</entry>
+ </row>
+ <row>
+ <entry>G2: ONE_LEVEL</entry>
+ <entry>backslash</entry>
+ <entry>questiondown</entry>
+ </row>
+ <row>
+ <entry>12</entry>
+ <entry>G1: KEYPAD</entry>
+ <entry>KP_End</entry>
+ <entry>KP_1</entry>
+ </row>
+ <row>
+ <entry>13</entry>
+ <entry>G1: ONE_LEVEL</entry>
+ <entry>Num_Lock</entry>
+ <entry>&#x0020;</entry>
+ </row>
+ <row>
+ <entry>14</entry>
+ <entry>No Groups</entry>
+ <entry>&#x0020;</entry>
+ <entry>&#x0020;</entry>
+ </row>
+ <row>
+ <entry>15</entry>
+ <entry>G1: ONE_LEVEL</entry>
+ <entry>Return</entry>
+ <entry>&#x0020;</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The keycode reported in a key event determines the row to be used for that
+event; the effective keyboard group determines the list of symbols and key type
+to be used. The key type determines which symbol is chosen from the list.
+</para>
+
+
+<para>
+<link linkend='Determining_the_KeySym_Associated_with_a_Key_Event'>Determining the KeySym Associated
+with a Key Event</link> details the procedure to map from a key event to a
+symbol and/or a string.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch08.xml b/specs/ch08.xml
new file mode 100644
index 0000000..08524a8
--- /dev/null
+++ b/specs/ch08.xml
@@ -0,0 +1,157 @@
+<chapter id='Symbolic_Names'>
+<title>Symbolic Names</title>
+
+<para>
+The core protocol does not provide any information to clients other than that
+actually used to interpret events. This makes it difficult to write a client
+which presents the keyboard to a user in an easy-to-understand way. Such
+applications have to examine the vendor string and keycodes to determine the
+type of keyboard connected to the server and have to examine keysyms and
+modifier mappings to determine the effects of most modifiers (the <emphasis>
+Shift</emphasis>
+, <emphasis>
+Lock</emphasis>
+ and <emphasis>
+Control</emphasis>
+ modifiers are defined by the core protocol but no semantics are implied for
+any other modifiers).
+</para>
+
+
+<para>
+This extension provides such applications with symbolic names for most
+components of the keyboard extension and a description of the physical layout
+of the keyboard.
+</para>
+
+
+<para>
+The <emphasis>
+keycodes</emphasis>
+ name describes the range and meaning of the keycodes returned by the keyboard
+in question; the <emphasis>
+keyboard</emphasis>
+ <emphasis>
+geometry </emphasis>
+name describes the physical location, size and shape of the various keys on the
+keyboard. As an example to distinguish between these two names, consider
+function keys on PC-compatible keyboards. Function keys are sometimes above the
+main keyboard and sometimes to the left of the main keyboard, but the same
+keycode is used for the key that is logically <emphasis>
+F1</emphasis>
+ regardless of physical position. Thus, all PC-compatible keyboards might share
+a keycodes name but different geometry names.
+</para>
+
+<note><para>The keycodes name is intended to be a very general description of
+the keycodes returned by a keyboard; A single keycodes name might cover
+keyboards with differing numbers of keys provided that the keys that all keys
+have the same semantics when present. For example, 101 and 102 key PC keyboards
+might use the same name. Applications can use the keyboard geometry to
+determine which subset of the named keyboard type is in use.</para></note>
+
+<para>
+The <emphasis>
+symbols</emphasis>
+ name identifies the symbols bound to the keys. The symbols name is a human or
+application-readable description of the intended locale or usage of the
+keyboard with these symbols. The <emphasis>
+physical symbols</emphasis>
+ name describes the symbols actually engraved on the keyboard, which might be
+different than the symbols currently being used.
+</para>
+
+
+<para>
+The <emphasis>
+types</emphasis>
+ name provides some information about the set of key types that can be
+associated with the keyboard keys. The <emphasis>
+compat</emphasis>
+ name provides some information about the rules used to bind actions to keys
+changed using core protocol requests.
+</para>
+
+
+<para>
+The <emphasis>
+compat</emphasis>
+, <emphasis>
+types</emphasis>
+, <emphasis>
+keycodes</emphasis>
+, <emphasis>
+symbols</emphasis>
+ and <emphasis>
+geometry</emphasis>
+ names typically correspond to the keyboard components from which the current
+keyboard description was assembled. These components are stored individually in
+the server’s database of keyboard components, described in
+<link linkend='The_Server_Database_of_Keyboard_Components'>
+The Server Database of Keyboard
+Components</link>, and can be combined to assemble a complete keyboard
+description.
+</para>
+
+
+<para>
+Each key has a four-byte symbolic name. The key name links keys with similar
+functions or in similar positions on keyboards that report different scan
+codes. <emphasis>
+Key aliases</emphasis>
+ allow the keyboard layout designer to assign multiple names to a single key,
+to make it easier to refer to keys using either their position <emphasis>
+or</emphasis>
+ their "function."
+</para>
+
+
+<para>
+For example, consider the common keyboard customizations:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Set the "key to the left of the letter a" to be a control key.
+ </para>
+</listitem>
+<listitem>
+ <para>Change the "caps lock" key, wherever it might be, to a control key.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If we specify key names by position, the first customization is simple but the
+second is impossible; if we specify key names by function, the second
+customization is simple but the first is impossible. Using key aliases, we can
+specify both function and position for "troublesome" keys, and both
+customizations are straightforward.
+</para>
+
+
+<para>
+Key aliases can be specified both in the symbolic names component and in the
+keyboard geometry (see <link linkend='Keyboard_Geometry'>Keyboard
+Geometry</link>). Both sets of aliases are always valid, but key alias
+definitions in the keyboard geometry have priority; if both symbolic names and
+geometry include aliases, applications should consider the definitions from the
+geometry before considering the definitions from the symbolic names section.
+</para>
+
+
+<para>
+XKB provides symbolic names for each of the four keyboard groups, sixteen
+virtual modifiers, thirty-two keyboard indicators, and up to <emphasis>
+MaxRadioGroups</emphasis>
+ (32) radio groups.
+</para>
+
+
+<para>
+XKB allows keyboard layout designers or editors to assign names to each key
+type and to each of the levels in a key type. For example, the second position
+on an alphabetic key might be called the "Caps" level while the second position
+on a numeric keypad key might be called the "Num Lock" level.
+</para>
+</chapter>
diff --git a/specs/ch09.xml b/specs/ch09.xml
new file mode 100644
index 0000000..d5f587b
--- /dev/null
+++ b/specs/ch09.xml
@@ -0,0 +1,605 @@
+<chapter id='Keyboard_Indicators'>
+<title>Keyboard Indicators</title>
+
+<para>
+Although the core X protocol supports thirty-two LEDs on a keyboard, it does
+not provide any way to link the state of the LEDs and the logical state of the
+keyboard. For example, most keyboards have a "Caps Lock" LED, but X does not
+provide any standard way to make the LED automatically follow the logical state
+of the modifier bound to the <emphasis>
+Caps Lock</emphasis>
+ key.
+</para>
+
+
+<para>
+The core protocol also gives no way to determine which bits in the <emphasis>
+led_mask</emphasis>
+ field of the keyboard state map to the particular LEDs on the keyboard. For
+example, X does not provide a method for a client to determine which bit to set
+in the <emphasis>
+led_mask</emphasis>
+ to turn on the "Scroll Lock" LED, or even if the keyboard has a "Scroll Lock"
+LED.
+</para>
+
+
+<para>
+Most X servers implement some kind of automatic behavior for one or more of the
+keyboard LEDs, but the details of that automatic behavior are
+implementation-specific and can be difficult or impossible to control.
+</para>
+
+
+<para>
+XKB provides indicator names and programmable indicators to help solve these
+problems. Using XKB, clients can determine the names of the various indicators,
+determine and control the way that the individual indicators should be updated
+to reflect keyboard changes, and determine which of the 32 keyboard indicators
+reported by the protocol are actually present on the keyboard. Clients may also
+request immediate notification of changes to the state of any subset of the
+keyboard indicators, which makes it straightforward to provide an on-screen
+"virtual" LED panel.
+</para>
+
+<sect1 id='Global_Information_About_Indicators'>
+<title>Global Information About Indicators</title>
+
+<para>
+XKB provides only two pieces of information about the indicators as a group.
+</para>
+
+
+<para>
+The <emphasis>
+physical indicators</emphasis>
+ mask reports which of the 32 logical keyboard indicators supported by the core
+protocol and XKB corresponds to some actual indicator on the keyboard itself.
+Because the physical indicators mask describes a physical characteristic of the
+keyboard, it cannot be directly changed under program control. It is possible,
+however, for the set of physical indicators to be change if a new keyboard is
+attached or if a completely new keyboard description is loaded by the <emphasis>
+XkbGetKeyboardByName</emphasis>
+ request (see <link linkend='Using_the_Servers_Database_of_Keyboard_Components'>Using the Server’s
+Database of Keyboard Components</link>).
+</para>
+
+
+<para>
+The <emphasis>
+indicator state</emphasis>
+ mask reports the current state of the 32 logical keyboard indicators. This
+field and the core protocol indicator state (as reported by the <emphasis>
+led-mask</emphasis>
+ field of the core protocol <emphasis>
+GetKeyboardControl</emphasis>
+ request) are always identical.
+</para>
+
+
+</sect1>
+<sect1 id='Per_Indicator_Information'>
+<title>Per-Indicator Information</title>
+
+<para>
+Each of the thirty-two keyboard indicators has a symbolic name, of type ATOM.
+The <emphasis>
+XkbGetNames</emphasis>
+ request reports the symbolic names for all keyboard components, including the
+indicators. Use the <emphasis>
+XkbSetNames</emphasis>
+ request to change symbolic names. Both requests are described in <link linkend='Querying_and_Changing_Symbolic_Names'>Querying and Changing Symbolic
+Names</link>.
+</para>
+
+
+<sect2 id='Indicator_Maps'>
+<title>Indicator Maps</title>
+
+<para>
+XKB also provides an <emphasis>
+indicator map</emphasis>
+ for each of the thirty-two keyboard indicators; an indicator map specifies:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The conditions under which the keyboard modifier state affects the
+indicator.
+ </para>
+</listitem>
+<listitem>
+ <para>The conditions under which the keyboard group state affects the
+indicator.
+ </para>
+</listitem>
+<listitem>
+ <para>The conditions under which the state of the boolean controls affects
+the indicator.
+ </para>
+</listitem>
+<listitem>
+ <para>The effect (if any) of attempts to explicitly change the state of the
+indicator using the core protocol <emphasis>
+SetKeyboardControl</emphasis>
+ request.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+IM_NoAutomatic</emphasis>
+ is set in the <emphasis>
+flags</emphasis>
+ field of an indicator map, that indicator never changes in response to changes
+in keyboard state or controls, regardless of the values for the other fields of
+the indicator map. If <emphasis>
+IM_NoAutomatic</emphasis>
+ is not set in <emphasis>
+flags</emphasis>
+, the other fields of the indicator map specify the automatic changes to the
+indicator in response to changes in the keyboard state or controls.
+</para>
+
+
+<para>
+The <emphasis>
+which_groups</emphasis>
+ and the <emphasis>
+groups</emphasis>
+ fields of an indicator map determine how the keyboard group state affects the
+corresponding indicator. The <emphasis>
+which_groups</emphasis>
+ field controls the interpretation of <emphasis>
+groups</emphasis>
+ and may contain any one of the following values:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Value</entry>
+ <entry>Interpretation of the Groups Field</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+IM_UseNone</emphasis>
+</entry>
+ <entry>The <emphasis>
+groups</emphasis>
+ field and the current keyboard group state are ignored.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseBase</emphasis>
+</entry>
+ <entry>If <emphasis>
+groups</emphasis>
+ is non-zero, the indicator is lit whenever the base keyboard group is
+non-zero. If <emphasis>
+groups</emphasis>
+ is zero, the indicator is lit whenever the base keyboard group is zero.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLatched</emphasis>
+</entry>
+ <entry>If <emphasis>
+groups</emphasis>
+ is non-zero, the indicator is lit whenever the latched keyboard group is
+non-zero. If <emphasis>
+groups</emphasis>
+ is zero, the indicator is lit whenever the latched keyboard group is
+zero.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLocked</emphasis>
+</entry>
+ <entry>The <emphasis>
+groups</emphasis>
+ field is interpreted as a mask. The indicator is lit when the current locked
+keyboard group matches one of the bits that are set in <emphasis>
+groups</emphasis>
+.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseEffective</emphasis>
+</entry>
+ <entry>The <emphasis>
+groups</emphasis>
+ field is interpreted as a mask. The indicator is lit when the current
+effective keyboard group matches one of the bits that are set in <emphasis>
+groups</emphasis>
+.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The <emphasis>
+which_mods</emphasis>
+ and <emphasis>
+mods</emphasis>
+ fields of an indicator map determine how the state of the keyboard modifiers
+affect the corresponding indicator. The <emphasis>
+mods</emphasis>
+ field is an XKB modifier definition, as described in <link linkend='Modifier_Definitions'>Modifier Definitions</link>, which can
+specify both real and virtual modifiers. The mods field takes effect even if
+some or all of the virtual indicators specified in <emphasis>
+mods</emphasis>
+ are unbound.
+</para>
+
+
+<para>
+The <emphasis>
+which_mods</emphasis>
+ field can specify one or more components of the XKB keyboard state. The
+corresponding indicator is lit whenever any of the real modifiers specified in
+the <emphasis>
+mask</emphasis>
+ field of the <emphasis>
+mods</emphasis>
+ modifier definition are also set in any of the current keyboard state
+components specified by the <emphasis>
+which_mods</emphasis>
+. The <emphasis>
+which_mods</emphasis>
+ field may have any combination of the following values:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Value</entry>
+ <entry>Keyboard State Component To Be Considered</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+IM_UseBase</emphasis>
+</entry>
+ <entry>Base modifier state</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLatched</emphasis>
+</entry>
+ <entry>Latched modifier state</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLocked</emphasis>
+</entry>
+ <entry>Locked modifier state</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseEffective</emphasis>
+</entry>
+ <entry>Effective modifier state</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseCompat</emphasis>
+</entry>
+ <entry>Modifier compatibility state</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The <emphasis>
+controls</emphasis>
+ field specifies a subset of the boolean keyboard controls (see <link linkend='Boolean_Controls_and_The_EnabledControls_Control'>"Boolean" Controls and The
+EnabledControls Control</link>). The indicator is lit whenever any of the
+boolean controls specified in <emphasis>
+controls</emphasis>
+ are enabled.
+</para>
+
+
+<para>
+An indicator is lit whenever any of the conditions specified by its indicator
+map are met, unless overridden by the <emphasis>
+IM_NoAutomatic</emphasis>
+ flag (described above) or an explicit indicator change (described below).
+</para>
+
+
+<sect3 id='Effects_of_Explicit_Changes_on_Indicators'>
+<title>Effects of Explicit Changes on Indicators</title>
+
+<para>
+If the <emphasis>
+IM_NoExplicit</emphasis>
+ flag is set in an indicator map, attempts to change the state of the indicator
+are ignored.
+</para>
+
+
+<para>
+If both <emphasis>
+IM_NoExplicit</emphasis>
+ and <emphasis>
+IM_NoAutomatic</emphasis>
+ are both absent from an indicator map, requests to change the state of the
+indicator are honored but might be immediately superseded by automatic changes
+to the indicator state which reflect changes to keyboard state or controls.
+</para>
+
+
+<para>
+If the <emphasis>
+IM_LEDDrivesKB</emphasis>
+ flag is set and the <emphasis>
+IM_NoExplicit</emphasis>
+ flag is not, the keyboard state and controls are changed to reflect the other
+fields of the indicator map, as described in the remainder of this section.
+Attempts to explicitly change the value of an indicator for which <emphasis>
+IM_LEDDrivesKB</emphasis>
+ is absent or for which <emphasis>
+IM_NoExplicit</emphasis>
+ is present do not affect keyboard state or controls.
+</para>
+
+
+<para>
+The effect on group state of changing an explicit indicator which drives the
+keyboard is determined by the value of <emphasis>
+which_groups</emphasis>
+ and <emphasis>
+groups</emphasis>
+, as follows:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='2.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry> which_groups</entry>
+ <entry>New State</entry>
+ <entry>Effect on Keyboard Group State</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+IM_UseNone</emphasis>
+, or <emphasis>
+IM_UseBase</emphasis>
+</entry>
+ <entry>On or Off</entry>
+ <entry>No Effect</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLatched</emphasis>
+</entry>
+ <entry>On</entry>
+ <entry>The <emphasis>
+groups</emphasis>
+ field is treated as a group mask. The keyboard group latch is changed to the
+lowest numbered group specified in <emphasis>
+groups</emphasis>
+; if <emphasis>
+groups</emphasis>
+ is empty, the keyboard group latch is changed to zero.</entry>
+ </row>
+ <row>
+ <entry>IM_UseLatched</entry>
+ <entry>Off</entry>
+ <entry>The <emphasis>
+groups</emphasis>
+ field is treated as a group mask. If the indicator is explicitly extinguished,
+keyboard group latch is changed to the lowest numbered group not specified in
+<emphasis>
+groups</emphasis>
+; if <emphasis>
+groups</emphasis>
+ is zero, the keyboard group latch is set to the index of the highest legal
+keyboard group.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLocked</emphasis>
+, or <emphasis>
+IM_UseEffective</emphasis>
+</entry>
+ <entry>On</entry>
+ <entry>If the <emphasis>
+groups</emphasis>
+ mask is empty, group is not changed, otherwise the locked keyboard group is
+changed to the lowest numbered group specified in <emphasis>
+groups</emphasis>
+.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLocked</emphasis>
+, or <emphasis>
+IM_UseEffective</emphasis>
+</entry>
+ <entry>Off</entry>
+ <entry>Locked keyboard group is changed to the lowest numbered group that
+is not specified in the <emphasis>
+groups</emphasis>
+ mask, or to <emphasis>
+Group1</emphasis>
+ if the <emphasis>
+groups</emphasis>
+ mask contains all keyboard groups.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The effect on the keyboard modifiers of changing an explicit indicator which
+drives the keyboard is determined by the values that are set in of <emphasis>
+which_mods</emphasis>
+ and <emphasis>
+mods</emphasis>
+, as follows:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Set in which_mods</entry>
+ <entry>New State</entry>
+ <entry>Effect on Keyboard Modifiers</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+IM_UseBase</emphasis>
+</entry>
+ <entry>On or Off</entry>
+ <entry>No Effect</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLatched</emphasis>
+</entry>
+ <entry>On</entry>
+ <entry>Any modifiers specified in the <emphasis>
+mask</emphasis>
+ field of <emphasis>
+mods</emphasis>
+ are added to the latched modifiers.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLatched</emphasis>
+</entry>
+ <entry>Off</entry>
+ <entry>Any modifiers specified in the <emphasis>
+mask</emphasis>
+ field of <emphasis>
+mods</emphasis>
+ are removed from the latched modifiers.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLocked</emphasis>
+, <emphasis>
+IM_UseCompat</emphasis>
+, or <emphasis>
+IM_UseEffective</emphasis>
+</entry>
+ <entry>On</entry>
+ <entry>Any modifiers specified in the <emphasis>
+mask</emphasis>
+ field of <emphasis>
+mods</emphasis>
+ are added to the locked modifiers.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseLocked</emphasis>
+</entry>
+ <entry>Off</entry>
+ <entry>Any modifiers specified in the <emphasis>
+mask</emphasis>
+ field of <emphasis>
+mods</emphasis>
+ are removed from the locked modifiers.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+IM_UseCompat</emphasis>
+, or <emphasis>
+IM_UseEffective</emphasis>
+</entry>
+ <entry>Off</entry>
+ <entry>Any modifiers specified in the <emphasis>
+mask</emphasis>
+ field of <emphasis>
+mods</emphasis>
+ are removed from both the locked and latched modifiers.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Lighting an explicit indicator which drives the keyboard also enables all of
+the boolean controls specified in the <emphasis>
+controls</emphasis>
+ field of its indicator map. Explicitly extinguishing such an indicator
+disables all of the boolean controls specified in <emphasis>
+controls</emphasis>
+.
+</para>
+
+
+<para>
+The effects of changing an indicator which drives the keyboard are cumulative;
+it is possible for a single change to affect keyboard group, modifiers and
+controls simultaneously.
+</para>
+
+
+<para>
+If an indicator for which both the <emphasis>
+IM_LEDDrivesKB</emphasis>
+ and <emphasis>
+IM_NoAutomatic</emphasis>
+ flags are specified is changed, the keyboard changes specified above are
+applied and the indicator is changed to reflect the state that was explicitly
+requested. The indicator will remain in the new state until it is explicitly
+changed again.
+</para>
+
+
+<para>
+If the <emphasis>
+IM_NoAutomatic</emphasis>
+ flag is not set for an indicator which drives the keyboard, the changes
+specified above are applied and the state of the indicator is set to the values
+specified by the indicator map. Note that it is possible in this case for the
+indicator to end up in a different state than the one that was explicitly
+requested. For example, an indicator with <emphasis>
+which_mods</emphasis>
+ of <emphasis>
+IM_UseBase</emphasis>
+ and <emphasis>
+mods</emphasis>
+ of <emphasis>
+Shift</emphasis>
+ is not extinguished if one of the <emphasis>
+Shift</emphasis>
+ keys is physically depressed when the request to extinguish the indicator is
+processed.
+</para>
+</sect3>
+</sect2>
+</sect1>
+</chapter>
diff --git a/specs/ch10.xml b/specs/ch10.xml
new file mode 100644
index 0000000..74362b0
--- /dev/null
+++ b/specs/ch10.xml
@@ -0,0 +1,174 @@
+<chapter id='Keyboard_Bells'>
+<title>Keyboard Bells</title>
+
+<para>
+The core protocol provides requests to control the pitch, volume and duration
+of the keyboard bell and a request to explicitly sound the bell.
+</para>
+
+
+<para>
+The X Keyboard Extension allows clients to disable the audible bell, attach a
+symbolic name to a bell request or receive an event when the keyboard bell is
+rung.
+</para>
+
+<sect1 id='Client_Notification_of_Bells'>
+<title>Client Notification of Bells</title>
+
+<para>
+Clients can ask to receive <emphasis>
+XkbBellNotify</emphasis>
+ event when a bell is requested by a client or generated by the server. Bells
+can be sounded due to core protocol <emphasis>
+Bell</emphasis>
+ requests, X Input Extension <emphasis>
+DeviceBell</emphasis>
+ requests, X Keyboard Extension <emphasis>
+XkbBell</emphasis>
+ requests or for reasons internal to the server such as the XKB <emphasis>
+AccessXFeedback</emphasis>
+ control.
+</para>
+
+
+<para>
+Bell events caused by the <emphasis>
+XkbBell</emphasis>
+ request or by the <emphasis>
+AccessXFeedback</emphasis>
+ control include an optional window and symbolic name for the bell. If present,
+the window makes it possible to provide some kind of visual indication of which
+window caused the sound. The symbolic name can report some information about
+the reason the bell was generated and makes it possible to generate a distinct
+sound for each type of bell.
+</para>
+
+
+</sect1>
+<sect1 id='Disabling_Server_Generated_Bells'>
+<title>Disabling Server Generated Bells</title>
+
+<para>
+The global <emphasis>
+AudibleBell</emphasis>
+ boolean control for a keyboard indicates whether bells sent to that device
+should normally cause the server to generate a sound. Applications which
+provide "sound effects" for the various named bells will typically disable the
+server generation of bells to avoid burying the user in sounds.
+</para>
+
+
+<para>
+When the <emphasis>
+AudibleBell</emphasis>
+ control is active, all bells caused by core protocol <emphasis>
+Bell</emphasis>
+ and X Input Extension <emphasis>
+DeviceBell</emphasis>
+ requests cause the server to generate a sound, as do all bells generated by
+the XKB <emphasis>
+AccessXFeedback</emphasis>
+ control. Bells requested via the X<emphasis>
+kbBell</emphasis>
+ request normally cause a server-generated sound, but clients can ask the
+server not to sound the default keyboard bell.
+</para>
+
+
+<para>
+When the <emphasis>
+AudibleBell</emphasis>
+ control is disabled, the server generates a sound only for bells that are
+generated using the <emphasis>
+XkbBell</emphasis>
+ request and which specify forced delivery of the bell.
+</para>
+
+
+</sect1>
+<sect1 id='Generating_Named_Bells'>
+<title>Generating Named Bells</title>
+
+<para>
+The <emphasis>
+XkbBell</emphasis>
+ request allows clients to specify a symbolic name which is reported in the
+bell events they cause. Bells generated by the <emphasis>
+AccessXFeedback</emphasis>
+ control of this extension also include a symbolic name, but all kinds of
+feedback cause a single event even if they sound multiple tones.
+</para>
+
+
+<para>
+The X server is permitted to use symbolic bell names (when present) to generate
+sounds other than simple tones, but it is not required to do so.
+</para>
+
+
+<para>
+Aside from those used by the XKB <emphasis>
+AccessXFeedback</emphasis>
+ control (see <link linkend='The_AccessXFeedback_Control'>The AccessXFeedback
+Control</link>), this extension does not specify bell names or their
+interpretation.
+</para>
+
+
+</sect1>
+<sect1 id='Generating_Optional_Named_Bells'>
+<title>Generating Optional Named Bells</title>
+
+<para>
+Under some circumstances, some kind of quiet audio feedback is useful, but a
+normal keyboard bell is not. For example, a quiet "launch effect" can be
+helpful to let the user know that an application has been started, but a loud
+bell would simply be annoying.
+</para>
+
+
+<para>
+To simplify generation of these kinds of effects, the <emphasis>
+XkbBell</emphasis>
+ request allows clients to specify "event only" bells. The X server never
+generates a normal keyboard bell for "event only" bells, regardless of the
+setting of the global <emphasis>
+AudibleBell</emphasis>
+ control.
+</para>
+
+
+<para>
+If the X server generates different sounds depending bell name, it is permitted
+to generate a sound even for "event only" bells. This field is intended simply
+to weed out "normal" keyboard bells.
+</para>
+
+
+</sect1>
+<sect1 id='Forcing_a_Server_Generated_Bell'>
+<title>Forcing a Server Generated Bell</title>
+
+<para>
+Occasionally, it is useful to force the server to generate a sound. For
+example, a client could "filter" server bells, generating sound effects for
+some but sounding the normal server bell for others. Such a client needs a way
+to tell the server that the requested bell should be generated regardless of
+the setting of the <emphasis>
+AudibleBell</emphasis>
+ control.
+</para>
+
+
+<para>
+To simplify this process, clients which call the <emphasis>
+XkbBell</emphasis>
+ request can specify that a bell is forced. A forced bell always causes a
+server generated sound and never causes a <emphasis>
+XkbBellNotify</emphasis>
+ event. Because forced bells do not cause bell notify events, they have no
+associated symbolic name or event window.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch11.xml b/specs/ch11.xml
new file mode 100644
index 0000000..39361a4
--- /dev/null
+++ b/specs/ch11.xml
@@ -0,0 +1,413 @@
+
+<chapter id='Keyboard_Geometry'>
+<title>Keyboard Geometry</title>
+
+<para>
+The XKB description of a keyboard includes an optional keyboard geometry which
+describes the physical appearance of the keyboard. Keyboard geometry describes
+the shape, location and color of all keyboard keys or other visible keyboard
+components such as indicators. The information contained in a keyboard geometry
+is sufficient to allow a client program to draw an accurate two-dimensional
+image of the keyboard.
+</para>
+
+
+<para>
+The components of the keyboard geometry include the following:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>A <emphasis>
+symbolic name</emphasis>
+ to help users identify the keyboard.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+width</emphasis>
+ and <emphasis>
+height</emphasis>
+ of the keyboard, in <mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-8.svg"/>
+ </imageobject>
+ </mediaobject>
+. For non-rectangular keyboards, the width and height describe the smallest
+bounding-box that encloses the outline of the keyboard.
+ </para>
+</listitem>
+<listitem>
+ <para>A list of up to <emphasis>
+MaxColors</emphasis>
+ (<emphasis>
+32</emphasis>
+) <emphasis>
+color names</emphasis>
+. A color name is a string whose interpretation is not specified by XKB. Other
+geometry components refer to colors using their indices in this list.
+ </para>
+</listitem>
+<listitem>
+ <para>The<emphasis>
+ base color</emphasis>
+ of the keyboard is the predominant color on the keyboard and is used as the
+default color for any components whose color is not explicitly specified.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+label color</emphasis>
+ is the color used to draw the labels on most of the keyboard keys.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+label font</emphasis>
+ is a string which describes the font used to draw labels on most keys; XKB
+does not specify a format or name space for font names.
+ </para>
+</listitem>
+<listitem>
+ <para>A list of <emphasis>
+geometry properties</emphasis>
+. A geometry property associates an arbitrary string with an equally arbitrary
+name. Geometry properties can be used to provide hints to programs that display
+images of keyboards, but they are not interpreted by XKB. No other geometry
+structures refer to geometry properties.
+ </para>
+</listitem>
+<listitem>
+ <para>A list of <emphasis>
+key aliases</emphasis>
+, as described in <link linkend='Symbolic_Names'>Symbolic
+Names</link>.
+ </para>
+</listitem>
+<listitem>
+ <para>A list of <emphasis>
+shapes</emphasis>
+; other keyboard components refer to shapes by their index in this list. A
+shape consists of a name and one or more closed-polygons called <emphasis>
+outlines</emphasis>
+. Shapes and outlines are described in detail in <link linkend='Shapes_and_Outlines'>Shapes and Outlines</link>.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Unless otherwise specified, geometry measurements are in <mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-9.svg"/>
+ </imageobject>
+ </mediaobject>
+
+ units. The origin (0,0) is in the top left corner of the keyboard image. Some
+geometry components can be drawn rotated; all such objects rotate about their
+origin in <mediaobject>
+ <imageobject> <imagedata format="SVG" fileref="XKBproto-10.svg"/>
+ </imageobject>
+ </mediaobject>
+
+ increments.
+</para>
+
+
+<para>
+All geometry components include a <emphasis>
+priority</emphasis>
+, which indicates the order in which overlapping objects should be drawn.
+Objects are drawn in order from highest priority (<emphasis>
+0</emphasis>
+) to lowest (<emphasis>
+255</emphasis>
+).
+</para>
+
+
+<para>
+The description of the actual appearance of the keyboard is subdivided into
+named <emphasis>
+sections</emphasis>
+ of related keys and <emphasis>
+doodads</emphasis>
+. A a <emphasis>
+doodad</emphasis>
+ describes some visible aspect of the keyboard that is not a key. A section is
+a collection of keys and doodads that are physically close together and
+logically related.
+</para>
+
+<sect1 id='Shapes_and_Outlines'>
+<title>Shapes and Outlines</title>
+
+<para>
+An outline is a list of one or more points which describes a single
+closed-polygon, as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>A list with a single point describes a rectangle with one corner at the
+origin of the shape (<emphasis>
+0</emphasis>
+,<emphasis>
+0</emphasis>
+) and the opposite corner at the specified point.
+ </para>
+</listitem>
+<listitem>
+ <para>A list of two points describes a rectangle with one corner at the
+position specified by the first point and the opposite corner at the position
+specified by the second point.
+ </para>
+</listitem>
+<listitem>
+ <para>A list of three or more points describes an arbitrary polygon. If
+necessary, the polygon is automatically closed by connecting the last point in
+the list with the first.
+ </para>
+</listitem>
+<listitem>
+ <para>A non-zero value for the <emphasis>
+cornerRadius</emphasis>
+ field specifies that the corners of the polygon should be drawn as circles
+with the specified radius.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+All points in an outline are specified relative to the origin of the enclosing
+shape. Points in an outline may have negative values for the X and Y coordinate.
+</para>
+
+
+<para>
+One outline (usually the first) is the primary outline; a keyboard display
+application can generate a simpler but still accurate keyboard image by
+displaying only the primary outlines for each shape. Non-rectangular keys must
+include a rectangular <emphasis>
+approximation</emphasis>
+ as one of the outlines associated with the shape; the approximation is not
+normally displayed but can be used by very simple keyboard display applications
+to generate a recognizable but degraded image of the keyboard.
+</para>
+
+
+</sect1>
+<sect1 id='Sections'>
+<title>Sections</title>
+
+<para>
+Each section has its own coordinate system — if a section is rotated, the
+coordinates of any components within the section are interpreted relative to
+the edges that were on the top and left before rotation. The components that
+make up a section include:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>A list of <emphasis>
+rows</emphasis>
+. A row is a list of horizontally or vertically adjacent keys. Horizontal rows
+parallel the (pre-rotation) top of the section and vertical rows parallel the
+(pre-rotation) left of the section. All keys in a horizontal row share a common
+top coordinate; all keys in a vertical row share a left coordinate.
+ </para>
+<para>
+A key description consists of a key <emphasis>
+name</emphasis>
+, a <emphasis>
+shape</emphasis>
+, a key <emphasis>
+color</emphasis>
+, and a <emphasis>
+gap</emphasis>
+. The key <emphasis>
+name</emphasis>
+ should correspond to one of the keys named in the keyboard names description,
+the <emphasis>
+shape</emphasis>
+ specifies the appearance of the key, and the key <emphasis>
+color</emphasis>
+ specifies the color of the key (not the label on the key). Keys are normally
+drawn immediately adjacent to one another from left-to-right (or top-to-bottom)
+within a row. The <emphasis>
+gap</emphasis>
+ field specifies the distance between a key and its predecessor.
+ </para>
+</listitem>
+<listitem>
+ <para>An optional list of doodads; any type of doodad can be enclosed within
+a section. Position and angle of rotation are relative to the origin and angle
+of rotation of the sections that contain them. Priority is relative to the
+other components of the section, not to the keyboard as a whole.
+ </para>
+</listitem>
+<listitem>
+ <para>An optional list of <emphasis>
+overlay keys</emphasis>
+. Each overlay key definition indicates a key that can yield multiple scan
+codes and consists of a field named <emphasis>
+under</emphasis>
+, which specifies the primary name of the key and a field named <emphasis>
+over</emphasis>
+, which specifies the name for the key when the overlay keycode is selected.
+The key specified in <emphasis>
+under</emphasis>
+ must be a member of the section that contains the overlay key definition,
+while the key specified in over must not.
+ </para>
+</listitem>
+</itemizedlist>
+
+</sect1>
+<sect1 id='Doodads'>
+<title>Doodads</title>
+
+<para>
+Doodads can be global to the keyboard or part of a section. Doodads have
+symbolic names of arbitrary length. The only doodad name whose interpretation
+is specified by XKB is "Edges", which describes the outline of the entire
+keyboard, if present.
+</para>
+
+
+<para>
+All doodads report their origin in fields named <emphasis>
+left</emphasis>
+ and <emphasis>
+top</emphasis>
+. XKB supports five kinds of doodads:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>An <emphasis>
+indicator doodad</emphasis>
+ describes one of the physical keyboard indicators. Indicator doodads specify
+the shape of the indicator, the indicator color when it is lit (<emphasis>
+on_color</emphasis>
+) and the indicator color when it is dark (<emphasis>
+off_color</emphasis>
+).
+ </para>
+</listitem>
+<listitem>
+ <para>An <emphasis>
+outline doodad</emphasis>
+ describes some aspect of the keyboard to be drawn as one or more hollow,
+closed polygons. Outline doodads specify the shape, color, and angle of
+rotation about the doodad origin at which they should be drawn.
+ </para>
+</listitem>
+<listitem>
+ <para>A <emphasis>
+solid doodad</emphasis>
+ describes some aspect of the keyboard to be drawn as one or more filled
+polygons. Solid doodads specify the shape, color and angle of rotation about
+the doodad origin at which they should be drawn.
+ </para>
+</listitem>
+<listitem>
+ <para>A <emphasis>
+text doodad</emphasis>
+ describes a text label somewhere on the keyboard. Text doodads specify the
+label string, the font and color to use when drawing the label, and the angle
+of rotation of the doodad about its origin.
+ </para>
+</listitem>
+<listitem>
+ <para>A <emphasis>
+logo doodad</emphasis>
+ is a catch-all, which describes some other visible element of the keyboard. A
+logo doodad is essentially an outline doodad with an additional symbolic name
+that describes the element to be drawn.
+ </para>
+ <para>
+If a keyboard display program recognizes the symbolic name, it can draw
+something appropriate within the bounding region of the shape specified in the
+doodad. If the symbolic name does not describe a recognizable image, it should
+draw an outline using the specified shape, outline, and angle of rotation.
+ </para>
+ <para>
+The XKB extension does not specify the interpretation of logo names.
+ </para>
+</listitem>
+</itemizedlist>
+
+</sect1>
+<sect1 id='Keyboard_Geometry_Example'>
+<title>Keyboard Geometry Example</title>
+
+<para>
+Consider the following example keyboard:
+</para>
+
+<mediaobject>
+ <imageobject>
+ <imagedata format="SVG" fileref="XKBproto-11.svg"/>
+ </imageobject>
+</mediaobject>
+
+
+<para>
+This keyboard has six sections: The left and right function sections (at the
+very top) each have one horizontal row with eight keys. The left and right
+alphanumeric sections (the large sections in the middle) each have six vertical
+rows, with four or five keys in each row. The left and right editing sections
+each have three vertical rows with one to three keys per row; the left editing
+section is rotated 20° clockwise about its origin while the right editing
+section is rotated 20° counterclockwise.
+</para>
+
+
+<para>
+This keyboard has four global doodads: Three small, round indicators and a
+rectangular logo. The program which generated this image did not recognize the
+logo, so it displays an outline with an appropriate shape in its place.
+</para>
+
+
+<para>
+This keyboard has seven shapes: All of the keys in the two function sections
+use the "FKEY" shape. Most of the keys in the alphanumeric sections, as well as
+four of the keys in each of the editing sections use the "NORM" shape. The keys
+in the first column of the left alphanumeric section and the last column of the
+right alphanumeric section all use the "WIDE" shape. Two keys in each of the
+editing sections use the "TALL" shape. The "LED" shape describes the three
+small, round indicators between the function and alphabetic sections. The
+"LOGO" shape describes the keyboard logo, and the "EDGE" shape describes the
+outline of the keyboard as a whole.
+</para>
+
+
+<para>
+The keyboard itself is white, as are all of the keys except for the eight keys
+that make up the home row, which use the "grey20" color. It isn’t really
+visible in this picture, but the three indicators have an "on" color of "green"
+and are "green30" when they are turned off. The keys in the alphanumeric and
+editing sections all have a (vertical) gap of 0.5mm; the keys in the two
+function sections have a (horizontal) gap of 3mm.
+</para>
+
+
+<para>
+Many of the keys in the right alphanumeric section, and the rightmost key in
+the right editing section are drawn with two names in this image. Those are
+overlay keys; the bottom key name is the normal name while the overlay name is
+printed at the top. For example, the right editing section has a single overlay
+key entry, which specifies an <emphasis>
+under</emphasis>
+ name of <emphasis>
+&lt;SPCE&gt;</emphasis>
+ and an <emphasis>
+over</emphasis>
+ name of <emphasis>
+&lt;KP0&gt;</emphasis>
+, which indicates that the key in question is usually the shift key, but can
+behave like the <emphasis>
+0</emphasis>
+ key on the numeric keypad when an overlay is active.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch12.xml b/specs/ch12.xml
new file mode 100644
index 0000000..efc6d6a
--- /dev/null
+++ b/specs/ch12.xml
@@ -0,0 +1,1024 @@
+
+<chapter id='Interactions_Between_XKB_and_the_Core_Protocol'>
+<title>Interactions Between XKB and the Core Protocol</title>
+
+<para>
+In addition to providing a number of new requests, XKB replaces or extends
+existing core protocol requests and events. Some aspects of the this extension,
+such as the ability to lock any key or modifier, are visible even to clients
+that are unaware of the XKB extension. Other capabilities, such as control of
+keysym selection on a per-key basis, are available only to XKB-aware clients.
+</para>
+
+
+<para>
+Though they do not have access to some advanced extension capabilities, the XKB
+extension includes compatibility mechanisms to ensure that non-XKB clients
+behave as expected and operate at least as well with an XKB-capable server as
+they do today.
+</para>
+
+
+<para>
+There are a few significant areas in which XKB state and mapping differences
+might be visible to XKB-unaware clients:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The core protocol uses a modifier to choose between two keyboard
+groups, while this extension provides explicit support for multiple groups.
+ </para>
+</listitem>
+<listitem>
+ <para>The order of the symbols associated with any given key by XKB might not
+match the ordering demanded by the core protocol.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+To minimize problems that might result from these differences, XKB includes
+ways to specify the correspondence between core protocol and XKB modifiers and
+symbols.
+</para>
+
+
+<para>
+This section describes the differences between the core X protocol’s notion
+of a keyboard mapping and XKB and explains the ways they can interact.
+</para>
+
+<sect1 id='Group_Compatibility_Map'>
+<title>Group Compatibility Map</title>
+
+<para>
+As described in <link linkend='Keyboard_State'>Keyboard
+State</link>, the current keyboard group is reported to XKB-aware clients in
+bits 13-14 of the state field of many core protocol events. XKB-unaware clients
+cannot interpret those bits, but they might use a keyboard modifier to
+implement support for a single keyboard group. To ensure that pre-XKB clients
+continue to work when XKB is present, XKB makes it possible to map an XKB state
+field, which includes both keyboard group and modifier state into a pre-XKB
+state field which contains only modifiers.
+</para>
+
+
+<para>
+A keyboard description includes one <emphasis>
+group compatibility map</emphasis>
+ per keyboard group (four in all). Each such map is a modifier definition (i.e.
+specifies both real and virtual modifiers) which specifies the modifiers to be
+set in the compatibility states when the corresponding keyboard group is
+active. Here are a few examples to illustrate the application of the group
+compatibility map:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='6' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='2.0*'/>
+<colspec colname='c3' colwidth='1.5*'/>
+<colspec colname='c4' colwidth='2.2*'/>
+<colspec colname='c5' colwidth='1.5*'/>
+<colspec colname='c6' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Group</entry>
+ <entry>GroupCompat Map</entry>
+ <entry>Effective Modifiers</entry>
+ <entry> State for XKB Clients</entry>
+ <entry>Compatibility Modifiers</entry>
+ <entry>State for non-XKB Clients</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>1</entry>
+ <entry>Group1=None</entry>
+ <entry>Shift</entry>
+ <entry>x00xxxxx00000001</entry>
+ <entry>Shift</entry>
+ <entry>xxxxxxxx00000001</entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry>Group2=Mod3</entry>
+ <entry>None</entry>
+ <entry>x01xxxxx00000000</entry>
+ <entry>Mod3</entry>
+ <entry>xxxxxxxx00100000</entry>
+ </row>
+ <row>
+ <entry>3</entry>
+ <entry>Group3=Mod2</entry>
+ <entry>Shift</entry>
+ <entry>x10xxxxx00000001</entry>
+ <entry>Shift+Mod2</entry>
+ <entry>xxxxxxxx00010001</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>Group4=None</entry>
+ <entry>Control</entry>
+ <entry>x11xxxxx00000100</entry>
+ <entry>Control</entry>
+ <entry>xxxxxxxx00000100</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Note that non-XKB clients (i.e. clients that are linked with a version of the X
+library that does not support XKB) cannot detect the fact that <emphasis>
+Group4</emphasis>
+ is active in this example because the group compatibility map for <emphasis>
+Group4</emphasis>
+ does not specify any modifiers.
+</para>
+
+
+<sect2 id='Setting_a_Passive_Grab_for_an_XKB_State'>
+<title>Setting a Passive Grab for an XKB State</title>
+
+<para>
+The fact that the <emphasis>
+state</emphasis>
+ field of an event might look different when XKB is present can cause problems
+with passive grabs. Existing clients specify the modifiers they wish to grab
+using the rules defined by the core protocol, which use a normal modifier to
+indicate keyboard group. If we used an XKB state field, the high bits of the
+state field would be non-zero whenever the keyboard was in any group other than
+<emphasis>
+Group1</emphasis>
+, and none of the passive grabs set by clients could ever be triggered.
+</para>
+
+
+<para>
+To avoid this behavior, the X server normally uses the compatibility grab state
+to decide whether or not to activate a passive grab, even for XKB-aware
+clients. The group compatibility map attempts to encode the keyboard group in
+one or more modifiers of the compatibility state, so existing clients continue
+to work exactly the way they do today. By default, there is no way to directly
+specify a keyboard group in a <emphasis>
+Grabbed</emphasis>
+ or <emphasis>
+GrabButton</emphasis>
+ request, but groups can be specified indirectly by correctly adjusting the
+group compatibility map.
+</para>
+
+
+<para>
+Clients that wish to specify an XKB keyboard state, including a separate
+keyboard group, can set the <emphasis>
+GrabsUseXKBState</emphasis>
+ per-client flag which indicates that all subsequent key and button grabs from
+the requesting clients are specified using an XKB state.
+</para>
+
+
+<para>
+Whether the XKB or core state should be used to trigger a grab is determined by
+the setting of the <emphasis>
+GrabsUseXKBState</emphasis>
+ flag for the requesting client at the time the key or button is grabbed. There
+is no way to change the state to be used for a grab that is already registered
+or for grabs that are set by some other client.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='Changing_the_Keyboard_Mapping_Using_the_Core_Protocol'>
+<title>Changing the Keyboard Mapping Using the Core Protocol</title>
+
+<para>
+An XKB keyboard description includes a lot of information that is not present
+in the core protocol description of a keyboard. Whenever a client remaps the
+keyboard using core protocol requests, XKB examines the map to determine likely
+default values for the components that cannot be specified using the core
+protocol.
+</para>
+
+
+<para>
+Some aspects of this automatic mapping are configurable, and make it fairly
+easy to take advantage of many XKB features using existing tools like <emphasis>
+xmodmap</emphasis>
+, but much of the process of mapping a core keyboard description into an XKB
+description is designed to preserve compatible behavior for pre-XKB clients and
+cannot be redefined by the user. Clients or users that want behavior that
+cannot be described using this mapping should use XKB functions directly.
+</para>
+
+
+<sect2 id='Explicit_Keyboard_Mapping_Components'>
+<title>Explicit Keyboard Mapping Components</title>
+
+<para>
+This automatic remapping might accidentally replace definitions that were
+explicitly requested by an application, so the XKB keyboard description defines
+a set of <emphasis>
+explicit components</emphasis>
+ for each key; any components that are listed in the explicit components for a
+key are not changed by the automatic keyboard mapping. The explicit components
+field for a key can contain any combination of the following values:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Bit in Explicit Mask</entry>
+ <entry>Protects Against</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>ExplicitKeyType1</entry>
+ <entry>Automatic determination of the key type associated with <emphasis>
+Group1</emphasis>
+ (see <link linkend='Assigning_Types_To_Groups_of_Symbols_for_a_Key'>Assigning Types To Groups of
+Symbols for a Key</link>)</entry>
+ </row>
+ <row>
+ <entry>ExplicitKeyType2</entry>
+ <entry>Automatic determination of the key type associated with <emphasis>
+Group2 </emphasis>
+(see <link linkend='Assigning_Types_To_Groups_of_Symbols_for_a_Key'>Assigning Types To Groups of
+Symbols for a Key</link>)</entry>
+ </row>
+ <row>
+ <entry>ExplicitKeyType3</entry>
+ <entry>Automatic determination of the key type associated with <emphasis>
+Group3 </emphasis>
+(see <link linkend='Assigning_Types_To_Groups_of_Symbols_for_a_Key'>Assigning Types To Groups of
+Symbols for a Key</link>).</entry>
+ </row>
+ <row>
+ <entry>ExplicitKeyType4</entry>
+ <entry>Automatic determination of the key type associated with <emphasis>
+Group4 </emphasis>
+(see <link linkend='Assigning_Types_To_Groups_of_Symbols_for_a_Key'>Assigning Types To Groups of
+Symbols for a Key</link>).</entry>
+ </row>
+ <row>
+ <entry>ExplicitInterpret</entry>
+ <entry>Application of any of the fields of a symbol interpretation to the
+key in question (see <link linkend='Assigning_Actions_To_Keys'>Assigning
+Actions To Keys</link>).</entry>
+ </row>
+ <row>
+ <entry>ExplicitAutoRepeat</entry>
+ <entry>Automatic determination of autorepeat status for the key, as
+specified in a symbol interpretation (see <link linkend='Assigning_Actions_To_Keys'>Assigning Actions To
+Keys</link>).</entry>
+ </row>
+ <row>
+ <entry>ExplicitBehavior</entry>
+ <entry>Automatic assignment of the <emphasis>
+KB_Lock</emphasis>
+ behavior to the key, if the <emphasis>
+LockingKey</emphasis>
+ flag is set in a symbol interpretation (see <link linkend='Assigning_Actions_To_Keys'>Assigning Actions To
+Keys</link>).</entry>
+ </row>
+ <row>
+ <entry>ExplicitVModMap</entry>
+ <entry>Automatic determination of the virtual modifier map for the key
+based on the actions assigned to the key and the symbol interpretations which
+match the key (see <link linkend='Assigning_Actions_To_Keys'>Assigning
+Actions To Keys</link>).</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect2>
+<sect2 id='Assigning_Symbols_To_Groups'>
+<title>Assigning Symbols To Groups</title>
+
+<para>
+The first step in applying the changes specified by a core protocol <emphasis>
+ChangeKeyboardMapping</emphasis>
+ request to the XKB description of a keyboard is to determine the number of
+groups that are defined for the key and the width of each group. The XKB
+extension does not change key types in response to core protocol <emphasis>
+SetModifierMapping</emphasis>
+ requests, but it does choose key actions as described in <link linkend='Assigning_Actions_To_Keys'>Assigning Actions To Keys</link>.
+</para>
+
+
+<para>
+Determining the number of symbols required for each group is straightforward.
+If the key type for some group is not protected by the corresponding <emphasis>
+ExplicitKeyType</emphasis>
+ component, that group has two symbols. If any of the explicit components for
+the key include <emphasis>
+ExplicitKeyType3</emphasis>
+ or <emphasis>
+ExplicitKeyType4</emphasis>
+, the width of the key type currently assigned to that group determines the
+number of symbols required for the group in the core protocol keyboard
+description. The explicit type components for <emphasis>
+Group1</emphasis>
+ and <emphasis>
+Group2</emphasis>
+ behave similarly, but for compatibility reasons the first two groups must have
+at least two symbols in the core protocol symbol mapping. Even if an explicit
+type assigned to either of the first two keyboard groups has fewer than two
+symbols, XKB requires two symbols for it in the core keyboard description.
+</para>
+
+
+<para>
+If the core protocol request contains fewer symbols than XKB needs, XKB adds
+trailing <emphasis>
+NoSymbol</emphasis>
+ keysyms to the request to pad it to the required length. If the core protocol
+request includes more symbols than it needs, XKB truncates the list of keysyms
+to the appropriate length.
+</para>
+
+
+<para>
+Finally, XKB divides the symbols from the (possibly padded or truncated) list
+of symbols specified by the core protocol request among the four keyboard
+groups. In most cases, the symbols for each group are taken from the core
+protocol definition in sequence (i.e. the first pair of symbols is assigned to
+<emphasis>
+Group1</emphasis>
+, the second pair of symbols is assigned to <emphasis>
+Group2</emphasis>
+, and so forth). If either <emphasis>
+Group1</emphasis>
+ or <emphasis>
+Group2</emphasis>
+ has an explicitly defined key type with a width other than two, it gets a
+little more complicated.
+</para>
+
+
+<sect3 id='Assigning_Symbols_to_Groups_One_and_Two_with_Explicitly_Defined_Key_Types'>
+<title>Assigning Symbols to Groups One and Two with Explicitly Defined Key Types</title>
+
+<para>
+The server assigns the first four symbols from the expanded or truncated map to
+the symbol positions <emphasis>G1L1</emphasis> , <emphasis>G1L2</emphasis>,
+<emphasis>G2L1</emphasis> and <emphasis>G2L2</emphasis>, respectively. If the key
+type assigned to <emphasis>Group1</emphasis> reports more than two shift levels,
+the fifth and following symbols contain
+the extra keysyms for <emphasis>
+Group2</emphasis>
+. If the key type assigned to <emphasis>
+Group2</emphasis>
+ reports more than two shift levels, the extra symbols follow the symbols (if
+any) for <emphasis>
+Group1</emphasis>
+ in the core protocol list of symbols. Symbols for <emphasis>
+Group3</emphasis>
+ and <emphasis>
+Group4</emphasis>
+ are contiguous and follow the extra symbols, if any, for <emphasis>
+Group1</emphasis>
+ and <emphasis>
+Group2</emphasis>
+.
+</para>
+
+
+<para>
+For example, consider a key with a key type that returns three shift levels
+bound to each group. The symbols bound to the core protocol are assigned in
+sequence to the symbol positions:
+</para>
+
+<literallayout class='monospaced'>
+<emphasis>G1L1</emphasis>, <emphasis>G1L2</emphasis>, <emphasis>G2L1</emphasis>, <emphasis>G2L2</emphasis>, <emphasis>G1L3</emphasis>, <emphasis>G2L3</emphasis>, <emphasis>G3L1</emphasis>, <emphasis>G3L2</emphasis>, <emphasis>G3L3</emphasis>, <emphasis>G4L1</emphasis>, <emphasis>G4L2</emphasis>, and <emphasis>G4L3</emphasis>
+</literallayout>
+
+<para>
+For a key with a width one key type on group one, a width two key type on group
+two and a width three key type on group three, the symbols bound to the key by
+the core protocol are assigned to the following key positions:
+</para>
+
+<literallayout class='monospaced'>
+<emphasis>G1L1</emphasis>, (<emphasis>G1L2</emphasis>), <emphasis>G2L1</emphasis>, <emphasis>G2L2</emphasis>, <emphasis>G3L1</emphasis>, <emphasis>G3L2</emphasis>, <emphasis>G3L3</emphasis>
+</literallayout>
+
+<para>
+Note that the second and fourth symbols (positions <emphasis>
+G1L2 and G2L2</emphasis>
+) can never be generated if the key type associated with the group yields only
+one symbol. XKB accepts and ignores them in order to maintain compatibility
+with the core protocol.
+</para>
+
+
+</sect3>
+</sect2>
+<sect2 id='Assigning_Types_To_Groups_of_Symbols_for_a_Key'>
+<title>Assigning Types To Groups of Symbols for a Key</title>
+
+<para>
+Once the symbols specified by <emphasis>
+ChangeKeyboardMapping</emphasis>
+ have been assigned to the four keyboard groups for a key, the X server assigns
+a key type to each group on the key from a canonical list of key types. The
+first four key types in any keyboard map are reserved for these standard key
+types:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Key Type Name</entry>
+ <entry>Standard Definition</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+ONE_LEVEL</emphasis>
+</entry>
+ <entry>Describes keys that have exactly one symbol per group. Most special
+or function keys (such as <emphasis>
+Return</emphasis>
+) are <emphasis>
+ONE_LEVEL</emphasis>
+ keys. Any combination of modifiers yields level <emphasis>
+0</emphasis>
+. Index <emphasis>
+0</emphasis>
+ in any key symbol map specifies key type <emphasis>
+ONE_LEVEL</emphasis>
+.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+TWO_LEVEL</emphasis>
+</entry>
+ <entry>Describes non-keypad and non-alphabetic keys that have exactly two
+symbols per group. By default, the <emphasis>
+TWO_LEVEL</emphasis>
+ type yields column <emphasis>
+1</emphasis>
+ if the Shift modifier is set, column <emphasis>
+0</emphasis>
+ otherwise. Index <emphasis>
+1</emphasis>
+ in any key symbol map specifies key type <emphasis>
+TWO_LEVEL</emphasis>
+.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+ALPHABETIC</emphasis>
+</entry>
+ <entry>Describes alphabetic keys that have exactly two symbols per group.
+The default definition of the <emphasis>
+ALPHABETIC</emphasis>
+ type provides shift-cancels-caps behavior as described in <link linkend='Key_Types'>Key Types</link>. Index <emphasis>
+2</emphasis>
+ in any key symbol map specifies key type <emphasis>
+ALPHABETIC</emphasis>
+.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+KEYPAD</emphasis>
+</entry>
+ <entry>Describes numeric keypad keys with two symbols per group. Yields
+column <emphasis>
+1</emphasis>
+ if either of the <emphasis>
+Shift</emphasis>
+ modifier or the real modifier bound to the virtual modifier named <emphasis>
+NumLock</emphasis>
+ are set. Yields column <emphasis>
+0</emphasis>
+ if neither or both modifiers are set. Index <emphasis>
+3</emphasis>
+ in any key symbol map specifies key type <emphasis>
+KEYPAD</emphasis>
+.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Users or applications may change these key types to get different default
+behavior (to make shift cancel caps lock, for example) but they must always
+have the specified number of symbols per group.
+</para>
+
+
+<para>
+Before assigning key types to groups, the X server expands any alphanumeric
+symbol definitions as follows:
+</para>
+
+
+<para>
+If the second symbol of either group is <emphasis>
+NoSymbol</emphasis>
+ and the first symbol of that group is an alphabetic keysym for which both
+lowercase and uppercase forms are defined, the X server treats the key as if
+the first element of the group were the lowercase form of the symbol and the
+second element were the uppercase form of the symbol. For the purposes of this
+expansion, XKB ignores the locale and uses the capitalization rules defined in
+<link linkend="default_symbol_transformations">Default Symbol Transformations</link>.
+</para>
+
+
+<para>
+For each keyboard group that does not have an explicit type definition, XKB
+chooses a key type from the canonical key types. If the second symbol assigned
+to a group is <emphasis>
+NoSymbol</emphasis>
+ (after alphabetic expansion), the server assigns key type <emphasis>
+ONE_LEVEL</emphasis>
+. If the group contains the lowercase and uppercase forms of a single glyph
+(after alphanumeric expansion), the server assigns key type <emphasis>
+ALPHABETIC</emphasis>
+. If either of the symbols in a group is a numeric keypad keysym (<emphasis>
+KP_*</emphasis>
+), the server assigns key type <emphasis>
+KEYPAD</emphasis>
+. Otherwise, it assigns key type <emphasis>
+TWO_LEVEL</emphasis>
+.
+</para>
+
+
+<para>
+Finally, XKB determines the number of groups of symbols that are actually
+defined for the key. Trailing empty groups (i.e. groups that have <emphasis>
+NoSymbol</emphasis>
+ in all symbol positions) are ignored.
+</para>
+
+
+<para>
+There are two last special cases for compatibility with the core protocol: If,
+after trailing empty groups are excluded, all of the groups of symbols bound to
+the key have identical type and symbol bindings, XKB assigns only one group to
+the key. If <emphasis>
+Group2</emphasis>
+ is empty and either of <emphasis>
+Group3</emphasis>
+ or <emphasis>
+Group4</emphasis>
+ are not, and if neither <emphasis>
+Group1</emphasis>
+ nor <emphasis>
+Group2</emphasis>
+ have explicit key types, XKB copies the symbols and key type from <emphasis>
+Group1</emphasis>
+ into <emphasis>
+Group2</emphasis>
+.
+</para>
+
+
+</sect2>
+<sect2 id='Assigning_Actions_To_Keys'>
+<title>Assigning Actions To Keys</title>
+
+<para>
+Once symbols have been divided into groups and key types chosen for the keys
+affected by a <emphasis>
+ChangeKeyboardMapping</emphasis>
+ request, XKB examines the symbols and modifier mapping for each changed key
+and assigns server actions where appropriate. XKB also automatically assigns
+server actions to changed keys if the client issues a core protocol <emphasis>
+SetModifierMapping</emphasis>
+ request, and does so optionally in response to <emphasis>
+XkbSetMap</emphasis>
+ and <emphasis>
+XkbSetCompatMap</emphasis>
+ requests.
+</para>
+
+
+<para>
+The compatibility map includes a list of <emphasis>
+symbol interpretations</emphasis>
+, which XKB compares to each symbol associated with any changed keys in turn,
+unless the <emphasis>
+ExplicitInterp</emphasis>
+ component is set for a key. Setting the <emphasis>
+ExplicitInterp</emphasis>
+ component prevents the application of symbol interpretations to that key.
+</para>
+
+
+<para>
+If the modifiers and keysym specified in a symbol interpretation match the
+modifier mapping and a symbol bound to a changed key that is not protected by
+<emphasis>
+ExplicitInterp</emphasis>
+, the server applies the symbol interpretation to the symbol position. The
+server considers all symbol interpretations which specify an explicit keysym
+before considering any that do not. The server uses the first interpretation
+which matches the given combination of keysym and modifier mapping; other
+matching interpretations are ignored.
+</para>
+
+
+<para>
+XKB uses four of the fields of a symbol interpretation to decide if it matches
+one of the symbols bound to some changed key:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+symbol</emphasis>
+ field is a keysym which matches if it has the value <emphasis>
+NoSymbol</emphasis>
+ or is identical to the symbol in question.
+ </para>
+</listitem>
+<listitem>
+ <para>The modifiers specified in the <emphasis>
+mods</emphasis>
+ field are compared to the modifiers affected by the key in question as
+indicated by <emphasis>
+match</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+match</emphasis>
+ field can specify any of the comparisons: <emphasis>
+NoneOf</emphasis>
+, <emphasis>
+AnyOfOrNone</emphasis>
+, <emphasis>
+AnyOf</emphasis>
+, <emphasis>
+AllOf</emphasis>
+ or <emphasis>
+Exactly</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+levelOneOnly</emphasis>
+ setting, indicates that the interpretation in question should only use the
+modifiers bound to this key by the modifier mapping if the symbol that matches
+in level one of its group. Otherwise, if the symbol being considered is not in
+shift level one of its group, the server behaves as if the modifier map for the
+key were empty. Note that it is still possible for such an interpretation to
+apply to a symbol in a shift level other than one if it matches a key without
+modifiers; the <emphasis>
+levelOneOnly</emphasis>
+ flag only controls the way that matches are determined and that the key
+modifiers are applied when an interpretation does match.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Applying a symbol interpretation can affect several aspects of the XKB
+definition of the key symbol mapping to which it is applied:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+action</emphasis>
+ specified in the symbol interpretation is bound to the symbol position; any
+key event which yields that symbol will also activate the new action.
+ </para>
+</listitem>
+<listitem>
+ <para>If the matching symbol is in position G1L1, the autorepeat behavior of
+the key is set from the <emphasis>
+autorepeat</emphasis>
+ field of the symbol interpretation. The <emphasis>
+ExplicitAutoRepeat</emphasis>
+ component protects the autorepeat status of a key from symbol interpretation
+initiated changes.
+ </para>
+</listitem>
+<listitem>
+ <para>If the symbol interpretation specifies an associated virtual modifier,
+that virtual modifier is added to the virtual modifier map for the key. The
+<emphasis>
+ExplicitVModMap</emphasis>
+ component guards the virtual modifier map for a key from automatic changes. If
+the <emphasis>
+levelOneOnly</emphasis>
+ flag is set for the interpretation, and the symbol in question is not in
+position G1L1, the virtual modifier map is not updated.
+ </para>
+</listitem>
+<listitem>
+ <para>If the matching symbol is in position G1L1, and the <emphasis>
+locking key</emphasis>
+ field is set in the symbol interpretation, the behavior of the key is changed
+to <emphasis>
+KB_Lock</emphasis>
+ (see <link linkend='Key_Behavior'>Key Behavior</link>). The
+<emphasis>
+ExplicitBehavior</emphasis>
+ component prevents this change.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If no interpretations match a given symbol or key, the server uses: <emphasis>
+SA_NoAction</emphasis>
+, autorepeat enabled, non-locking key. with no virtual modifiers.
+</para>
+
+
+<para>
+If all of the actions computed for a key are <emphasis>
+SA_NoAction</emphasis>
+, the server assigns an length zero list of actions to the key.
+</para>
+
+
+<para>
+If the core protocol modifier mapping is changed, the server regenerates
+actions for the affected keys. The <emphasis>
+XkbSetMap</emphasis>
+ and <emphasis>
+XkbSetCompatMap</emphasis>
+ requests can also cause actions for some or all keyboard keys to be recomputed.
+</para>
+
+
+</sect2>
+<sect2 id='Updating_Everything_Else'>
+<title>Updating Everything Else</title>
+
+<para>
+Changes to the symbols or modifier mapping can affect the bindings of virtual
+modifiers. If any virtual modifiers change, XKB updates all of its data
+structures to reflect the change. Applying virtual modifier changes to the
+keyboard mapping night result in changes to types, the group compatibility map,
+indicator maps, internal modifiers or ignore locks modifiers.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='Effects_of_XKB_on_Core_Protocol_Events'>
+<title>Effects of XKB on Core Protocol Events</title>
+
+<para>
+After applying server actions which modify the base, latched or locked modifier
+or group state of the keyboard, the X server recomputes the effective group and
+state. Several components of the keyboard state are reported to XKB-aware
+clients depending on context (see <link linkend='Keyboard_State'>
+Keyboard State</link> for a detailed description of each of the keyboard state
+components):
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The effective modifier state is reported in <emphasis>
+XkbStateNotify</emphasis>
+ events and in response to <emphasis>
+XkbGetState</emphasis>
+ requests.
+ </para>
+</listitem>
+<listitem>
+ <para>The symbol lookup state is reported to XKB-aware clients in the state
+field of core protocol and input extension key press and release events that do
+not activate passive grabs. Unless the <emphasis>
+LookupStateWhenGrabbed</emphasis>
+ per-client flag is set, the lookup state is only reported in these events when
+no grabs are active.
+ </para>
+</listitem>
+<listitem>
+ <para>The grab state is reported to XKB-aware clients in the state field of
+all core protocol events that report keyboard state, except <emphasis>
+KeyPress</emphasis>
+ and <emphasis>
+KeyRelease</emphasis>
+ events that do not activate passive grabs.
+ </para>
+</listitem>
+<listitem>
+ <para>The effective group is the sum of the base, latched and locked keyboard
+groups. An out of range effective group is wrapped or truncated into range
+according to the setting of the <emphasis>
+groupsWrap</emphasis>
+ flag for the keyboard.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+The server reports compatibility states to any clients that have not issued a
+successful <emphasis>
+XkbUseExtension</emphasis>
+ request. The server computes the compatibility symbol lookup state and the
+compatibility effective grab state by applying the compatibility modifier map
+to the corresponding computed XKB states.
+</para>
+
+
+<para>
+The compatibility symbol lookup state is reported to non-XKB clients whenever
+an XKB-aware client would receive the XKB lookup state. The compatibility grab
+state is reported to XKB-unaware clients whenever an XKB client would receive
+the XKB grab state.
+</para>
+
+
+<para>
+If the <emphasis>
+GrabsUseXKBState</emphasis>
+ per-client option is not set, even XKB-aware clients receive the compatibility
+grab state in events that trigger or terminate passive grabs. If this flag is
+not set, XKB clients also receive the compatibility grab or lookup state
+whenever any keyboard grab is active.
+</para>
+
+
+<para>
+If the <emphasis>
+LookupStateWhenGrabbed</emphasis>
+ per-client option is set, clients receive either the XKB or compatibility
+lookup state when the keyboard is grabbed, otherwise they receive either the
+XKB or compatibility grab state. All non-XKB clients receive the compatibility
+form of the appropriate state component; the form that is sent to an XKB-aware
+client depends on the setting of the <emphasis>
+GrabsUseXKBState</emphasis>
+ option for that client.
+</para>
+
+
+</sect1>
+<sect1 id='Effect_of_XKB_on_Core_Protocol_Requests'>
+<title>Effect of XKB on Core Protocol Requests</title>
+
+<para>
+Whenever a client updates the keyboard mapping using a core protocol request,
+the server saves the requested core protocol keyboard mapping and reports it to
+any clients that issue <emphasis>
+GetKeyboardMapping</emphasis>
+ or <emphasis>
+GetModifierMapping</emphasis>
+ requests. Whenever a client updates the keyboard mapping using XKB requests,
+the server discards the affected portion of the stored core keyboard
+description and regenerates it based on the XKB description of the keyboard.
+</para>
+
+
+<para>
+The symbols associated with the XKB keyboard description appear in the order:
+</para>
+
+<literallayout class='monospaced'>
+G1L1 G1L2 G2L1 G2L2 G1L3-n G2L3-n G3L* G4L*
+</literallayout>
+
+<para>
+If the type associated with <emphasis>
+Group1</emphasis>
+ is width one, the second symbol is <emphasis>
+NoSymbol</emphasis>
+; if the type associated with <emphasis>
+Group2</emphasis>
+ is width one, the fourth symbol is <emphasis>
+NoSymbol</emphasis>
+.
+</para>
+
+
+<para>
+If a key has only one group but the keyboard has several, the symbols for
+<emphasis>
+Group1</emphasis>
+ are repeated for each group. For example, given a keyboard with three groups
+and a key with one group that contains the symbols { <emphasis>
+a A</emphasis>
+ }, the core protocol description would contain the six symbols: { <emphasis>
+a</emphasis>
+ <emphasis>
+A</emphasis>
+ <emphasis>
+a</emphasis>
+ <emphasis>
+A</emphasis>
+ <emphasis>
+a</emphasis>
+ <emphasis>
+A</emphasis>
+ }. As a slightly more complicated example, an XKB key which had a single width
+three group with the symbols { <emphasis>
+a</emphasis>
+ <emphasis>
+b</emphasis>
+ <emphasis>
+c</emphasis>
+ } would show up in the generated core protocol keyboard description with the
+symbols { <emphasis>
+a</emphasis>
+ <emphasis>
+b</emphasis>
+ <emphasis>
+a</emphasis>
+ <emphasis>
+b</emphasis>
+ <emphasis>
+c</emphasis>
+ <emphasis>
+c</emphasis>
+ <emphasis>
+a</emphasis>
+ <emphasis>
+b</emphasis>
+ <emphasis>
+c</emphasis>
+ } for a keyboard with three groups.
+</para>
+
+
+<para>
+The generated modifier mapping for a key contains all of the modifiers affected
+by all of the actions associated with the key plus all of the modifiers
+associated with any virtual modifiers bound to the key by the virtual modifier
+mapping. If any of the actions associated with a key affect any component of
+the keyboard group, any modifiers specified in any entry of the group
+compatibility map (see <link linkend='Group_Compatibility_Map'>Group
+Compatibility Map</link>) are reported in the modifier mask. The <emphasis>
+SA_ISOLock</emphasis>
+ action can theoretically affect any modifier, but the modifier map of an
+<emphasis>
+SA_ISOLock</emphasis>
+ key contains only the modifiers or group state that it sets by default.
+</para>
+
+
+<para>
+The server notifies interested clients of keyboard map changes in one of two
+ways. It sends <emphasis>
+XkbMapNotify</emphasis>
+ to clients that have explicitly selected them and core protocol <emphasis>
+MappingNotify</emphasis>
+ events to clients that have not. Once a client requests <emphasis>
+XkbMapNotify</emphasis>
+ events, the server stops sending it <emphasis>
+MappingNotify</emphasis>
+ events to inform it of keyboard changes.
+</para>
+
+
+</sect1>
+<sect1 id='Sending_Events_to_Clients'>
+<title>Sending Events to Clients</title>
+
+<para>
+XKB normally assumes that events sent to clients using the core protocol
+<emphasis>
+SendEvent</emphasis>
+ request contain a core protocol state, if applicable. If the client which will
+receive the event is not XKB-capable, XKB attempts to convert the core state to
+an XKB state as follows: if any of the modifiers bound to <emphasis>
+Group2</emphasis>
+ in the group compatibility map are set in the event state, XKB clears them in
+the resulting event but sets the effective group in the event state to
+<emphasis>
+Group2</emphasis>
+.
+</para>
+
+
+<para>
+If the <emphasis>
+PCF_SendEventUsesXKBState</emphasis>
+ per-client flag is set at the time of the SendEvent request, XKB instead
+assumes that the event reported in the event is an XKB state. If the receiving
+client is not XKB-aware, the extension converts the XKB state (which contains
+the effective state in bits 13-14) to a core state by applying the group
+compatibility map just as it would for actual key events.
+</para>
+
+</sect1>
+</chapter>
diff --git a/specs/ch13.xml b/specs/ch13.xml
new file mode 100644
index 0000000..25fa96d
--- /dev/null
+++ b/specs/ch13.xml
@@ -0,0 +1,442 @@
+<chapter id='The_Server_Database_of_Keyboard_Components'>
+<title>The Server Database of Keyboard Components</title>
+
+<para>
+The X server maintains a database of keyboard components and common keyboard
+mappings. This database contains five kinds of components; when combined, these
+five components provide a complete description of a keyboard and its behavior.
+</para>
+
+
+<para>
+The X Keyboard Extension provides requests to list the contents of this
+database, to assemble and complete keyboard descriptions by merging the current
+keyboard description with the contents of this database, or to replace the
+current keyboard description with a complete keyboard description assembled as
+described below.
+</para>
+
+<sect1 id='Component_Names'>
+<title>Component Names</title>
+
+<para>
+Component and keymap names have the form "<emphasis>
+class</emphasis>
+(<emphasis>
+member</emphasis>
+)" where <emphasis>
+class</emphasis>
+ describes a subset of the available components for a particular type and the
+optional <emphasis>
+member</emphasis>
+ identifies a specific component from that subset. For example, the name
+"atlantis(acme)" might specify the symbols used for the atlantis national
+keyboard layout by the vendor "acme." Each class has an optional <emphasis>
+default</emphasis>
+ member — references which specify a class but not a member refer to the
+default member of the class, if one exists.
+</para>
+
+
+<para>
+The <emphasis>
+class</emphasis>
+ and <emphasis>
+member</emphasis>
+ names are both specified using characters from the Latin-1 character set. XKB
+implementations must accept all alphanumeric characters, minus (‘-’) and
+underscore (‘_’) in class or member names, and must not accept parentheses,
+plus, vertical bar, percent sign, asterisk, question mark or white space. The
+use of other characters is implementation-dependent.
+</para>
+
+
+</sect1>
+<sect1 id='Partial_Components_and_Combining_Multiple_Components'>
+<title>Partial Components and Combining Multiple Components</title>
+
+<para>
+Some of the elements in the server database contain describe only a piece of
+the corresponding keyboard component. These <emphasis>
+partial</emphasis>
+ components should be combined with other components of the same type to be
+useful.
+</para>
+
+
+<para>
+For example, a partial symbols map might describe the differences between a
+common ASCII keyboard and some national layout. Such a partial map is not
+useful on its own because it does not include those symbols that are the same
+on both the ASCII and national layouts (such as function keys). On the other
+hand, this partial map can configure <emphasis>
+any</emphasis>
+ ASCII keyboard to use a national layout.
+</para>
+
+
+<para>
+Two components can be combined in two ways:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If the second component <emphasis>
+overrides</emphasis>
+ the first, any definitions that are present in both components are taken from
+the second.
+ </para>
+</listitem>
+<listitem>
+ <para>If the second component <emphasis>
+augments</emphasis>
+ the first, any definitions that are present in both components are taken from
+the first.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Applications can use a <emphasis>
+component expression</emphasis>
+ to combine multiple components of some time into a complete description of
+some aspect of the keyboard. A component expression is a string which lists the
+components to be combined separated by operators which specify the rules for
+combining them. A complete description is assembled from the listed components,
+left to right, as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If the new elements are being merged with an existing map, the special
+component name ‘%’ refers to the unmodified value of the map.
+ </para>
+</listitem>
+<listitem>
+ <para>The ‘+’ operator specifies that the next specified component should
+override the current assembled definition.
+ </para>
+</listitem>
+<listitem>
+ <para>The ‘|’ operator specifies that the next specified component should
+augment the currently assembled definition.
+ </para>
+</listitem>
+<listitem>
+ <para>If the new elements are being merged with an existing map and the
+component expression begins with an operator, a leading ‘%’ is implied.
+ </para>
+</listitem>
+<listitem>
+ <para>If any unknown or illegal characters appear anywhere in the string, the
+entire expression is invalid and is ignored.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+For example, the component expression "+de" specifies that the default element
+of the "de" map should be applied to the current keyboard mapping, overriding
+any existing definitions.
+</para>
+
+
+<para>
+A slightly more involved example: the expression
+"acme(ascii)+de(basic)|iso9995-3" constructs a German (de) mapping for the
+ASCII keyboard supplied by the "acme" vendor. The new definition begins with
+the symbols for the default ASCII keyboard for Acme, overrides them with any
+keys that are defined for the default German keyboard layout and then applies
+the definitions from the iso9995-3 to any undefined keys or groups of keys
+(part three of the iso9995 standard defines a common set of bindings for the
+secondary group, but allows national layouts to override those definitions
+where necessary).
+</para>
+
+
+</sect1>
+<sect1 id='Component_Hints'>
+<title>Component Hints</title>
+
+<para>
+Each component has a set of flags that provide some additional hints about that
+component. XKB provides these hints for clients that present the keyboard
+database to users and specifies their interpretation only loosely. Clients can
+use these hints to constrain the list of components or to control the way that
+components are presented to the user.
+</para>
+
+
+<para>
+Hints for a component are reported with its name. The least significant byte of
+the hints field has the same meaning for all five types of keyboard components,
+and can contain any combination of the following values:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Flag</entry>
+ <entry>Meaning</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+LC_Hidden</emphasis>
+</entry>
+ <entry>Indicates a component that should not normally be presented to the
+user.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+LC_Default</emphasis>
+</entry>
+ <entry>Indicates a component that is the default member of its
+class.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+LC_Partial</emphasis>
+</entry>
+ <entry>Indicates a partial component.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The interpretation of the most significant byte of the hints field is dependent
+on the type of component. The hints defined for each kind of component are
+listed in the section below that describes that kind of component.
+</para>
+
+
+</sect1>
+<sect1 id='Keyboard_Components'>
+<title>Keyboard Components</title>
+
+<para>
+The five types of components stored in the server database of keyboard
+components correspond to the <emphasis>
+symbols</emphasis>
+, <emphasis>
+geometry</emphasis>
+, <emphasis>
+keycodes</emphasis>
+, <emphasis>
+compat</emphasis>
+ and <emphasis>
+types</emphasis>
+ symbolic names associated with a keyboard.
+</para>
+
+</sect1>
+<sect1 id='The_Keycodes_Component'>
+<title>The Keycodes Component</title>
+
+<para>
+The <emphasis>
+keycodes</emphasis>
+ component of a keyboard mapping specifies the range and interpretation of the
+raw keycodes reported by the device. It sets the <emphasis>
+keycodes</emphasis>
+ symbolic name, the minimum and maximum legal keycodes for the keyboard, and
+the symbolic name for each key. The keycodes component might also contain
+aliases for some keys, symbolic names for some indicators, and a description of
+which indicators are physically present.
+</para>
+
+
+<para>
+The special keycodes component named "computed" indicates that XKB should
+assign unused keycodes to any unknown keys referenced by name by any of the
+other components. The computed keycodes component is useful primarily when
+browsing keymaps because it makes it possible to use the symbols and geometry
+components without having to find a set of keycodes that includes keycode
+definitions for all of the keys listed in the two components.
+</para>
+
+
+<para>
+XKB defines no hints that are specific to the keycodes component.
+</para>
+
+
+<sect2 id='The_Types_Component'>
+<title>The Types Component</title>
+
+<para>
+The <emphasis>
+types</emphasis>
+ component of a keyboard mapping specifies the key types that can be associated
+with the various keyboard keys. It affects the <emphasis>
+types</emphasis>
+ symbolic name and the list of types associated with the keyboard (see
+<link linkend='Key_Types'>Key Types</link>). The types component
+of a keyboard mapping can also optionally contain real modifier bindings and
+symbolic names for one or more virtual modifiers.
+</para>
+
+
+<para>
+The special types component named "canonical" always contains the types and
+definitions listed in <link linkend="canonical_key_types">Canonical Key Types</link> of this document.
+</para>
+
+
+<para>
+XKB defines no hints that are specific to the types component.
+</para>
+
+
+</sect2>
+<sect2 id='The_Compatibility_Map_Component'>
+<title>The Compatibility Map Component</title>
+
+<para>
+The <emphasis>
+compatibility map</emphasis>
+ component of a keyboard mapping primarily specifies the rules used to assign
+actions to keysyms. It affects the <emphasis>
+compat</emphasis>
+ symbolic name, the symbol compatibility map and the group compatibility map.
+The compat component might also specify maps for some indicators and the real
+modifier bindings and symbolic names of some virtual modifiers.
+</para>
+
+
+<para>
+XKB defines no hints that are specific to the compatibility map component.
+</para>
+
+
+</sect2>
+<sect2 id='The_Symbols_Component'>
+<title>The Symbols Component</title>
+
+<para>
+The <emphasis>
+symbols</emphasis>
+ component of a keyboard mapping specifies primarily the symbols bound to each
+keyboard key. It affects the <emphasis>
+symbols</emphasis>
+ symbolic name, a key symbol mapping for each key, they keyboard modifier
+mapping, and the symbolic names for the keyboard symbol groups. Optionally, the
+<emphasis>
+symbols</emphasis>
+ component can contain explicit actions and behaviors for some keys, or the
+real modifier bindings and symbolic names for some virtual modifiers.
+</para>
+
+
+<para>
+XKB defines the following additional hints for the symbols component:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Flag</entry>
+ <entry>Meaning</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+LC_AlphanumericKeys</emphasis>
+</entry>
+ <entry>Indicates a symbol component that contains bindings primarily for an
+alphanumeric section of the keyboard.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+LC_ModifierKeys</emphasis>
+</entry>
+ <entry>Indicates a symbol component that contains bindings primarily for
+modifier keys.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+LC_KeypadKeys</emphasis>
+</entry>
+ <entry>Indicates a symbol component that contains bindings primarily for
+numeric keypad keys.</entry>
+ </row>
+ <row>
+ <entry>LC_FunctionKeys</entry>
+ <entry>Indicates a symbol component that contains bindings primarily for
+function keys.</entry>
+ </row>
+ <row>
+ <entry>LC_AlternateGroup</entry>
+ <entry>Indicates a symbol component that contains bindings for an alternate
+keyboard group.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+These hints only apply to partial symbols components; full symbols components
+are assumed to specify all of the pieces listed above.
+</para>
+
+<note><para>The alphanumeric, modifier, keypad or function keys hints should
+describe the primary intent of the component designer and should not simply an
+exhaustive list of the kinds of keys that are affected. For example, national
+keyboard layouts affect primarily alphanumeric keys, but many affect a few
+modifier keys too; such mappings should set only <emphasis>
+LC_AlphanumericKeys</emphasis>
+ hint. In general, symbol components should set only one of those four flags
+(though <emphasis>
+LC_AlternateGroup</emphasis>
+ may be combined with any of the other flags).</para></note>
+
+</sect2>
+<sect2 id='The_Geometry_Component'>
+<title>The Geometry Component</title>
+
+<para>
+The <emphasis>
+geometry</emphasis>
+ component of a keyboard mapping specifies primarily the geometry of the
+keyboard. It contains the geometry symbolic name and the keyboard geometry
+description. The geometry component might also contain aliases for some keys or
+symbolic names for some indicators and might affect the set of indicators that
+are physically present. Key aliases defined in the geometry component of a
+keyboard mapping override those defined in the keycodes component.
+</para>
+
+
+<para>
+XKB defines no hints that are specific to the geometry component.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='Complete_Keymaps'>
+<title>Complete Keymaps</title>
+
+<para>
+The X server also reports a set of fully specified keymaps. The keymaps
+specified in this list are usually assembled from the components stored in the
+rest of the database and typically represent the most commonly used keymaps for
+a particular system.
+</para>
+
+
+<para>
+XKB defines no hints that are specific to complete keymaps.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch14.xml b/specs/ch14.xml
new file mode 100644
index 0000000..6a2f45a
--- /dev/null
+++ b/specs/ch14.xml
@@ -0,0 +1,94 @@
+<chapter id='Replacing_the_Keyboard_On_the_Fly'>
+<title>Replacing the Keyboard "On-the-Fly"</title>
+
+<para>
+XKB supports the <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event, which reports a change in keyboard geometry or the range of supported
+keycodes. The server can generate an <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event when it detects a new keyboard, or in response to an <emphasis>
+XkbGetKeyboardByName</emphasis>
+ request (see <link linkend='Using_the_Servers_Database_of_Keyboard_Components'>Using the Server’s
+Database of Keyboard Components</link>) which loads a new keyboard description.
+</para>
+
+
+<para>
+When a client opens a connection to the X server, the server reports the
+minimum and maximum keycodes. If the range of supported keycodes is changed,
+XKB keeps track of the minimum and maximum keycodes that were reported to each
+client and filters out any events that fall outside of that range. Note that
+these events are simply ignored; they are not delivered to some other client.
+</para>
+
+
+<para>
+When the server sends an <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event to a client to inform it of the new keycode range, XKB resets the stored
+range of legal keycodes to the keycode range reported in the event. Non-XKB
+clients and XKB-aware clients that do not request <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ events never receive events from keys that fall outside of the legal range
+that XKB maintains for that client.
+</para>
+
+
+<para>
+When a client requests <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ events, the server compares the range of keycodes for the current keyboard to
+the range of keycodes that are valid for the client. If they are not the same,
+the server immediately sends that client an <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event. Even if the "new" keyboard is not new to the server, it is new to this
+particular client.
+</para>
+
+
+<para>
+In addition to filtering out-of-range key events, XKB:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Adjusts core protocol <emphasis>
+MappingNotify</emphasis>
+ events to refer only to keys that match the stored legal range.
+ </para>
+</listitem>
+<listitem>
+ <para>Reports keyboard mappings for keys that match the stored legal range to
+clients that issue a core protocol <emphasis>
+GetKeyboardMapping</emphasis>
+ request.
+ </para>
+</listitem>
+<listitem>
+ <para>Reports modifier mappings only for keys that match the stored legal
+range to clients that issue a core protocol <emphasis>
+GetModifierMapping</emphasis>
+ request.
+ </para>
+</listitem>
+<listitem>
+ <para>Restricts the core protocol <emphasis>
+ChangeKeyboardMapping</emphasis>
+ and <emphasis>
+SetModifierMapping</emphasis>
+ requests to keys that fall inside the stored legal range.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+In short, XKB does everything possible to hide the fact that the range of legal
+keycodes has changed from clients non-XKB clients, which cannot be expected to
+deal with it. The corresponding XKB events and requests do <emphasis>
+not</emphasis>
+ pay attention to the legal keycode range in the same way because XKB makes it
+possible for clients to track changes to the keycode range for a device and
+respond to them.
+</para>
+</chapter>
diff --git a/specs/ch15.xml b/specs/ch15.xml
new file mode 100644
index 0000000..d3e47d0
--- /dev/null
+++ b/specs/ch15.xml
@@ -0,0 +1,233 @@
+<chapter id='Interactions_Between_XKB_and_the_X_Input_Extension'>
+<title>Interactions Between XKB and the X Input Extension</title>
+
+<para>
+All XKB interactions with the input extension are optional; implementors are
+free to restrict the effects of the X Keyboard Extension to the core keyboard
+device. The <emphasis>
+XkbGetExtensionDeviceInfo</emphasis>
+ request reports whether or not an XKB implementation supports a particular
+capability for input extension devices.
+</para>
+
+
+<para>
+XKB recognizes the following interactions with the X Input Extension:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='3.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Name</entry>
+ <entry>Capability</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>XI_Keyboards</entry>
+ <entry>If set, applications can use all XKB requests and events with
+extension keyboards.</entry>
+ </row>
+ <row>
+ <entry>XI_ButtonActions</entry>
+ <entry>If set, clients can assign key actions to buttons, even on input
+extension devices that are not keyboards.</entry>
+ </row>
+ <row>
+ <entry>XI_IndicatorNames</entry>
+ <entry>If set, clients can assign names to indicators on non-keyboard
+extension devices.</entry>
+ </row>
+ <row>
+ <entry>XI_IndicatorMaps</entry>
+ <entry>If set, clients can assign indicator maps to indicators on
+non-keyboard extension devices. </entry>
+ </row>
+ <row>
+ <entry>XI_IndicatorState</entry>
+ <entry>If set, clients can change the state of device indicators using the
+<emphasis>
+XkbSetExtensionDeviceInfo</emphasis>
+ request.</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Attempts to use an XKB feature with an extension device fail with a <emphasis>
+Keyboard</emphasis>
+ error if the server does not support the <emphasis>
+XkbXI_Keyboards</emphasis>
+ optional feature. If a capability particular capability other than <emphasis>
+XkbXI_Keyboards</emphasis>
+ is not supported, attempts to use it fail silently. The replies for most
+requests that can use one of the other optional features include a field to
+report whether or not the request was successful, but such requests do not
+cause an error condition.
+</para>
+
+
+<para>
+Clients can also request an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event. This event notifies interested clients of changes to any of the
+supported XKB features for extension devices, or if a request from the client
+that is receiving the event attempted to use an unsupported feature.
+</para>
+
+<sect1 id='Using_XKB_Functions_with_Input_Extension_Keyboards'>
+<title>Using XKB Functions with Input Extension Keyboards</title>
+
+<para>
+All XKB requests and events include a device identifier which can refer to an
+input extension <emphasis>
+KeyClass</emphasis>
+ device, if the implementation allows XKB to control extension devices. If the
+implementation does not support XKB manipulation of extension devices, the
+device identifier is ignored but it must be either <emphasis>
+0</emphasis>
+ or <emphasis>
+UseCoreKbd</emphasis>
+.
+</para>
+
+
+<para>
+Implementations which do not support the use of XKB functions with extension
+keyboards must not set the <emphasis>
+XkbXI_Keyboards</emphasis>
+ flag. Attempts to use XKB features on an extension keyboard with an
+implementation that does not support this feature yield a <emphasis>
+Keyboard</emphasis>
+ error.
+</para>
+
+
+</sect1>
+<sect1 id='Pointer_and_Device_Button_Actions'>
+<title>Pointer and Device Button Actions</title>
+
+<para>
+The XKB extension optionally allows clients to assign any key action (see
+<link linkend='Key_Actions'>Key Actions</link>) to core
+pointer or input extension device buttons. This makes it possible to control
+the keyboard or generate keyboard key events from extension devices or from the
+core pointer.
+</para>
+
+
+<para>
+XKB implementations are required to support actions for the buttons of the core
+pointer device, but support for actions on extension devices is optional.
+Implementations which do not support button actions for extension devices must
+not set the <emphasis>
+XkbXI_ButtonActions</emphasis>
+ flag.
+</para>
+
+
+<para>
+Attempts to query or assign button actions with an implementation that does not
+support this feature report failure in the request reply and might cause the
+server to send an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event to the client which issued the request that failed. Such requests never
+cause an error condition.
+</para>
+
+
+</sect1>
+<sect1 id='Indicator_Maps_for_Extension_Devices'>
+<title>Indicator Maps for Extension Devices</title>
+
+<para>
+The XKB extension allows applications to assign indicator maps to the
+indicators of non-keyboard extension devices. If supported, maps can be
+assigned to all extension device indicators, whether they are part of a
+keyboard feedback or part of an indicator feedback.
+</para>
+
+
+<para>
+Implementations which do not support indicator maps for extension devices must
+not set the <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+ flag.
+</para>
+
+
+<para>
+Attempts to query or assign indicator maps with an implementation that does not
+support this feature report failure in the request reply and might cause the
+server to send an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event to the client which issued the request that failed. Such requests never
+cause an error condition.
+</para>
+
+
+<para>
+If this feature is supported, the maps for the default indicators on the core
+keyboard device are visible both as extension indicators and as the core
+indicators. Changes made with <emphasis>
+XkbSetDeviceInfo</emphasis>
+ are visible via <emphasis>
+XkbGetIndicatorMap</emphasis>
+ and changes made with <emphasis>
+XkbSetIndicatorMap</emphasis>
+ are visible via <emphasis>
+XkbGetDeviceInfo</emphasis>
+.
+</para>
+
+
+</sect1>
+<sect1 id='Indicator_Names_for_Extension_Devices'>
+<title>Indicator Names for Extension Devices</title>
+
+<para>
+The XKB extension allows applications to assign symbolic names to the
+indicators of non-keyboard extension devices. If supported, symbolic names can
+be assigned to all extension device indicators, whether they are part of a
+keyboard feedback or part of an indicator feedback.
+</para>
+
+
+<para>
+Implementations which do not support indicator maps for extension devices must
+not set the <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+ flag.
+</para>
+
+
+<para>
+Attempts to query or assign indicator names with an implementation that does
+not support this feature report failure in the request reply and might cause
+the server to send an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event to the client which issued the request that failed. Such requests never
+cause an error condition.
+</para>
+
+
+<para>
+If this feature is supported, the names for the default indicators on the core
+keyboard device are visible both as extension indicators and as the core
+indicators. Changes made with <emphasis>
+XkbSetDeviceInfo</emphasis>
+ are visible via <emphasis>
+XkbGetNames</emphasis>
+ and changes made with <emphasis>
+XkbSetNames</emphasis>
+ are visible via <emphasis>
+XkbGetDeviceInfo</emphasis>
+.
+</para>
+</sect1>
+</chapter>
diff --git a/specs/ch16.xml b/specs/ch16.xml
new file mode 100644
index 0000000..6044843
--- /dev/null
+++ b/specs/ch16.xml
@@ -0,0 +1,9427 @@
+
+<chapter id='XKB_Protocol_Requests'>
+<title>XKB Protocol Requests</title>
+
+<para>
+This document uses the syntactic conventions and common types defined by the
+specification of the core X protocol with a number of additions, which are
+detailed below.
+</para>
+
+<sect1 id='Errors'>
+<title>Errors</title>
+
+<para>
+If a client attempts to use any other XKB request except <emphasis>
+XkbUseExtension</emphasis>
+ before the extension is properly initialized, XKB reports an <emphasis>
+Access</emphasis>
+ error and ignores the request. XKB is properly initialized once <emphasis>
+XkbUseExtension</emphasis>
+ reports that the client has asked for a supported or compatible version of the
+extension.
+</para>
+
+
+<sect2 id='Keyboard_Errors'>
+<title>Keyboard Errors</title>
+
+<para>
+In addition to all of the errors defined by the core protocol, the X Keyboard
+Extension defines a single error, <emphasis>
+Keyboard</emphasis>
+, which indicates that some request specified an illegal device identifier or
+an extension device that is not a member of an appropriate. Unless otherwise
+noted, any request with an argument of type KB_DEVICESPEC can cause <emphasis>
+Keyboard</emphasis>
+ errors if an illegal or inappropriate device is specified.
+</para>
+
+
+<para>
+When the extension reports a Keyboard error, the most significant byte of the
+<emphasis>
+resource_id</emphasis>
+ is a further refinement of the error cause, as defined in the table below. The
+least significant byte contains the device, class, or feedback id as indicated:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='4' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='2.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='3.0*'/>
+<colspec colname='c4' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>high-order byte</entry>
+ <entry>value</entry>
+ <entry>meaning</entry>
+ <entry>low-order byte</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>XkbErr_BadDevice</entry>
+ <entry>0xff</entry>
+ <entry>device not found</entry>
+ <entry>device id</entry>
+ </row>
+ <row>
+ <entry>XkbErr_BadClass</entry>
+ <entry>0xfe</entry>
+ <entry>device found, but is the wrong class</entry>
+ <entry>class id</entry>
+ </row>
+ <row>
+ <entry>XkbErr_BadId</entry>
+ <entry>0xfd</entry>
+ <entry>device found, class ok, but device does not have a feedback with the
+indicated id</entry>
+ <entry>feedback id</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect2>
+<sect2 id='Side_Effects_of_Errors'>
+<title>Side-Effects of Errors</title>
+
+<para>
+With the exception of <emphasis>
+Alloc</emphasis>
+ or <emphasis>
+Implementation</emphasis>
+ errors, which might result in an inconsistent internal state, no XKB request
+that reports an error condition has any effect. Unless otherwise stated,
+requests which update some aspect of the keyboard description will not apply
+only part of a request — if part of a request fails, the whole thing is
+ignored.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='Common_Types'>
+<title>Common Types</title>
+
+<para>
+The following types are used in the request and event definitions in subsequent
+sections:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="auto" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>LISTofITEMs</entry>
+ <entry> The type LISTofITEMs is special. It is similar to the
+LISTofVALUE defined by the core protocol, but the elements of a LISTofITEMs are
+not necessarily all the same size. The use of a BITMASK to indicate which
+members are present is optional for a LISTofITEMs — it is possible for the
+set of elements to be derived from one or more fields of the request.</entry>
+ </row>
+ <row>
+ <entry>KB_DEVICESPEC</entry>
+ <entry>8 bit unsigned integer, <emphasis>
+UseCoreKbd, or UseCorePtr</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>KB_LEDCLASSSPEC</entry>
+ <entry>{ <emphasis>
+KbdFeedbackClass</emphasis>
+, <emphasis>
+LedFeedbackClass</emphasis>
+, <emphasis>
+DfltXIClass</emphasis>
+, <emphasis>
+AllXIClasses</emphasis>
+, <emphasis>
+XINone</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_BELLCLASSSPEC</entry>
+ <entry>{ <emphasis>
+KbdFeedbackClass</emphasis>
+, <emphasis>
+BellFeedbackClass</emphasis>
+, <emphasis>
+DfltXIClass</emphasis>
+, <emphasis>
+AllXIClasses</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_IDSPEC</entry>
+ <entry>8 bit unsigned integer or <emphasis>
+DfltXIId</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>KB_VMODMASK</entry>
+ <entry> CARD16, each bit corresponds to a virtual modifier</entry>
+ </row>
+ <row>
+ <entry>KB_GROUPMASK</entry>
+ <entry>{ <emphasis>
+Group1</emphasis>
+, <emphasis>
+Group2</emphasis>
+, <emphasis>
+Group3</emphasis>
+, <emphasis>
+Group4</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_GROUPSWRAP</entry>
+ <entry>{ <emphasis>
+WrapIntoRange</emphasis>
+, <emphasis>
+ClampIntoRange</emphasis>
+, <emphasis>
+RedirectIntoRange</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_GROUPINFO</entry>
+ <entry>{ groupsWrap: KB_GROUPSWRAP
+redirectGroup: 1…4,
+numGroups: 1…4 }</entry>
+ </row>
+ <row>
+ <entry>KB_NKNDETAILSMASK</entry>
+ <entry>{ <emphasis>
+NKN_Keycodes</emphasis>
+, NKN_Geometry, <emphasis>
+NKN_DeviceID</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_STATEMASK</entry>
+ <entry> KEYBUTMASK or KB_GROUPMASK</entry>
+ </row>
+ <row>
+ <entry>KB_STATEPARTMASK</entry>
+ <entry>{ <emphasis>
+ModifierState</emphasis>
+, <emphasis>
+ModifierBase</emphasis>
+, <emphasis>
+ModifierLatch</emphasis>
+, <emphasis>
+ModifierLock</emphasis>
+, <emphasis>
+GroupState</emphasis>
+, <emphasis>
+GroupBase</emphasis>
+, <emphasis>
+GroupLatch</emphasis>
+, <emphasis>
+GroupLock</emphasis>
+, <emphasis>
+CompatState</emphasis>
+, <emphasis>
+GrabMods</emphasis>
+, <emphasis>
+CompatGrabMods</emphasis>
+, <emphasis>
+LookupMods</emphasis>
+, <emphasis>
+CompatLookupMods</emphasis>
+, <emphasis>
+PointerButtons</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_BOOLCTRLMASK</entry>
+ <entry>{ <emphasis>
+RepeatKeys</emphasis>
+, <emphasis>
+SlowKeys</emphasis>
+, <emphasis>
+BounceKeys</emphasis>
+, <emphasis>
+StickyKeys</emphasis>
+, <emphasis>
+MouseKeys</emphasis>
+, <emphasis>
+MouseKeysAccel</emphasis>
+, <emphasis>
+AccessXKeys</emphasis>
+, <emphasis>
+AccessXTimeout</emphasis>
+, <emphasis>
+AccessXFeedback</emphasis>
+, <emphasis>
+AudibleBell</emphasis>
+, <emphasis>
+Overlay1</emphasis>
+, <emphasis>
+Overlay2</emphasis>
+, <emphasis>
+IgnoreGroupLock</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_CONTROLSMASK</entry>
+ <entry>{ <emphasis>
+GroupsWrap, InternalMods</emphasis>
+, <emphasis>
+IgnoreLockMods</emphasis>
+, <emphasis>
+PerKeyRepeat</emphasis>
+, <emphasis>
+ControlsEnabled</emphasis>
+ } or KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry>KB_MAPPARTMASK</entry>
+ <entry>{ <emphasis>
+KeyTypes</emphasis>
+, <emphasis>
+KeySyms</emphasis>
+, <emphasis>
+ModifierMap</emphasis>
+, <emphasis>
+ExplicitComponents</emphasis>
+, <emphasis>
+KeyActions</emphasis>
+, <emphasis>
+KeyBehaviors</emphasis>
+, <emphasis>
+VirtualMods</emphasis>
+, <emphasis>
+VirtualModMap</emphasis>
+}</entry>
+ </row>
+ <row>
+ <entry>KB_CMDETAILMASK</entry>
+ <entry>{ <emphasis>
+SymInterp</emphasis>
+, <emphasis>
+GroupCompat</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_NAMEDETAILMASK</entry>
+ <entry>{ <emphasis>
+KeycodesName</emphasis>
+, <emphasis>
+GeometryName</emphasis>
+, <emphasis>
+SymbolsName</emphasis>
+,
+ <emphasis>
+PhysSymbolsName</emphasis>
+, <emphasis>
+TypesName</emphasis>
+, <emphasis>
+CompatName</emphasis>
+, <emphasis>
+KeyTypeNames</emphasis>
+, <emphasis>
+KTLevelNames</emphasis>
+, <emphasis>
+IndicatorNames</emphasis>
+, <emphasis>
+KeyNames</emphasis>
+, <emphasis>
+KeyAliases</emphasis>
+, <emphasis>
+VirtualModNames</emphasis>
+, <emphasis>
+GroupNames</emphasis>
+, <emphasis>
+RGNames</emphasis>
+}</entry>
+ </row>
+ <row>
+ <entry>KB_AXNDETAILMASK</entry>
+ <entry>{ <emphasis>
+AXN_SKPress</emphasis>
+, <emphasis>
+AXN_SKAccept</emphasis>
+, <emphasis>
+AXN_SKReject</emphasis>
+, <emphasis>
+AXN_SKRelease, AXN_BKAccept, AXN_BKReject, AXN_AXKWarning </emphasis>
+}</entry>
+ </row>
+ <row>
+ <entry>KB_AXSKOPTSMASK</entry>
+ <entry>{ <emphasis>
+AX_TwoKeys</emphasis>
+, <emphasis>
+AX_LatchToLock</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_AXFBOPTSMASK</entry>
+ <entry>{ <emphasis>
+AX_SKPressFB</emphasis>
+, <emphasis>
+AX_SKAcceptFB</emphasis>
+, <emphasis>
+AX_FeatureFB</emphasis>
+, <emphasis>
+AX_SlowWarnFB</emphasis>
+, <emphasis>
+AX_IndicatorFB</emphasis>
+, <emphasis>
+AX_StickyKeysFB</emphasis>
+, <emphasis>
+AX_SKReleaseFB</emphasis>
+,<emphasis>
+ AX_SKRejectFB</emphasis>
+, <emphasis>
+AX_BKRejectFB</emphasis>
+, <emphasis>
+AX_DumbBellFB</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_AXOPTIONSMASK</entry>
+ <entry> KB_AXFBOPTSMASK or KB_AXSKOPTSMASK</entry>
+ </row>
+ <row>
+ <entry>KB_GBNDETAILMASK</entry>
+ <entry>{ <emphasis>
+GBN_Types</emphasis>
+, <emphasis>
+GBN_CompatMap</emphasis>
+, <emphasis>
+GBN_ClientSymbols</emphasis>
+, <emphasis>
+GBN_ServerSymbols</emphasis>
+, <emphasis>
+GBN_IndicatorMap</emphasis>
+, <emphasis>
+GBN_KeyNames</emphasis>
+, <emphasis>
+GBN_Geometry</emphasis>
+, <emphasis>
+GBN_OtherNames</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_BELLDETAILMASK</entry>
+ <entry>{ <emphasis>
+XkbAllBellNotifyEvents</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_MSGDETAILMASK</entry>
+ <entry>{ <emphasis>
+XkbAllActionMessages</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_EVENTTYPE</entry>
+ <entry>{ <emphasis>
+XkbNewKeyboardNotify</emphasis>
+, <emphasis>
+XkbMapNotify</emphasis>
+, <emphasis>
+XkbStateNotify</emphasis>
+, <emphasis>
+XkbControlsNotify</emphasis>
+, <emphasis>
+XkbIndicatorStateNotify</emphasis>
+, <emphasis>
+XkbIndicatorMapNotify</emphasis>
+, <emphasis>
+XkbNamesNotify</emphasis>
+, <emphasis>
+XkbCompatMapNotify</emphasis>
+, <emphasis>
+XkbBellNotify</emphasis>
+, <emphasis>
+XkbActionMessage</emphasis>
+, <emphasis>
+XkbAccessXNotify</emphasis>
+, <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_ACTION</entry>
+ <entry>[ type: CARD8
+data: LISTofCARD8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_BEHAVIOR</entry>
+ <entry>[ type: CARD8, data: CARD 8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_MODDEF</entry>
+ <entry>[ mask: KEYMASK,
+mods: KEYMASK,
+vmods: KB_VMODMASK ]</entry>
+ </row>
+ <row>
+ <entry>KB_KTMAPENTRY</entry>
+ <entry>[ active: BOOL,
+level: CARD8,
+mods: KB_MODDEF ]</entry>
+ </row>
+ <row>
+ <entry>KB_KTSETMAPENTRY</entry>
+ <entry>[ level: CARD8,
+mods: KB_MODDEF ]</entry>
+ </row>
+ <row>
+ <entry>KB_KEYTYPE</entry>
+ <entry>[ mods: KB_MODDEF,
+numLevels: CARD8,
+map: LISTofKB_KTMAPENTRY,
+preserve: LISTofKB_MODDEF ]</entry>
+ </row>
+ <row>
+ <entry>KB_SETKEYTYPE</entry>
+ <entry>[ realMods: KEYMASK,
+vmods: CARD16,
+numLevels: CARD8,
+map: LISTofKB_KTSETMAPENTRY,
+preserve: LISTofKB_MODDEF ]</entry>
+ </row>
+ <row>
+ <entry>KB_KEYSYMMAP</entry>
+ <entry>[ ktIndex: LISTofCARD8, width: CARD8
+ numGroups: 0…4,
+ groupsWrap: KB_GROUPSWRAP,
+ redirectGroup: 0…3,
+ syms: LISTofKEYSYM ]</entry>
+ </row>
+ <row>
+ <entry>KB_KEYVMODMAP</entry>
+ <entry>[ key: KEYCODE, vmods: CARD16 ]</entry>
+ </row>
+ <row>
+ <entry>KB_KEYMODMAP</entry>
+ <entry>[ key: KEYCODE, mods: KEYMASK ]</entry>
+ </row>
+ <row>
+ <entry>KB_EXPLICITMASK</entry>
+ <entry>{ <emphasis>
+ExplicitKeyType1</emphasis>
+, <emphasis>
+ExplicitKeyType2</emphasis>
+, <emphasis>
+ExplicitKeyType3</emphasis>
+, <emphasis>
+ExplicitKeyType4</emphasis>
+, <emphasis>
+ExplicitInterpret</emphasis>
+, <emphasis>
+ExplicitAutoRepeat</emphasis>
+, <emphasis>
+ExplicitBehavior</emphasis>
+, <emphasis>
+ExplicitVModMap</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_INDICATORMASK</entry>
+ <entry> CARD32, each bit corresponds to an indicator</entry>
+ </row>
+ <row>
+ <entry>KB_IMFLAGS</entry>
+ <entry>{ <emphasis>
+IM_NoExplicit</emphasis>
+, <emphasis>
+IM_NoAutomatic</emphasis>
+, <emphasis>
+IM_LEDDrivesKB</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_IMMODSWHICH</entry>
+ <entry>{ <emphasis>
+IM_UseNone</emphasis>
+, <emphasis>
+IM_UseBase</emphasis>
+, <emphasis>
+IM_UseLatched</emphasis>
+, <emphasis>
+IM_UseLocked</emphasis>
+, <emphasis>
+IM_UseEffective</emphasis>
+, <emphasis>
+IM_UseCompat</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_IMGROUPSWHICH</entry>
+ <entry>{ <emphasis>
+IM_UseNone</emphasis>
+, <emphasis>
+IM_UseBase</emphasis>
+, <emphasis>
+IM_UseLatched</emphasis>
+, <emphasis>
+IM_UseLocked</emphasis>
+, <emphasis>
+IM_UseEffective</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_INDICATORMAP</entry>
+ <entry>[ flags: CARD8,
+mods: KB_MODDEF,
+whichMods:
+groups: KB_GROUPMASK,
+whichGroups:
+ctrls: KB_BOOLCTRLMASK ]</entry>
+ </row>
+ <row>
+ <entry>KB_SYMINTERPMATCH</entry>
+ <entry>{ <emphasis>
+SI_NoneOf</emphasis>
+, <emphasis>
+SI_AnyOfOrNone</emphasis>
+, <emphasis>
+SI_AnyOf</emphasis>
+, <emphasis>
+SI_AllOf</emphasis>
+, <emphasis>
+SI_Exactly</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_SYMINTERP</entry>
+ <entry>[ sym: KEYSYM,
+ mods; KEYMASK,
+ levelOneOnly: BOOL,
+ match: KB_SYMINTERPMATCH,
+ virtualMod: CARD8,
+ autoRepeat: BOOL,
+ lockingKey: BOOL ]</entry>
+ </row>
+ <row>
+ <entry>KB_PCFMASK</entry>
+ <entry>{ <emphasis>
+PCF_DetectableAutorepeat</emphasis>
+, <emphasis>
+PCF_GrabsUseXkbState</emphasis>
+, <emphasis>
+PCF_AutoResetControls</emphasis>
+, <emphasis>
+PCF_LookupStateWhenGrabbed</emphasis>
+, <emphasis>
+PCF_SendEventUsesXKBState</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_LCFLAGSMASK</entry>
+ <entry>{ <emphasis>
+LC_Hidden</emphasis>
+, <emphasis>
+LC_Default</emphasis>
+, <emphasis>
+LC_Partial</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_LCSYMFLAGSMASK</entry>
+ <entry>{ <emphasis>
+LC_AlphanumericKeys</emphasis>
+, <emphasis>
+LC_ModifierKeys</emphasis>
+, <emphasis>
+LC_KeypadKeys</emphasis>
+, <emphasis>
+LC_FunctionKeys</emphasis>
+, <emphasis>
+LC_AlternateGroup</emphasis>
+ }</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+These types are used by the <emphasis>
+XkbGetGeometry</emphasis>
+ and <emphasis>
+XkbSetGeometry</emphasis>
+ requests:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="auto" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>KB_PROPERTY</entry>
+ <entry>[ name, value: STRING8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_POINT</entry>
+ <entry>[ x, y: CARD16 ]</entry>
+ </row>
+ <row>
+ <entry>KB_OUTLINE</entry>
+ <entry>[ cornerRadius: CARD8, points: LISTofKB_POINT ]</entry>
+ </row>
+ <row>
+ <entry>KB_SHAPE</entry>
+ <entry>[ name: ATOM, outlines: LISTofKB_OUTLINE
+ primaryNdx, approxNdx: CARD8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_KEYNAME</entry>
+ <entry>[ name: LISTofCHAR ]</entry>
+ </row>
+ <row>
+ <entry>KB_KEYALIAS</entry>
+ <entry>[ real: LISTofCHAR, alias: LISTofCHAR ]</entry>
+ </row>
+ <row>
+ <entry>KB_KEY</entry>
+ <entry>[ name: KB_KEYNAME, gap: INT16,
+ shapeNdx, colorNdx: CARD8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_ROW</entry>
+ <entry>[ top, left: INT16, vertical: BOOL, keys LISTofKB_KEY ]</entry>
+ </row>
+ <row>
+ <entry>KB_OVERLAYKEY</entry>
+ <entry>[ over, under: KB_KEYNAME ]</entry>
+ </row>
+ <row>
+ <entry>KB_OVERLAYROW</entry>
+ <entry>[ rowUnder: CARD8, keys: LISTofKB_OVERLAYKEY ]</entry>
+ </row>
+ <row>
+ <entry>KB_OVERLAY</entry>
+ <entry>[ sectionUnder: CARD8,
+rows: LISTofKB_OVERLAYROW ]</entry>
+ </row>
+ <row>
+ <entry>KB_SHAPEDOODAD</entry>
+ <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
+ type: { SolidDoodad, OutlineDoodad },
+ angle: INT16, width, height: CARD16
+ colorNdx, shapeNdx: CARD8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_TEXTDOODAD</entry>
+ <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
+ angle: INT16, width, height: CARD16,
+ colorNdx: CARD8, text: STRING8, font: STRING8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_INDICATORDOODAD</entry>
+ <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
+angle: INT16,
+shapeNdx, onColorNdx, offColorNdx: CARD8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_LOGODOODAD</entry>
+ <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
+ angle: INT16, colorNdx, shapeNdx: CARD8,
+ logoName: STRING8 ]</entry>
+ </row>
+ <row>
+ <entry>KB_DOODAD</entry>
+ <entry>KB_SHAPEDOODAD, or KB_TEXTDOODAD, or KB_INDICATORDOODAD, or
+KB_LOGODOODAD</entry>
+ </row>
+ <row>
+ <entry>KB_SECTION</entry>
+ <entry>[ name: ATOM,
+ top, left, angle: INT16,
+ width, height: CARD16,
+ priority: CARD8,
+ rows: LISTofKB_ROW,
+ doodads: LISTofKB_DOODAD,
+ overlays: LISTofKB_OVERLAY ]</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+These types are used by <emphasis>
+XkbGetDeviceInfo</emphasis>
+ and <emphasis>
+XkbSetDeviceInfo</emphasis>
+:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>KB_XIDEVFEATUREMASK</entry>
+ <entry>{ <emphasis>
+XI_ButtonActions</emphasis>
+, <emphasis>
+XI_IndicatorNames</emphasis>
+, <emphasis>
+XI_IndicatorMaps</emphasis>
+, <emphasis>
+XI_IndicatorState</emphasis>
+ }</entry>
+ </row>
+ <row>
+ <entry>KB_XIFEATUREMASK</entry>
+ <entry>{ KB_XIDEVFEATURES or <emphasis>
+XI_Keyboards</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>KB_XIDETAILMASK</entry>
+ <entry> { KB_XIFEATURES or <emphasis>
+XI_UnsupportedFeature</emphasis>
+ <emphasis>
+}</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>KB_DEVICELEDINFO</entry>
+ <entry>[ ledClass: KB_LEDCLASSSPEC,
+ledID: KB_IDSPEC,
+physIndicators: CARD32,
+state: CARD32,
+names: LISTofATOM,
+maps: LISTofKB_INDICATORMAP ]</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+</sect1>
+<sect1 id='Requests'>
+<title>Requests</title>
+
+<para>
+This section lists all of the requests supported by the X Keyboard Extension,
+separated into categories of related requests.
+</para>
+
+
+<sect2 id='Initializing_the_X_Keyboard_Extension'>
+<title>Initializing the X Keyboard Extension</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbUseExtension</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>wantedMajor, wantedMinor: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+supported: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+serverMajor, serverMinor: CARD16</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request enables XKB extension capabilities for the client that issues the
+request; the <emphasis>
+wantedMajor</emphasis>
+ and <emphasis>
+wantedMinor</emphasis>
+ fields specify the extension version in use by the requesting client. The
+<emphasis>
+supported</emphasis>
+ field is <emphasis>
+True</emphasis>
+ if the server supports a compatible version, <emphasis>
+False</emphasis>
+ otherwise. The <emphasis>
+serverMajor</emphasis>
+ and <emphasis>
+serverMinor</emphasis>
+ fields return the actual version supported by the server.
+</para>
+
+
+<para>
+Until a client explicitly and successfully requests the XKB extension, an XKB
+capable server reports compatibility state in all core protocol events and
+requests. Once a client asks for XKB extension semantics by issuing this
+request, the server reports the extended XKB keyboard state in some core
+protocol events and requests, as described in the overview section of this
+specification.
+</para>
+
+
+<para>
+Clients should issue an <emphasis>
+XkbUseExtension</emphasis>
+ request before using any other extension requests.
+</para>
+
+
+</sect2>
+<sect2 id='Selecting_Events'>
+<title>Selecting Events</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSelectEvents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectWhich, clear, selectAll: KB_EVENTTYPE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectMap, map: KB_MAPPARTMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+details: LISTofITEMs</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request updates the event masks of the keyboard indicated by <emphasis>
+deviceSpec</emphasis>
+ for this client. If <emphasis>
+deviceSpec</emphasis>
+ specifies an illegal device, a <emphasis>
+Keyboard</emphasis>
+ error results.
+</para>
+
+
+<para>
+The <emphasis>
+affectMap</emphasis>
+ and <emphasis>
+map</emphasis>
+ fields specify changes to the event details mask for the <emphasis>
+XkbMapNotify</emphasis>
+ event. If any map components are set in <emphasis>
+map</emphasis>
+ but not in <emphasis>
+affectMap</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results. Otherwise, any map components that are set in <emphasis>
+affectMap</emphasis>
+ are set or cleared in the map notify details mask, depending on the value of
+the corresponding field in <emphasis>
+map</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+affectWhich</emphasis>
+, <emphasis>
+clear</emphasis>
+, and <emphasis>
+selectAll</emphasis>
+ fields specify changes to any other event details masks. If any event types
+are set in both <emphasis>
+clear</emphasis>
+ and <emphasis>
+selectAll</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results; if any event types are specified in either <emphasis>
+clear</emphasis>
+ or <emphasis>
+selectAll</emphasis>
+ but not in <emphasis>
+affectWhich</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results. Otherwise, the detail masks for any event types specified in
+the <emphasis>
+affectWhich</emphasis>
+ field of this request are changed as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If the event type is also set in <emphasis>
+clear</emphasis>
+, the detail mask for the corresponding event is set to <emphasis>
+0</emphasis>
+ or <emphasis>
+False</emphasis>
+, as appropriate.
+ </para>
+</listitem>
+<listitem>
+ <para>If the event type is also set in <emphasis>
+selectAll</emphasis>
+, the detail mask for the corresponding event is set to include all legal
+detail values for that type.
+ </para>
+</listitem>
+<listitem>
+ <para>If the event type is not set in either <emphasis>
+clear</emphasis>
+ or <emphasis>
+selectAll</emphasis>
+, the corresponding element of <emphasis>
+details</emphasis>
+ lists a set of explicit changes to the details mask for the event, as
+described below.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Each entry of the <emphasis>
+details</emphasis>
+ list specifies changes to the event details mask for a single type of event,
+and consists of an <emphasis>
+affects</emphasis>
+ mask and a <emphasis>
+values</emphasis>
+ mask. All details that are specified in <emphasis>
+affects</emphasis>
+ are set to the corresponding value from <emphasis>
+values</emphasis>
+; if any details are listed in <emphasis>
+values</emphasis>
+ but not in <emphasis>
+affects</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+The details list contains entries only for those event types, if any, that are
+listed in the <emphasis>
+affectWhich</emphasis>
+ mask and not in either <emphasis>
+clear</emphasis>
+ or <emphasis>
+selectAll</emphasis>
+. When present, the items of the <emphasis>
+details</emphasis>
+ list appear in the following order:
+</para>
+
+<informaltable frame='none'>
+<?dbfo keep-together="auto" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Event Type</entry>
+ <entry>Legal Details</entry>
+ <entry>Type</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+XkbNewKeyboardNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_NKNDETAILSMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD16</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbStateNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_STATEPARTMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD16</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbControlsNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_CONTROLMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD32</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbIndicatorMapNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_INDICATORMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD32</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbIndicatorStateNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_INDICATORMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD32</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbNamesNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_NAMEDETAILMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD16</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbCompatMapNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_CMDETAILMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD8</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbBellNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_BELLDETAILMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD8</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbActionMessage</emphasis>
+</entry>
+ <entry><emphasis>
+KB_MSGDETAILMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD8</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbAccessXNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_AXNDETAILMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD16</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbExtensionDeviceNotify</emphasis>
+</entry>
+ <entry><emphasis>
+KB_XIDETAILMASK</emphasis>
+</entry>
+ <entry><emphasis>
+CARD16</emphasis>
+</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Detail masks for event types that are not specified in <emphasis>
+affectWhich</emphasis>
+ are not changed.
+</para>
+
+
+<para>
+If any components are specified in a client’s event masks, the X server sends
+the client an appropriate event whenever any of those components change state.
+Unless explicitly modified, all event detail masks are empty. <link linkend='Events'>Events</link> describes all XKB events
+and the conditions under which the server generates them.
+</para>
+
+
+</sect2>
+<sect2 id='Generating_Named_Keyboard_Bells'>
+<title>Generating Named Keyboard Bells</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbBell</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+bellClass: KB_BELLCLASSSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+bellID: KB_IDSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+percent: INT8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+forceSound: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+eventOnly: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+pitch, duration: INT16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+name: ATOM</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+window: WINDOW</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+, <emphasis>
+Match</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request generates audible bells and/or <emphasis>
+XkbBellNotify</emphasis>
+ events for the bell specified by the <emphasis>
+bellClass</emphasis>
+ and <emphasis>
+bellID</emphasis>
+ on the device specified by <emphasis>
+deviceSpec</emphasis>
+ at the specified <emphasis>
+pitch</emphasis>
+, <emphasis>
+duration</emphasis>
+ and volume (<emphasis>
+percent</emphasis>
+). If deviceSpec specifies a device that does not have a bell or keyboard
+feedback, a <emphasis>
+Keyboard</emphasis>
+ error results.
+</para>
+
+
+<para>
+If both <emphasis>
+forceSound</emphasis>
+ and <emphasis>
+eventOnly</emphasis>
+ are set, this request yields a <emphasis>
+Match</emphasis>
+ error. Otherwise, if <emphasis>
+forceSound</emphasis>
+ is <emphasis>
+True</emphasis>
+, this request always generates a sound and never generates an event; if
+<emphasis>
+eventOnly</emphasis>
+ is <emphasis>
+True</emphasis>
+, it causes an event but no sound. If neither <emphasis>
+forceSound</emphasis>
+ nor <emphasis>
+eventOnly</emphasis>
+ are <emphasis>
+True</emphasis>
+, this request always generates an event; if the keyboard’s global <emphasis>
+AudibleBell</emphasis>
+ control is enabled, it also generates a sound.
+</para>
+
+
+<para>
+Any bell event generated by this request contains all of the information about
+the bell that was requested, including the symbolic name specified by <emphasis>
+name</emphasis>
+ and the event window specified by window. The <emphasis>
+name</emphasis>
+ and <emphasis>
+window</emphasis>
+ are not directly interpreted by XKB, but they must have the value <emphasis>
+None</emphasis>
+ or specify a legal Atom or Window, respectively. <emphasis>
+XkbBellNotify</emphasis>
+ events generated in response to core protocol or X input extension bell
+requests always report <emphasis>
+None</emphasis>
+ as their <emphasis>
+name</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+bellClass</emphasis>
+, <emphasis>
+bellID</emphasis>
+, and <emphasis>
+percent</emphasis>
+ fields are interpreted as for the X input extension <emphasis>
+DeviceBell</emphasis>
+ request. If <emphasis>
+pitch</emphasis>
+ and <emphasis>
+duration</emphasis>
+ are zero, the server uses the corresponding values for that bell from the core
+protocol or input extension, otherwise <emphasis>
+pitch</emphasis>
+ and <emphasis>
+duration</emphasis>
+ are interpreted as for the core protocol <emphasis>
+ChangeKeyboardControl</emphasis>
+ request; if they do not include legal values, a <emphasis>
+Value</emphasis>
+ error results. The <emphasis>
+window</emphasis>
+ field must specify a legal Window or have the value <emphasis>
+None</emphasis>
+, or a <emphasis>
+Value</emphasis>
+ error results. The name field must specify a legal Atom or have the value
+<emphasis>
+None</emphasis>
+, or an <emphasis>
+Atom</emphasis>
+ error results. If an error occurs, this request has no other effect (i.e. does
+not cause a sound or generate an event).
+</para>
+
+
+<para>
+The <emphasis>
+pitch</emphasis>
+, <emphasis>
+volume</emphasis>
+, and <emphasis>
+duration</emphasis>
+ are suggested values for the bell, but XKB does not require the server to
+honor them.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_Keyboard_State'>
+<title>Querying and Changing Keyboard State</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetState</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+mods, baseMods, latchedMods, lockedMods: KEYMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+group, lockedGroup: KB_GROUP
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+baseGroup, latchedGroup: INT16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+compatState: KEYMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+grabMods, compatGrabMods: KB_GROUP
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+lookupMods, compatLookupMods: KEYMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+ptrBtnState: BUTMASK</entry>
+ </row>
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns a detailed description of the current state of the
+keyboard specified by <emphasis>
+deviceSpec</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ return value contains the input extension identifier for the specified device,
+or <emphasis>
+0</emphasis>
+ if the server does not support the input extension.
+</para>
+
+
+<para>
+The <emphasis>
+baseMods</emphasis>
+ return value reports the modifiers that are set because one or more modifier
+keys are logically down. The <emphasis>
+latchedMods</emphasis>
+ and <emphasis>
+lockedMods</emphasis>
+ return values report the modifiers that are latched or locked respectively.
+The <emphasis>
+mods</emphasis>
+ return value reports the effective modifier mask which results from the
+current combination of base, latched and locked modifiers.
+</para>
+
+
+<para>
+The <emphasis>
+baseGroup</emphasis>
+ return value reports the group state selected by group shift keys that are
+logically down. The <emphasis>
+latchedGroup</emphasis>
+ and <emphasis>
+lockedGroup</emphasis>
+ return values detail the effects of latching or locking group shift keys and
+<emphasis>
+XkbLatchLockState</emphasis>
+ requests. The <emphasis>
+group</emphasis>
+ return value reports the effective keyboard group which results from the
+current combination of base, latched and locked group values.
+</para>
+
+
+<para>
+The <emphasis>
+lookupMods</emphasis>
+ return value reports the lookup modifiers, which consist of the current
+effective modifiers minus any server internal modifiers. The <emphasis>
+grabMods</emphasis>
+ return value reports the grab modifiers, which consist of the lookup modifiers
+minus any members of the ignore locks mask that are not either latched or
+logically depressed. <link linkend='Keyboard_State'>Keyboard
+State</link> describes the lookup modifiers and grab modifiers in more detail.
+</para>
+
+
+<para>
+The <emphasis>
+ptrBtnState</emphasis>
+ return value reports the current logical state of up to five buttons on the
+core pointer device.
+</para>
+
+
+<para>
+The <emphasis>
+compatState</emphasis>
+ return value reports the compatibility state that corresponds to the effective
+keyboard group and modifier state. The <emphasis>
+compatLookupMods</emphasis>
+ and <emphasis>
+compatGrabMods</emphasis>
+ return values report the core protocol compatibility states that correspond to
+the XKB lookup and grab state. All of the compatibility states are computed by
+applying the group compatibility mapping to the corresponding XKB modifier and
+group states, as described in <link linkend='Group_Compatibility_Map'>
+Group Compatibility Map</link>.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbLatchLockState</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectModLocks, modLocks: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+lockGroup: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+groupLock: KB_GROUP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectModLatches,modLatches: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+latchGroup: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+groupLatch: INT16</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request locks or latches keyboard modifiers and group state for the device
+specified by <emphasis>
+deviceSpec</emphasis>
+. If <emphasis>
+deviceSpec</emphasis>
+ specifies an illegal or non-keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error occurs.
+</para>
+
+
+<para>
+The locked state of any modifier specified in the <emphasis>
+affectModLocks</emphasis>
+ mask is set to the corresponding value from <emphasis>
+modLocks</emphasis>
+. If <emphasis>
+lockGroup</emphasis>
+ is <emphasis>
+True</emphasis>
+, the locked keyboard group is set to the group specified by <emphasis>
+groupLock</emphasis>
+. If any modifiers are set in <emphasis>
+modLocks</emphasis>
+ but not <emphasis>
+affectModLocks</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error occurs.
+</para>
+
+
+<para>
+The latched state of any modifier specified in the <emphasis>
+affectModLatches</emphasis>
+ mask is set to the corresponding value from <emphasis>
+modLatches</emphasis>
+. If <emphasis>
+latchGroup</emphasis>
+ is <emphasis>
+True</emphasis>
+, the latched keyboard group is set to the group specified by <emphasis>
+groupLatch</emphasis>
+. if any modifiers are set in <emphasis>
+modLatches</emphasis>
+ but not in <emphasis>
+affectModLatches</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error occurs.
+</para>
+
+
+<para>
+If the locked group exceeds the maximum number of groups permitted for the
+specified keyboard, it is wrapped or truncated back into range as specified by
+the global <emphasis>
+GroupsWrap</emphasis>
+<emphasis>
+ </emphasis>
+control. No error results from an out-of-range group specification.
+</para>
+
+
+<para>
+After changing the locked and latched modifiers and groups as specified, the X
+server recalculates the effective and compatibility keyboard state and
+generates <emphasis>
+XkbStateNotify</emphasis>
+ events as appropriate if any state components have changed. Changing the
+keyboard state might also turn indicators on or off which can cause <emphasis>
+XkbIndicatorStateNotify</emphasis>
+ events as well.
+</para>
+
+
+<para>
+If any errors occur, this request has no effect.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_Keyboard_Controls'>
+<title>Querying and Changing Keyboard Controls</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetControls</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+mouseKeysDfltBtn: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+numGroups: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+groupsWrap: KB_GROUPINFO
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+internalMods,ignoreLockMods: KB_MODDEF
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+repeatDelay,repeatInterval: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+slowKeysDelay, debounceDelay: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+mouseKeysDelay, mouseKeysInterval: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+mouseKeysTimeToMax, mouseKeysMaxSpeed: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+mouseKeysCurve: INT16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+accessXOptions: KB_AXOPTIONMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+accessXTimeout: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+accessXTimeoutOptionsMask, accessXTimeoutOptionValues: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+accessXTimeoutMask,accessXTimeoutValues: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+enabledControls: KB_BOOLCTRLMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+perKeyRepeat: LISTofCARD8</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns the current values and status of all controls for the
+keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. If <emphasis>
+deviceSpec</emphasis>
+ specifies an illegal device a <emphasis>
+Keyboard</emphasis>
+ error results. On return, the <emphasis>
+deviceID</emphasis>
+ specifies the identifier of the requested device or zero if the server does
+not support the input extension.
+</para>
+
+
+<para>
+The <emphasis>
+numGroups</emphasis>
+ return value reports the current number of groups, and <emphasis>
+groupsWrap</emphasis>
+ reports the treatment of out-of-range groups, as described in <link linkend='Key_Symbol_Map'>Key Symbol Map</link>. The <emphasis>
+internalMods</emphasis>
+ and <emphasis>
+ignoreLockMods</emphasis>
+ return values report the current values of the server internal and ignore
+locks modifiers as described in <link linkend='Keyboard_State'>
+Keyboard State</link>. Both are modifier definitions (
+<link linkend='Modifier_Definitions'>Modifier Definitions</link>) which
+report the real modifiers, virtual modifiers, and the resulting combination of
+real modifiers that are bound to the corresponding control.
+</para>
+
+
+<para>
+The <emphasis>
+repeatDelay</emphasis>
+, <emphasis>
+repeatInterval</emphasis>
+, <emphasis>
+slowKeysDelay</emphasis>
+ and <emphasis>
+debounceDelay</emphasis>
+ fields report the current values of the for the autorepeat delay, autorepeat
+interval, slow keys delay and bounce keys timeout, respectively. The <emphasis>
+mouseKeysDelay</emphasis>
+, <emphasis>
+mouseKeysInterval</emphasis>
+, <emphasis>
+mouseKeysTimeToMax</emphasis>
+ and <emphasis>
+mouseKeysMaxSpeed</emphasis>
+ and <emphasis>
+mouseKeysCurve</emphasis>
+ return values report the current acceleration applied to mouse keys, as
+described in <link linkend='The_MouseKeysAccel_Control'>The MouseKeysAccel
+Control</link>. All times are reported in milliseconds.
+</para>
+
+
+<para>
+The <emphasis>
+mouseKeysDfltBtn</emphasis>
+ return value reports the current default pointer button for which events are
+synthesized by the mouse keys server actions.
+</para>
+
+
+<para>
+The <emphasis>
+accessXOptions</emphasis>
+ return value reports the current settings of the various AccessX options flags
+which govern the behavior of the <emphasis>
+StickyKeys</emphasis>
+ control and of AccessX feedback.
+</para>
+
+
+<para>
+The <emphasis>
+accessXTimeout</emphasis>
+ return value reports the length of time, in seconds, that the keyboard must
+remain idle before AccessX controls are automatically changed; an <emphasis>
+accessXTimeout</emphasis>
+ of <emphasis>
+0</emphasis>
+ indicates that AccessX controls are not automatically changed. The <emphasis>
+accessXTimeoutMask</emphasis>
+ specifies the boolean controls to be changed if the AccessX timeout expires;
+the <emphasis>
+accessXTimeoutValues</emphasis>
+ field specifies new values for all of the controls in the timeout mask. The
+<emphasis>
+accessXTimeoutOptionsMask</emphasis>
+ field specifies the AccessX options to be changed when the AccessX timeout
+expires; the <emphasis>
+accessXTimeoutOptionValues</emphasis>
+ return value reports the values to which they will be set.
+</para>
+
+
+<para>
+The <emphasis>
+enabledControls</emphasis>
+ return value reports the current state of all of the global boolean controls.
+</para>
+
+
+<para>
+The <emphasis>
+perKeyRepeat</emphasis>
+ array consists of one bit per key and reports the current autorepeat behavior
+of each keyboard key; if a bit is set in <emphasis>
+perKeyRepeat</emphasis>
+, the corresponding key repeats if it is held down while global keyboard
+autorepeat is enabled. This array parallels the core protocol and input
+extension keyboard controls, if the autorepeat behavior of a key is changed via
+the core protocol or input extension, those changes are automatically reflected
+in the <emphasis>
+perKeyRepeat</emphasis>
+ array.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetControls</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectInternalRealMods, internalRealMods: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectInternalVirtualMods,internalVirtualMods: KB_VMODMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectIgnoreLockRealMods,ignoreLockRealMods: KB_MODMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectIgnoreLockVirtualMods,ignoreLockVirtualMods: KB_VMODMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+mouseKeysDfltBtn: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+groupsWrap: KB_GROUPINFO</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+accessXOptions: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectEnabledControls: KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+enabledControls: KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changeControls: KB_CONTROLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+repeatDelay,repeatInterval: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+slowKeysDelay, debounceDelay: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+mouseKeysDelay, mouseKeysInterval: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+mouseKeysTimeToMax, mouseKeysMaxSpeed: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+mouseKeysCurve: INT16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+accessXTimeout: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+accessXTimeoutMask, accessXTimeoutValues: KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+accessXTimeoutOptionsMask,accessXTimeoutOptionsValues: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+perKeyRepeat: LISTofCARD8</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors:<emphasis>
+ Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request sets the keyboard controls indicated in <emphasis>
+changeControls</emphasis>
+ for the keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. Each bit that is set in <emphasis>
+changeControls</emphasis>
+ indicates that one or more of the other request fields should be applied, as
+follows:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Bit in changeControls</entry>
+ <entry>Field(s) to be Applied</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+XkbRepeatKeysMask</emphasis>
+</entry>
+ <entry><emphasis>
+repeatDelay</emphasis>
+, <emphasis>
+repeatInterval</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbSlowKeysMask</emphasis>
+</entry>
+ <entry><emphasis>
+slowKeysDelay</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbStickyKeysMask</emphasis>
+</entry>
+ <entry><emphasis>
+accessXOptions</emphasis>
+ (only the <emphasis>
+XkbAX_TwoKeys</emphasis>
+<emphasis>
+ </emphasis>
+and the <emphasis>
+XkbAX_LatchToLock</emphasis>
+ options are affected)</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbBounceKeysMask</emphasis>
+</entry>
+ <entry><emphasis>
+debounceDelay</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbMouseKeysMask</emphasis>
+</entry>
+ <entry><emphasis>
+mouseKeysDfltBtn</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbMouseKeysAccelMask</emphasis>
+</entry>
+ <entry><emphasis>
+mouseKeysDelay</emphasis>
+, <emphasis>
+mouseKeysInterval</emphasis>
+, <emphasis>
+mouseKeysCurve</emphasis>
+, <emphasis>
+mouseKeysTimeToMax</emphasis>
+, <emphasis>
+mouseKeysMaxSpeed</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbAccessXKeysMask</emphasis>
+</entry>
+ <entry><emphasis>
+accessXOptions (all options)</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbAccessXTimeoutMask</emphasis>
+</entry>
+ <entry><emphasis>
+accessXTimeout</emphasis>
+, <emphasis>
+accessXTimeoutMask</emphasis>
+, <emphasis>
+accessXTimeoutValues</emphasis>
+, <emphasis>
+accessXTimeoutOptionsMask</emphasis>
+, <emphasis>
+accessXTimeoutOptionsValues</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry>XkbAccessXFeedbackMask</entry>
+ <entry><emphasis>
+accessXOptions</emphasis>
+ (all options except those affected by the <emphasis>
+XkbStickyKeysMask</emphasis>
+ bit)</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGroupsWrapMask</emphasis>
+</entry>
+ <entry><emphasis>
+groupsWrap</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbInternalModsMask</emphasis>
+</entry>
+ <entry><emphasis>
+affectInternalRealMods</emphasis>
+, <emphasis>
+internalRealMods</emphasis>
+, <emphasis>
+affectInternalVirtualMods</emphasis>
+, <emphasis>
+internalVirtualMods</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbIgnoreLockModsMask</emphasis>
+</entry>
+ <entry><emphasis>
+affectIgnoreLockRealMods</emphasis>
+, <emphasis>
+ignoreLockRealMods</emphasis>
+, <emphasis>
+affectIgnoreLockVirtualMods</emphasis>
+, <emphasis>
+ignoreLockVirtualMods</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbPerKeyRepeatMask</emphasis>
+</entry>
+ <entry><emphasis>
+perKeyRepeat</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbControlsEnabledMask</emphasis>
+</entry>
+ <entry><emphasis>
+affectEnabledControls</emphasis>
+, <emphasis>
+enabledControls</emphasis>
+</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+If any other bits are set in <emphasis>
+changeControls</emphasis>
+, a <emphasis>
+Value</emphasis>
+ error results. If any of the bits listed above are not set in <emphasis>
+changeControls</emphasis>
+, the corresponding fields must have the value <emphasis>
+0</emphasis>
+, or a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+If applied, <emphasis>
+repeatDelay</emphasis>
+ and <emphasis>
+repeatInterval</emphasis>
+ change the autorepeat characteristics of the keyboard, as described in
+<link linkend='The_RepeatKeys_Control'>The RepeatKeys Control</link>. If
+specified, <emphasis>
+repeatDelay</emphasis>
+ and <emphasis>
+repeatInterval</emphasis>
+ must both be non-zero or a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If applied, the <emphasis>
+slowKeysDelay</emphasis>
+ field specifies a new delay for the <emphasis>
+SlowKeys</emphasis>
+ control, as defined in <link linkend='The_SlowKeys_Control'>The
+SlowKeys Control</link>. If specified, <emphasis>
+slowKeysDelay</emphasis>
+ must be non-zero, or a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If applied, the <emphasis>
+debounceDelay</emphasis>
+ field specifies a new delay for the <emphasis>
+BounceKeys</emphasis>
+ control, as described in <link linkend='The_BounceKeys_Control'>The
+BounceKeys Control</link>. If present, the <emphasis>
+debounceDelay</emphasis>
+ must be non-zero or a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If applied, the <emphasis>
+mouseKeysDfltBtn</emphasis>
+ field specifies the core pointer button for which events are generated
+whenever a <emphasis>
+SA_PtrBtn</emphasis>
+ or <emphasis>
+SA_LockPtrBtn</emphasis>
+ key action is activated. If present, <emphasis>
+mouseKeysDfltBtn</emphasis>
+ must specify a legal button for the core pointer device, or a <emphasis>
+Value</emphasis>
+ error results. <link linkend='Key_Actions'>Key
+Actions</link> describes the <emphasis>
+SA_PtrBtn</emphasis>
+ and <emphasis>
+SA_LockPtrBtn</emphasis>
+ actions in more detail.
+</para>
+
+
+<para>
+If applied, the <emphasis>
+mouseKeysDelay</emphasis>
+, <emphasis>
+mouseKeysInterval</emphasis>
+, <emphasis>
+mouseKeysTimeToMax</emphasis>
+, <emphasis>
+mouseKeysMaxSpeed</emphasis>
+ and <emphasis>
+mouseKeysCurve</emphasis>
+ fields change the rate at which the pointer moves when a key which generates a
+<emphasis>
+SA_MovePtr</emphasis>
+ action is held down. <link linkend='The_MouseKeysAccel_Control'>The
+MouseKeysAccel Control</link> describes these <emphasis>
+MouseKeysAccel</emphasis>
+ parameters in more detail. If defined, the <emphasis>
+mouseKeysDelay</emphasis>
+, <emphasis>
+mouseKeysInterval</emphasis>
+, <emphasis>
+mouseKeysTimeToMax</emphasis>
+ and <emphasis>
+mouseKeysMaxSpeed</emphasis>
+ values must all be greater than zero, or a <emphasis>
+Value</emphasis>
+ error results. The <emphasis>
+mouseKeysCurve</emphasis>
+ value must be greater than <emphasis>
+-1000</emphasis>
+ or a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If applied, the <emphasis>
+accessXOptions</emphasis>
+ field sets the AccessX options, which are described in detail in
+<link linkend='The_AccessXKeys_Control'>The AccessXKeys Control</link>. If
+either one of <emphasis>
+XkbStickyKeysMask</emphasis>
+ and <emphasis>
+XkbAccessXFeedbackMask</emphasis>
+ are set in <emphasis>
+changeControls</emphasis>
+ and <emphasis>
+XkbAccessXKeysMask</emphasis>
+ is not, only a subset of the AccessX options are changed, as described in the
+table above; if both are set or if the <emphasis>
+AccessXKeys</emphasis>
+ bit is set in <emphasis>
+changeControls</emphasis>
+, all of the AccessX options are updated. Any bit in <emphasis>
+accessXOptions</emphasis>
+ whose interpretation is undefined must be zero, or a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If applied, the <emphasis>
+accessXTimeout</emphasis>
+, <emphasis>
+accessXTimeoutMask</emphasis>
+, <emphasis>
+accessXTimeoutValues</emphasis>
+, <emphasis>
+accessXTimeoutOptionsMask</emphasis>
+ and <emphasis>
+accessXTimeoutOptionsValues</emphasis>
+ fields change the behavior of the AccessX Timeout control, as described in
+<link linkend='The_AccessXTimeout_Control'>The AccessXTimeout
+Control</link>. The <emphasis>
+accessXTimeout</emphasis>
+ must be greater than zero, or a <emphasis>
+Value</emphasis>
+ error results. The <emphasis>
+accessXTimeoutMask</emphasis>
+ or <emphasis>
+accessXTimeoutValues</emphasis>
+ fields must specify only legal boolean controls, or a <emphasis>
+Value</emphasis>
+ error results. The <emphasis>
+accessXTimeoutOptionsMask</emphasis>
+ and <emphasis>
+accessXTimeoutOptionsValues</emphasis>
+ fields must contain only legal AccessX options or a <emphasis>
+Value</emphasis>
+ error results. If any bits are set in either values field but not in the
+corresponding mask, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+If present, the <emphasis>
+groupsWrap</emphasis>
+ field specifies the treatment of out-of-range keyboard groups, as described in
+<link linkend='Key_Symbol_Map'>Key Symbol Map</link>. If the
+<emphasis>
+groupsWrap</emphasis>
+ field does not specify a legal treatment for out-of-range groups, a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If present, the <emphasis>
+affectInternalRealMods</emphasis>
+ field specifies the set of real modifiers to be changed in the internal
+modifier definition and the <emphasis>
+internalRealMods</emphasis>
+ field specifies new values for those modifiers. The <emphasis>
+affectInternalVirtualMods</emphasis>
+ and <emphasis>
+internalVirtualMods</emphasis>
+ fields update the virtual modifier component of the modifier definition that
+describes the internal modifiers in the same way. If any bits are set in either
+values field but not in the corresponding mask field, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+If present, the <emphasis>
+affectIgnoreLockRealMods</emphasis>
+ field specifies the set of real modifiers to be changed in the ignore locks
+modifier definition and the <emphasis>
+ignoreLockRealMods</emphasis>
+ field specifies new values for those modifiers. The <emphasis>
+affectIgnoreLockVirtualMods</emphasis>
+ and <emphasis>
+ignoreLockVirtualMods</emphasis>
+ fields update the virtual modifier component of the ignore locks modifier
+definition in the same way. If any bits are set in either values field but not
+in the corresponding mask field, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+If present, the <emphasis>
+perKeyRepeat</emphasis>
+ array specifies the repeat behavior of the individual keyboard keys. The
+corresponding core protocol or input extension per-key autorepeat information
+is updated to reflect any changes specified in <emphasis>
+perKeyRepeat</emphasis>
+. If the bits that correspond to any out-of-range keys are set in <emphasis>
+perKeyRepeat</emphasis>
+, a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If present, the <emphasis>
+affectEnabledControls</emphasis>
+ and <emphasis>
+enabledControls</emphasis>
+ field enable and disable global boolean controls. Any controls set in both
+fields are enabled; any controls that are set in <emphasis>
+affectEnabledControls</emphasis>
+ but not in <emphasis>
+enabledControls</emphasis>
+ are disabled. Controls that are not set in either field are not affected. If
+any controls are specified in <emphasis>
+enabledControls</emphasis>
+ but not in <emphasis>
+affectEnabledControls</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results. If either field contains anything except boolean controls, a
+<emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_the_Keyboard_Mapping'>
+<title>Querying and Changing the Keyboard Mapping</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetMap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+full, partial: KB_MAPPARTMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstType, nTypes: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKeySym, firstKeyAction: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeySyms, nKeyActions: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKeyBehavior,firstKeyExplicit: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeyBehaviors,nKeyExplicit: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstModMapKey,firstVModMapKey: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nModMapKeys, nVModMapKeys: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+virtualMods: KB_VMODMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+minKeyCode, maxKeyCode: KEYCODE
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+present: KB_MAPPARTMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+firstType, nTypes, nTotalTypes: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+firstKeySym, firstKeyAction: KEYCODE
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+nKeySyms, nKeyActions: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+totalSyms, totalActions: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+firstKeyBehavior, firstKeyExplicit: KEYCODE
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+nKeyBehaviors, nKeyExplicit: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+totalKeyBehaviors, totalKeyExplicit: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+firstModMapKey, firstVModMapKey: KEYCODE
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+nModMapKeys, nVModMapKeys: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+totalModMapKeys, totalVModMapKeys: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+virtualMods: KB_VMODMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+typesRtrn: LISTofKB_KEYTYPE
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+symsRtrn: LISTofKB_KEYSYMMAP
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+actsRtrn: { count: LISTofCARD8, acts: LISTofKB_ACTION }
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+behaviorsRtrn: LISTofKB_SETBEHAVIOR
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+vmodsRtrn: LISTofSETofKEYMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+explicitRtrn: LISTofKB_SETEXPLICIT
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+modmapRtrn: LISTofKB_KEYMODMAP
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+vmodMapRtrn: LISTofKB_KEYVMODMAP
+ </entry>
+ </row>
+ <row>
+ <entry role='protoerror'>
+Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns the indicated components of the server and client maps of
+the keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. The <emphasis>
+full</emphasis>
+ mask specifies the map components to be returned in full; the <emphasis>
+partial</emphasis>
+ mask specifies the components for which some subset of the legal elements are
+to be returned. The server returns a <emphasis>
+Match</emphasis>
+ error if any component is specified in both <emphasis>
+full</emphasis>
+ and <emphasis>
+partial</emphasis>
+, or a <emphasis>
+Value</emphasis>
+ error if any undefined bits are set in either <emphasis>
+full</emphasis>
+ or <emphasis>
+partial</emphasis>
+.
+</para>
+
+
+<para>
+Each bit in the <emphasis>
+partial</emphasis>
+ mask controls the interpretation of one or more of the other request fields,
+as follows:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.5*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.5*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Bit in the Partial Mask</entry>
+ <entry>Type</entry>
+ <entry>Corresponding Field(s)</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+XkbKeyTypesMask</emphasis>
+</entry>
+ <entry>key types</entry>
+ <entry><emphasis>
+firstType</emphasis>
+, <emphasis>
+nTypes</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbKeySymsMask</emphasis>
+</entry>
+ <entry>keycodes</entry>
+ <entry><emphasis>
+firstKeySym</emphasis>
+, <emphasis>
+nKeySyms</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbKeyActionsMask</emphasis>
+</entry>
+ <entry>keycodes</entry>
+ <entry><emphasis>
+firstKeyAction</emphasis>
+, <emphasis>
+nKeyActions</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbKeyBehaviorsMask</emphasis>
+</entry>
+ <entry>keycodes</entry>
+ <entry><emphasis>
+firstKeyBehavior</emphasis>
+, <emphasis>
+nKeyBehaviors</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbExplicitComponentsMask</emphasis>
+</entry>
+ <entry>keycodes</entry>
+ <entry><emphasis>
+firstKeyExplicit</emphasis>
+, <emphasis>
+nKeyExplicit</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbModifierMapMask</emphasis>
+</entry>
+ <entry>keycodes</entry>
+ <entry><emphasis>
+firstModMapKey</emphasis>
+, <emphasis>
+nModMapKeys</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbVirtualModMapMask</emphasis>
+</entry>
+ <entry>keycodes</entry>
+ <entry><emphasis>
+firstVModMapKey</emphasis>
+, <emphasis>
+nVModMapKeys</emphasis>
+</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbVirtualModsMask</emphasis>
+</entry>
+ <entry>virtual modifiers</entry>
+ <entry><emphasis>
+virtualMods</emphasis>
+</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+If any of these keyboard map components are specified in <emphasis>
+partial</emphasis>
+, the corresponding values must specify a valid subset of the requested
+components or this request reports a <emphasis>
+Value</emphasis>
+ error. If a keyboard map component is not specified in <emphasis>
+partial</emphasis>
+, the corresponding fields must contain zeroes, or a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+If any error is generated, the request aborts and does not report any values.
+</para>
+
+
+<para>
+On successful return, the <emphasis>
+deviceID</emphasis>
+ field reports the X input extension device ID of the keyboard for which
+information is being returned, or <emphasis>
+0</emphasis>
+ if the server does not support the X input extension. The <emphasis>
+minKeyCode</emphasis>
+ and <emphasis>
+maxKeyCode</emphasis>
+ return values report the minimum and maximum keycodes that are legal for the
+keyboard in question.
+</para>
+
+
+<para>
+The <emphasis>
+present</emphasis>
+ return value lists all of the keyboard map components contained in the reply.
+The bits in <emphasis>
+present</emphasis>
+ affect the interpretation of the other return values as follows:
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyTypesMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para><emphasis>
+firstType</emphasis>
+ and <emphasis>
+nTypes</emphasis>
+ specify the types reported in the reply.
+ </para>
+</listitem>
+<listitem>
+ <para><emphasis>
+nTotalTypes</emphasis>
+ reports the total number of types defined for the keyboard
+ </para>
+</listitem>
+<listitem>
+ <para><emphasis>
+typesRtrn</emphasis>
+ has <emphasis>
+nTypes</emphasis>
+ elements of type KB_KEYTYPE which describe consecutive key types starting from
+<emphasis>
+firstType</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbKeySymsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para><emphasis>
+firstKeySym</emphasis>
+ and <emphasis>
+nKeySyms</emphasis>
+ specify the subset of the keyboard keys for which symbols will be reported.
+ </para>
+</listitem>
+<listitem>
+ <para><emphasis>
+totalSyms</emphasis>
+ reports the total number of keysyms bound to the keys returned in this reply.
+ </para>
+</listitem>
+<listitem>
+ <para><emphasis>
+symsRtrn</emphasis>
+ has <emphasis>
+nKeySyms</emphasis>
+ elements of type KB_KEYSYMMAP, which describe the symbols bound to consecutive
+keys starting from <emphasis>
+firstKeySym</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbKeyActionsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para><emphasis>
+firstKeyAction</emphasis>
+ and <emphasis>
+nKeyActions</emphasis>
+ specify the subset of the keys for which actions are reported.
+ </para>
+</listitem>
+<listitem>
+ <para><emphasis>
+totalActions</emphasis>
+ reports the total number of actions bound to the returned keys.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+count </emphasis>
+field of the <emphasis>
+actsRtrn</emphasis>
+ return value has <emphasis>
+nKeyActions</emphasis>
+ entries of type CARD8, which specify the number of actions bound to
+consecutive keys starting from <emphasis>
+firstKeyAction</emphasis>
+. The <emphasis>
+acts</emphasis>
+ field of <emphasis>
+actsRtrn</emphasis>
+ has <emphasis>
+totalActions</emphasis>
+ elements of type KB_ACTION and specifies the actions bound to the keys.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbKeyBehaviorsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+firstKeyBehavior</emphasis>
+ and <emphasis>
+nKeyBehaviors</emphasis>
+ return values report the range of keyboard keys for which behaviors will be
+reported.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+totalKeyBehaviors</emphasis>
+ return value reports the number of keys in the range to be reported that have
+non-default values.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+behaviorsRtrn</emphasis>
+ value has <emphasis>
+totalKeyBehaviors</emphasis>
+ entries of type KB_BEHAVIOR. Each entry specifies a key in the range for which
+behaviors are being reported and the behavior associated with that key. Any
+keys in that range that do not have an entry in <emphasis>
+behaviorsRtrn</emphasis>
+ have the default behavior, <emphasis>
+KB_Default</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbExplicitComponentsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+firstKeyExplicit</emphasis>
+ and <emphasis>
+nKeyExplicit</emphasis>
+ return values report the range of keyboard keys for which the set of explicit
+components is to be returned.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+totalKeyExplicit</emphasis>
+ return value reports the number of keys in the range specified by <emphasis>
+firstKeyExplicit</emphasis>
+ and <emphasis>
+nKeyExplicit</emphasis>
+ that have one or more explicit components.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+explicitRtrn</emphasis>
+ return value has <emphasis>
+totalKeyExplicit</emphasis>
+ entries of type KB_KEYEXPLICIT. Each entry specifies the a key in the range
+for which explicit components are being reported and the explicit components
+that are bound to it. Any keys in that range that do not have an entry in
+<emphasis>
+explicitRtrn</emphasis>
+ have no explicit components.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbModifierMapMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+firstModMapKey</emphasis>
+ and <emphasis>
+nModMapKeys</emphasis>
+ return values report the range of keyboard keys for which the modifier map is
+to be reported.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+totalModMapKeys</emphasis>
+ return value reports the number of keys in the range specified by <emphasis>
+firstModMapKey</emphasis>
+ and <emphasis>
+nModMapKeys</emphasis>
+ that are bound with to one or more modifiers.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+modmapRtrn</emphasis>
+ return value has <emphasis>
+totalModMapKeys</emphasis>
+ entries of type KB_KEYMODMAP. Each entry specifies the a key in the range for
+which the modifier map is being reported and the set of modifiers that are
+bound to that key. Any keys in that range that do not have an entry in
+<emphasis>
+modmapRtrn</emphasis>
+ are not associated with any modifiers by the modifier mapping.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbVirtualModMapMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+firstVModMapKey</emphasis>
+ and <emphasis>
+nVModMapKeys</emphasis>
+ return values report the range of keyboard keys for which the virtual modifier
+map is to be reported.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+totalVModMapKeys</emphasis>
+ return value reports the number of keys in the range specified by <emphasis>
+firstVModMapKey</emphasis>
+ and <emphasis>
+nVModMapKeys</emphasis>
+ that are bound with to or more virtual modifiers.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+vmodmapRtrn</emphasis>
+ return value has <emphasis>
+totalVModMapKeys</emphasis>
+ entries of type KB_KEYVMODMAP. Each entry specifies the a key in the range for
+which the virtual modifier map is being reported and the set of virtual
+modifiers that are bound to that key. Any keys in that range that do not have
+an entry in <emphasis>
+vmodmapRtrn</emphasis>
+ are not associated with any virtual modifiers,
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbVirtualModsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+virtualMods</emphasis>
+ return value is a mask with one bit per virtual modifier which specifies the
+virtual modifiers for which a set of corresponding real modifiers is to be
+returned.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+vmodsRtrn</emphasis>
+ return value is a list with one entry of type KEYBUTMASK for each virtual
+modifier that is specified in <emphasis>
+virtualMods</emphasis>
+. The entries in <emphasis>
+vmodsRtrn</emphasis>
+ contain the real modifier bindings for the specified virtual modifiers,
+beginning with the lowest-numbered virtual modifier that is present in
+<emphasis>
+virtualMods</emphasis>
+ and proceeding to the highest.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If any of these bits are not set in <emphasis>
+present</emphasis>
+, the corresponding numeric fields all have the value zero, and the
+corresponding lists are all of length zero.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetMap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+flags: { <emphasis>
+SetMapResizeTypes, SetMapRecomputeActions </emphasis>
+}</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+present: KB_MAPPARTMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+minKeyCode, maxKeyCode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstType, nTypes: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKeySym, firstKeyAction: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeySyms, nKeyActions: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+totalSyms, totalActions: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKeyBehavior, firstKeyExplicit: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeyBehaviors, nKeyExplicit: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+totalKeyBehaviors, totalKeyExplicit: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstModMapKey, firstVModMapKey: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nModMapKeys, nVModMapKeys: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+totalModMapKeys, totalVModMapKeys: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+virtualMods: VMODMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+types: LISTofKB_KEYTYPE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+syms: LISTofKB_KEYSYMMAP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+actions: { count: LISTofCARD8, actions: LISTofKB_ACTION }</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+behaviors: LISTofKB_BEHAVIOR</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+vmods: LISTofKEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+explicit: LISTofKB_EXPLICIT</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+modmap: LISTofKB_KEYMODMAP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+vmodmap: LISTofKB_KEYVMODMAP</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request changes the indicated parts of the keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. With XKB, the effect of a key release is independent of the keyboard mapping
+at the time of the release, so this request can be processed regardless of the
+logical state of the modifier keys at the time of the request.
+</para>
+
+
+<para>
+The <emphasis>
+present</emphasis>
+ field specifies the keyboard map components contained to be changed. The bits
+in <emphasis>
+present</emphasis>
+ affect the interpretation of the other fields as follows:
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyTypesMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+firstType</emphasis>
+ and <emphasis>
+nTypes</emphasis>
+ specify a subset of the key types bound to the keyboard to be changed or
+created. The index of the first key type to be changed must be less than or
+equal to the unmodified length of the list of key types or a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyTypesMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+ and <emphasis>
+SetMapResizeTypes</emphasis>
+ is set in <emphasis>
+flags</emphasis>
+, the server resizes the list of key types bound to the keyboard so that the
+last key type specified by this request is the last element in the list. If the
+list of key types is shrunk, any existing key definitions that use key types
+that eliminated are automatically assigned key types from the list of canonical
+key types as described in <link linkend='Assigning_Types_To_Groups_of_Symbols_for_a_Key'>
+Assigning Types To Groups of Symbols for a Key</link>. The list of key types
+bound to a keyboard must always include the four canonical types and cannot
+have more than <emphasis>
+XkbMaxTypesPerKey</emphasis>
+ (32) types; any attempt to reduce the number of types bound to a keyboard
+below four or above <emphasis>
+XkbMaxTypesPerKey</emphasis>
+ causes a <emphasis>
+Value</emphasis>
+ error. Symbolic names for newly created key types or levels within a key type
+are initialized to <emphasis>
+None</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyTypesMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, the types list has <emphasis>
+nTypes</emphasis>
+ entries of type KB_KEYTYPE.Each key type specified in <emphasis>
+types</emphasis>
+ must be valid or a <emphasis>
+Value</emphasis>
+ error results. To be valid a key type definition must meet the following
+criteria:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+numLevels</emphasis>
+ for the type must be greater than zero.
+ </para>
+</listitem>
+<listitem>
+ <para>If the key type is <emphasis>
+ONE_LEVEL</emphasis>
+ (i.e. index zero in the list of key types), <emphasis>
+numLevels</emphasis>
+ must be one.
+ </para>
+</listitem>
+<listitem>
+ <para>If the key type is <emphasis>
+TWO_LEVEL</emphasis>
+ or <emphasis>
+KEYPAD</emphasis>
+, or <emphasis>
+ALPHABETIC</emphasis>
+ (i.e. index one, two, or three in the lest of key types) group width must be
+two.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Each key type in types must also be internally consistent, or a Match error
+results. To be internally consistent, a key type definition must meet the
+following criteria:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Each map entry must specify a resulting level that is legal for the
+type.
+ </para>
+</listitem>
+<listitem>
+ <para>Any real or virtual modifiers specified in any of the map entries must
+also be specified in the <emphasis>
+mods</emphasis>
+ for the type.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbKeySymsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+firstKeySym</emphasis>
+ and <emphasis>
+nKeySyms</emphasis>
+ specify a subset of the keyboard keys to which new symbols are to be assigned
+and <emphasis>
+totalSyms</emphasis>
+ specifies the total number of symbols to be assigned to those keys. If any of
+the keys specified by <emphasis>
+firstKeySym</emphasis>
+ and <emphasis>
+nKeySyms</emphasis>
+ are not legal, a <emphasis>
+Match</emphasis>
+ error results. The <emphasis>
+syms</emphasis>
+ list has <emphasis>
+nKeySyms</emphasis>
+ elements of type KB_KEYSYMMAP. Each key in the resulting key symbol map must
+be valid and internally consistent or a <emphasis>
+Value</emphasis>
+ error results. To be valid and internally consistent, a key symbol map must
+meet the following criteria:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The key type indices must specify legal result key types.
+ </para>
+</listitem>
+<listitem>
+ <para>The number of groups specified by <emphasis>
+groupInfo</emphasis>
+ must be in the range <emphasis>
+0…4</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+width</emphasis>
+ of the key symbol map must be equal to <emphasis>
+numLevels</emphasis>
+ of the widest key type bound to the key.
+ </para>
+</listitem>
+<listitem>
+ <para>The number of symbols, <emphasis>
+nSyms</emphasis>
+, must equal the number of groups times <emphasis>
+width</emphasis>
+.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If <emphasis>
+XkbKeyActionsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+firstKeyAction</emphasis>
+ and <emphasis>
+nKeyActions</emphasis>
+ specify a subset of the keyboard keys to which new actions are to be assigned
+and <emphasis>
+totalActions</emphasis>
+ specifies the total number of actions to be assigned to those keys. If any of
+the keys specified by <emphasis>
+firstKeyAction</emphasis>
+ and <emphasis>
+nKeyActions</emphasis>
+ are not legal, a <emphasis>
+Match</emphasis>
+ error results. The <emphasis>
+count</emphasis>
+ field of the <emphasis>
+actions</emphasis>
+ return value has <emphasis>
+nKeyActions</emphasis>
+ elements of type CARD8; each element of <emphasis>
+count</emphasis>
+ specifies the number of actions bound to the corresponding key. The <emphasis>
+actions</emphasis>
+ list in the <emphasis>
+actions</emphasis>
+ field has <emphasis>
+totalActions</emphasis>
+ elements of type KB_ACTION. These actions are assigned to each target key in
+turn, as specified by <emphasis>
+count</emphasis>
+. The list of actions assigned to each key must either be empty or have exactly
+as many actions as the key has symbols, or a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyBehaviorsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+firstKeyBehavior</emphasis>
+ and <emphasis>
+nKeyBehaviors</emphasis>
+ specify a subset of the keyboard keys to which new behaviors are to be
+assigned, and <emphasis>
+totalKeyBehaviors</emphasis>
+ specifies the total number of keys in that range to be assigned non-default
+behavior. If any of the keys specified by <emphasis>
+firstKeyBehavior</emphasis>
+ and <emphasis>
+nKeyBehaviors</emphasis>
+ are not legal, a <emphasis>
+Match</emphasis>
+ error results. The <emphasis>
+behaviors</emphasis>
+ list has <emphasis>
+totalKeyBehaviors</emphasis>
+ elements of type KB_BEHAVIOR; each entry of <emphasis>
+behaviors</emphasis>
+ specifies a key in the specified range and a new behavior for that key; any
+key that falls in the range specified by <emphasis>
+firstBehavior</emphasis>
+ and <emphasis>
+nBehaviors</emphasis>
+ for which no behavior is specified in <emphasis>
+behaviors</emphasis>
+ is assigned the default behavior, <emphasis>
+KB_Default</emphasis>
+. The new behaviors must be legal, or a <emphasis>
+Value</emphasis>
+ error results. To be legal, the behavior specified in the <emphasis>
+XkbSetMap</emphasis>
+ request must:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Specify a key in the range indicated by <emphasis>
+firstKeyBehavior</emphasis>
+ and <emphasis>
+nKeyBehaviors</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>Not specify the <emphasis>
+permanent</emphasis>
+ flag; permanent behaviors cannot be set or changed using the <emphasis>
+XkbSetMap</emphasis>
+ request.
+ </para>
+</listitem>
+<listitem>
+ <para>If present, the <emphasis>
+KB_Overlay1</emphasis>
+ and <emphasis>
+KB_Overlay2</emphasis>
+ behaviors must specify a keycode for the overlay key that is valid for the
+current keyboard.
+ </para>
+</listitem>
+<listitem>
+ <para>If present, the <emphasis>
+KB_RadioGroup</emphasis>
+ behavior must specify a legal index (0…31) for the radio group to which the
+key belongs.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+Key behaviors that are not recognized by the server are accepted but ignored.
+Attempts to replace a "permanent" behavior are silently ignored; the behavior
+is not replaced, but not error is generated and any other components specified
+in the <emphasis>
+XkbSetMap</emphasis>
+ request are updated, as appropriate.
+</para>
+
+
+<para>
+If <emphasis>
+XkbVirtualModsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+virtualMods</emphasis>
+ is a mask which specifies the virtual modifiers to be rebound. The <emphasis>
+vmods</emphasis>
+ list specifies the real modifiers that are bound to each of the virtual
+modifiers specified in <emphasis>
+virtualMods</emphasis>
+, starting from the lowest numbered virtual modifier and progressing upward.
+Any virtual modifier that is not specified in <emphasis>
+virtualMods</emphasis>
+ has no corresponding entry in <emphasis>
+vmods</emphasis>
+, so the <emphasis>
+vmods</emphasis>
+ list has one entry for each bit that is set in <emphasis>
+virtualMods</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbExplicitComponentsMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+firstKeyExplicit</emphasis>
+ and <emphasis>
+nKeyExplicit</emphasis>
+ specify a subset of the keyboard keys to which new explicit components are to
+be assigned, and <emphasis>
+totalKeyExplicit</emphasis>
+ specifies the total number of keys in that range that have at least one
+explicit component. The <emphasis>
+explicit</emphasis>
+ list has <emphasis>
+totalKeyExplicit</emphasis>
+ elements of type KB_KEYEXPLICIT; each entry of <emphasis>
+explicit</emphasis>
+ specifies a key in the specified range and a new set of explicit components
+for that key. Any key that falls in the range specified by <emphasis>
+firstKeyExplicit</emphasis>
+ and <emphasis>
+nKeyExplicit</emphasis>
+ that is not assigned some value in <emphasis>
+explicit</emphasis>
+ has no explicit components.
+</para>
+
+
+<para>
+If <emphasis>
+XkbModifierMapMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+firstModMapKey</emphasis>
+ and <emphasis>
+nModMapKeys</emphasis>
+ specify a subset of the keyboard keys for which new modifier mappings are to
+be assigned, and <emphasis>
+totalModMapKeys</emphasis>
+ specifies the total number of keys in that range to which at least one
+modifier is bound. The <emphasis>
+modmap</emphasis>
+ list has <emphasis>
+totalModMapKeys</emphasis>
+ elements of type KB_KEYMODMAP; each entry of <emphasis>
+modmap</emphasis>
+ specifies a key in the specified range and a new set of modifiers to be
+associated with that key. Any key that falls in the range specified by
+<emphasis>
+firstModMapKey</emphasis>
+ and <emphasis>
+nModMapKeys</emphasis>
+ that is not assigned some value in <emphasis>
+modmap</emphasis>
+ has no associated modifiers.
+</para>
+
+
+<para>
+If the modifier map is changed by the <emphasis>
+XkbSetMap</emphasis>
+ request, any changes are also reflected in the core protocol modifier mapping.
+Changes to the core protocol modifier mapping are reported to XKB-unaware
+clients via <emphasis>
+MappingNotify</emphasis>
+ events and can be retrieved with the core protocol <emphasis>
+GetModifierMapping</emphasis>
+ request.
+</para>
+
+
+<para>
+If <emphasis>
+XkbVirtualModMapMask</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, <emphasis>
+firstVModMapKey</emphasis>
+ and <emphasis>
+nVModMapKeys</emphasis>
+ specify a subset of the keyboard keys for which new modifier mappings are to
+be assigned, and <emphasis>
+totalVModMapKeys</emphasis>
+ specifies the total number of keys in that range to which at least one virtual
+modifier is bound. The <emphasis>
+vmodmap</emphasis>
+ list has <emphasis>
+totalVModMapKeys</emphasis>
+ elements of type KB_KEYVMODMAP; each entry of <emphasis>
+vmodmap</emphasis>
+ specifies a key in the specified range and a new set of virtual modifiers to
+be associated with that key. Any key that falls in the range specified by
+<emphasis>
+firstVModMapKey</emphasis>
+ and <emphasis>
+nVModMapKeys</emphasis>
+ that is not assigned some value in <emphasis>
+vmodmap</emphasis>
+ has no associated virtual modifiers.
+</para>
+
+
+<para>
+If the resulting keyboard map is legal, the server updates the keyboard map.
+Changes to some keyboard components have indirect effects on others:
+</para>
+
+
+<para>
+If the <emphasis>
+XkbSetMapRecomputeActions</emphasis>
+ bit is set in <emphasis>
+flags</emphasis>
+, the actions associated with any keys for which symbol or modifier bindings
+were changed by this request are recomputed as described in
+<link linkend='Assigning_Actions_To_Keys'>Assigning Actions To Keys</link>. Note
+that actions are recomputed <emphasis>
+after </emphasis>
+any actions specified in this request are bound to keys, so the actions
+specified in this request might be clobbered by the automatic assignment of
+actions to keys.
+</para>
+
+
+<para>
+If the group width of an existing key type is changed, the list of symbols
+associated with any keys of the changed type might be resized accordingly. If
+the list increases in size, any unspecified new symbols are initialized to
+<emphasis>
+NoSymbol</emphasis>
+.
+</para>
+
+
+<para>
+If the list of actions associated with a key is not empty, changing the key
+type of the key resizes the list. Unspecified new actions are calculated by
+applying any keyboard symbol interpretations to the corresponding symbols.
+</para>
+
+
+<para>
+The number of groups global to the keyboard is always equal to the largest
+number of groups specified by any of the key symbol maps. Changing the number
+of groups in one or more key symbol maps may change the number of groups global
+to the keyboard.
+</para>
+
+
+<para>
+Assigning key behavior <emphasis>
+KB_RadioGroup</emphasis>
+ to a key adds that key as a member of the specified radio group. Changing a
+key with the existing behavior <emphasis>
+KB_RadioGroup</emphasis>
+ removes that key from the group. Changing the elements of a radio group can
+cause synthetic key press or key release events if the key to be added or
+removed is logically down at the time of the change.
+</para>
+
+
+<para>
+Changing a key with behavior <emphasis>
+KB_Lock</emphasis>
+ causes a synthetic key release event if the key is logically but not
+physically down at the time of the change.
+</para>
+
+
+<para>
+This request sends an <emphasis>
+XkbMapNotify</emphasis>
+ event which reflects both explicit and indirect map changes to any interested
+clients. If any symbolic names are changed, it sends a <emphasis>
+XkbNamesNotify</emphasis>
+ reflecting the changes to any interested clients. XKB-unaware clients are
+notified of keyboard changes via core protocol <emphasis>
+MappingNotify</emphasis>
+ events.
+</para>
+
+
+<para>
+Key press and key release events caused by changing key behavior may cause
+additional <emphasis>
+XkbStateNotify</emphasis>
+ or <emphasis>
+XkbIndicatorStateNotify</emphasis>
+ events.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_the_Compatibility_Map'>
+<title>Querying and Changing the Compatibility Map</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetCompatMap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+groups: KB_GROUPMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+getAllSI: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstSI, nSI: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+groupsRtrn: KB_GROUPMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+firstSIRtrn, nSIRtrn, nTotalSI: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+siRtrn: LISTofKB_SYMINTERP
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+groupRtrn: LISTofKB_MODDEF</entry>
+ </row>
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns the listed compatibility map components for the keyboard
+specified by <emphasis>
+deviceSpec</emphasis>
+. If <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ Error results. On return, <emphasis>
+deviceID</emphasis>
+ reports the input extension identifier of the keyboard device or <emphasis>
+0</emphasis>
+ if the server does not support the input extension.
+</para>
+
+
+<para>
+If <emphasis>
+getAllSI</emphasis>
+ is <emphasis>
+False</emphasis>
+, <emphasis>
+firstSI</emphasis>
+ and <emphasis>
+nSI</emphasis>
+ specify a subset of the symbol interpretations to be returned; if used,
+<emphasis>
+nSI</emphasis>
+ must be greater than <emphasis>
+0</emphasis>
+ and all of the elements specified by <emphasis>
+firstSI</emphasis>
+ and <emphasis>
+nSI</emphasis>
+ must be defined or a <emphasis>
+Value</emphasis>
+ error results. If <emphasis>
+getAllSyms</emphasis>
+ is <emphasis>
+True</emphasis>
+, the server ignores <emphasis>
+firstSym</emphasis>
+ and <emphasis>
+nSyms</emphasis>
+ and returns all of the symbol interpretations defined for the keyboard.
+</para>
+
+
+<para>
+The <emphasis>
+groups</emphasis>
+ mask specifies the groups for which compatibility maps are to be returned.
+</para>
+
+
+<para>
+The <emphasis>
+nTotalSI</emphasis>
+ return value reports the total number of symbol interpretations defined for
+the keyboard. On successful return, the <emphasis>
+siRtrn</emphasis>
+ return list contains the definitions for <emphasis>
+nSIRtrn</emphasis>
+ symbol interpretations beginning at <emphasis>
+firstSIRtrn</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+groupRtrn</emphasis>
+ return values report the entries in the group compatibility map for any groups
+specified in the <emphasis>
+groupsRtrn</emphasis>
+ return value.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetCompatMap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+recomputeActions: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+truncateSI: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+groups: KB_GROUPMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstSI, nSI: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+si: LISTofKB_SYMINTERPRET</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+groupMaps: LISTofKB_MODDEF</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Value</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request changes a specified subset of the compatibility map of the
+keyboard indicated by <emphasis>
+deviceSpec</emphasis>
+. If <emphasis>
+deviceSpec</emphasis>
+ specifies an invalid device, a <emphasis>
+Keyboard</emphasis>
+ error results and nothing is changed.
+</para>
+
+
+<para>
+The <emphasis>
+firstSI</emphasis>
+ and <emphasis>
+nSI</emphasis>
+ fields specify a subset of the keyboard symbol interpretations to be changed.
+The <emphasis>
+si</emphasis>
+ list specifies new values for each of the interpretations in that range.
+</para>
+
+
+<para>
+The first symbol interpretation to be changed, <emphasis>
+firstSI</emphasis>
+, must be less than or equal to the unchanged length of the list of symbol
+interpretations, or a <emphasis>
+Value</emphasis>
+ error results. If the resulting list would be larger than the unchanged list,
+it server list of symbol interpretations is automatically increased in size.
+Otherwise, if <emphasis>
+truncateSyms</emphasis>
+ is <emphasis>
+True</emphasis>
+, the server deletes any symbol interpretations after the last element changed
+by this request, and reduces the length of the list accordingly.
+</para>
+
+
+<para>
+The <emphasis>
+groupMaps</emphasis>
+ fields contain new definitions for a subset of the group compatibility map;
+<emphasis>
+groups</emphasis>
+ specifies the group compatibility map entries to be updated from <emphasis>
+groupMaps</emphasis>
+.
+</para>
+
+
+<para>
+ All changed compatibility maps and symbol interpretations must either ignore
+group state or specify a legal range of groups, or a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+If the <emphasis>
+recomputeActions</emphasis>
+ field is <emphasis>
+True</emphasis>
+, the server regenerates recalculates the actions bound to all keyboard keys by
+applying the new symbol interpretations to the entire key symbol map, as
+described in <link linkend='Assigning_Actions_To_Keys'>Assigning Actions To
+Keys</link>.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_Indicators'>
+<title>Querying and Changing Indicators</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetIndicatorState</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+state: KB_INDICATORMASK</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request reports the current state of the indicators for the keyboard
+specified by <emphasis>
+deviceSpec</emphasis>
+. If <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard, a <emphasis>
+Keyboard</emphasis>
+ error results.
+</para>
+
+
+<para>
+On successful return, the <emphasis>
+deviceID</emphasis>
+ field reports the input extension identifier of the keyboard or <emphasis>
+0</emphasis>
+ if the server does not support the input extension. The <emphasis>
+state</emphasis>
+ return value reports the state of each of the thirty-two indicators on the
+specified keyboard. The least-significant bit corresponds to indicator 0, the
+most significant bit to indicator 31; if a bit is set, the corresponding
+indicator is lit.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetIndicatorMap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+which: KB_INDICATORMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+which: KB_INDICATORMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+realIndicators: KB_INDICATORMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+nIndicators: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+maps: LISTofKB_INDICATORMAP</entry>
+ </row>
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns a subset of the maps for the indicators on the keyboard
+specified by <emphasis>
+deviceSpec</emphasis>
+. If <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error results.
+</para>
+
+
+<para>
+The <emphasis>
+which</emphasis>
+ field specifies the subset to be returned; a set bit in the which field
+indicates that the map for the corresponding indicator should be returned.
+</para>
+
+
+<para>
+On successful return, the <emphasis>
+deviceID</emphasis>
+ field reports the input extension identifier of the keyboard or <emphasis>
+0</emphasis>
+ if the server does not support the input extension. Any indicators specified
+in <emphasis>
+realIndicators</emphasis>
+ are actually present on the keyboard; the rest are virtual indicators. Virtual
+indicators do not directly cause any visible or audible effect when they change
+state, but they do cause <emphasis>
+XkbIndicatorStateNotify</emphasis>
+ events.
+</para>
+
+
+<para>
+The <emphasis>
+maps</emphasis>
+ return value reports the requested indicator maps. Indicator maps are
+described in <link linkend='Indicator_Maps'>Indicator Maps</link>
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetIndicatorMap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+which: KB_INDICATORMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+maps: LISTofKB_INDICATORMAP</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request changes a subset of the maps on the keyboard specified by
+<emphasis>
+deviceSpec</emphasis>
+. If <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error results.
+</para>
+
+
+<para>
+The <emphasis>
+which</emphasis>
+ field specifies the subset to be changed; the <emphasis>
+maps</emphasis>
+ field contains the new definitions.
+</para>
+
+
+<para>
+If successful, the new indicator maps are applied immediately. If any
+indicators change state as a result of the new maps, the server generates
+<emphasis>
+XkbIndicatorStateNotify</emphasis>
+ events as appropriate.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetNamedIndicator</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledClass: KB_LEDCLASSSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledID: KB_IDSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+indicator: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+supported: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+indicator: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+found: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+on: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+realIndicator: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+ndx: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+map: KB_INDICATORMAP</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Atom</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns information about the indicator specified by <emphasis>
+ledClass</emphasis>
+, <emphasis>
+ledID</emphasis>
+, and <emphasis>
+indicator</emphasis>
+ on the keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. The <emphasis>
+indicator</emphasis>
+ field specifies the name of the indicator for which information is to be
+returned.
+</para>
+
+
+<para>
+If <emphasis>
+deviceSpec</emphasis>
+ does not specify a device with indicators, a <emphasis>
+Keyboard</emphasis>
+ error results. If <emphasis>
+ledClass</emphasis>
+ does not have the value <emphasis>
+DfltXIClass</emphasis>
+, <emphasis>
+LedFeedbackClass</emphasis>
+, or <emphasis>
+KbdFeedbackClass</emphasis>
+, a <emphasis>
+Value</emphasis>
+ error results. If <emphasis>
+ledID</emphasis>
+ does not have the value <emphasis>
+DfltXIId</emphasis>
+ or specify the identifier of a feedback of the class specified by <emphasis>
+ledClass</emphasis>
+ on the device specified by <emphasis>
+deviceSpec</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results. If <emphasis>
+indicator</emphasis>
+ is not a valid ATOM other than <emphasis>
+None</emphasis>
+, an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+This request is always supported with default class and identifier on the core
+keyboard device. If the request specifies a device other than the core keyboard
+device or a feedback class and identifier other than the defaults, and the
+server does not support indicator names or indicator maps for extension
+devices, the <emphasis>
+supported</emphasis>
+ return value is <emphasis>
+False</emphasis>
+ and the values of the other fields in the reply are undefined. If the client
+which issued the unsupported request has also selected to do so, it will also
+receive an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event which reports the attempt to use an unsupported feature, in this case
+one or both of <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+ or <emphasis>
+XkbXI_IndicatorNames</emphasis>
+.
+</para>
+
+
+<para>
+Otherwise, <emphasis>
+supported</emphasis>
+ is <emphasis>
+True</emphasis>
+ and the <emphasis>
+deviceID</emphasis>
+ field reports the input extension identifier of the keyboard or <emphasis>
+0</emphasis>
+ if the server does not support the input extension. The <emphasis>
+indicator</emphasis>
+ return value reports the name for which information was requested and the
+<emphasis>
+found</emphasis>
+ return value is <emphasis>
+True</emphasis>
+ if an indicator with the specified name was found on the device.
+</para>
+
+
+<para>
+If a matching indicator was found:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+on</emphasis>
+ return value reports the state of the indicator at the time of the request.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+realIndicator</emphasis>
+ return value is <emphasis>
+True</emphasis>
+ if the requested indicator is actually present on the keyboard or <emphasis>
+False</emphasis>
+ if it is virtual.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+ndx</emphasis>
+ return value reports the index of the indicator in the requested feedback.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+map</emphasis>
+ return value reports the indicator map used by to automatically change the
+state of the specified indicator in response to changes in keyboard state or
+controls.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If no matching indicator is found, the <emphasis>
+found</emphasis>
+ return value is <emphasis>
+False</emphasis>
+, and the <emphasis>
+on</emphasis>
+, <emphasis>
+realIndicator</emphasis>
+, <emphasis>
+ndx</emphasis>
+, and <emphasis>
+map</emphasis>
+ return values are undefined.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetNamedIndicator</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledClass: KB_LEDCLASSSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledID: KB_IDSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+indicator: ATOM</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+setState: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+on: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+setMap: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+createMap: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+map: KB_SETINDICATORMAP</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Atom</emphasis>
+, <emphasis>
+Access</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request changes various aspects of the indicator specified by <emphasis>
+ledClass</emphasis>
+, <emphasis>
+ledID</emphasis>
+, and <emphasis>
+indicator</emphasis>
+ on the keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. The <emphasis>
+indicator</emphasis>
+ argument specifies the name of the indicator to be updated.
+</para>
+
+
+<para>
+If <emphasis>
+deviceSpec</emphasis>
+ does not specify a device with indicators, a <emphasis>
+Keyboard</emphasis>
+ error results. If <emphasis>
+ledClass</emphasis>
+ does not have the value <emphasis>
+DfltXIClass</emphasis>
+, <emphasis>
+LedFeedbackClass</emphasis>
+, or <emphasis>
+KbdFeedbackClass</emphasis>
+, a <emphasis>
+Value</emphasis>
+ error results. If <emphasis>
+ledID</emphasis>
+ does not have the value <emphasis>
+DfltXIId</emphasis>
+ or specify the identifier of a feedback of the class specified by <emphasis>
+ledClass</emphasis>
+ on the device specified by <emphasis>
+deviceSpec</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results. If <emphasis>
+indicator</emphasis>
+ is not a valid ATOM other than <emphasis>
+None</emphasis>
+, an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+This request is always supported with default class and identifier on the core
+keyboard device. If the request specifies a device other than the core keyboard
+device or a feedback class and identifier other than the defaults, and the
+server does not support indicator names or indicator maps for extension
+devices, the <emphasis>
+supported</emphasis>
+ return value is <emphasis>
+False</emphasis>
+ and the values of the other fields in the reply are undefined. If the client
+which issued the unsupported request has also selected to do so, it will also
+receive an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event which reports the attempt to use an unsupported feature, in this case
+one or both of <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+ and <emphasis>
+XkbXI_IndicatorNames</emphasis>
+.
+</para>
+
+
+<para>
+Otherwise, <emphasis>
+supported</emphasis>
+ is <emphasis>
+True</emphasis>
+ and the <emphasis>
+deviceID</emphasis>
+ field reports the input extension identifier of the keyboard or <emphasis>
+0</emphasis>
+ if the server does not support the input extension. The <emphasis>
+indicator</emphasis>
+ return value reports the name for which information was requested and the
+<emphasis>
+found</emphasis>
+ return value is <emphasis>
+True</emphasis>
+ if an indicator with the specified name was found on the device.
+</para>
+
+
+<para>
+If no indicator with the specified name is found on the specified device, and
+the <emphasis>
+createMap</emphasis>
+ field is <emphasis>
+True</emphasis>
+, XKB assigns the specified name to the lowest-numbered indicator that has no
+name (i.e. whose name is <emphasis>
+None</emphasis>
+) and applies the rest of the fields in the request to the newly named
+indicator. If no unnamed indicators remain, this request reports no error and
+has no effect.
+</para>
+
+
+<para>
+If no matching indicator is found or new indicator assigned this request
+reports no error and has no effect. Otherwise, it updates the indicator as
+follows:
+</para>
+
+
+<para>
+If <emphasis>
+setMap </emphasis>
+is <emphasis>
+True</emphasis>
+, XKB changes the map for the indicator (see <link linkend='Indicator_Maps'>Indicator Maps</link>) to reflect the
+values specified in <emphasis>
+map</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+setState</emphasis>
+ is <emphasis>
+True</emphasis>
+, XKB attempts to explicitly change the state of the indicator to the state
+specified in <emphasis>
+on</emphasis>
+. The effects of an attempt to explicitly change the state of an indicator
+depend on the values in the map for that indicator and are not guaranteed to
+succeed.
+</para>
+
+
+<para>
+If this request affects both indicator map and state, it updates the indicator
+map before attempting to change its state, so the success of the explicit
+change depends on the indicator map values specified in the request.
+</para>
+
+
+<para>
+If this request changes the indicator map, it applies the new map immediately
+to determine the appropriate state for the indicator given the new indicator
+map and the current state of the keyboard.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_Symbolic_Names'>
+<title>Querying and Changing Symbolic Names</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetNames</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+which: KB_NAMEDETAILMASK</entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+which: KB_NAMESMASK
+minKeyCode, maxKeyCode: KEYCODE
+nTypes: CARD8
+nKTLevels: CARD16
+groupNames: KB_GROUPMASK
+virtualMods: KB_VMODMASK
+firstKey: KEYCODE
+nKeys: CARD8
+indicators: KB_INDICATORMASK
+nRadioGroups, nKeyAliases: CARD8
+present: KB_NAMEDETAILMASK
+valueList: LISTofITEMs</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns the symbolic names for various components of the keyboard
+mapping for the device specified by <emphasis>
+deviceSpec</emphasis>
+. The <emphasis>
+which</emphasis>
+ field specifies the keyboard components for which names are to be returned. If
+<emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error results. If any undefined bits in <emphasis>
+which</emphasis>
+ are non-zero, a <emphasis>
+Value</emphasis>
+ error results.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ return value contains the X Input Extension device identifier of the specified
+device or <emphasis>
+0</emphasis>
+ if the server does not support the input extension. The <emphasis>
+present</emphasis>
+ and <emphasis>
+valueList</emphasis>
+ return values specify the components for which names are being reported. If a
+component is specified in <emphasis>
+present</emphasis>
+, the corresponding element is present in the <emphasis>
+valueList</emphasis>
+, otherwise that component has length <emphasis>
+0</emphasis>
+. The components of the <emphasis>
+valueList</emphasis>
+ appear in the following order, when present:.
+</para>
+
+<informaltable frame='none'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Component</entry>
+ <entry>Size</entry>
+ <entry>Type</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+XkbKeycodesName</emphasis>
+</entry>
+ <entry>1</entry>
+ <entry> ATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGeometryName</emphasis>
+</entry>
+ <entry>1</entry>
+ <entry> ATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbSymbolsName</emphasis>
+</entry>
+ <entry>1</entry>
+ <entry> ATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbPhysSymbolsName</emphasis>
+</entry>
+ <entry>1</entry>
+ <entry> ATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbTypesName</emphasis>
+</entry>
+ <entry>1</entry>
+ <entry> ATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbCompatName</emphasis>
+</entry>
+ <entry>1</entry>
+ <entry> ATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbKeyTypeNames</emphasis>
+ </entry>
+ <entry><emphasis>
+nTypes</emphasis>
+</entry>
+ <entry> LISTofATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbKTLevelNames</emphasis>
+ </entry>
+ <entry><emphasis>
+nTypes</emphasis>
+,
+<emphasis>
+nKTLevels</emphasis>
+</entry>
+ <entry>{ count: LISTofCARD8,
+ names: LISTofATOM }</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbIndicatorNames</emphasis>
+ </entry>
+ <entry>One per bit set in <emphasis>
+indicators</emphasis>
+</entry>
+ <entry> LISTofATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbVirtualModNames</emphasis>
+ </entry>
+ <entry>One per bit set in <emphasis>
+virtualMods</emphasis>
+</entry>
+ <entry> LISTofATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGroupNames </emphasis>
+</entry>
+ <entry>One per bit set in <emphasis>
+groupNames</emphasis>
+</entry>
+ <entry> LISTofATOM</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbKeyNames</emphasis>
+</entry>
+ <entry><emphasis>
+nKeys</emphasis>
+</entry>
+ <entry> LISTofKB_KEYNAME</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbKeyAliases</emphasis>
+</entry>
+ <entry><emphasis>
+nKeyAliases</emphasis>
+</entry>
+ <entry> LISTofKB_KEYALIAS</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbRGNames</emphasis>
+</entry>
+ <entry><emphasis>
+nRadioGroups</emphasis>
+</entry>
+ <entry> LISTofATOM</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+If type names are reported, the <emphasis>
+nTypes</emphasis>
+ return value reports the number of types defined for the keyboard, and the
+list of key type names in <emphasis>
+valueList</emphasis>
+ has <emphasis>
+nTypes</emphasis>
+ elements.
+</para>
+
+
+<para>
+If key type level names are reported, the list of key type level names in the
+<emphasis>
+valueList</emphasis>
+ has two parts: The <emphasis>
+count</emphasis>
+ array has <emphasis>
+nTypes</emphasis>
+ elements, each of which reports the number of level names reported for the
+corresponding key type. The <emphasis>
+names</emphasis>
+ array has <emphasis>
+nKTLevels</emphasis>
+ atoms and reports the names of each type sequentially. The <emphasis>
+nKTLevels</emphasis>
+ return value is always equal to the sum of all of the elements of the
+<emphasis>
+count</emphasis>
+ array.
+</para>
+
+
+<para>
+If indicator names are reported, the <emphasis>
+indicators</emphasis>
+ mask specifies the indicators for which names are defined; any indicators not
+specified in <emphasis>
+indicators</emphasis>
+ have the name <emphasis>
+None</emphasis>
+. The list of indicator names in <emphasis>
+valueList</emphasis>
+ contains the names of the listed indicators, beginning with the
+lowest-numbered indicator for which a name is defined and proceeding to the
+highest.
+</para>
+
+
+<para>
+If virtual modifier names are reported, the <emphasis>
+virtualMods</emphasis>
+ mask specifies the virtual modifiers for which names are defined; any virtual
+modifiers not specified in <emphasis>
+virtualMods</emphasis>
+ have the name <emphasis>
+None</emphasis>
+. The list of virtual modifier names in <emphasis>
+valueList</emphasis>
+ contains the names of the listed virtual modifiers, beginning with the
+lowest-numbered virtual modifier for which a name is defined and proceeding to
+the highest.
+</para>
+
+
+<para>
+If group names are reported, the <emphasis>
+groupNames</emphasis>
+ mask specifies the groups for which names are defined; any groups not
+specified in <emphasis>
+groupNames</emphasis>
+ have the name <emphasis>
+None</emphasis>
+. The list of group names in <emphasis>
+valueList</emphasis>
+ contains the names of the listed groups, beginning with the lowest-numbered
+group for which a name is defined and proceeding to the highest.
+</para>
+
+
+<para>
+If key names are reported, the <emphasis>
+firstKey</emphasis>
+ and <emphasis>
+nKeys</emphasis>
+ return values specify a range of keys which includes all keys for which names
+are defined; any key that does not fall in the range specified by <emphasis>
+firstKey</emphasis>
+ and <emphasis>
+nKeys</emphasis>
+ has the name <emphasis>
+NullKeyName</emphasis>
+. The list of key names in the <emphasis>
+valueList</emphasis>
+ has <emphasis>
+nKeys</emphasis>
+ entries and specifies the names of the keys beginning at <emphasis>
+firstKey</emphasis>
+.
+</para>
+
+
+<para>
+If key aliases are reported, the <emphasis>
+nKeyAliases</emphasis>
+ return value specifies the total number of key aliases defined for the
+keyboard. The list of key aliases in <emphasis>
+valueList</emphasis>
+ has <emphasis>
+nKeyAliases</emphasis>
+ entries, each of which reports an alias and the real name of the key to which
+it corresponds.
+</para>
+
+
+<para>
+If radio group names are reported, the <emphasis>
+nRadioGroups</emphasis>
+ return value specifies the number of radio groups on the keyboard for which
+names are defined. The list of radio group names in <emphasis>
+valueList</emphasis>
+ reports the names of each group and has <emphasis>
+nRadioGroups</emphasis>
+ entries.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetNames</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoargs'>which: KB_NAMEDETAILMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+virtualMods: KB_VMODMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstType, nTypes: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKTLevel, nKTLevels: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+totalKTLevelNames: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+indicators: KB_INDICATORMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+groupNames: KB_GROUPMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nRadioGroups: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKey: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeys, nKeyAliases: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+valueList: LISTofITEMs</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Atom</emphasis>
+, <emphasis>
+Value</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request changes the symbolic names for the requested components of the
+keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. The <emphasis>
+which</emphasis>
+ field specifies the components for which one or more names are to be updated.
+If <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error results. If any undefined bits in <emphasis>
+which</emphasis>
+ are non-zero, a <emphasis>
+Value</emphasis>
+ error results. If any error (other than <emphasis>
+Alloc</emphasis>
+ or <emphasis>
+Implementation</emphasis>
+) occurs, this request returns without modifying any names.
+</para>
+
+
+<para>
+The <emphasis>
+which</emphasis>
+ and <emphasis>
+valueList</emphasis>
+ fields specify the components to be changed; the type of each <emphasis>
+valueList</emphasis>
+ entry, the order in which components appear in the <emphasis>
+valueList</emphasis>
+ when specified, and the correspondence between components in <emphasis>
+which</emphasis>
+ and the entries in the <emphasis>
+valueList</emphasis>
+ are as specified for the <emphasis>
+XkbGetNames</emphasis>
+ request.
+</para>
+
+
+<para>
+If keycodes, geometry, symbols, physical symbols, types or compatibility map
+names are to be changed, the corresponding entries in the <emphasis>
+valueList</emphasis>
+ must have the value <emphasis>
+None</emphasis>
+ or specify a valid ATOM, else an <emphasis>
+Atom</emphasis>
+ error occurs.
+</para>
+
+
+<para>
+If key type names are to be changed, the <emphasis>
+firstType</emphasis>
+ and <emphasis>
+nTypes</emphasis>
+ fields specify a range of types for which new names are supplied, and the list
+of key type names in <emphasis>
+valueList</emphasis>
+ has <emphasis>
+nTypes</emphasis>
+ elements. Names for types that fall outside of the range specified by
+<emphasis>
+firstType</emphasis>
+ and <emphasis>
+nTypes</emphasis>
+ are not affected. If this request specifies names for types that are not
+present on the keyboard, a <emphasis>
+Match</emphasis>
+ error results. All of the type names in the <emphasis>
+valueList</emphasis>
+ must be valid ATOMs or have the value <emphasis>
+None</emphasis>
+, or an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+The names of the first four keyboard types are specified by the XKB extension
+and cannot be changed; including any of the canonical types in this request
+causes an <emphasis>
+Access</emphasis>
+ error, as does trying to assign the name reserved for a canonical type to one
+of the other key types.
+</para>
+
+
+<para>
+If key type level names are to be changed, the <emphasis>
+firstKTLevel</emphasis>
+ and <emphasis>
+nKTLevels</emphasis>
+ fields specify a range of key types for which new level names are supplied,
+and the list of key type level names in the <emphasis>
+valueList</emphasis>
+ has two parts: The <emphasis>
+count</emphasis>
+ array has <emphasis>
+nKTLevels</emphasis>
+ elements, each of which specifies the number of levels for which names are
+supplied on the corresponding key type; any levels for which no names are
+specified are assigned the name <emphasis>
+None</emphasis>
+. The <emphasis>
+names</emphasis>
+ array has <emphasis>
+totalKTLevels</emphasis>
+ atoms and specifies the names of each type sequentially. The <emphasis>
+totalKTLevels</emphasis>
+ field must always equal the sum of all of the elements of the <emphasis>
+count</emphasis>
+ array. Level names for types that fall outside of the specified range are not
+affected. If this request specifies level names for types that are not present
+on the keyboard, or if it specifies more names for a type than the type has
+levels, a <emphasis>
+Match</emphasis>
+ error results. All specified type level names must be <emphasis>
+None</emphasis>
+ or a valid ATOM or an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+If indicator names are to be changed, the <emphasis>
+indicators</emphasis>
+ mask specifies the indicators for which new names are specified; the names for
+indicators not specified in <emphasis>
+indicators</emphasis>
+ are not affected. The list of indicator names in <emphasis>
+valueList</emphasis>
+ contains the new names for the listed indicators, beginning with the
+lowest-numbered indicator for which a name is defined and proceeding to the
+highest. All specified indicator names must be a valid ATOM or <emphasis>
+None</emphasis>
+, or an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+If virtual modifier names are to be changed, the <emphasis>
+virtualMods</emphasis>
+ mask specifies the virtual modifiers for which new names are specified; names
+for any virtual modifiers not specified in <emphasis>
+virtualMods</emphasis>
+ are not affected. The list of virtual modifier names in <emphasis>
+valueList</emphasis>
+ contains the new names for the specified virtual modifiers, beginning with the
+lowest-numbered virtual modifier for which a name is defined and proceeding to
+the highest. All virtual modifier names must be valid ATOMs or <emphasis>
+None</emphasis>
+, or an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+If group names are to be changed, the <emphasis>
+groupNames</emphasis>
+ mask specifies the groups for which new names are specified; the name of any
+group not specified in <emphasis>
+groupNames</emphasis>
+ is not changed. The list of group names in <emphasis>
+valueList</emphasis>
+ contains the new names for the listed groups, beginning with the
+lowest-numbered group for which a name is defined and proceeding to the
+highest. All specified group names must be a valid ATOM or <emphasis>
+None</emphasis>
+, or an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+If key names are to be changed, the <emphasis>
+firstKey</emphasis>
+ and <emphasis>
+nKeys</emphasis>
+ fields specify a range of keys for which new names are defined; the name of
+any key that does not fall in the range specified by <emphasis>
+firstKey</emphasis>
+ and <emphasis>
+nKeys</emphasis>
+ is not changed. The list of key names in the <emphasis>
+valueList</emphasis>
+ has <emphasis>
+nKeys</emphasis>
+ entries and specifies the names of the keys beginning at <emphasis>
+firstKey</emphasis>
+.
+</para>
+
+
+<para>
+If key aliases are to be changed, the <emphasis>
+nKeyAliases</emphasis>
+ field specifies the length of a new list of key aliases for the keyboard. The
+list of key aliases can only be replaced in its entirety; it cannot be
+replaced. The list of key aliases in <emphasis>
+valueList</emphasis>
+ has <emphasis>
+nKeyAliases</emphasis>
+ entries, each of which reports an alias and the real name of the key to which
+it corresponds.
+</para>
+
+
+<para>
+XKB does not check key names or aliases for consistency and validity, so
+applications should take care not to assign duplicate names or aliases
+</para>
+
+
+<para>
+If radio group names are to be changed, the <emphasis>
+nRadioGroups</emphasis>
+ field specifies the length of a new list of radio group names for the
+keyboard. There is no way to edit the list of radio group names; it can only be
+replaced in its entirety. The list of radio group names in <emphasis>
+valueList</emphasis>
+ reports the names of each group and has <emphasis>
+nRadioGroups</emphasis>
+ entries. If the list of radio group names specifies names for more radio
+groups than XKB allows (32), a <emphasis>
+Match</emphasis>
+ error results. All specified radio group names must be valid ATOMs or have the
+value <emphasis>
+None</emphasis>
+, or an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_Keyboard_Geometry'>
+<title>Querying and Changing Keyboard Geometry</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetGeometry</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+name: ATOM</entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+name: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+found: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+widthMM, heightMM: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+baseColorNdx, labelColorNdx: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+properties: LISTofKB_PROPERTY
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+colors: LISTofSTRING8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+shapes: LISTofKB_SHAPE
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+sections: LISTofKB_SECTION
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+doodads: LISTofKB_DOODAD
+ </entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keyAliases: LISTofKB_KEYALIAS</entry>
+ </row>
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns a description of the physical layout of a keyboard. If the
+<emphasis>
+name</emphasis>
+ field has the value <emphasis>
+None</emphasis>
+, or if name is identical to the name of the geometry for the keyboard
+specified by <emphasis>
+deviceSpec</emphasis>
+, this request returns the geometry of the keyboard specified by <emphasis>
+deviceSpec</emphasis>
+; otherwise, if <emphasis>
+name</emphasis>
+ is a valid atom other than <emphasis>
+None</emphasis>
+, the server returns the keyboard geometry description with that name in the
+server database of keyboard components (see <link linkend='The_Server_Database_of_Keyboard_Components'>The Server Database of Keyboard
+Components</link>) if one exists. If <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error results. If <emphasis>
+name</emphasis>
+ has a value other than <emphasis>
+None</emphasis>
+ or a valid ATOM, an <emphasis>
+Atom</emphasis>
+ error results.
+</para>
+
+
+<para>
+On successful return, the <emphasis>
+deviceID</emphasis>
+ field reports the X Input extension identifier of the keyboard device
+specified in the request, or <emphasis>
+0</emphasis>
+ if the server does not support the input extension.
+</para>
+
+
+<para>
+The <emphasis>
+found</emphasis>
+ return value reports whether the requested geometry was available. If
+<emphasis>
+found</emphasis>
+ is <emphasis>
+False</emphasis>
+, no matching geometry was found and the remaining fields in the request reply
+are undefined; if <emphasis>
+found</emphasis>
+ is <emphasis>
+True</emphasis>
+, the remaining fields of the reply describe the requested keyboard geometry.
+The interpretation of the components that make up a keyboard geometry is
+described in detail in <link linkend='Keyboard_Geometry'>Keyboard
+Geometry</link>
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetGeometry</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+name: ATOM</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+widthMM, heightMM, CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+baseColorNdx, labelColorNdx: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+shapes: LISTofKB_SHAPE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+sections: LISTofKB_SECTION</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+properties: LISTofKB_PROPERTY</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+colors: LISTofSTRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+doodads: LISTofKB_DOODAD</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keyAliases: LISTofKB_KEYALIAS</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Atom</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request changes the reported description of the geometry for the keyboard
+specified by <emphasis>
+deviceSpec</emphasis>
+. If deviceSpec does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error results.
+</para>
+
+
+<para>
+The <emphasis>
+name</emphasis>
+ field specifies the name of the new keyboard geometry and must be a valid ATOM
+or an <emphasis>
+Atom</emphasis>
+ error results. The new geometry is not added to the server database of
+keyboard components, but it can be retrieved using the <emphasis>
+XkbGetGeometry</emphasis>
+ request for as long as it is bound to the keyboard. The keyboard geometry
+symbolic name is also updated from the name field, and an <emphasis>
+XkbNamesNotify</emphasis>
+ event is generated, if necessary.
+</para>
+
+
+<para>
+The list of <emphasis>
+colors</emphasis>
+ must include at least two definitions, or a <emphasis>
+Value</emphasis>
+ error results. All color definitions in the geometry must specify a legal
+color (i.e. must specify a valid index for one of the entries of the <emphasis>
+colors</emphasis>
+ list) or a <emphasis>
+Match</emphasis>
+ error results. The <emphasis>
+baseColorNdx</emphasis>
+ and the <emphasis>
+labelColorNdx</emphasis>
+ must be different or a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+The list of <emphasis>
+shapes</emphasis>
+ must include at least one shape definition, or a <emphasis>
+Value</emphasis>
+ error results. If any two shapes have the same name, a <emphasis>
+Match</emphasis>
+ error result. All doodads and keys which specify shape must specify a valid
+index for one of the elements of the <emphasis>
+shapes</emphasis>
+ list, or a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+All section, shape and doodad names must be valid ATOMs or an <emphasis>
+Atom</emphasis>
+ error results; the constant <emphasis>
+None</emphasis>
+ is not permitted for any of these components.
+</para>
+
+
+<para>
+All doodads must be of a known type; XKB does not support "private" doodad
+types.
+</para>
+
+
+<para>
+If, after rotation, any keys or doodads fall outside of the bounding box for a
+section, the bounding box is automatically adjusted to the minimum size which
+encloses all of its components.
+</para>
+
+
+<para>
+If, after adjustment and rotation, the bounding box of any section or doodad
+extends below zero on either the X or Y axes, the entire geometry is translated
+so that the minimum extent along either axis is zero.
+</para>
+
+
+<para>
+If, after rotation and translation, any keyboard components fall outside of the
+rectangle specified by <emphasis>
+widthMM</emphasis>
+ and <emphasis>
+heightMM</emphasis>
+, the keyboard dimensions are automatically resized to the minimum bounding box
+that surrounds all components. Otherwise, the width and height of the keyboard
+are left as specified.
+</para>
+
+
+<para>
+The <emphasis>
+under</emphasis>
+ field of any overlay key definitions must specify a key that is in the section
+that contains the overlay key, or a <emphasis>
+Match</emphasis>
+ error results. This request does not check the value of the <emphasis>
+over</emphasis>
+ field of an overlay key definition, so applications must be careful to avoid
+conflicts with actual keys.
+</para>
+
+
+<para>
+This request does not verify that key names or aliases are unique. It also does
+not verify that all key names specified in the geometry are bound to some
+keycode or that all keys that are named in the keyboard definition are also
+available in the geometry. Applications should make sure that keyboard geometry
+has no internal conflicts and is consistent with the other components of the
+keyboard definition, but XKB does not check for or guarantee it.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_Per_Client_Flags'>
+<title>Querying and Changing Per-Client Flags</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbPerClientFlags</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+change: KB_PCFMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+value: KB_PCFMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ctrlsToChange: KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+autoCtrls: KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+autoCtrlValues: KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+supported: KB_PCFMASK
+value: KB_PCFMASK
+autoCtrls: KB_BOOLCTRLMASK
+autoCtrlValues: KB_BOOLCTRLMASK
+where: KB_PCFMASK:</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Value</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Changes the client specific flags for the keyboard specified by <emphasis>
+deviceSpec</emphasis>
+. Reports a <emphasis>
+Keyboard</emphasis>
+ error if <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device.
+</para>
+
+
+<para>
+Any flags specified in <emphasis>
+change</emphasis>
+ are set to the corresponding values in <emphasis>
+value</emphasis>
+, provided that the server supports the requested control. Legal
+per-client-flags are:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Flag…</entry>
+ <entry>Described in…</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+XkbPCF_DetectableAutorepeat</emphasis>
+</entry>
+ <entry><link linkend='Detectable_Autorepeat'>Detectable
+Autorepeat</link></entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbPCF_GrabsUseXKBStateMask</emphasis>
+</entry>
+ <entry><link linkend='Setting_a_Passive_Grab_for_an_XKB_State'>Setting a Passive Grab
+for an XKB State</link></entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbPCF_AutoResetControlsMask</emphasis>
+</entry>
+ <entry><link linkend='Automatic_Reset_of_Boolean_Controls'>Automatic Reset of
+Boolean Controls</link></entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbPCF_LookupStateWhenGrabbed</emphasis>
+</entry>
+ <entry><link linkend='Effects_of_XKB_on_Core_Protocol_Events'>Effects of XKB on Core
+Protocol Events</link></entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbPCF_SendEventUsesXKBState</emphasis>
+</entry>
+ <entry><link linkend='Sending_Events_to_Clients'>Sending Events to
+Clients</link></entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+If <emphasis>
+PCF_AutoResetControls</emphasis>
+ is set in both <emphasis>
+change</emphasis>
+ and <emphasis>
+value</emphasis>
+, the client’s mask of controls to be changed is updated from <emphasis>
+ctrlsToChange</emphasis>
+, <emphasis>
+autoCtrls</emphasis>
+, and <emphasis>
+autoCtrlValues</emphasis>
+. Any controls specified in <emphasis>
+ctrlsToChange</emphasis>
+ are modified in the auto-reset controls mask for the client; the corresponding
+bits from the <emphasis>
+autoCtrls</emphasis>
+ field are copied into the auto-reset controls mask and the corresponding bits
+from <emphasis>
+autoCtrlValues</emphasis>
+ are copied into the auto-reset controls state values. If any controls are
+specified in <emphasis>
+autoCtrlValues</emphasis>
+ but not in <emphasis>
+autoCtrls</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results. If any controls are specified in <emphasis>
+autoCtrls</emphasis>
+ but not in <emphasis>
+ctrlsToChange</emphasis>
+, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+If <emphasis>
+PCF_AutoResetControls</emphasis>
+ is set in <emphasis>
+change</emphasis>
+ but not in <emphasis>
+value</emphasis>
+, the client’s mask of controls to be changed is reset to all zeroes (i.e.
+the client does not change any controls when it exits).
+</para>
+
+
+<para>
+This request reports a <emphasis>
+Match</emphasis>
+ error if a bit is set in any of the value masks but not in the control mask
+that governs it or a <emphasis>
+Value</emphasis>
+ error if any undefined bits are set in any of the masks.
+</para>
+
+
+<para>
+On successful return, the <emphasis>
+deviceID</emphasis>
+ field reports the X Input extension identifier of the keyboard, or <emphasis>
+0</emphasis>
+ if the server does not support the X Input Extension.
+</para>
+
+
+<para>
+The <emphasis>
+supported</emphasis>
+ return value reports the set of per-client flags that are supported by the
+server; in this version of XKB, only the <emphasis>
+XkbPCF_DetectableAutorepeat</emphasis>
+ per-client flag is optional; all other per-client flags must be supported.
+</para>
+
+
+<para>
+The <emphasis>
+value</emphasis>
+ return value reports the current settings of all per-client flags for the
+specified keyboard. The <emphasis>
+autoCtrls</emphasis>
+ return value reports the current set of controls to be reset when the client
+exits, while the <emphasis>
+autoCtrlValues</emphasis>
+ return value reports the state to which they should be set.
+</para>
+
+
+</sect2>
+<sect2 id='Using_the_Servers_Database_of_Keyboard_Components'>
+<title>Using the Server’s Database of Keyboard Components</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbListComponents</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+maxNames: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keymapsSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keycodesSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+typesSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+compatMapSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+symbolsSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+geometrySpec: STRING8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+extra: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+keymaps,keycodes,types,compatMaps: LISTofKB_COMPONENTNAME
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+symbols, geometries: LISTofKB_COMPONENTNAME</entry>
+ </row>
+ <row>
+ <entry role='protoreply'>Where:</entry>
+ </row>
+ <row>
+ <entry role='protoreply'>KB_COMPONENTNAME { hints: CARD8, name:
+STRING8 }</entry>
+ </row>
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns one or more lists of keyboard components that are
+available from the X server database of keyboard components for the device
+specified by <emphasis>
+deviceSpec</emphasis>
+. The X server is allowed, but not required or expected, to maintain separate
+databases for each keyboard device. A <emphasis>
+Keyboard</emphasis>
+ error results if <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device.
+</para>
+
+
+<para>
+The <emphasis>
+maxNames</emphasis>
+ field specifies the maximum number of component names to be reported, in
+total, by this request.
+</para>
+
+
+<para>
+The <emphasis>
+keymapsSpec</emphasis>
+, <emphasis>
+keycodesSpec</emphasis>
+, <emphasis>
+typesSpec</emphasis>
+, <emphasis>
+compatMapSpec</emphasis>
+, <emphasis>
+symbolsSpec</emphasis>
+ and <emphasis>
+geometrySpec</emphasis>
+ request fields specify a pattern to be matched against the names of all
+components of the corresponding type in the server database of keyboard
+components.
+</para>
+
+
+<para>
+Each pattern uses the ISO Latin-1 encoding and should contain only parentheses,
+the wildcard characters "?" and "*" or characters that are permitted in a
+component class or member name (see <link linkend='Component_Names'>Component Names</link>). Illegal
+characters in a pattern are simply ignored; no error results if a pattern
+contains illegal characters.
+</para>
+
+
+<para>
+Comparison is case-sensitive and, in a pattern, the "?" wildcard character
+matches any single character except parentheses while the "*" character matches
+any number of characters except parentheses. If an implementation accepts
+characters other than those required by XKB, whether or not those characters
+match either wildcard is also implementation dependent. An empty pattern does
+not match any component names.
+</para>
+
+
+<para>
+On successful return, the <emphasis>
+deviceID</emphasis>
+ return value reports the X Input Extension device identifier of the specified
+device, or <emphasis>
+0</emphasis>
+ if the server does not support the X input extension. The <emphasis>
+extra</emphasis>
+ return value reports the number of matching component names that could not be
+returned due to the setting of the <emphasis>
+maxNames</emphasis>
+ field in the request.
+</para>
+
+
+<para>
+The <emphasis>
+keymaps</emphasis>
+, <emphasis>
+keycodes</emphasis>
+, <emphasis>
+types</emphasis>
+, <emphasis>
+compatMaps</emphasis>
+, <emphasis>
+symbols</emphasis>
+ and <emphasis>
+geometries</emphasis>
+ return the hints (see <link linkend='Component_Hints'>Component
+Hints</link>) and names of any components from the server database that match
+the corresponding pattern.
+</para>
+
+
+<para>
+<link linkend='The_Server_Database_of_Keyboard_Components'>The Server Database of Keyboard
+Components</link> describes the X server database of keyboard components in
+more detail.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetKbdByName</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+need, want: KB_GBNDETAILMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+load: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keymapsSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keycodesSpec, typesSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+compatMapSpec, symbolsSpec: STRING8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+geometrySpec: STRING8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+minKeyCode, maxKeyCode: KEYCODE
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+loaded, newKeyboard: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+found, reported: KB_GBNDETAILMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+map: optional <emphasis>
+XkbGetMap</emphasis>
+ reply
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+compat: optional <emphasis>
+XkbGetCompatMap</emphasis>
+ reply
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+indicators: optional <emphasis>
+XkbGetIndicatorMap</emphasis>
+ reply
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+names: optional <emphasis>
+XkbGetNames</emphasis>
+ reply
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+geometry: optional <emphasis>
+XkbGetGeometry</emphasis>
+ reply</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Keyboard</emphasis>
+, <emphasis>
+Access</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Assembles and returns a keymap from the current mapping and specified elements
+from the server database of keymap components for the keyboard specified by
+<emphasis>
+deviceSpec</emphasis>
+, and optionally replaces the current keyboard mapping with the newly generated
+description. If <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid keyboard device, a <emphasis>
+Keyboard</emphasis>
+ error results.
+</para>
+
+
+<para>
+The <emphasis>
+keymapsSpec</emphasis>
+, <emphasis>
+keycodesSpec</emphasis>
+, <emphasis>
+typesSpec</emphasis>
+, <emphasis>
+compatMapSpec</emphasis>
+, <emphasis>
+symbolsSpec</emphasis>
+ and <emphasis>
+geometrySpec</emphasis>
+ component expressions (see <link linkend='Partial_Components_and_Combining_Multiple_Components'>
+Partial Components and Combining Multiple Components</link>) specify the
+database components to be used to assemble the keyboard description.
+</para>
+
+
+<para>
+The <emphasis>
+want</emphasis>
+ field lists the pieces of the keyboard description that the client wants to
+have reported for the newly constructed keymap. The <emphasis>
+need</emphasis>
+ field lists all of the pieces that must be reported. If any of the pieces in
+<emphasis>
+need</emphasis>
+ cannot be loaded from the specified names, no description of the keyboard is
+returned.
+</para>
+
+
+<para>
+The <emphasis>
+want</emphasis>
+ and <emphasis>
+need</emphasis>
+ fields can include any combinations of these <emphasis>
+XkbGetMapByName</emphasis>
+ (GBN) components:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='1.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>XkbGetMapByName Keyboard Component…</entry>
+ <entry>Database Component…</entry>
+ <entry>Components of Keyboard Description</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+XkbGBN_Types</emphasis>
+</entry>
+ <entry>types</entry>
+ <entry>key types</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGBN_CompatMap</emphasis>
+</entry>
+ <entry>compat</entry>
+ <entry>symbol interpretations, group compatibility map</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGBN_ClientSymbols</emphasis>
+</entry>
+ <entry>symbols, types, keycodes</entry>
+ <entry>key types, key symbol mappings, modifier mapping</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGBN_ServerSymbols</emphasis>
+</entry>
+ <entry>symbols, types, keycodes</entry>
+ <entry>key behaviors, key actions, key explicit components, virtual
+modifiers, virtual modifier mapping</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGBN_IndicatorMap</emphasis>
+</entry>
+ <entry>compat</entry>
+ <entry>indicator maps, indicator names</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGBN_KeyNames</emphasis>
+</entry>
+ <entry>keycodes</entry>
+ <entry>key names, key aliases</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGBN_Geometry</emphasis>
+</entry>
+ <entry>geometry</entry>
+ <entry>keyboard geometry</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+XkbGBN_OtherNames</emphasis>
+</entry>
+ <entry>all</entry>
+ <entry>key types, symbol interpretations, indicator maps, names,
+geometry</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+If either field contains a GBN component that depends on some database
+component for which the request does not supply an expression, XKB
+automatically substitutes the special pattern "%" which copies the
+corresponding component from the current keyboard description, as described in
+<link linkend='Partial_Components_and_Combining_Multiple_Components'>Partial Components and Combining
+Multiple Components</link>.
+</para>
+
+
+<para>
+The <emphasis>
+load</emphasis>
+ flag asks the server to replace the current keyboard description for <emphasis>
+deviceSpec</emphasis>
+ with the newly constructed keyboard description. If <emphasis>
+load</emphasis>
+ is <emphasis>
+True</emphasis>
+, the request must include component expressions for all of the database
+components; if any are missing, XKB substitutes "%" as described above.
+</para>
+
+
+<para>
+If all necessary components are both specified and found, the new keyboard
+description is loaded. If the new keyboard description has a different geometry
+or keycode range than the previous keyboard description, XKB sends <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ events to all interested clients. See
+<link linkend='Replacing_the_Keyboard_On_the_Fly'>Replacing the Keyboard
+"On-the-Fly"</link> for more information about the effects of replacing the
+keyboard description on the fly.
+</para>
+
+
+<para>
+If the range of keycodes changes, clients that have requested <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ events are not sent any other change notification events by this request.
+Clients that do not request <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ events are sent other XKB change notification events (e.g. <emphasis>
+XkbMapNotify</emphasis>
+, <emphasis>
+XkbNamesNotify</emphasis>
+) as necessary to alert them to as many of the keyboard changes as possible.
+</para>
+
+
+<para>
+If no error occurs, the request reply reports the GBN components that were
+found and sends a description of any of the resulting keyboard that includes
+and of the components that were requested.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ return value reports the X Input extension device identifier of the keyboard
+that was used, or <emphasis>
+0</emphasis>
+ if the server does not support the X input extension.
+</para>
+
+
+<para>
+The <emphasis>
+minKeyCode</emphasis>
+ and <emphasis>
+maxKeyCode</emphasis>
+ return values report the legal range of keycodes for the keyboard description
+that was created. If the resulting keyboard description does not include at
+least one of the key names, client symbols or server symbols components,
+<emphasis>
+minKeyCode</emphasis>
+ and <emphasis>
+maxKeyCode</emphasis>
+ are both <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+loaded</emphasis>
+ return value reports whether or not the existing keyboard definition was
+replaced with the newly created one. If <emphasis>
+loaded</emphasis>
+ is <emphasis>
+True</emphasis>
+, the <emphasis>
+newKeyboard</emphasis>
+ return value reports whether or not the new map changed the geometry or range
+of keycodes and caused <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ events for clients that have requested them.
+</para>
+
+
+<para>
+The <emphasis>
+found</emphasis>
+ return value reports the GBN components that were present in the keymap that
+was constructed by this request. The <emphasis>
+reported</emphasis>
+ return value lists the subset of those components for which descriptions
+follow. if any of the components specified in the <emphasis>
+need</emphasis>
+ field of the request were not found, <emphasis>
+reported</emphasis>
+ is empty, otherwise it contains the intersection of the <emphasis>
+found</emphasis>
+ return value with the union of the <emphasis>
+need</emphasis>
+ and <emphasis>
+want</emphasis>
+ request fields.
+</para>
+
+
+<para>
+If any of <emphasis>
+GBN_Types</emphasis>
+, <emphasis>
+GBN_ClientSymbols</emphasis>
+ or <emphasis>
+GBN_ServerSymbols</emphasis>
+ are set in <emphasis>
+reported</emphasis>
+, the <emphasis>
+map</emphasis>
+ return value has the same format as the reply to an <emphasis>
+XkbGetMap</emphasis>
+ request and reports the corresponding pieces of the newly constructed keyboard
+description.
+</para>
+
+
+<para>
+If <emphasis>
+GBN_CompatMap</emphasis>
+ is set in <emphasis>
+reported</emphasis>
+, the <emphasis>
+compat</emphasis>
+ return value has the same format as the reply to an <emphasis>
+XkbGetCompatMap</emphasis>
+ request and reports the symbol interpretations and group compatibility map for
+the newly constructed keyboard description.
+</para>
+
+
+<para>
+If <emphasis>
+GBN_IndicatorMap</emphasis>
+ is set in <emphasis>
+reported</emphasis>
+, the <emphasis>
+indicators</emphasis>
+ return value has the same format as the reply to an <emphasis>
+XkbGetIndicatorMap</emphasis>
+ request and reports the physical indicators and indicator maps for the newly
+constructed keyboard description.
+</para>
+
+
+<para>
+If <emphasis>
+GBN_KeyNames</emphasis>
+ or <emphasis>
+GBN_OtherNames</emphasis>
+ are set in <emphasis>
+reported</emphasis>
+, the <emphasis>
+names</emphasis>
+ return value has the same format as the reply to an <emphasis>
+XkbGetNames</emphasis>
+ reply and reports the corresponding set of symbolic names for the newly
+constructed keyboard description.
+</para>
+
+
+<para>
+If <emphasis>
+GBN_Geometry</emphasis>
+ is set in <emphasis>
+reported</emphasis>
+, the <emphasis>
+geometry</emphasis>
+ return value has the same format as the reply to an <emphasis>
+XkbGetGeometryMap</emphasis>
+ request and reports the keyboard geometry for the newly constructed keyboard
+description.
+</para>
+
+
+</sect2>
+<sect2 id='Querying_and_Changing_Input_Extension_Devices'>
+<title>Querying and Changing Input Extension Devices</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbGetDeviceInfo</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+wanted: KB_XIDEVFEATUREMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledClass: KB_LEDCLASSSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledID: KB_IDSPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+allButtons: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstButton, nButtons: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+deviceID: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+present: KB_XIDEVFEATUREMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+supported: KB_XIFEATUREMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+unsupported: KB_XIFEATUREMASK
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+firstBtnWanted: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+nBtnsWanted: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+firstBtnRtrn: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+nBtnsRtrn: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+totalBtns: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+hasOwnState: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+dfltKbdFB, dfltLedFB: KB_IDSPEC
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+devType: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+name: STRING
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+btnActions: LISTofKB_ACTION
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+leds: LISTofKB_DEVICELEDINFO</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Device</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Access</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Reports a subset of the XKB-supplied information about the input device
+specified by <emphasis>
+deviceSpec</emphasis>
+. Unlike most XKB requests, the device specified for <emphasis>
+XkbGetDeviceInfo</emphasis>
+ need not be a keyboard device. Nonetheless, a <emphasis>
+Keyboard</emphasis>
+ error results if <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid core or input extension device.
+</para>
+
+
+<para>
+The <emphasis>
+wanted</emphasis>
+ field specifies the types of information to be returned, and controls the
+interpretation of the other request fields.
+</para>
+
+
+<para>
+If the server does not support assignment of XKB actions to extension device
+buttons, the <emphasis>
+allButtons</emphasis>
+, <emphasis>
+firstButton</emphasis>
+ and <emphasis>
+nButtons</emphasis>
+ fields are ignored.
+</para>
+
+
+<para>
+Otherwise, if the <emphasis>
+XkbXI_ButtonActions</emphasis>
+ flag is set in <emphasis>
+wanted</emphasis>
+, the <emphasis>
+allButtons</emphasis>
+, <emphasis>
+firstButton</emphasis>
+ and <emphasis>
+nButtons</emphasis>
+ fields specify the device buttons for which actions should be returned.
+Setting <emphasis>
+allButtons</emphasis>
+ to <emphasis>
+True</emphasis>
+ requests actions for all device buttons; if <emphasis>
+allButtons</emphasis>
+ is <emphasis>
+False</emphasis>
+, <emphasis>
+firstButton</emphasis>
+ and <emphasis>
+nButtons</emphasis>
+ specify a range of buttons for which actions are requested. If the device has
+no buttons or if <emphasis>
+firstButton</emphasis>
+ and <emphasis>
+nButtons</emphasis>
+ specify illegal buttons, a <emphasis>
+Match</emphasis>
+ error results. If <emphasis>
+allButtons</emphasis>
+ is <emphasis>
+True</emphasis>
+, <emphasis>
+firstButton</emphasis>
+ and <emphasis>
+nButtons</emphasis>
+ are ignored.
+</para>
+
+
+<para>
+If the server does not support XKB access to any aspect of the indicators on
+extension devices, or if the <emphasis>
+wanted</emphasis>
+ field does not include any of the indicator flags, the <emphasis>
+ledClass</emphasis>
+ and <emphasis>
+ledID</emphasis>
+ fields are ignored. Otherwise, <emphasis>
+ledClass</emphasis>
+ and <emphasis>
+ledID</emphasis>
+ specify one or more feedback(s) for which indicator information is requested.
+If <emphasis>
+ledClass</emphasis>
+ or <emphasis>
+ledID</emphasis>
+ have illegal values, a <emphasis>
+Value</emphasis>
+ error results. If they have legal values but do not specify a keyboard or
+indicator class feedback for the device in question, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+The <emphasis>
+ledClass</emphasis>
+ field can specify either <emphasis>
+KbdFeedbackClass</emphasis>
+, <emphasis>
+LedFeedbackClass</emphasis>
+, <emphasis>
+XkbDfltXIClass</emphasis>
+, or <emphasis>
+XkbAllXIClasses</emphasis>
+. If at least one keyboard feedback is defined for the specified device,
+<emphasis>
+XkbDfltXIClass</emphasis>
+ is equivalent to <emphasis>
+KbdFeedbackClass</emphasis>
+, otherwise it is equivalent to <emphasis>
+LedFeedbackClass</emphasis>
+. If <emphasis>
+XkbAllXIClasses</emphasis>
+ is specified, this request returns information about both indicator and
+keyboard class feedbacks which match the requested identifier, as described
+below.
+</para>
+
+
+<para>
+The <emphasis>
+ledID</emphasis>
+ field can specify any valid input extension feedback identifier, <emphasis>
+XkbDfltXIId</emphasis>
+, or <emphasis>
+XkbAllXIIds</emphasis>
+. The default keyboard feedback is the one that is affected by core protocol
+requests; the default led feedback is implementation-specific. If <emphasis>
+XkbAllXIIds</emphasis>
+ is specified, this request returns indicator information about all feedbacks
+of the class(es) specified by <emphasis>
+ledClass</emphasis>
+.
+</para>
+
+
+<para>
+If no error results, the <emphasis>
+deviceID</emphasis>
+ return value reports the input extension device identifier of the device for
+which values are being returned. The <emphasis>
+supported</emphasis>
+ return value reports the set of optional XKB extension device features that
+are supported by this implementation (see
+<link linkend='Interactions_Between_XKB_and_the_X_Input_Extension'>
+Interactions Between XKB and the X Input
+Extension</link>) for the specified device, and the unsupported return value
+reports any <emphasis>
+unsupported</emphasis>
+ features.
+</para>
+
+
+<para>
+If <emphasis>
+hasOwnState</emphasis>
+ is <emphasis>
+True</emphasis>
+, the device is also a keyboard, and any indicator maps bound to the device use
+the current state and control settings for this device to control automatic
+changes. If <emphasis>
+hasOwnState</emphasis>
+ is <emphasis>
+False</emphasis>
+, the state and control settings of the core keyboard device control automatic
+indicator changes.
+</para>
+
+
+<para>
+The <emphasis>
+name</emphasis>
+ field reports the X Input Extension name for the device. The <emphasis>
+devType</emphasis>
+ field reports the X Input Extension device type. Both fields are provided
+merely for convenience and are not interpreted by XKB.
+</para>
+
+
+<para>
+The <emphasis>
+present</emphasis>
+ return value reports the kinds of device information being returned, and
+controls the interpretation of the remaining fields. The <emphasis>
+present</emphasis>
+ field consists of the <emphasis>
+wanted</emphasis>
+ field from the original request minus the flags for any unsupported features.
+</para>
+
+
+<para>
+If <emphasis>
+XkbXI_ButtonActions</emphasis>
+ is set in <emphasis>
+present</emphasis>
+, the <emphasis>
+totalBtns</emphasis>
+ return value reports the total number of buttons present on the device,
+<emphasis>
+firstBtnWanted</emphasis>
+ and <emphasis>
+nBtnsWanted</emphasis>
+ specify the range of buttons for which actions were requested, and the
+<emphasis>
+firstBtnRtrn</emphasis>
+ and <emphasis>
+nBtnsRtrn </emphasis>
+values specify the range of buttons for which actions are reported. The
+<emphasis>
+actionsRtrn</emphasis>
+ list has <emphasis>
+nButtonsRtrn</emphasis>
+ entries which contain the actions bound to the specified buttons on the
+device. Any buttons for which actions were requested but not returned have the
+action <emphasis>
+NoAction()</emphasis>
+.
+</para>
+
+
+<para>
+If any indicator information is reported, the leds list contains one element
+for each requested feedback. For example, if <emphasis>
+ledClass</emphasis>
+ is <emphasis>
+XkbAllXIClasses</emphasis>
+ and <emphasis>
+ledID</emphasis>
+ is <emphasis>
+XkbAllXIIds</emphasis>
+, <emphasis>
+leds</emphasis>
+ describes all of the indicators on the device and has one element for each
+keyboard or led class feedback defined for the device. If any information at
+all is reported about a feedback, the set of physical indicators is also
+reported in the <emphasis>
+physIndicators</emphasis>
+ field of the corresponding element of <emphasis>
+leds</emphasis>
+.
+</para>
+
+
+<para>
+If the server supports assignment of indicator maps to extension device
+indicators, and if the <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+ flag is set in <emphasis>
+wanted</emphasis>
+, each member of <emphasis>
+leds</emphasis>
+ reports any indicators on the corresponding feedback to which names have been
+assigned. Any indicators for which no map is reported have the default map,
+which allows explicit changes and does not request any automatic changes.
+</para>
+
+
+<para>
+If the server supports assignment of indicator names to extension device
+indicators, and the <emphasis>
+XkbXI_IndicatorNames</emphasis>
+ flag is set in <emphasis>
+wanted</emphasis>
+, each member of <emphasis>
+leds</emphasis>
+ reports any indicators on the corresponding feedback to which names have been
+assigned. Any indicators for which no name is reported have the name <emphasis>
+None</emphasis>
+.
+</para>
+
+
+<para>
+If the server supports XKB access to the state of extension device indicators,
+and the <emphasis>
+XkbXI_IndicatorState</emphasis>
+ flag is set in wanted, each member of leds reports the state of the indicators
+on the corresponding feedback.
+</para>
+
+
+<para>
+If any unsupported features are requested, and the requesting client has
+selected for them, the server sends the client an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event which indicates that an unsupported feature was requested. This event is
+only generated if the client which issued the unsupported request has selected
+for it and, if generated, is not sent to any other clients.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetDeviceInfo</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+change: KB_XIDEVFEATUREMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstBtn, nBtns: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+btnActions:LISTofKB_ACTION</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+leds: LISTofKB_DEVICELEDINFO</entry>
+ </row>
+
+ <row>
+ <entry role='protoerror'>Errors: <emphasis>
+Device</emphasis>
+, <emphasis>
+Match</emphasis>
+, <emphasis>
+Access</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Changes a subset of the XKB-supplied information about the input device
+specified by <emphasis>
+deviceSpec</emphasis>
+. Unlike most XKB requests, the device specified for <emphasis>
+XkbGetDeviceInfo</emphasis>
+ need not be a keyboard device. Nonetheless, a <emphasis>
+Keyboard</emphasis>
+ error results if <emphasis>
+deviceSpec</emphasis>
+ does not specify a valid core or input extension device
+</para>
+
+
+<para>
+The <emphasis>
+change</emphasis>
+ field specifies the features for which new values are supplied, and controls
+the interpretation of the other request fields.
+</para>
+
+
+<para>
+If the server does not support assignment of XKB actions to extension device
+buttons, the <emphasis>
+firstButton</emphasis>
+ and <emphasis>
+nButtons</emphasis>
+ fields are ignored.
+</para>
+
+
+<para>
+Otherwise, if the <emphasis>
+XkbXI_ButtonActions</emphasis>
+ flag is set in <emphasis>
+change</emphasis>
+, the <emphasis>
+firstBtn</emphasis>
+ and <emphasis>
+nBtns</emphasis>
+ fields specify a range of buttons for which actions are specified in this
+request. If the device has no buttons or if <emphasis>
+firstBtn</emphasis>
+ and <emphasis>
+nBtns</emphasis>
+ specify illegal buttons, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+Each element of the <emphasis>
+leds</emphasis>
+ list describes the changes for a single keyboard or led feedback. If the
+<emphasis>
+ledClass</emphasis>
+ field of any element of <emphasis>
+leds</emphasis>
+ contains any value other than <emphasis>
+KbdFeedbackClass</emphasis>
+, <emphasis>
+LedFeedbackClass</emphasis>
+ or <emphasis>
+XkbDfltXIClass</emphasis>
+, a <emphasis>
+Value</emphasis>
+ error results. If the <emphasis>
+ledId</emphasis>
+ field of any element of leds contains any value other than a valid input
+extension feedback identifier or <emphasis>
+XkbDfltXIId</emphasis>
+, a <emphasis>
+Value</emphasis>
+ error results. If both fields are valid, but the device has no matching
+feedback, a <emphasis>
+Match</emphasis>
+ error results.
+</para>
+
+
+<para>
+The fields of each element of <emphasis>
+leds</emphasis>
+ are interpreted as follows:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>If <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+ is set in <emphasis>
+change</emphasis>
+ and the server supports XKB assignment of indicator maps to the corresponding
+feedback, the maps for all indicators on the corresponding feedback are taken
+from <emphasis>
+leds</emphasis>
+. If the server does not support this feature, any maps specified in <emphasis>
+leds</emphasis>
+ are ignored.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+XkbXI_IndicatorNames</emphasis>
+ is set in <emphasis>
+change</emphasis>
+, and the server supports XKB assignment of names to indicators for the
+corresponding feedback, the names for all indicators on the corresponding
+feedback are taken from <emphasis>
+leds</emphasis>
+. If the server does not support this feature, any names specified in <emphasis>
+leds</emphasis>
+ are ignored. Regardless of whether they are used, any names be a valid Atom or
+<emphasis>
+None</emphasis>
+, or an <emphasis>
+Atom</emphasis>
+ error results.
+ </para>
+</listitem>
+<listitem>
+ <para>If <emphasis>
+XkbXI_IndicatorState</emphasis>
+ is set in change, and the server supports XKB changes to extension device
+indicator state, the server attempts to change the indicators on the
+corresponding feedback as specified by <emphasis>
+leds</emphasis>
+. Any indicator maps bound to the feedback are applied, so state changes might
+be blocked or have side-effects.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+If any unsupported features are requested, and the requesting client has
+selected for them, the server sends the client an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event which indicates that an unsupported feature was requested. This event is
+only generated if the client which issued the unsupported request has selected
+for it and, if generated, is not sent to any other clients.
+</para>
+
+
+</sect2>
+<sect2 id='Debugging_the_X_Keyboard_Extension'>
+<title>Debugging the X Keyboard Extension</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbSetDebuggingFlags</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>affectFlags, flags: CARD32</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+affectCtrls, ctrls: CARD32</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+message: STRING
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+currentFlags, supportedFlags: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry role='protoreply'>
+currentCtrls, supportedCtrls: CARD32</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request sets up various internal XKB debugging flags and controls. It is
+intended for developer use and may be disabled in production servers. If
+disabled, <emphasis>
+XkbSetDebuggingFlags</emphasis>
+ has no effect but returns <emphasis>
+Success</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+affectFlags</emphasis>
+ field specifies the debugging flags to be changed, the <emphasis>
+flags</emphasis>
+ field specifies new values for the changed flags. The interpretation of the
+debugging flags is implementation-specific, but flags are intended to control
+debugging output and should not otherwise affect the operation of the server.
+</para>
+
+
+<para>
+The <emphasis>
+affectCtrls</emphasis>
+ field specifies the debugging controls to be changed, the <emphasis>
+ctrls</emphasis>
+ field specifies new values for the changed controls. The interpretation of the
+debugging controls is implementation-specific, but debugging controls are
+allowed to affect the behavior of the server.
+</para>
+
+
+<para>
+The <emphasis>
+message</emphasis>
+ field provides a message that the X server can print in any logging or
+debugging files before changing the flags. The server must accept this field
+but it is not required to actually display it anywhere.
+</para>
+
+
+<para>
+The X Test Suite makes some assumptions about the implementation of locking
+modifier keys that do not apply when XKB is present. The <emphasis>
+XkbDF_DisableLocks</emphasis>
+ debugging control provides a simple workaround to these test suite problems by
+simply disabling all locking keys. If <emphasis>
+XkbDF_DisableLocks</emphasis>
+ is enabled, the <emphasis>
+SA_LockMods</emphasis>
+ and <emphasis>
+SA_LockGroup</emphasis>
+ actions behave like <emphasis>
+SA_SetMods</emphasis>
+ and <emphasis>
+SA_LockMods</emphasis>
+, respectively. If it is disabled, <emphasis>
+SA_LockMods</emphasis>
+ and <emphasis>
+SA_LockGroup</emphasis>
+ actions behave normally.
+</para>
+
+
+<para>
+Implementations are free to ignore the <emphasis>
+XkbDF_DisableLocks</emphasis>
+ debugging control or to define others.
+</para>
+
+
+<para>
+The <emphasis>
+currentFlags</emphasis>
+ return value reports the current setting for the debugging flags, if
+applicable. The <emphasis>
+currentCtrls</emphasis>
+ return value reports the setting for the debugging controls, if applicable.
+The <emphasis>
+supportedFlags</emphasis>
+ and <emphasis>
+supportedCtrls</emphasis>
+ fields report the flags and controls that are recognized by the
+implementation. Attempts to change unsupported fields or controls are silently
+ignored.
+</para>
+
+
+<para>
+If the <emphasis>
+XkbSetDebuggingFlags</emphasis>
+ request contains more data than expected, the server ignores the extra data,
+but no error results. If the request has less data than expected, a <emphasis>
+Length</emphasis>
+ error results.
+</para>
+
+
+<para>
+If the <emphasis>
+XkbSetDebuggingFlags</emphasis>
+ reply contains more data than expected, the client just ignores any
+uninterpreted data without reporting an error. If the reply has less data than
+expected, a <emphasis>
+Length</emphasis>
+ error results.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='Events'>
+<title>Events</title>
+
+<para>
+All XKB events report the time at which they occurred in a field named
+<emphasis>
+time</emphasis>
+ and the device on which they occurred in a field named <emphasis>
+deviceID</emphasis>
+. XKB uses a single X event code for all events and uses a common field to
+distinguish XKB event type.
+</para>
+
+
+<sect2 id='Tracking_Keyboard_Replacement'>
+<title>Tracking Keyboard Replacement</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbNewKeyboardNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changed: KB_NKNDETAILMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+minKeyCode, maxKeyCode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+oldDeviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+oldMinKeyCode, oldMaxKeyCode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+requestMajor, requestMinor: CARD8</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event reports that a new core keyboard has been installed. New keyboard notify
+events can be generated:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>When the X server detects that the keyboard was changed.
+ </para>
+</listitem>
+<listitem>
+ <para>When a client installs a new extension device as the core keyboard
+using the X Input Extension <emphasis>
+ChangeKeyboardDevice</emphasis>
+ request.
+ </para>
+</listitem>
+<listitem>
+ <para>When a client issues an <emphasis>
+XkbGetMapByName</emphasis>
+ request which changes the keycodes range or geometry.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+The <emphasis>
+changed</emphasis>
+ field of the event reports the aspects of the keyboard that have changed, and
+can contain any combination of the event details for this event:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='2' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Bit in Changed</entry>
+ <entry>Meaning</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry>NKN_Keycodes</entry>
+ <entry>The new keyboard has a different minimum or maximum keycode.</entry>
+ </row>
+ <row>
+ <entry>NKN_Geometry</entry>
+ <entry>The new keyboard has a different keyboard geometry.</entry>
+ </row>
+ <row>
+ <entry>NKN_DeviceID</entry>
+ <entry>The new keyboard has a new X Input Extension device
+identifier</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The server sends an <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+changed</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+The <emphasis>
+minKeyCode</emphasis>
+ and <emphasis>
+maxKeyCode</emphasis>
+ fields report the minimum and maximum keycodes that can be returned by the new
+keyboard. The <emphasis>
+oldMinKeyCode</emphasis>
+ and <emphasis>
+oldMaxKeyCode</emphasis>
+ fields report the minimum and maximum values that could be returned before the
+change. This event always reports all four values, but the old and new values
+are the same unless <emphasis>
+NKN_Keycodes</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+.
+</para>
+
+
+<para>
+Once a client receives a new keyboard notify event which reports a new keycode
+range, the X server reports events from all keys in the new range to that
+client. Clients that do not request or receive new keyboard notify events
+receive events only from keys that fall in the last range for legal keys
+reported to that client. See <link linkend='Replacing_the_Keyboard_On_the_Fly'>
+Replacing the Keyboard "On-the-Fly"</link> for a more detailed explanation.
+</para>
+
+
+<para>
+If <emphasis>
+NKN_Keycodes</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event subsumes all other change notification events (e.g. <emphasis>
+XkbMapNotify</emphasis>
+, <emphasis>
+XkbNamesNotify</emphasis>
+) that would otherwise result from the keyboard change. Clients who receive an
+<emphasis>
+XkbNewKeyboardNotify</emphasis>
+ event should assume that all other aspects of the keyboard mapping have
+changed and regenerate the entire local copy of the keyboard description.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the X Input Extension device identifier of the new keyboard
+device; <emphasis>
+oldDeviceID</emphasis>
+ reports the device identifier before the change. This event always includes
+both values, but they are the same unless <emphasis>
+NKN_DeviceID</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+. If the server does not support the X Input Extension, both fields have the
+value <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+requestMajor</emphasis>
+ and <emphasis>
+requestMinor</emphasis>
+ fields report the major and minor opcode of the request that caused the
+keyboard change. If the keyboard change was not caused by some client request,
+both fields have the value <emphasis>
+0</emphasis>
+.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Keyboard_Mapping_Changes'>
+<title>Tracking Keyboard Mapping Changes</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbMapNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ptrBtnActions: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changed: KB_MAPPARTMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+minKeyCode, maxKeyCode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstType, nTypes: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKeySym, firstKeyAction: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeySyms, nKeyActions: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKeyBehavior, firstKeyExplicit: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeyBehaviors, nKeyExplicit: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+virtualMods: KB_VMODMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstModMapKey, firstVModMapKey: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nModMapKeys, nVModMapKeys: CARD8</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbMapNotify</emphasis>
+ event reports that some aspect of XKB map for a keyboard has changed. Map
+notify events can be generated whenever some aspect of the keyboard map is
+changed by an XKB or core protocol request.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the keyboard for which some map component has changed and the
+<emphasis>
+changed</emphasis>
+ field reports the components with new values, and can contain any of the
+values that are legal for the <emphasis>
+full</emphasis>
+ and <emphasis>
+partial</emphasis>
+ fields of the <emphasis>
+XkbGetMap</emphasis>
+ request. The server sends an <emphasis>
+XkbMapNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+changed</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+The <emphasis>
+minKeyCode</emphasis>
+ and <emphasis>
+maxKeyCode</emphasis>
+ fields report the range of keycodes that are legal on the keyboard for which
+the change is being reported.
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyTypesMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstType</emphasis>
+ and <emphasis>
+nTypes</emphasis>
+ fields report a range of key types that includes all changed types. Otherwise,
+both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeySymsMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstKeySym</emphasis>
+ and <emphasis>
+nKeySyms</emphasis>
+ fields report a range of keycodes that includes all keys with new symbols.
+Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyActionsMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstKeyAction</emphasis>
+ and <emphasis>
+nKeyActions</emphasis>
+ fields report a range of keycodes that includes all keys with new actions.
+Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbKeyBehaviorsMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstKeyBehavior </emphasis>
+and <emphasis>
+nKeyBehaviors</emphasis>
+ fields report a range of keycodes that includes all keys with new key
+behavior. Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbVirtualModsMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, <emphasis>
+virtualMods</emphasis>
+ contains all virtual modifiers to which a new set of real modifiers is bound.
+Otherwise, <emphasis>
+virtualMods</emphasis>
+ is <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbExplicitComponentsMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstKeyExplicit</emphasis>
+ and <emphasis>
+nKeyExplicit</emphasis>
+ fields report a range of keycodes that includes all keys with changed explicit
+components. Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbModifierMapMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstModMapKey</emphasis>
+ and <emphasis>
+nModMapKeys</emphasis>
+ fields report a range of keycodes that includes all keys with changed modifier
+bindings. Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+XkbVirtualModMapMask</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstVModMapKey</emphasis>
+ and <emphasis>
+nVModMapKeys</emphasis>
+ fields report a range of keycodes that includes all keys with changed virtual
+modifier mappings. Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Keyboard_State_Changes'>
+<title>Tracking Keyboard State Changes</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbStateNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+mods, baseMods, latchedMods, lockedMods: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+group, lockedGroup: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+baseGroup, latchedGroup: INT16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+compatState: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+grabMods, compatGrabMods: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+lookupMods, compatLookupMods: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ptrBtnState: BUTMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changed: KB_STATEPARTMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keycode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+eventType: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+requestMajor, requestMinor: CARD8</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>XkbStateNotify</emphasis>
+event reports that some component of the XKB state (see
+<link linkend='Keyboard_State'>Keyboard State</link>) has changed.
+State notify events are usually caused by key or pointer activity, but they can
+also result from explicit state changes requested by the <emphasis>
+XkbLatchLockState</emphasis>
+ request or by other extensions.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the keyboard on which some state component changed. The
+<emphasis>
+changed</emphasis>
+ field reports the XKB state components (see
+<link linkend='Keyboard_State'>Keyboard State</link>) that have changed
+and contain any combination of:
+</para>
+
+<informaltable frame='none'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Bit in changed</entry>
+ <entry>Event field</entry>
+ <entry>Changed component</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+ModifierState</emphasis>
+</entry>
+ <entry><emphasis>
+mods</emphasis>
+</entry>
+ <entry>The effective modifiers</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+ModifierBase</emphasis>
+</entry>
+ <entry><emphasis>
+baseMods</emphasis>
+</entry>
+ <entry>The base modifiers</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+ModifierLatch</emphasis>
+</entry>
+ <entry><emphasis>
+latchedMods</emphasis>
+</entry>
+ <entry>The latched modifiers</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+ModifierLock</emphasis>
+</entry>
+ <entry><emphasis>
+lockedMods</emphasis>
+</entry>
+ <entry>The locked modifiers</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+GroupState</emphasis>
+</entry>
+ <entry><emphasis>
+group</emphasis>
+</entry>
+ <entry>The effective keyboard group</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+GroupBase</emphasis>
+</entry>
+ <entry><emphasis>
+baseGroup</emphasis>
+</entry>
+ <entry>The base keyboard group</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+GroupLatch</emphasis>
+</entry>
+ <entry><emphasis>
+latchedGroup</emphasis>
+</entry>
+ <entry>The latched keyboard group</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+GroupLock</emphasis>
+</entry>
+ <entry><emphasis>
+lockedGroup</emphasis>
+</entry>
+ <entry>The locked keyboard group</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+PointerButtons</emphasis>
+</entry>
+ <entry><emphasis>
+ptrBtnState</emphasis>
+</entry>
+ <entry>The state of the core pointer buttons</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+GrabMods</emphasis>
+</entry>
+ <entry><emphasis>
+grabMods</emphasis>
+</entry>
+ <entry>The XKB state used to compute grabs</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+LookupMods</emphasis>
+</entry>
+ <entry><emphasis>
+lookupMods</emphasis>
+</entry>
+ <entry>The XKB state used to look up symbols</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+CompatState</emphasis>
+</entry>
+ <entry><emphasis>
+compatState</emphasis>
+</entry>
+ <entry>Default state for non-XKB clients</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+CompatGrabMods</emphasis>
+</entry>
+ <entry><emphasis>
+compatGrabMods</emphasis>
+</entry>
+ <entry>The core state used to compute grabs</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+CompatLookupMods</emphasis>
+</entry>
+ <entry><emphasis>
+compatLookupMods</emphasis>
+</entry>
+ <entry>The core state used to look up symbols</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The server sends an <emphasis>
+XkbStateNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+changed</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+A state notify event reports current values for all state components, even
+those with unchanged values.
+</para>
+
+
+<para>
+The <emphasis>
+keycode</emphasis>
+ field reports the key or button which caused the change in state while the
+<emphasis>
+eventType</emphasis>
+ field reports the exact type of event (e.g. <emphasis>
+KeyPress</emphasis>
+). If the change in state was not caused by key or button activity, both fields
+have the value <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+requestMajor</emphasis>
+ and <emphasis>
+requestMinor</emphasis>
+ fields report the major and minor opcodes of the request that caused the
+change in state and have the value <emphasis>
+0</emphasis>
+ if it was resulted from key or button activity.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Keyboard_Control_Changes'>
+<title>Tracking Keyboard Control Changes</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbControlsNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+numGroups: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changedControls: KB_CONTROLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+enabledControls,enabledControlChanges: KB_BOOLCTRLMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keycode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+eventType: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+requestMajor: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+requestMinor: CARD8</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbControlsNotify</emphasis>
+ event reports a change in one or more of the global keyboard controls (see
+<link linkend='Global_Keyboard_Controls'>Global Keyboard Controls</link>)
+or in the internal modifiers or ignore locks masks (see
+<link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>
+Server Internal Modifiers and Ignore
+Locks Behavior</link>). Controls notify events are usually caused by and
+<emphasis>
+XkbSetControls</emphasis>
+ request, but they can also be caused by keyboard activity or certain core
+protocol and input extension requests.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the keyboard for which some control has changed, and the
+<emphasis>
+changed</emphasis>
+ field reports the controls that have new values.
+</para>
+
+
+<para>
+The <emphasis>
+changed</emphasis>
+ field can contain any of the values that are permitted for the <emphasis>
+changeControls</emphasis>
+ field of the <emphasis>
+XkbSetControls</emphasis>
+ request. The server sends an <emphasis>
+XkbControlsNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+changed</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+The <emphasis>
+numGroups</emphasis>
+ field reports the total number of groups defined for the keyboard, whether or
+not the number of groups has changed.
+</para>
+
+
+<para>
+The <emphasis>
+enabledControls</emphasis>
+ field reports the current status of all of the boolean controls, whether or
+not any boolean controls changed state. If <emphasis>
+EnabledControls</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+enabledControlChanges</emphasis>
+ field reports the boolean controls that were enabled or disabled; if a control
+is specified in <emphasis>
+enabledControlChanges</emphasis>
+, the value that is reported for that control in <emphasis>
+enabledControls</emphasis>
+ represents a change in state.
+</para>
+
+
+<para>
+The <emphasis>
+keycode</emphasis>
+ field reports the key or button which caused the change in state while the
+<emphasis>
+eventType</emphasis>
+ field reports the exact type of event (e.g. <emphasis>
+KeyPress</emphasis>
+). If the change in state was not caused by key or button activity, both fields
+have the value <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+requestMajor</emphasis>
+ and <emphasis>
+requestMinor</emphasis>
+ fields report the major and minor opcodes of the request that caused the
+change in state and have the value <emphasis>
+0</emphasis>
+ if it was resulted from key or button activity.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Keyboard_Indicator_State_Changes'>
+<title>Tracking Keyboard Indicator State Changes</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbIndicatorStateNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+stateChanged, state: KB_INDICATORMASK</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbIndicatorStateNotify</emphasis>
+ event indicates that one or more of the indicators on a keyboard have changed
+state. Indicator state notify events can be caused by:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>Automatic update to reflect changes in keyboard state (keyboard
+activity, <emphasis>
+XkbLatchLockState</emphasis>
+ requests).
+ </para>
+</listitem>
+<listitem>
+ <para>Automatic update to reflect changes in keyboard controls (<emphasis>
+XkbSetControls</emphasis>
+, keyboard activity, certain core protocol and input extension requests).
+ </para>
+</listitem>
+<listitem>
+ <para>Explicit attempts to change indicator state (core protocol and input
+extension requests, <emphasis>
+XkbSetNamedIndicator</emphasis>
+ requests).
+ </para>
+</listitem>
+<listitem>
+ <para>Changes to indicator maps (<emphasis>
+XkbSetIndicatorMap</emphasis>
+ and <emphasis>
+XkbSetNamedIndicator</emphasis>
+ requests).
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the keyboard for which some indicator has changed, and the
+<emphasis>
+state</emphasis>
+ field reports the new state for all indicators on the specified keyboard. The
+<emphasis>
+stateChanged</emphasis>
+ field specifies which of the values in <emphasis>
+state</emphasis>
+ represent a new state for the corresponding indicator. The server sends an
+<emphasis>
+XkbIndicatorStateNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+stateChanged</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Keyboard_Indicator_Map_Changes'>
+<title>Tracking Keyboard Indicator Map Changes</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbIndicatorMapNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+state: KB_INDICATORMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+mapChanged: KB_INDICATORMASK</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbIndicatorMapNotify</emphasis>
+ event indicates that the maps for one or more keyboard indicators have been
+changed. Indicator map notify events can be caused by <emphasis>
+XkbSetIndicatorMap</emphasis>
+ and <emphasis>
+XkbSetNamedIndicator</emphasis>
+ requests.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the keyboard for which some indicator map has changed, and the
+<emphasis>
+mapChanged</emphasis>
+ field reports the indicators with changed maps. The server sends an <emphasis>
+XkbIndicatorMapNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+mapChanged</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+The <emphasis>
+state</emphasis>
+ field reports the current state of all indicators on the specified keyboard.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Keyboard_Name_Changes'>
+<title>Tracking Keyboard Name Changes</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbNamesNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changed: KB_NAMEDETAILMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstType, nTypes: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstLevelName, nLevelNames: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstKey: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nKeys, nKeyAliases, nRadioGroups: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changedGroupNames: KB_GROUPMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changedVirtualMods: KB_VMODMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changedIndicators: KB_INDICATORMASK</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbNamesNotify</emphasis>
+ event reports a change to one or more of the symbolic names associated with a
+keyboard. Symbolic names can change when:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para> Some client explicitly changes them using <emphasis>
+XkbSetNames</emphasis>
+.
+ </para>
+</listitem>
+<listitem>
+ <para>The list of key types or radio groups is resized
+ </para>
+</listitem>
+<listitem>
+ <para>The group width of some key type is changed
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the keyboard on which names were changed. The <emphasis>
+changed</emphasis>
+ mask lists the components for which some names have changed and can have any
+combination of the values permitted for the <emphasis>
+which</emphasis>
+ field of the <emphasis>
+XkbGetNames</emphasis>
+ request. The server sends an <emphasis>
+XkbNamesNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+changed</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+If <emphasis>
+KeyTypeNames</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstType</emphasis>
+ and <emphasis>
+nTypes</emphasis>
+ fields report a range of types that includes all types with changed names.
+Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+KTLevelNames</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstLevelName</emphasis>
+ and <emphasis>
+nLevelNames</emphasis>
+ fields report a range of types that includes all types with changed level
+names. Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+IndicatorNames</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+changedIndicators</emphasis>
+ field reports the indicators with changed names. Otherwise, <emphasis>
+changedIndicators</emphasis>
+ is <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+VirtualModNames</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+changedVirtualMods</emphasis>
+ field reports the virtual modifiers with changed names. Otherwise, <emphasis>
+changedVirtualMods</emphasis>
+ is <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+GroupNames</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+changedGroupNames</emphasis>
+ field reports the groups with changed names. Otherwise, <emphasis>
+changedGroupNames</emphasis>
+ is <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+KeyNames</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+, the <emphasis>
+firstKey</emphasis>
+ and <emphasis>
+nKeys</emphasis>
+ fields report a range of keycodes that includes all keys with changed names.
+Otherwise, both fields are <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+nKeyAliases</emphasis>
+ field reports the total number of key aliases associated with the keyboard,
+regardless of whether <emphasis>
+KeyAliases</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+nRadioGroups</emphasis>
+ field reports the total number of radio group names associated with the
+keyboard, regardless of whether <emphasis>
+RGNames</emphasis>
+ is set in <emphasis>
+changed</emphasis>
+.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Compatibility_Map_Changes'>
+<title>Tracking Compatibility Map Changes</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbCompatMapNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+changedGroups: KB_GROUPMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstSI, nSI: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+nTotalSI: CARD16</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbCompatMapNotify</emphasis>
+ event indicates that some component of the compatibility map for a keyboard
+has been changed. Compatibility map notify events can be caused by <emphasis>
+XkbSetCompatMap</emphasis>
+ and <emphasis>
+XkbGetMapByName</emphasis>
+ requests.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field reports the keyboard for which the compatibility map has changed; if the
+server does not support the X input extension, <emphasis>
+deviceID</emphasis>
+ is <emphasis>
+0</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+changedGroups</emphasis>
+ field reports the keyboard groups, if any, with a changed entry in the group
+compatibility map. The <emphasis>
+firstSI</emphasis>
+ and <emphasis>
+nSI</emphasis>
+ fields specify a range of symbol interpretations in the symbol compatibility
+map that includes all changed symbol interpretations; if the symbol
+compatibility map is unchanged, both fields are <emphasis>
+0</emphasis>
+. The <emphasis>
+nTotalSI</emphasis>
+ field always reports the total number of symbol interpretations present in the
+symbol compatibility map, regardless of whether any symbol interpretations have
+been changed.
+</para>
+
+
+<para>
+The server sends an <emphasis>
+XkbCompatMapNotify</emphasis>
+ event to a client only if at least one of the following conditions is met:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>The <emphasis>
+nSI</emphasis>
+ field of the event is non-zero, and the <emphasis>
+XkbSymInterpMask</emphasis>
+ bit is set in the appropriate event details mask for the client.
+ </para>
+</listitem>
+<listitem>
+ <para>The <emphasis>
+changedGroups</emphasis>
+ field of the event contains at least one group, and the <emphasis>
+XkbGroupCompatMask</emphasis>
+ bit is set in the appropriate event details mask for the client.
+ </para>
+</listitem>
+</itemizedlist>
+
+</sect2>
+<sect2 id='Tracking_Application_Bell_Requests'>
+<title>Tracking Application Bell Requests</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbBellNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+bellClass: { KbdFeedbackClass, BellFeedbackClass }</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+bellID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+percent: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+pitch: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+duration: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+eventOnly: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+name: ATOM</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+window: WINDOW</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbBellNotify</emphasis>
+ event indicates that some client has requested a keyboard bell. Bell notify
+events are usually caused by <emphasis>
+Bell</emphasis>
+, <emphasis>
+DeviceBell</emphasis>
+, or <emphasis>
+XkbBell</emphasis>
+ requests, but they can also be generated by the server (e.g. if the <emphasis>
+AccessXFeedback</emphasis>
+ control is active).
+</para>
+
+
+<para>
+The server sends an <emphasis>
+XkbBellNotify</emphasis>
+ event to a client if the appropriate event details field for the client has
+the value <emphasis>
+True</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field specifies the device for which a bell was requested, while the <emphasis>
+bellClass</emphasis>
+ and <emphasis>
+bellID</emphasis>
+ fields specify the input extension class and identifier of the feedback for
+which the bell was requested. If the reporting server does not support the
+input extension, all three fields have the value 0.
+</para>
+
+
+<para>
+The <emphasis>
+percent</emphasis>
+, <emphasis>
+pitch</emphasis>
+ and <emphasis>
+duration</emphasis>
+ fields report the volume, tone and duration requested for the bell as
+specified by the <emphasis>
+XkbBell</emphasis>
+ request. Bell notify events caused by core protocol or input extension
+requests use the pitch and duration specified in the corresponding bell or
+keyboard feedback control.
+</para>
+
+
+<para>
+If the bell was caused by an <emphasis>
+XkbBell</emphasis>
+ request or by the X server, <emphasis>
+name</emphasis>
+ reports an optional symbolic name for the bell and the <emphasis>
+window</emphasis>
+ field optionally reports the window for which the bell was generated.
+Otherwise, both fields have the value <emphasis>
+None</emphasis>
+.
+</para>
+
+
+<para>
+If the <emphasis>
+eventOnly</emphasis>
+ field is <emphasis>
+True</emphasis>
+, the server did not generate a sound in response to the request, otherwise the
+server issues the beep before sending the event. The eventOnly field can be
+<emphasis>
+True</emphasis>
+ if the <emphasis>
+AudibleBell</emphasis>
+ control is disabled or if a client explicitly requests <emphasis>
+eventOnly</emphasis>
+ when it issues an <emphasis>
+XkbBell</emphasis>
+ request.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Messages_Generated_by_Key_Actions'>
+<title>Tracking Messages Generated by Key Actions</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbActionMessage</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keycode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+press: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+mods: KEYMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+group: KB_GROUP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keyEventFollows: BOOL</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+message: LISTofCARD8</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbActionMessage</emphasis>
+ event is generated when the user operates a key to which an <emphasis>
+SA_ActionMessage</emphasis>
+ message is bound under the appropriate state and group. The server sends an
+<emphasis>
+XkbActionMessage</emphasis>
+ event to a client if the appropriate event details field for the client has
+the value <emphasis>
+True</emphasis>
+.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field specifies the keyboard device that contains the key which activated the
+event. The <emphasis>
+keycode</emphasis>
+ field specifies the key whose operation caused the message and press is
+<emphasis>
+True</emphasis>
+ if the message was caused by the user pressing the key. The <emphasis>
+mods</emphasis>
+ and <emphasis>
+group</emphasis>
+ fields report the effective keyboard modifiers and group in effect at the time
+the key was pressed or released.
+</para>
+
+
+<para>
+If <emphasis>
+keyEventFollows</emphasis>
+ is <emphasis>
+True</emphasis>
+, the server will also send a key press or release event, as appropriate, for
+the key that generated the message. If it is <emphasis>
+False</emphasis>
+, the key causes only a message. Note that the key event is delivered normally
+with respect to passive grabs, keyboard focus, and cursor position, so that
+<emphasis>
+keyEventFollows</emphasis>
+ does not guarantee that any particular client which receives the <emphasis>
+XkbActionMessage</emphasis>
+ notify event will also receive a key press or release event.
+</para>
+
+
+<para>
+The <emphasis>
+message</emphasis>
+ field is <emphasis>
+NULL</emphasis>
+-terminated string of up to <emphasis>
+ActionMessageLength</emphasis>
+ (<emphasis>
+6</emphasis>
+) bytes, which reports the contents of the <emphasis>
+message</emphasis>
+ field in the action that caused the message notify event.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Changes_to_AccessX_State_and_Keys'>
+<title>Tracking Changes to AccessX State and Keys</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbAccessXNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD8</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+detail: KB_AXNDETAILMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+keycode: KEYCODE</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+slowKeysDelay: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+debounceDelay: CARD16</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbAccessXNotify</emphasis>
+ event reports on some kinds of keyboard activity when any of the <emphasis>
+SlowKeys</emphasis>
+, <emphasis>
+BounceKeys</emphasis>
+ or <emphasis>
+AccessXKeys</emphasis>
+ controls are active. Compatibility map notify events can only be caused by
+keyboard activity.
+</para>
+
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ and <emphasis>
+keycode</emphasis>
+ fields specify the keyboard and key for which the event occurred. The
+<emphasis>
+detail</emphasis>
+ field describes the event that occurred and has one of the following values:
+</para>
+
+<informaltable frame='topbot'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='3' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+<colspec colname='c2' colwidth='1.0*'/>
+<colspec colname='c3' colwidth='2.0*'/>
+<thead>
+ <row rowsep='1'>
+ <entry>Detail</entry>
+ <entry>Control</entry>
+ <entry>Meaning</entry>
+ </row>
+</thead>
+<tbody>
+ <row>
+ <entry><emphasis>
+AXN_SKPress</emphasis>
+</entry>
+ <entry><emphasis>
+SlowKeys</emphasis>
+</entry>
+ <entry>Key pressed</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+AXN_SKAccept</emphasis>
+</entry>
+ <entry><emphasis>
+SlowKeys</emphasis>
+</entry>
+ <entry><emphasis>
+K</emphasis>
+ey held until it was accepted.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+AXN_SKReject</emphasis>
+</entry>
+ <entry><emphasis>
+SlowKeys</emphasis>
+</entry>
+ <entry>Key released before it was accepted.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+AXN_SKRelease</emphasis>
+</entry>
+ <entry><emphasis>
+SlowKeys</emphasis>
+</entry>
+ <entry>Key released after it was accepted.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+AXN_BKAccept</emphasis>
+</entry>
+ <entry><emphasis>
+BounceKeys</emphasis>
+</entry>
+ <entry>Key pressed while it was active.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+AXN_BKReject</emphasis>
+</entry>
+ <entry><emphasis>
+BounceKeys</emphasis>
+</entry>
+ <entry>Key pressed while it was still disabled.</entry>
+ </row>
+ <row>
+ <entry><emphasis>
+AXN_AXKWarning</emphasis>
+</entry>
+ <entry><emphasis>
+AccessXKeys</emphasis>
+</entry>
+ <entry>Shift key held down for four seconds</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+Each subclass of the AccessX notify event is generated only when the control
+specified in the table above is enabled. The server sends an <emphasis>
+XkbAccessXNotify</emphasis>
+ event to a client only if the bit which corresponds to the value of the
+<emphasis>
+detail</emphasis>
+ field for the event is set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+Regardless of the value of <emphasis>
+detail</emphasis>
+, the <emphasis>
+slowKeysDelay</emphasis>
+ and <emphasis>
+debounceDelay</emphasis>
+ fields always reports the current slow keys acceptance delay (see
+<link linkend='The_SlowKeys_Control'>The SlowKeys Control</link>) and
+debounce delay (see <link linkend='The_BounceKeys_Control'>The BounceKeys
+Control</link>) for the specified keyboard.
+</para>
+
+
+</sect2>
+<sect2 id='Tracking_Changes_To_Extension_Devices'>
+<title>Tracking Changes To Extension Devices</title>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<?dbfo keep-together="always" ?>
+<tgroup cols='1' align='left' colsep='0' rowsep='0'>
+<colspec colname='c1' colwidth='1.0*'/>
+ <thead>
+ <row>
+ <entry role='protoname'>XkbExtensionDeviceNotify</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry role='protoargs'>time: TIMESTAMP</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+deviceID: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledClass: { KbdFeedbackClass, LedFeedbackClass }</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledID: CARD16</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+reason: KB_XIDETAILMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+supported: KB_XIFEATUREMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+unsupported: KB_XIFEATUREMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledsDefined: KB_INDICATORMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+ledState: KB_INDICATORMASK</entry>
+ </row>
+ <row>
+ <entry role='protoname'>
+firstButton, nButtons: CARD8</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+An <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event reports:
+</para>
+
+<itemizedlist>
+<listitem>
+ <para>A change to some part of the XKB information for an extension device.
+ </para>
+</listitem>
+<listitem>
+ <para>An attempt to use an XKB extension device feature that is not supported
+for the specified device by the current implementation.
+ </para>
+</listitem>
+</itemizedlist>
+
+<para>
+The <emphasis>
+deviceID</emphasis>
+ field specifies the X Input Extension device identifier of some device on
+which an XKB feature was requested, or <emphasis>
+XkbUseCorePtr</emphasis>
+ if the request affected the core pointer device. The <emphasis>
+reason</emphasis>
+ field explains why the event was generated in response to the request, and can
+contain any combination of <emphasis>
+XkbXI_UnsupportedFeature</emphasis>
+ and the values permitted for the change field of the <emphasis>
+XkbSetDeviceInfo</emphasis>
+ request.
+</para>
+
+
+<para>
+If <emphasis>
+XkbXI_ButtonActions</emphasis>
+ is set in <emphasis>
+reason</emphasis>
+, this event reports a successful change to the XKB actions bound to one or
+more buttons on the core pointer or an extension device. The <emphasis>
+firstButton</emphasis>
+ and <emphasis>
+nButtons</emphasis>
+ fields report a range of device buttons that include all of the buttons for
+which actions were changed.
+</para>
+
+
+<para>
+If any combination of <emphasis>
+XkbXI_IndicatorNames</emphasis>
+, <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+, or <emphasis>
+XkbXI_IndicatorState</emphasis>
+ is set in either <emphasis>
+reason</emphasis>
+ or <emphasis>
+unsupported</emphasis>
+, the <emphasis>
+ledClass</emphasis>
+ and <emphasis>
+ledID</emphasis>
+ fields specify the X Input Extension feedback class and identifier of the
+feedback for which the change is reported. If this event reports any changes to
+an indicator feedback, the <emphasis>
+ledsDefined</emphasis>
+ field reports all indicators on that feedback for which either a name or a
+indicator map are defined, and <emphasis>
+ledState</emphasis>
+ reports the current state of all of the indicators on the specified feedback.
+</para>
+
+
+<para>
+If <emphasis>
+XkbXI_IndicatorNames</emphasis>
+ is set in <emphasis>
+reason</emphasis>
+, this event reports a successful change to the symbolic names bound to one or
+more extension device indicators by XKB. If <emphasis>
+XkbXI_IndicatorMaps</emphasis>
+ is set in <emphasis>
+reason</emphasis>
+, this event reports a successful change to the indicator maps bound to one or
+more extension device indicators by XKB. If <emphasis>
+XkbXI_IndicatorState</emphasis>
+ is set in reason, this event reports that one or more indicators in the
+specified device and feedback have changed state.
+</para>
+
+
+<para>
+If <emphasis>
+XkbXI_UnsupportedFeature</emphasis>
+ is set in reason, this event reports an unsuccessful attempt to use some XKB
+extension device feature that is not supported by the XKB implementation in the
+server for the specified device. The <emphasis>
+unsupported</emphasis>
+ mask reports the requested features that are not available on the specified
+device. See <link linkend='Interactions_Between_XKB_and_the_X_Input_Extension'>Interactions Between
+XKB and the X Input Extension</link> for more information about possible XKB
+interactions with the X Input Extension.
+</para>
+
+
+<para>
+The server sends an <emphasis>
+XkbExtensionDeviceNotify</emphasis>
+ event to a client only if at least one of the bits that is set in the
+<emphasis>
+reason</emphasis>
+ field of the event is also set in the appropriate event details mask for the
+client.
+</para>
+
+
+<para>
+Events that report a successful change to some extension device feature are
+reported to all clients that have expressed interest in the event; events that
+report an attempt to use an unsupported feature are reported only to the client
+which issued the request. Events which report a partial success are reported to
+all interested clients, but only the client that issued the request is informed
+of the attempt to use unsupported features.
+</para>
+</sect2>
+</sect1>
+</chapter>
diff --git a/specs/encoding.xml b/specs/encoding.xml
new file mode 100644
index 0000000..0c6ef02
--- /dev/null
+++ b/specs/encoding.xml
@@ -0,0 +1,3268 @@
+<appendix id="protocol_encoding">
+<title>Protocol Encoding</title>
+<!--
+ The sections in this appendix correspond to their
+ number counterparts in the protocol document.
+-->
+<sect1 id='Syntactic_Conventions_b'>
+<title>Syntactic Conventions</title>
+
+<para>
+All numbers are in decimal,
+unless prefixed with #x, in which case they are in hexadecimal (base 16).
+</para>
+
+<para>
+The general syntax used to describe requests, replies, errors, events, and
+compound types is:
+</para>
+
+<literallayout class="monospaced">
+ <emphasis role='bold'>NameofThing</emphasis>
+ encode-form
+ ...
+ encode-form
+</literallayout>
+
+<para>
+Each encode-form describes a single component.
+</para>
+<para>
+For components described in the protocol as:
+</para>
+<literallayout class="monospaced">
+ name: TYPE
+</literallayout>
+
+<para>
+the encode-form is:
+</para>
+
+<literallayout class="monospaced">
+ N TYPE name
+</literallayout>
+
+<para>
+N is the number of bytes occupied in the data stream,
+and TYPE is the interpretation of those bytes.
+For example,
+</para>
+
+<literallayout class="monospaced">
+ depth: CARD8
+</literallayout>
+
+<para>
+becomes:
+</para>
+
+<literallayout class="monospaced">
+ 1 CARD8 depth
+</literallayout>
+
+<para>
+For components with a static numeric value the encode-form is:
+</para>
+
+<literallayout class="monospaced">
+ N value name
+</literallayout>
+
+<para>
+The value is always interpreted as an N-byte unsigned integer.
+For example,
+the first two bytes of a
+<emphasis role='bold'>Window</emphasis>
+error are always zero (indicating an
+error in general) and three (indicating the
+<emphasis role='bold'>Window</emphasis>
+error in particular):
+</para>
+
+<literallayout class="monospaced">
+ 1 0 Error
+ 1 3 code
+</literallayout>
+
+<para>
+For components described in the protocol as:
+</para>
+
+<para>
+name:
+{ <emphasis role='bold'>Name1</emphasis>,...,
+<emphasis role='bold'>NameI</emphasis>}
+</para>
+
+<para>
+the encode-form is:
+</para>
+
+<literallayout class="monospaced">
+ N name
+ value1 Name1
+ ...
+ valueI NameI
+</literallayout>
+
+<para>
+The value is always interpreted as an N-byte unsigned integer.
+Note that the size of N is sometimes larger than that strictly required
+to encode the values.
+For example:
+</para>
+
+<para>
+class:
+{ <emphasis role='bold'>InputOutput</emphasis>,
+<emphasis role='bold'>InputOnly</emphasis>,
+<emphasis role='bold'>CopyFromParent</emphasis> }
+</para>
+
+<para>
+becomes:
+</para>
+
+<literallayout class="monospaced">
+2 class
+ 0 CopyFromParent
+ 1 InputOutput
+ 2 InputOnly
+</literallayout>
+
+<para>
+For components described in the protocol as:
+</para>
+
+<para>
+NAME: TYPE or
+<emphasis role='bold'>Alternative1 ...or</emphasis>
+<emphasis role='bold'>AlternativeI</emphasis>
+</para>
+
+<para>
+the encode-form is:
+</para>
+
+<literallayout class="monospaced">
+N TYPE NAME
+ value1 Alternative1
+ ...
+ valueI AlternativeI
+</literallayout>
+
+<para>
+The alternative values are guaranteed not to conflict with the encoding
+of TYPE.
+For example:
+</para>
+
+<para>
+destination: WINDOW or
+<emphasis role='bold'>PointerWindow</emphasis>
+or
+<emphasis role='bold'>InputFocus</emphasis>
+</para>
+
+<para>
+becomes:
+</para>
+
+<literallayout class="monospaced">
+4 WINDOW destination
+ 0 PointerWindow
+ 1 InputFocus
+</literallayout>
+
+<para>
+For components described in the protocol as:
+</para>
+
+<literallayout class="monospaced">
+ value-mask: BITMASK
+</literallayout>
+
+<para>
+the encode-form is:
+</para>
+
+<literallayout class="monospaced">
+N BITMASK value-mask
+ mask1 mask-name1
+ ...
+ maskI mask-nameI
+</literallayout>
+
+<para>
+The individual bits in the mask are specified and named,
+and N is 2 or 4.
+The most-significant bit in a BITMASK is reserved for use in defining
+chained (multiword) bitmasks, as extensions augment existing core requests.
+The precise interpretation of this bit is not yet defined here,
+although a probable mechanism is that a 1-bit indicates that another N bytes
+of bitmask follows, with bits within the overall mask still interpreted
+from least-significant to most-significant with an N-byte unit,
+with N-byte units
+interpreted in stream order, and with the overall mask being byte-swapped
+in individual N-byte units.
+</para>
+
+<para>
+For LISTofVALUE encodings, the request is followed by a section of the form:
+</para>
+
+<literallayout class="monospaced">
+ VALUEs
+ encode-form
+ ...
+ encode-form
+</literallayout>
+
+<para>
+listing an encode-form for each VALUE.
+The NAME in each encode-form keys to the corresponding BITMASK bit.
+The encoding of a VALUE always occupies four bytes,
+but the number of bytes specified in the encoding-form indicates how
+many of the least-significant bytes are actually used;
+the remaining bytes are unused and their values do not matter.
+</para>
+
+<para>
+In various cases, the number of bytes occupied by a component will be
+specified
+by a lowercase single-letter variable name instead of a specific numeric
+value, and often some other component will have its value specified as a
+simple numeric expression involving these variables.
+Components specified with such expressions are always interpreted
+as unsigned integers.
+The scope of such variables is always just the enclosing request, reply,
+error, event, or compound type structure.
+For example:
+</para>
+
+<literallayout class="monospaced">
+2 3+n request length
+4n LISTofPOINT points
+</literallayout>
+
+<para>
+For unused bytes (the values of the bytes are undefined and do no matter),
+the encode-form is:
+</para>
+
+<literallayout class="monospaced">
+ N unused
+</literallayout>
+
+<para>
+<!-- .LP -->
+If the number of unused bytes is variable, the encode-form typically is:
+</para>
+
+<literallayout class="monospaced">
+ p unused, p=pad(E)
+</literallayout>
+
+<para>
+where E is some expression,
+<phrase id="encoding:pad">
+<indexterm zone="encoding:pad" significance="preferred"><primary>Padding</primary></indexterm>
+and pad(E) is the number of bytes needed to round E up to a multiple of four.
+</phrase>
+</para>
+
+<literallayout class="monospaced">
+ pad(E) = (4 - (E mod 4)) mod 4
+</literallayout>
+</sect1>
+
+<sect1 id='Encoding::Common_Types'>
+<title>Common Types</title>
+<indexterm zone="Encoding::Common_Types"><primary>Types</primary><secondary>encoding</secondary></indexterm>
+
+<variablelist>
+ <varlistentry>
+ <term>LISTofFOO</term>
+ <listitem>
+ <para>
+In this document the LISTof notation strictly means some number of repetitions
+of the FOO encoding;
+the actual length of the list is encoded elsewhere.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>SETofFOO</term>
+ <listitem>
+ <para>
+A set is always represented by a bitmask, with a 1-bit indicating presence in
+the set.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<informaltable frame='none'>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+BITMASK: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+WINDOW: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+PIXMAP: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+CURSOR: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+FONT: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+GCONTEXT: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+COLORMAP: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+DRAWABLE: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+FONTABLE: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+ATOM: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+VISUALID: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+BYTE: 8-bit value
+ </entry>
+ </row>
+ <row>
+ <entry>
+INT8: 8-bit signed integer
+ </entry>
+ </row>
+ <row>
+ <entry>
+INT16: 16-bit signed integer
+ </entry>
+ </row>
+ <row>
+ <entry>
+INT32: 32-bit signed integer
+ </entry>
+ </row>
+ <row>
+ <entry>
+CARD8: 8-bit unsigned integer
+ </entry>
+ </row>
+ <row>
+ <entry>
+CARD16: 16-bit unsigned integer
+ </entry>
+ </row>
+ <row>
+ <entry>
+CARD32: 32-bit unsigned integer
+ </entry>
+ </row>
+ <row>
+ <entry>
+TIMESTAMP: CARD32
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+
+<literallayout class="monospaced">
+BITGRAVITY
+ 0 Forget
+ 1 NorthWest
+ 2 North
+ 3 NorthEast
+ 4 West
+ 5 Center
+ 6 East
+ 7 SouthWest
+ 8 South
+ 9 SouthEast
+ 10 Static
+
+WINGRAVITY
+ 0 Unmap
+ 1 NorthWest
+ 2 North
+ 3 NorthEast
+ 4 West
+ 5 Center
+ 6 East
+ 7 SouthWest
+ 8 South
+ 9 SouthEast
+ 10 Static
+
+BOOL
+ 0 False
+ 1 True
+
+SETofEVENT
+ #x00000001 KeyPress
+ #x00000002 KeyRelease
+ #x00000004 ButtonPress
+ #x00000008 ButtonRelease
+ #x00000010 EnterWindow
+ #x00000020 LeaveWindow
+ #x00000040 PointerMotion
+ #x00000080 PointerMotionHint
+ #x00000100 Button1Motion
+ #x00000200 Button2Motion
+ #x00000400 Button3Motion
+ #x00000800 Button4Motion
+ #x00001000 Button5Motion
+ #x00002000 ButtonMotion
+ #x00004000 KeymapState
+ #x00008000 Exposure
+ #x00010000 VisibilityChange
+ #x00020000 StructureNotify
+ #x00040000 ResizeRedirect
+ #x00080000 SubstructureNotify
+ #x00100000 SubstructureRedirect
+ #x00200000 FocusChange
+ #x00400000 PropertyChange
+ #x00800000 ColormapChange
+ #x01000000 OwnerGrabButton
+ #xFE000000 unused but must be zero
+
+SETofPOINTEREVENT
+ encodings are the same as for SETofEVENT, except with
+ #xFFFF8003 unused but must be zero
+
+SETofDEVICEEVENT
+ encodings are the same as for SETofEVENT, except with
+ #xFFFFC0B0 unused but must be zero
+
+KEYSYM: CARD32
+KEYCODE: CARD8
+BUTTON: CARD8
+
+SETofKEYBUTMASK
+ #x0001 Shift
+ #x0002 Lock
+ #x0004 Control
+ #x0008 Mod1
+ #x0010 Mod2
+ #x0020 Mod3
+ #x0040 Mod4
+ #x0080 Mod5
+ #x0100 Button1
+ #x0200 Button2
+ #x0400 Button3
+ #x0800 Button4
+ #x1000 Button5
+ #xE000 unused but must be zero
+
+SETofKEYMASK
+ encodings are the same as for SETofKEYBUTMASK, except with
+ #xFF00 unused but must be zero
+STRING8: LISTofCARD8
+STRING16: LISTofCHAR2B
+
+CHAR2B
+ 1 CARD8 byte1
+ 1 CARD8 byte2
+
+POINT
+ 2 INT16 x
+ 2 INT16 y
+
+RECTANGLE
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+
+ARC
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 INT16 angle1
+ 2 INT16 angle2
+
+HOST
+ 1 family
+ 0 Internet
+ 1 DECnet
+ 2 Chaos
+ 5 ServerInterpreted
+ 6 InternetV6
+ 1 unused
+ 2 n length of address
+ n LISTofBYTE address
+ p unused, p=pad(n)
+
+STR
+ 1 n length of name in bytes
+ n STRING8 name
+
+</literallayout>
+</sect1>
+
+<sect1 id='Encoding::Errors'>
+<title>Errors</title>
+<indexterm zone="Encoding::Errors"><primary>Error report</primary><secondary>encoding</secondary></indexterm>
+
+<literallayout class="monospaced">
+<emphasis role='bold'>Request</emphasis>
+ 1 0 Error
+ 1 1 code
+ 2 CARD16 sequence number
+ 4 unused
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Value</emphasis>
+ 1 0 Error
+ 1 2 code
+ 2 CARD16 sequence number
+ 4 &lt;32-bits&gt; bad value
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Window</emphasis>
+ 1 0 Error
+ 1 3 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Pixmap</emphasis>
+ 1 0 Error
+ 1 4 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Atom</emphasis>
+ 1 0 Error
+ 1 5 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad atom id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Cursor</emphasis>
+ 1 0 Error
+ 1 6 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Font</emphasis>
+ 1 0 Error
+ 1 7 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Match</emphasis>
+ 1 0 Error
+ 1 8 code
+ 2 CARD16 sequence number
+ 4 unused
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Drawable</emphasis>
+ 1 0 Error
+ 1 9 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Access</emphasis>
+ 1 0 Error
+ 1 10 code
+ 2 CARD16 sequence number
+ 4 unused
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Alloc</emphasis>
+ 1 0 Error
+ 1 11 code
+ 2 CARD16 sequence number
+ 4 unused
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Colormap</emphasis>
+ 1 0 Error
+ 1 12 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>GContext</emphasis>
+ 1 0 Error
+ 1 13 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>IDChoice</emphasis>
+ 1 0 Error
+ 1 14 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad resource id
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Name</emphasis>
+ 1 0 Error
+ 1 15 code
+ 2 CARD16 sequence number
+ 4 unused
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Length</emphasis>
+ 1 0 Error
+ 1 16 code
+ 2 CARD16 sequence number
+ 4 unused
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+
+<emphasis role='bold'>Implementation</emphasis>
+ 1 0 Error
+ 1 17 code
+ 2 CARD16 sequence number
+ 4 unused
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
+</literallayout>
+</sect1>
+
+<sect1 id='Encoding::Keyboards'>
+<title>Keyboards</title>
+
+<para>
+KEYCODE values are always greater than 7 (and less than 256).
+</para>
+
+<para>
+KEYSYM values with the bit #x10000000 set are reserved as vendor-specific.
+</para>
+
+<para>
+The names and encodings of the standard KEYSYM values are contained in
+<link linkend="keysym_encoding">Appendix A, Keysym Encoding</link>.
+</para>
+</sect1>
+
+<sect1 id='Encoding::Pointers'>
+<title>Pointers</title>
+
+<para>
+BUTTON values are numbered starting with one.
+</para>
+
+</sect1>
+<sect1 id='Encoding::Predefined_Atoms'>
+<title>Predefined Atoms</title>
+<indexterm zone="Encoding::Predefined_Atoms"><primary>Atom</primary><secondary>predefined</secondary></indexterm>
+
+<literallayout class="monospaced">
+PRIMARY 1 WM_NORMAL_HINTS 40
+SECONDARY 2 WM_SIZE_HINTS 41
+ARC 3 WM_ZOOM_HINTS 42
+ATOM 4 MIN_SPACE 43
+BITMAP 5 NORM_SPACE 44
+CARDINAL 6 MAX_SPACE 45
+COLORMAP 7 END_SPACE 46
+CURSOR 8 SUPERSCRIPT_X 47
+CUT_BUFFER0 9 SUPERSCRIPT_Y 48
+CUT_BUFFER1 10 SUBSCRIPT_X 49
+CUT_BUFFER2 11 SUBSCRIPT_Y 50
+CUT_BUFFER3 12 UNDERLINE_POSITION 51
+CUT_BUFFER4 13 UNDERLINE_THICKNESS 52
+CUT_BUFFER5 14 STRIKEOUT_ASCENT 53
+CUT_BUFFER6 15 STRIKEOUT_DESCENT 54
+CUT_BUFFER7 16 ITALIC_ANGLE 55
+DRAWABLE 17 X_HEIGHT 56
+FONT 18 QUAD_WIDTH 57
+INTEGER 19 WEIGHT 58
+PIXMAP 20 POINT_SIZE 59
+POINT 21 RESOLUTION 60
+RECTANGLE 22 COPYRIGHT 61
+RESOURCE_MANAGER 23 NOTICE 62
+RGB_COLOR_MAP 24 FONT_NAME 63
+RGB_BEST_MAP 25 FAMILY_NAME 64
+RGB_BLUE_MAP 26 FULL_NAME 65
+RGB_DEFAULT_MAP 27 CAP_HEIGHT 66
+RGB_GRAY_MAP 28 WM_CLASS 67
+RGB_GREEN_MAP 29 WM_TRANSIENT_FOR 68
+RGB_RED_MAP 30
+STRING 31
+VISUALID 32
+WINDOW 33
+WM_COMMAND 34
+WM_HINTS 35
+WM_CLIENT_MACHINE 36
+WM_ICON_NAME 37
+WM_ICON_SIZE 38
+WM_NAME 39
+</literallayout>
+</sect1>
+
+<sect1 id='Encoding::Connection_Setup'>
+<title>Connection Setup</title>
+
+<para>
+For TCP connections,
+displays on a given host are numbered starting from 0,
+and the server for display N listens and accepts connections on port 6000 + N.
+For DECnet connections,
+displays on a given host are numbered starting from 0,
+and the server for display N listens and accepts connections on the object
+name obtained by concatenating "X$X" with the decimal representation of N,
+for example, X$X0 and X$X1.
+</para>
+
+<para>
+Information sent by the client at connection setup:
+</para>
+
+<literallayout class="monospaced">
+ 1 byte-order
+ #x42 MSB first
+ #x6C LSB first
+ 1 unused
+ 2 CARD16 protocol-major-version
+ 2 CARD16 protocol-minor-version
+ 2 n length of authorization-protocol-name
+ 2 d length of authorization-protocol-data
+ 2 unused
+ n STRING8 authorization-protocol-name
+ p unused, p=pad(n)
+ d STRING8 authorization-protocol-data
+ q unused, q=pad(d)
+</literallayout>
+
+<para>
+Except where explicitly noted in the protocol,
+all 16-bit and 32-bit quantities sent by the client must be transmitted
+with the specified byte order,
+and all 16-bit and 32-bit quantities returned by the server will be transmitted
+with this byte order.
+</para>
+
+<para>
+Information received by the client if the connection is refused:
+</para>
+
+<literallayout class="monospaced">
+ 1 0 Failed
+ 1 n length of reason in bytes
+ 2 CARD16 protocol-major-version
+ 2 CARD16 protocol-minor-version
+ 2 (n+p)/4 length in 4-byte units of "additional data"
+ n STRING8 reason
+ p unused, p=pad(n)
+</literallayout>
+
+<para>
+Information received by the client if further authentication is required:
+</para>
+
+<literallayout class="monospaced">
+ 1 2 Authenticate
+ 5 unused
+ 2 (n+p)/4 length in 4-byte units of "additional data"
+ n STRING8 reason
+ p unused, p=pad(n)
+</literallayout>
+
+<para>
+Information received by the client if the connection is accepted:
+</para>
+
+<literallayout class="monospaced">
+ 1 1 Success
+ 1 unused
+ 2 CARD16 protocol-major-version
+ 2 CARD16 protocol-minor-version
+ 2 8+2n+(v+p+m)/4 length in 4-byte units of
+ "additional data"
+ 4 CARD32 release-number
+ 4 CARD32 resource-id-base
+ 4 CARD32 resource-id-mask
+ 4 CARD32 motion-buffer-size
+ 2 v length of vendor
+ 2 CARD16 maximum-request-length
+ 1 CARD8 number of SCREENs in roots
+ 1 n number for FORMATs in
+ pixmap-formats
+ 1 image-byte-order
+ 0 LSBFirst
+ 1 MSBFirst
+ 1 bitmap-format-bit-order
+ 0 LeastSignificant
+ 1 MostSignificant
+ 1 CARD8 bitmap-format-scanline-unit
+ 1 CARD8 bitmap-format-scanline-pad
+ 1 KEYCODE min-keycode
+ 1 KEYCODE max-keycode
+ 4 unused
+ v STRING8 vendor
+ p unused, p=pad(v)
+ 8n LISTofFORMAT pixmap-formats
+ m LISTofSCREEN roots (m is always a multiple of 4)
+</literallayout>
+
+<literallayout class="monospaced">
+FORMAT
+ 1 CARD8 depth
+ 1 CARD8 bits-per-pixel
+ 1 CARD8 scanline-pad
+ 5 unused
+</literallayout>
+
+<literallayout class="monospaced">
+SCREEN
+ 4 WINDOW root
+ 4 COLORMAP default-colormap
+ 4 CARD32 white-pixel
+ 4 CARD32 black-pixel
+ 4 SETofEVENT current-input-masks
+ 2 CARD16 width-in-pixels
+ 2 CARD16 height-in-pixels
+ 2 CARD16 width-in-millimeters
+ 2 CARD16 height-in-millimeters
+ 2 CARD16 min-installed-maps
+ 2 CARD16 max-installed-maps
+ 4 VISUALID root-visual
+ 1 backing-stores
+ 0 Never
+ 1 WhenMapped
+ 2 Always
+ 1 BOOL save-unders
+ 1 CARD8 root-depth
+ 1 CARD8 number of DEPTHs in allowed-depths
+ n LISTofDEPTH allowed-depths (n is always a
+ multiple of 4)
+</literallayout>
+
+<literallayout class="monospaced">
+DEPTH
+ 1 CARD8 depth
+ 1 unused
+ 2 n number of VISUALTYPES in visuals
+ 4 unused
+ 24n LISTofVISUALTYPE visuals
+</literallayout>
+
+<literallayout class="monospaced">
+VISUALTYPE
+ 4 VISUALID visual-id
+ 1 class
+ 0 StaticGray
+ 1 GrayScale
+ 2 StaticColor
+ 3 PseudoColor
+ 4 TrueColor
+ 5 DirectColor
+ 1 CARD8 bits-per-rgb-value
+ 2 CARD16 colormap-entries
+ 4 CARD32 red-mask
+ 4 CARD32 green-mask
+ 4 CARD32 blue-mask
+ 4 unused
+</literallayout>
+</sect1>
+
+<sect1 id='Encoding::Requests'>
+<title>Requests</title>
+<indexterm zone="Encoding::Requests"><primary>Request</primary><secondary>encoding</secondary></indexterm>
+
+<literallayout class="monospaced">
+<link linkend="requests:CreateWindow"><emphasis role='bold'>CreateWindow</emphasis></link>
+ 1 1 opcode
+ 1 CARD8 depth
+ 2 8+n request length
+ 4 WINDOW wid
+ 4 WINDOW parent
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 border-width
+ 2 class
+ 0 CopyFromParent
+ 1 InputOutput
+ 2 InputOnly
+ 4 VISUALID visual
+ 0 CopyFromParent
+ 4 BITMASK value-mask (has n bits set to 1)
+ #x00000001 background-pixmap
+ #x00000002 background-pixel
+ #x00000004 border-pixmap
+ #x00000008 border-pixel
+ #x00000010 bit-gravity
+ #x00000020 win-gravity
+ #x00000040 backing-store
+ #x00000080 backing-planes
+ #x00000100 backing-pixel
+ #x00000200 override-redirect
+ #x00000400 save-under
+ #x00000800 event-mask
+ #x00001000 do-not-propagate-mask
+ #x00002000 colormap
+ #x00004000 cursor
+ 4n LISTofVALUE value-list
+
+ VALUEs
+ 4 PIXMAP background-pixmap
+ 0 None
+ 1 ParentRelative
+ 4 CARD32 background-pixel
+ 4 PIXMAP border-pixmap
+ 0 CopyFromParent
+ 4 CARD32 border-pixel
+ 1 BITGRAVITY bit-gravity
+ 1 WINGRAVITY win-gravity
+ 1 backing-store
+ 0 NotUseful
+ 1 WhenMapped
+ 2 Always
+ 4 CARD32 backing-planes
+ 4 CARD32 backing-pixel
+ 1 BOOL override-redirect
+ 1 BOOL save-under
+ 4 SETofEVENT event-mask
+ 4 SETofDEVICEEVENT do-not-propagate-mask
+ 4 COLORMAP colormap
+ 0 CopyFromParent
+ 4 CURSOR cursor
+ 0 None
+
+<link linkend="requests:ChangeWindowAttributes"><emphasis role='bold'>ChangeWindowAttributes</emphasis></link>
+ 1 2 opcode
+ 1 unused
+ 2 3+n request length
+ 4 WINDOW window
+ 4 BITMASK value-mask (has n bits set to 1)
+ encodings are the same as for CreateWindow
+ 4n LISTofVALUE value-list
+ encodings are the same as for CreateWindow
+
+<link linkend="requests:GetWindowAttributes"><emphasis role='bold'>GetWindowAttributes</emphasis></link>
+ 1 3 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+▶
+ 1 1 Reply
+ 1 backing-store
+ 0 NotUseful
+ 1 WhenMapped
+ 2 Always
+ 2 CARD16 sequence number
+ 4 3 reply length
+ 4 VISUALID visual
+ 2 class
+ 1 InputOutput
+ 2 InputOnly
+ 1 BITGRAVITY bit-gravity
+ 1 WINGRAVITY win-gravity
+ 4 CARD32 backing-planes
+ 4 CARD32 backing-pixel
+ 1 BOOL save-under
+ 1 BOOL map-is-installed
+ 1 map-state
+ 0 Unmapped
+ 1 Unviewable
+ 2 Viewable
+ 1 BOOL override-redirect
+ 4 COLORMAP colormap
+ 0 None
+ 4 SETofEVENT all-event-masks
+ 4 SETofEVENT your-event-mask
+ 2 SETofDEVICEEVENT do-not-propagate-mask
+ 2 unused
+
+<link linkend="requests:DestroyWindow"><emphasis role='bold'>DestroyWindow</emphasis></link>
+ 1 4 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:DestroySubwindows"><emphasis role='bold'>DestroySubwindows</emphasis></link>
+ 1 5 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:ChangeSaveSet"><emphasis role='bold'>ChangeSaveSet</emphasis></link>
+ 1 6 opcode
+ 1 mode
+ 0 Insert
+ 1 Delete
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:ReparentWindow"><emphasis role='bold'>ReparentWindow</emphasis></link>
+ 1 7 opcode
+ 1 unused
+ 2 4 request length
+ 4 WINDOW window
+ 4 WINDOW parent
+ 2 INT16 x
+ 2 INT16 y
+
+<link linkend="requests:MapWindow"><emphasis role='bold'>MapWindow</emphasis></link>
+ 1 8 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:MapSubwindows"><emphasis role='bold'>MapSubwindows</emphasis></link>
+ 1 9 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:UnmapWindow"><emphasis role='bold'>UnmapWindow</emphasis></link>
+ 1 10 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:UnmapSubwindows"><emphasis role='bold'>UnmapSubwindows</emphasis></link>
+ 1 11 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:ConfigureWindow"><emphasis role='bold'>ConfigureWindow</emphasis></link>
+ 1 12 opcode
+ 1 unused
+ 2 3+n request length
+ 4 WINDOW window
+ 2 BITMASK value-mask (has n bits set to 1)
+ #x0001 x
+ #x0002 y
+ #x0004 width
+ #x0008 height
+ #x0010 border-width
+ #x0020 sibling
+ #x0040 stack-mode
+ 2 unused
+ 4n LISTofVALUE value-list
+
+ VALUEs
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 border-width
+ 4 WINDOW sibling
+ 1 stack-mode
+ 0 Above
+ 1 Below
+ 2 TopIf
+ 3 BottomIf
+ 4 Opposite
+
+<link linkend="requests:CirculateWindow"><emphasis role='bold'>CirculateWindow</emphasis></link>
+ 1 13 opcode
+ 1 direction
+ 0 RaiseLowest
+ 1 LowerHighest
+ 2 2 request length
+ 4 WINDOW window
+
+<link linkend="requests:GetGeometry"><emphasis role='bold'>GetGeometry</emphasis></link>
+ 1 14 opcode
+ 1 unused
+ 2 2 request length
+ 4 DRAWABLE drawable
+
+▶
+ 1 1 Reply
+ 1 CARD8 depth
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 WINDOW root
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 border-width
+ 10 unused
+
+<link linkend="requests:QueryTree"><emphasis role='bold'>QueryTree</emphasis></link>
+ 1 15 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n reply length
+ 4 WINDOW root
+ 4 WINDOW parent
+ 0 None
+ 2 n number of WINDOWs in children
+ 14 unused
+ 4n LISTofWINDOW children
+
+<link linkend="requests:InternAtom"><emphasis role='bold'>InternAtom</emphasis></link>
+ 1 16 opcode
+ 1 BOOL only-if-exists
+ 2 2+(n+p)/4 request length
+ 2 n length of name
+ 2 unused
+ n STRING8 name
+ p unused, p=pad(n)
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 ATOM atom
+ 0 None
+ 20 unused
+
+<link linkend="requests:GetAtomName"><emphasis role='bold'>GetAtomName</emphasis></link>
+ 1 17 opcode
+ 1 unused
+ 2 2 request length
+ 4 ATOM atom
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 2 n length of name
+ 22 unused
+ n STRING8 name
+ p unused, p=pad(n)
+
+<link linkend="requests:ChangeProperty"><emphasis role='bold'>ChangeProperty</emphasis></link>
+ 1 18 opcode
+ 1 mode
+ 0 Replace
+ 1 Prepend
+ 2 Append
+ 2 6+(n+p)/4 request length
+ 4 WINDOW window
+ 4 ATOM property
+ 4 ATOM type
+ 1 CARD8 format
+ 3 unused
+ 4 CARD32 length of data in format units
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+ n LISTofBYTE data
+ (n is a multiple of 2 for format = 16)
+ (n is a multiple of 4 for format = 32)
+ p unused, p=pad(n)
+
+
+<link linkend="requests:DeleteProperty"><emphasis role='bold'>DeleteProperty</emphasis></link>
+ 1 19 opcode
+ 1 unused
+ 2 3 request length
+ 4 WINDOW window
+ 4 ATOM property
+
+<link linkend="requests:GetProperty"><emphasis role='bold'>GetProperty</emphasis></link>
+ 1 20 opcode
+ 1 BOOL delete
+ 2 6 request length
+ 4 WINDOW window
+ 4 ATOM property
+ 4 ATOM type
+ 0 AnyPropertyType
+ 4 CARD32 long-offset
+ 4 CARD32 long-length
+
+▶
+ 1 1 Reply
+ 1 CARD8 format
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 4 ATOM type
+ 0 None
+ 4 CARD32 bytes-after
+ 4 CARD32 length of value in format units
+ (= 0 for format = 0)
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+ 12 unused
+ n LISTofBYTE value
+ (n is zero for format = 0)
+ (n is a multiple of 2 for format = 16)
+ (n is a multiple of 4 for format = 32)
+ p unused, p=pad(n)
+
+<link linkend="requests:ListProperties"><emphasis role='bold'>ListProperties</emphasis></link>
+ 1 21 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n reply length
+ 2 n number of ATOMs in atoms
+ 22 unused
+ 4n LISTofATOM atoms
+
+<link linkend="requests:SetSelectionOwner"><emphasis role='bold'>SetSelectionOwner</emphasis></link>
+ 1 22 opcode
+ 1 unused
+ 2 4 request length
+ 4 WINDOW owner
+ 0 None
+ 4 ATOM selection
+ 4 TIMESTAMP time
+ 0 CurrentTime
+
+<link linkend="requests:GetSelectionOwner"><emphasis role='bold'>GetSelectionOwner</emphasis></link>
+ 1 23 opcode
+ 1 unused
+ 2 2 request length
+ 4 ATOM selection
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 WINDOW owner
+ 0 None
+ 20 unused
+
+<link linkend="requests:ConvertSelection"><emphasis role='bold'>ConvertSelection</emphasis></link>
+ 1 24 opcode
+ 1 unused
+ 2 6 request length
+ 4 WINDOW requestor
+ 4 ATOM selection
+ 4 ATOM target
+ 4 ATOM property
+ 0 None
+ 4 TIMESTAMP time
+ 0 CurrentTime
+
+<link linkend="requests:SendEvent"><emphasis role='bold'>SendEvent</emphasis></link>
+ 1 25 opcode
+ 1 BOOL propagate
+ 2 11 requestlength
+ 4 WINDOW destination
+ 0 PointerWindow
+ 1 InputFocus
+ 4 SETofEVENT event-mask
+ 32 event
+ standard event format (see <link linkend='Events'>the Events section</link>)
+
+<link linkend="requests:GrabPointer"><emphasis role='bold'>GrabPointer</emphasis></link>
+ 1 26 opcode
+ 1 BOOL owner-events
+ 2 6 request length
+ 4 WINDOW grab-window
+ 2 SETofPOINTEREVENT event-mask
+ 1 pointer-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 1 keyboard-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 4 WINDOW confine-to
+ 0 None
+ 4 CURSOR cursor
+ 0 None
+ 4 TIMESTAMP time
+ 0 CurrentTime
+
+▶
+ 1 1 Reply
+ 1 status
+ 0 Success
+ 1 AlreadyGrabbed
+ 2 InvalidTime
+ 3 NotViewable
+ 4 Frozen
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 24 unused
+
+<link linkend="requests:UngrabPointer"><emphasis role='bold'>UngrabPointer</emphasis></link>
+ 1 27 opcode
+ 1 unused
+ 2 2 request length
+ 4 TIMESTAMP time
+ 0 CurrentTime
+
+<link linkend="requests:GrabButton"><emphasis role='bold'>GrabButton</emphasis></link>
+ 1 28 opcode
+ 1 BOOL owner-events
+ 2 6 request length
+ 4 WINDOW grab-window
+ 2 SETofPOINTEREVENT event-mask
+ 1 pointer-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 1 keyboard-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 4 WINDOW confine-to
+ 0 None
+ 4 CURSOR cursor
+ 0 None
+ 1 BUTTON button
+ 0 AnyButton
+ 1 unused
+ 2 SETofKEYMASK modifiers
+ #x8000 AnyModifier
+
+<link linkend="requests:UngrabButton"><emphasis role='bold'>UngrabButton</emphasis></link>
+ 1 29 opcode
+ 1 BUTTON button
+ 0 AnyButton
+ 2 3 request length
+ 4 WINDOW grab-window
+ 2 SETofKEYMASK modifiers
+ #x8000 AnyModifier
+ 2 unused
+
+<link linkend="requests:ChangeActivePointerGrab"><emphasis role='bold'>ChangeActivePointerGrab</emphasis></link>
+ 1 30 opcode
+ 1 unused
+ 2 4 request length
+ 4 CURSOR cursor
+ 0 None
+ 4 TIMESTAMP time
+ 0 CurrentTime
+ 2 SETofPOINTEREVENT event-mask
+ 2 unused
+
+<link linkend="requests:GrabKeyboard"><emphasis role='bold'>GrabKeyboard</emphasis></link>
+ 1 31 opcode
+ 1 BOOL owner-events
+ 2 4 request length
+ 4 WINDOW grab-window
+ 4 TIMESTAMP time
+ 0 CurrentTime
+ 1 pointer-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 1 keyboard-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 2 unused
+
+▶
+ 1 1 Reply
+ 1 status
+ 0 Success
+ 1 AlreadyGrabbed
+ 2 InvalidTime
+ 3 NotViewable
+ 4 Frozen
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 24 unused
+
+<link linkend="requests:UngrabKeyboard"><emphasis role='bold'>UngrabKeyboard</emphasis></link>
+ 1 32 opcode
+ 1 unused
+ 2 2 request length
+ 4 TIMESTAMP time
+ 0 CurrentTime
+
+<link linkend="requests:GrabKey"><emphasis role='bold'>GrabKey</emphasis></link>
+ 1 33 opcode
+ 1 BOOL owner-events
+ 2 4 request length
+ 4 WINDOW grab-window
+ 2 SETofKEYMASK modifiers
+ #x8000 AnyModifier
+ 1 KEYCODE key
+ 0 AnyKey
+ 1 pointer-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 1 keyboard-mode
+ 0 Synchronous
+ 1 Asynchronous
+ 3 unused
+
+<link linkend="requests:UngrabKey"><emphasis role='bold'>UngrabKey</emphasis></link>
+ 1 34 opcode
+ 1 KEYCODE key
+ 0 AnyKey
+ 2 3 request length
+ 4 WINDOW grab-window
+ 2 SETofKEYMASK modifiers
+ #x8000 AnyModifier
+ 2 unused
+
+<link linkend="requests:AllowEvents"><emphasis role='bold'>AllowEvents</emphasis></link>
+ 1 35 opcode
+ 1 mode
+ 0 AsyncPointer
+ 1 SyncPointer
+ 2 ReplayPointer
+ 3 AsyncKeyboard
+ 4 SyncKeyboard
+ 5 ReplayKeyboard
+ 6 AsyncBoth
+ 7 SyncBoth
+ 2 2 request length
+ 4 TIMESTAMP time
+ 0 CurrentTime
+
+<link linkend="requests:GrabServer"><emphasis role='bold'>GrabServer</emphasis></link>
+ 1 36 opcode
+ 1 unused
+ 2 1 request length
+
+<link linkend="requests:UngrabServer"><emphasis role='bold'>UngrabServer</emphasis></link>
+ 1 37 opcode
+ 1 unused
+ 2 1 request length
+
+<link linkend="requests:QueryPointer"><emphasis role='bold'>QueryPointer</emphasis></link>
+ 1 38 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+▶
+ 1 1 Reply
+ 1 BOOL same-screen
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 WINDOW root
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 win-x
+ 2 INT16 win-y
+ 2 SETofKEYBUTMASK mask
+ 6 unused
+
+<link linkend="requests:GetMotionEvents"><emphasis role='bold'>GetMotionEvents</emphasis></link>
+ 1 39 opcode
+ 1 unused
+ 2 4 request length
+ 4 WINDOW window
+ 4 TIMESTAMP start
+ 0 CurrentTime
+ 4 TIMESTAMP stop
+ 0 CurrentTime
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 2n reply length
+ 4 n number of TIMECOORDs in events
+ 20 unused
+ 8n LISTofTIMECOORD events
+
+ TIMECOORD
+ 4 TIMESTAMP time
+ 2 INT16 x
+ 2 INT16 y
+
+<link linkend="requests:TranslateCoordinates"><emphasis role='bold'>TranslateCoordinates</emphasis></link>
+ 1 40 opcode
+ 1 unused
+ 2 4 request length
+ 4 WINDOW src-window
+ 4 WINDOW dst-window
+ 2 INT16 src-x
+ 2 INT16 src-y
+▶
+ 1 1 Reply
+ 1 BOOL same-screen
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 WINDOW child
+ 0 None
+ 2 INT16 dst-x
+ 2 INT16 dst-y
+ 16 unused
+
+<link linkend="requests:WarpPointer"><emphasis role='bold'>WarpPointer</emphasis></link>
+ 1 41 opcode
+ 1 unused
+ 2 6 request length
+ 4 WINDOW src-window
+ 0 None
+ 4 WINDOW dst-window
+ 0 None
+ 2 INT16 src-x
+ 2 INT16 src-y
+ 2 CARD16 src-width
+ 2 CARD16 src-height
+ 2 INT16 dst-x
+ 2 INT16 dst-y
+
+<link linkend="requests:SetInputFocus"><emphasis role='bold'>SetInputFocus</emphasis></link>
+ 1 42 opcode
+ 1 revert-to
+ 0 None
+ 1 PointerRoot
+ 2 Parent
+ 2 3 request length
+ 4 WINDOW focus
+ 0 None
+ 1 PointerRoot
+ 4 TIMESTAMP time
+ 0 CurrentTime
+
+<link linkend="requests:GetInputFocus"><emphasis role='bold'>GetInputFocus</emphasis></link>
+ 1 43 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 revert-to
+ 0 None
+ 1 PointerRoot
+ 2 Parent
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 WINDOW focus
+ 0 None
+ 1 PointerRoot
+ 20 unused
+
+<link linkend="requests:QueryKeymap"><emphasis role='bold'>QueryKeymap</emphasis></link>
+ 1 44 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 2 reply length
+ 32 LISTofCARD8 keys
+
+<link linkend="requests:OpenFont"><emphasis role='bold'>OpenFont</emphasis></link>
+ 1 45 opcode
+ 1 unused
+ 2 3+(n+p)/4 request length
+ 4 FONT fid
+ 2 n length of name
+ 2 unused
+ n STRING8 name
+ p unused, p=pad(n)
+
+<link linkend="requests:CloseFont"><emphasis role='bold'>CloseFont</emphasis></link>
+ 1 46 opcode
+ 1 unused
+ 2 2 request length
+ 4 FONT font
+
+<link linkend="requests:QueryFont"><emphasis role='bold'>QueryFont</emphasis></link>
+ 1 47 opcode
+ 1 unused
+ 2 2 request length
+ 4 FONTABLE font
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 7+2n+3m reply length
+ 12 CHARINFO min-bounds
+ 4 unused
+ 12 CHARINFO max-bounds
+ 4 unused
+ 2 CARD16 min-char-or-byte2
+ 2 CARD16 max-char-or-byte2
+ 2 CARD16 default-char
+ 2 n number of FONTPROPs in properties
+ 1 draw-direction
+ 0 LeftToRight
+ 1 RightToLeft
+ 1 CARD8 min-byte1
+ 1 CARD8 max-byte1
+ 1 BOOL all-chars-exist
+ 2 INT16 font-ascent
+ 2 INT16 font-descent
+ 4 m number of CHARINFOs in char-infos
+ 8n LISTofFONTPROP properties
+ 12m LISTofCHARINFO char-infos
+
+ FONTPROP
+ 4 ATOM name
+ 4 &lt;32-bits&gt; value
+
+ CHARINFO
+ 2 INT16 left-side-bearing
+ 2 INT16 right-side-bearing
+ 2 INT16 character-width
+ 2 INT16 ascent
+ 2 INT16 descent
+ 2 CARD16 attributes
+
+<link linkend="requests:QueryTextExtents"><emphasis role='bold'>QueryTextExtents</emphasis></link>
+ 1 48 opcode
+ 1 BOOL odd length, True if p = 2
+ 2 2+(2n+p)/4 request length
+ 4 FONTABLE font
+ 2n STRING16 string
+ p unused, p=pad(2n)
+
+▶
+ 1 1 Reply
+ 1 draw-direction
+ 0 LeftToRight
+ 1 RightToLeft
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 INT16 font-ascent
+ 2 INT16 font-descent
+ 2 INT16 overall-ascent
+ 2 INT16 overall-descent
+ 4 INT32 overall-width
+ 4 INT32 overall-left
+ 4 INT32 overall-right
+ 4 unused
+
+<link linkend="requests:ListFonts"><emphasis role='bold'>ListFonts</emphasis></link>
+ 1 49 opcode
+ 1 unused
+ 2 2+(n+p)/4 request length
+ 2 CARD16 max-names
+ 2 n length of pattern
+ n STRING8 pattern
+ p unused, p=pad(n)
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 2 CARD16 number of STRs in names
+ 22 unused
+ n LISTofSTR names
+ p unused, p=pad(n)
+
+<link linkend="requests:ListFontsWithInfo"><emphasis role='bold'>ListFontsWithInfo</emphasis></link>
+ 1 50 opcode
+ 1 unused
+ 2 2+(n+p)/4 request length
+ 2 CARD16 max-names
+ 2 n length of pattern
+ n STRING8 pattern
+ p unused, p=pad(n)
+
+▶ (except for last in series)
+ 1 1 Reply
+ 1 n length of name in bytes
+ 2 CARD16 sequence number
+ 4 7+2m+(n+p)/4 reply length
+ 12 CHARINFO min-bounds
+ 4 unused
+ 12 CHARINFO max-bounds
+ 4 unused
+ 2 CARD16 min-char-or-byte2
+ 2 CARD16 max-char-or-byte2
+ 2 CARD16 default-char
+ 2 m number of FONTPROPs in properties
+ 1 draw-direction
+ 0 LeftToRight
+ 1 RightToLeft
+ 1 CARD8 min-byte1
+ 1 CARD8 max-byte1
+ 1 BOOL all-chars-exist
+ 2 INT16 font-ascent
+ 2 INT16 font-descent
+ 4 CARD32 replies-hint
+ 8m LISTofFONTPROP properties
+ n STRING8 name
+ p unused, p=pad(n)
+
+ FONTPROP
+ encodings are the same as for QueryFont
+
+ CHARINFO
+ encodings are the same as for QueryFont
+
+▶ (last in series)
+ 1 1 Reply
+ 1 0 last-reply indicator
+ 2 CARD16 sequence number
+ 4 7 reply length
+ 52 unused
+
+<link linkend="requests:SetFontPath"><emphasis role='bold'>SetFontPath</emphasis></link>
+ 1 51 opcode
+ 1 unused
+ 2 2+(n+p)/4 request length
+ 2 CARD16 number of STRs in path
+ 2 unused
+ n LISTofSTR path
+ p unused, p=pad(n)
+
+<link linkend="requests:GetFontPath"><emphasis role='bold'>GetFontPath</emphasis></link>
+ 1 52 opcode
+ 1 unused
+ 2 1 request list
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 2 CARD16 number of STRs in path
+ 22 unused
+ n LISTofSTR path
+ p unused, p=pad(n)
+
+<link linkend="requests:CreatePixmap"><emphasis role='bold'>CreatePixmap</emphasis></link>
+ 1 53 opcode
+ 1 CARD8 depth
+ 2 4 request length
+ 4 PIXMAP pid
+ 4 DRAWABLE drawable
+ 2 CARD16 width
+ 2 CARD16 height
+
+<link linkend="requests:FreePixmap"><emphasis role='bold'>FreePixmap</emphasis></link>
+ 1 54 opcode
+ 1 unused
+ 2 2 request length
+ 4 PIXMAP pixmap
+
+<link linkend="requests:CreateGC"><emphasis role='bold'>CreateGC</emphasis></link>
+ 1 55 opcode
+ 1 unused
+ 2 4+n request length
+ 4 GCONTEXT cid
+ 4 DRAWABLE drawable
+ 4 BITMASK value-mask (has n bits set to 1)
+ #x00000001 function
+ #x00000002 plane-mask
+ #x00000004 foreground
+ #x00000008 background
+ #x00000010 line-width
+ #x00000020 line-style
+ #x00000040 cap-style
+ #x00000080 join-style
+ #x00000100 fill-style
+ #x00000200 fill-rule
+ #x00000400 tile
+ #x00000800 stipple
+ #x00001000 tile-stipple-x-origin
+ #x00002000 tile-stipple-y-origin
+ #x00004000 font
+ #x00008000 subwindow-mode
+ #x00010000 graphics-exposures
+ #x00020000 clip-x-origin
+ #x00040000 clip-y-origin
+ #x00080000 clip-mask
+ #x00100000 dash-offset
+ #x00200000 dashes
+ #x00400000 arc-mode
+ 4n LISTofVALUE value-list
+
+ VALUEs
+ 1 function
+ 0 Clear
+ 1 And
+ 2 AndReverse
+ 3 Copy
+ 4 AndInverted
+ 5 NoOp
+ 6 Xor
+ 7 Or
+ 8 Nor
+ 9 Equiv
+ 10 Invert
+ 11 OrReverse
+ 12 CopyInverted
+ 13 OrInverted
+ 14 Nand
+ 15 Set
+ 4 CARD32 plane-mask
+ 4 CARD32 foreground
+ 4 CARD32 background
+ 2 CARD16 line-width
+ 1 line-style
+ 0 Solid
+ 1 OnOffDash
+ 2 DoubleDash
+ 1 cap-style
+ 0 NotLast
+ 1 Butt
+ 2 Round
+ 3 Projecting
+ 1 join-style
+ 0 Miter
+ 1 Round
+ 2 Bevel
+ 1 fill-style
+ 0 Solid
+ 1 Tiled
+ 2 Stippled
+ 3 OpaqueStippled
+ 1 fill-rule
+ 0 EvenOdd
+ 1 Winding
+ 4 PIXMAP tile
+ 4 PIXMAP stipple
+ 2 INT16 tile-stipple-x-origin
+ 2 INT16 tile-stipple-y-origin
+ 4 FONT font
+ 1 subwindow-mode
+ 0 ClipByChildren
+ 1 IncludeInferiors
+ 1 BOOL graphics-exposures
+ 2 INT16 clip-x-origin
+ 2 INT16 clip-y-origin
+ 4 PIXMAP clip-mask
+ 0 None
+ 2 CARD16 dash-offset
+ 1 CARD8 dashes
+ 1 arc-mode
+ 0 Chord
+ 1 PieSlice
+
+<link linkend="requests:ChangeGC"><emphasis role='bold'>ChangeGC</emphasis></link>
+ 1 56 opcode
+ 1 unused
+ 2 3+n request length
+ 4 GCONTEXT gc
+ 4 BITMASK value-mask (has n bits set to 1)
+ encodings are the same as for CreateGC
+ 4n LISTofVALUE value-list
+ encodings are the same as for CreateGC
+
+<link linkend="requests:CopyGC"><emphasis role='bold'>CopyGC</emphasis></link>
+ 1 57 opcode
+ 1 unused
+ 2 4 request length
+ 4 GCONTEXT src-gc
+ 4 GCONTEXT dst-gc
+ 4 BITMASK value-mask
+ encodings are the same as for CreateGC
+
+<link linkend="requests:SetDashes"><emphasis role='bold'>SetDashes</emphasis></link>
+ 1 58 opcode
+ 1 unused
+ 2 3+(n+p)/4 request length
+ 4 GCONTEXT gc
+ 2 CARD16 dash-offset
+ 2 n length of dashes
+ n LISTofCARD8 dashes
+ p unused, p=pad(n)
+
+<link linkend="requests:SetClipRectangles"><emphasis role='bold'>SetClipRectangles</emphasis></link>
+ 1 59 opcode
+ 1 ordering
+ 0 UnSorted
+ 1 YSorted
+ 2 YXSorted
+ 3 YXBanded
+ 2 3+2n request length
+ 4 GCONTEXT gc
+ 2 INT16 clip-x-origin
+ 2 INT16 clip-y-origin
+ 8n LISTofRECTANGLE rectangles
+
+<link linkend="requests:FreeGC"><emphasis role='bold'>FreeGC</emphasis></link>
+ 1 60 opcode
+ 1 unused
+ 2 2 request length
+ 4 GCONTEXT gc
+
+<link linkend="requests:ClearArea"><emphasis role='bold'>ClearArea</emphasis></link>
+ 1 61 opcode
+ 1 BOOL exposures
+ 2 4 request length
+ 4 WINDOW window
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+
+<link linkend="requests:CopyArea"><emphasis role='bold'>CopyArea</emphasis></link>
+ 1 62 opcode
+ 1 unused
+ 2 7 request length
+ 4 DRAWABLE src-drawable
+ 4 DRAWABLE dst-drawable
+ 4 GCONTEXT gc
+ 2 INT16 src-x
+ 2 INT16 src-y
+ 2 INT16 dst-x
+ 2 INT16 dst-y
+ 2 CARD16 width
+ 2 CARD16 height
+
+<link linkend="requests:CopyPlane"><emphasis role='bold'>CopyPlane</emphasis></link>
+ 1 63 opcode
+ 1 unused
+ 2 8 request length
+ 4 DRAWABLE src-drawable
+ 4 DRAWABLE dst-drawable
+ 4 GCONTEXT gc
+ 2 INT16 src-x
+ 2 INT16 src-y
+ 2 INT16 dst-x
+ 2 INT16 dst-y
+ 2 CARD16 width
+ 2 CARD16 height
+ 4 CARD32 bit-plane
+
+<link linkend="requests:PolyPoint"><emphasis role='bold'>PolyPoint</emphasis></link>
+ 1 64 opcode
+ 1 coordinate-mode
+ 0 Origin
+ 1 Previous
+ 2 3+n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 4n LISTofPOINT points
+
+<link linkend="requests:PolyLine"><emphasis role='bold'>PolyLine</emphasis></link>
+ 1 65 opcode
+ 1 coordinate-mode
+ 0 Origin
+ 1 Previous
+ 2 3+n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 4n LISTofPOINT points
+
+<link linkend="requests:PolySegment"><emphasis role='bold'>PolySegment</emphasis></link>
+ 1 66 opcode
+ 1 unused
+ 2 3+2n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 8n LISTofSEGMENT segments
+
+ SEGMENT
+ 2 INT16 x1
+ 2 INT16 y1
+ 2 INT16 x2
+ 2 INT16 y2
+
+<link linkend="requests:PolyRectangle"><emphasis role='bold'>PolyRectangle</emphasis></link>
+ 1 67 opcode
+ 1 unused
+ 2 3+2n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 8n LISTofRECTANGLE rectangles
+
+<link linkend="requests:PolyArc"><emphasis role='bold'>PolyArc</emphasis></link>
+ 1 68 opcode
+ 1 unused
+ 2 3+3n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 12n LISTofARC arcs
+
+<link linkend="requests:FillPoly"><emphasis role='bold'>FillPoly</emphasis></link>
+ 1 69 opcode
+ 1 unused
+ 2 4+n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 1 shape
+ 0 Complex
+ 1 Nonconvex
+ 2 Convex
+ 1 coordinate-mode
+ 0 Origin
+ 1 Previous
+ 2 unused
+ 4n LISTofPOINT points
+
+<link linkend="requests:PolyFillRectangle"><emphasis role='bold'>PolyFillRectangle</emphasis></link>
+ 1 70 opcode
+ 1 unused
+ 2 3+2n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 8n LISTofRECTANGLE rectangles
+
+<link linkend="requests:PolyFillArc"><emphasis role='bold'>PolyFillArc</emphasis></link>
+ 1 71 opcode
+ 1 unused
+ 2 3+3n request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 12n LISTofARC arcs
+
+<link linkend="requests:PutImage"><emphasis role='bold'>PutImage</emphasis></link>
+ 1 72 opcode
+ 1 format
+ 0 Bitmap
+ 1 XYPixmap
+ 2 ZPixmap
+ 2 6+(n+p)/4 request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 INT16 dst-x
+ 2 INT16 dst-y
+ 1 CARD8 left-pad
+ 1 CARD8 depth
+ 2 unused
+ n LISTofBYTE data
+ p unused, p=pad(n)
+
+<link linkend="requests:GetImage"><emphasis role='bold'>GetImage</emphasis></link>
+ 1 73 opcode
+ 1 format
+ 1 XYPixmap
+ 2 ZPixmap
+ 2 5 request length
+ 4 DRAWABLE drawable
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 4 CARD32 plane-mask
+
+▶
+ 1 1 Reply
+ 1 CARD8 depth
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 4 VISUALID visual
+ 0 None
+ 20 unused
+ n LISTofBYTE data
+ p unused, p=pad(n)
+
+<link linkend="requests:PolyText8"><emphasis role='bold'>PolyText8</emphasis></link>
+ 1 74 opcode
+ 1 unused
+ 2 4+(n+p)/4 request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 2 INT16 x
+ 2 INT16 y
+ n LISTofTEXTITEM8 items
+ p unused, p=pad(n) (p is always 0
+ or 1)
+
+ TEXTITEM8
+ 1 m length of string (cannot be 255)
+ 1 INT8 delta
+ m STRING8 string
+ or
+ 1 255 font-shift indicator
+ 1 font byte 3 (most-significant)
+ 1 font byte 2
+ 1 font byte 1
+ 1 font byte 0 (least-significant)
+
+<link linkend="requests:PolyText16"><emphasis role='bold'>PolyText16</emphasis></link>
+ 1 75 opcode
+ 1 unused
+ 2 4+(n+p)/4 request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 2 INT16 x
+ 2 INT16 y
+ n LISTofTEXTITEM16 items
+ p unused, p=pad(n) (p must be 0 or
+ 1)
+
+ TEXTITEM16
+ 1 m number of CHAR2Bs in string
+ (cannot be 255)
+ 1 INT8 delta
+ 2m STRING16 string
+ or
+ 1 255 font-shift indicator
+ 1 font byte 3 (most-significant)
+ 1 font byte 2
+ 1 font byte 1
+ 1 font byte 0 (least-significant)
+
+<link linkend="requests:ImageText8"><emphasis role='bold'>ImageText8</emphasis></link>
+ 1 76 opcode
+ 1 n length of string
+ 2 4+(n+p)/4 request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 2 INT16 x
+ 2 INT16 y
+ n STRING8 string
+ p unused, p=pad(n)
+
+<link linkend="requests:ImageText16"><emphasis role='bold'>ImageText16</emphasis></link>
+ 1 77 opcode
+ 1 n number of CHAR2Bs in string
+ 2 4+(2n+p)/4 request length
+ 4 DRAWABLE drawable
+ 4 GCONTEXT gc
+ 2 INT16 x
+ 2 INT16 y
+ 2n STRING16 string
+ p unused, p=pad(2n)
+
+<link linkend="requests:CreateColormap"><emphasis role='bold'>CreateColormap</emphasis></link>
+ 1 78 opcode
+ 1 alloc
+ 0 None
+ 1 All
+ 2 4 request length
+ 4 COLORMAP mid
+ 4 WINDOW window
+ 4 VISUALID visual
+
+<link linkend="requests:FreeColormap"><emphasis role='bold'>FreeColormap</emphasis></link>
+ 1 79 opcode
+ 1 unused
+ 2 2 request length
+ 4 COLORMAP cmap
+
+<link linkend="requests:CopyColormapAndFree"><emphasis role='bold'>CopyColormapAndFree</emphasis></link>
+ 1 80 opcode
+ 1 unused
+ 2 3 request length
+ 4 COLORMAP mid
+ 4 COLORMAP src-cmap
+
+<link linkend="requests:InstallColormap"><emphasis role='bold'>InstallColormap</emphasis></link>
+ 1 81 opcode
+ 1 unused
+ 2 2 request length
+ 4 COLORMAP cmap
+
+<link linkend="requests:UninstallColormap"><emphasis role='bold'>UninstallColormap</emphasis></link>
+ 1 82 opcode
+ 1 unused
+ 2 2 request length
+ 4 COLORMAP cmap
+
+<link linkend="requests:ListInstalledColormaps"><emphasis role='bold'>ListInstalledColormaps</emphasis></link>
+ 1 83 opcode
+ 1 unused
+ 2 2 request length
+ 4 WINDOW window
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n reply length
+ 2 n number of COLORMAPs in cmaps
+ 22 unused
+ 4n LISTofCOLORMAP cmaps
+
+<link linkend="requests:AllocColor"><emphasis role='bold'>AllocColor</emphasis></link>
+ 1 84 opcode
+ 1 unused
+ 2 4 request length
+ 4 COLORMAP cmap
+ 2 CARD16 red
+ 2 CARD16 green
+ 2 CARD16 blue
+ 2 unused
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 red
+ 2 CARD16 green
+ 2 CARD16 blue
+ 2 unused
+ 4 CARD32 pixel
+ 12 unused
+
+<link linkend="requests:AllocNamedColor"><emphasis role='bold'>AllocNamedColor</emphasis></link>
+ 1 85 opcode
+ 1 unused
+ 2 3+(n+p)/4 request length
+ 4 COLORMAP cmap
+ 2 n length of name
+ 2 unused
+ n STRING8 name
+ p unused, p=pad(n)
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 pixel
+ 2 CARD16 exact-red
+ 2 CARD16 exact-green
+ 2 CARD16 exact-blue
+ 2 CARD16 visual-red
+ 2 CARD16 visual-green
+ 2 CARD16 visual-blue
+ 8 unused
+
+<link linkend="requests:AllocColorCells"><emphasis role='bold'>AllocColorCells</emphasis></link>
+ 1 86 opcode
+ 1 BOOL contiguous
+ 2 3 request length
+ 4 COLORMAP cmap
+ 2 CARD16 colors
+ 2 CARD16 planes
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n+m reply length
+ 2 n number of CARD32s in pixels
+ 2 m number of CARD32s in masks
+ 20 unused
+ 4n LISTofCARD32 pixels
+ 4m LISTofCARD32 masks
+
+<link linkend="requests:AllocColorPlanes"><emphasis role='bold'>AllocColorPlanes</emphasis></link>
+ 1 87 opcode
+ 1 BOOL contiguous
+ 2 4 request length
+ 4 COLORMAP cmap
+ 2 CARD16 colors
+ 2 CARD16 reds
+ 2 CARD16 greens
+ 2 CARD16 blues
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n reply length
+ 2 n number of CARD32s in pixels
+ 2 unused
+ 4 CARD32 red-mask
+ 4 CARD32 green-mask
+ 4 CARD32 blue-mask
+ 8 unused
+ 4n LISTofCARD32 pixels
+
+<link linkend="requests:FreeColors"><emphasis role='bold'>FreeColors</emphasis></link>
+ 1 88 opcode
+ 1 unused
+ 2 3+n request length
+ 4 COLORMAP cmap
+ 4 CARD32 plane-mask
+ 4n LISTofCARD32 pixels
+
+<link linkend="requests:StoreColors"><emphasis role='bold'>StoreColors</emphasis></link>
+ 1 89 opcode
+ 1 unused
+ 2 2+3n request length
+ 4 COLORMAP cmap
+ 12n LISTofCOLORITEM items
+
+ COLORITEM
+ 4 CARD32 pixel
+ 2 CARD16 red
+ 2 CARD16 green
+ 2 CARD16 blue
+ 1 do-red, do-green, do-blue
+ #x01 do-red (1 is True, 0 is False)
+ #x02 do-green (1 is True, 0 is False)
+ #x04 do-blue (1 is True, 0 is False)
+ #xF8 unused
+ 1 unused
+
+<link linkend="requests:StoreNamedColor"><emphasis role='bold'>StoreNamedColor</emphasis></link>
+ 1 90 opcode
+ 1 do-red, do-green, do-blue
+ #x01 do-red (1 is True, 0 is False)
+ #x02 do-green (1 is True, 0 is False)
+ #x04 do-blue (1 is True, 0 is False)
+ #xF8 unused
+ 2 4+(n+p)/4 request length
+ 4 COLORMAP cmap
+ 4 CARD32 pixel
+ 2 n length of name
+ 2 unused
+ n STRING8 name
+ p unused, p=pad(n)
+
+<link linkend="requests:QueryColors"><emphasis role='bold'>QueryColors</emphasis></link>
+ 1 91 opcode
+ 1 unused
+ 2 2+n request length
+ 4 COLORMAP cmap
+ 4n LISTofCARD32 pixels
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 2n reply length
+ 2 n number of RGBs in colors
+ 22 unused
+ 8n LISTofRGB colors
+
+ RGB
+ 2 CARD16 red
+ 2 CARD16 green
+ 2 CARD16 blue
+ 2 unused
+
+<link linkend="requests:LookupColor"><emphasis role='bold'>LookupColor</emphasis></link>
+ 1 92 opcode
+ 1 unused
+ 2 3+(n+p)/4 request length
+ 4 COLORMAP cmap
+ 2 n length of name
+ 2 unused
+ n STRING8 name
+ p unused, p=pad(n)
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 exact-red
+ 2 CARD16 exact-green
+ 2 CARD16 exact-blue
+ 2 CARD16 visual-red
+ 2 CARD16 visual-green
+ 2 CARD16 visual-blue
+ 12 unused
+
+<link linkend="requests:CreateCursor"><emphasis role='bold'>CreateCursor</emphasis></link>
+ 1 93 opcode
+ 1 unused
+ 2 8 request length
+ 4 CURSOR cid
+ 4 PIXMAP source
+ 4 PIXMAP mask
+ 0 None
+ 2 CARD16 fore-red
+ 2 CARD16 fore-green
+ 2 CARD16 fore-blue
+ 2 CARD16 back-red
+ 2 CARD16 back-green
+ 2 CARD16 back-blue
+ 2 CARD16 x
+ 2 CARD16 y
+
+<link linkend="requests:CreateGlyphCursor"><emphasis role='bold'>CreateGlyphCursor</emphasis></link>
+ 1 94 opcode
+ 1 unused
+ 2 8 request length
+ 4 CURSOR cid
+ 4 FONT source-font
+ 4 FONT mask-font
+ 0 None
+ 2 CARD16 source-char
+ 2 CARD16 mask-char
+ 2 CARD16 fore-red
+ 2 CARD16 fore-green
+ 2 CARD16 fore-blue
+ 2 CARD16 back-red
+ 2 CARD16 back-green
+ 2 CARD16 back-blue
+
+<link linkend="requests:FreeCursor"><emphasis role='bold'>FreeCursor</emphasis></link>
+ 1 95 opcode
+ 1 unused
+ 2 2 request length
+ 4 CURSOR cursor
+
+<link linkend="requests:RecolorCursor"><emphasis role='bold'>RecolorCursor</emphasis></link>
+ 1 96 opcode
+ 1 unused
+ 2 5 request length
+ 4 CURSOR cursor
+ 2 CARD16 fore-red
+ 2 CARD16 fore-green
+ 2 CARD16 fore-blue
+ 2 CARD16 back-red
+ 2 CARD16 back-green
+ 2 CARD16 back-blue
+
+<link linkend="requests:QueryBestSize"><emphasis role='bold'>QueryBestSize</emphasis></link>
+ 1 97 opcode
+ 1 class
+ 0 Cursor
+ 1 Tile
+ 2 Stipple
+ 2 3 request length
+ 4 DRAWABLE drawable
+ 2 CARD16 width
+ 2 CARD16 height
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 width
+ 2 CARD16 height
+ 20 unused
+
+<link linkend="requests:QueryExtension"><emphasis role='bold'>QueryExtension</emphasis></link>
+ 1 98 opcode
+ 1 unused
+ 2 2+(n+p)/4 request length
+ 2 n length of name
+ 2 unused
+ n STRING8 name
+ p unused, p=pad(n)
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 1 BOOL present
+ 1 CARD8 major-opcode
+ 1 CARD8 first-event
+ 1 CARD8 first-error
+ 20 unused
+
+<link linkend="requests:ListExtensions"><emphasis role='bold'>ListExtensions</emphasis></link>
+ 1 99 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 CARD8 number of STRs in names
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 24 unused
+ n LISTofSTR names
+ p unused, p=pad(n)
+
+<link linkend="requests:ChangeKeyboardMapping"><emphasis role='bold'>ChangeKeyboardMapping</emphasis></link>
+ 1 100 opcode
+ 1 n keycode-count
+ 2 2+nm request length
+ 1 KEYCODE first-keycode
+ 1 m keysyms-per-keycode
+ 2 unused
+ 4nm LISTofKEYSYM keysyms
+
+<link linkend="requests:GetKeyboardMapping"><emphasis role='bold'>GetKeyboardMapping</emphasis></link>
+ 1 101 opcode
+ 1 unused
+ 2 2 request length
+ 1 KEYCODE first-keycode
+ 1 m count
+ 2 unused
+
+▶
+ 1 1 Reply
+ 1 n keysyms-per-keycode
+ 2 CARD16 sequence number
+ 4 nm reply length (m = count field
+ from the request)
+ 24 unused
+ 4nm LISTofKEYSYM keysyms
+
+<link linkend="requests:ChangeKeyboardControl"><emphasis role='bold'>ChangeKeyboardControl</emphasis></link>
+ 1 102 opcode
+ 1 unused
+ 2 2+n request length
+ 4 BITMASK value-mask (has n bits set to 1)
+ #x0001 key-click-percent
+ #x0002 bell-percent
+ #x0004 bell-pitch
+ #x0008 bell-duration
+ #x0010 led
+ #x0020 led-mode
+ #x0040 key
+ #x0080 auto-repeat-mode
+ 4n LISTofVALUE value-list
+
+ VALUEs
+ 1 INT8 key-click-percent
+ 1 INT8 bell-percent
+ 2 INT16 bell-pitch
+ 2 INT16 bell-duration
+ 1 CARD8 led
+ 1 led-mode
+ 0 Off
+ 1 On
+ 1 KEYCODE key
+ 1 auto-repeat-mode
+ 0 Off
+ 1 On
+ 2 Default
+
+<link linkend="requests:GetKeyboardControl"><emphasis role='bold'>GetKeyboardControl</emphasis></link>
+ 1 103 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 global-auto-repeat
+ 0 Off
+ 1 On
+ 2 CARD16 sequence number
+ 4 5 reply length
+ 4 CARD32 led-mask
+ 1 CARD8 key-click-percent
+ 1 CARD8 bell-percent
+ 2 CARD16 bell-pitch
+ 2 CARD16 bell-duration
+ 2 unused
+ 32 LISTofCARD8 auto-repeats
+
+<link linkend="requests:Bell"><emphasis role='bold'>Bell</emphasis></link>
+ 1 104 opcode
+ 1 INT8 percent
+ 2 1 request length
+
+<link linkend="requests:ChangePointerControl"><emphasis role='bold'>ChangePointerControl</emphasis></link>
+ 1 105 opcode
+ 1 unused
+ 2 3 request length
+ 2 INT16 acceleration-numerator
+ 2 INT16 acceleration-denominator
+ 2 INT16 threshold
+ 1 BOOL do-acceleration
+ 1 BOOL do-threshold
+
+<link linkend="requests:GetPointerControl"><emphasis role='bold'>GetPointerControl</emphasis></link>
+ 1 106 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 acceleration-numerator
+ 2 CARD16 acceleration-denominator
+ 2 CARD16 threshold
+ 18 unused
+
+<link linkend="requests:SetScreenSaver"><emphasis role='bold'>SetScreenSaver</emphasis></link>
+ 1 107 opcode
+ 1 unused
+ 2 3 request length
+ 2 INT16 timeout
+ 2 INT16 interval
+ 1 prefer-blanking
+ 0 No
+ 1 Yes
+ 2 Default
+ 1 allow-exposures
+ 0 No
+ 1 Yes
+ 2 Default
+ 2 unused
+
+<link linkend="requests:GetScreenSaver"><emphasis role='bold'>GetScreenSaver</emphasis></link>
+ 1 108 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 timeout
+ 2 CARD16 interval
+ 1 prefer-blanking
+ 0 No
+ 1 Yes
+ 1 allow-exposures
+ 0 No
+ 1 Yes
+ 18 unused
+
+<link linkend="requests:ChangeHosts"><emphasis role='bold'>ChangeHosts</emphasis></link>
+ 1 109 opcode
+ 1 mode
+ 0 Insert
+ 1 Delete
+ 2 2+(n+p)/4 request length
+ 1 family
+ 0 Internet
+ 1 DECnet
+ 2 Chaos
+ 1 unused
+ 2 n length of address
+ n LISTofCARD8 address
+ p unused, p=pad(n)
+
+<link linkend="requests:ListHosts"><emphasis role='bold'>ListHosts</emphasis></link>
+ 1 110 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 mode
+ 0 Disabled
+ 1 Enabled
+ 2 CARD16 sequence number
+ 4 n/4 reply length
+ 2 CARD16 number of HOSTs in hosts
+ 22 unused
+ n LISTofHOST hosts (n always a multiple of 4)
+
+<link linkend="requests:SetAccessControl"><emphasis role='bold'>SetAccessControl</emphasis></link>
+ 1 111 opcode
+ 1 mode
+ 0 Disable
+ 1 Enable
+ 2 1 request length
+
+<link linkend="requests:SetCloseDownMode"><emphasis role='bold'>SetCloseDownMode</emphasis></link>
+ 1 112 opcode
+ 1 mode
+ 0 Destroy
+ 1 RetainPermanent
+ 2 RetainTemporary
+ 2 1 request length
+
+<link linkend="requests:KillClient"><emphasis role='bold'>KillClient</emphasis></link>
+ 1 113 opcode
+ 1 unused
+ 2 2 request length
+ 4 CARD32 resource
+ 0 AllTemporary
+
+<link linkend="requests:RotateProperties"><emphasis role='bold'>RotateProperties</emphasis></link>
+ 1 114 opcode
+ 1 unused
+ 2 3+n request length
+ 4 WINDOW window
+ 2 n number of properties
+ 2 INT16 delta
+ 4n LISTofATOM properties
+
+<link linkend="requests:ForceScreenSaver"><emphasis role='bold'>ForceScreenSaver</emphasis></link>
+ 1 115 opcode
+ 1 mode
+ 0 Reset
+ 1 Activate
+ 2 1 request length
+
+<link linkend="requests:SetPointerMapping"><emphasis role='bold'>SetPointerMapping</emphasis></link>
+ 1 116 opcode
+ 1 n length of map
+ 2 1+(n+p)/4 request length
+ n LISTofCARD8 map
+ p unused, p=pad(n)
+
+▶
+ 1 1 Reply
+ 1 status
+ 0 Success
+ 1 Busy
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 24 unused
+
+<link linkend="requests:GetPointerMapping"><emphasis role='bold'>GetPointerMapping</emphasis></link>
+ 1 117 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 n length of map
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 24 unused
+ n LISTofCARD8 map
+ p unused, p=pad(n)
+
+<link linkend="requests:SetModifierMapping"><emphasis role='bold'>SetModifierMapping</emphasis></link>
+ 1 118 opcode
+ 1 n keycodes-per-modifier
+ 2 1+2n request length
+ 8n LISTofKEYCODE keycodes
+
+▶
+ 1 1 Reply
+ 1 status
+ 0 Success
+ 1 Busy
+ 2 Failed
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 24 unused
+
+<link linkend="requests:GetModifierMapping"><emphasis role='bold'>GetModifierMapping</emphasis></link>
+ 1 119 opcode
+ 1 unused
+ 2 1 request length
+
+▶
+ 1 1 Reply
+ 1 n keycodes-per-modifier
+ 2 CARD16 sequence number
+ 4 2n reply length
+ 24 unused
+ 8n LISTofKEYCODE keycodes
+
+<link linkend="requests:NoOperation"><emphasis role='bold'>NoOperation</emphasis></link>
+ 1 127 opcode
+ 1 unused
+ 2 1+n request length
+ 4n unused
+</literallayout>
+</sect1>
+
+<sect1 id='Encoding::Events'>
+<title>Events</title>
+<indexterm zone="Encoding::Events"><primary>Event</primary><secondary>encoding</secondary></indexterm>
+
+<literallayout class="monospaced">
+<link linkend="events:KeyPress"><emphasis role='bold'>KeyPress</emphasis></link>
+ 1 2 code
+ 1 KEYCODE detail
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW root
+ 4 WINDOW event
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 event-x
+ 2 INT16 event-y
+ 2 SETofKEYBUTMASK state
+ 1 BOOL same-screen
+ 1 unused
+
+<link linkend="events:KeyRelease"><emphasis role='bold'>KeyRelease</emphasis></link>
+ 1 3 code
+ 1 KEYCODE detail
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW root
+ 4 WINDOW event
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 event-x
+ 2 INT16 event-y
+ 2 SETofKEYBUTMASK state
+ 1 BOOL same-screen
+ 1 unused
+
+<link linkend="events:ButtonPress"><emphasis role='bold'>ButtonPress</emphasis></link>
+ 1 4 code
+ 1 BUTTON detail
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW root
+ 4 WINDOW event
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 event-x
+ 2 INT16 event-y
+ 2 SETofKEYBUTMASK state
+ 1 BOOL same-screen
+ 1 unused
+
+<link linkend="events:ButtonRelease"><emphasis role='bold'>ButtonRelease</emphasis></link>
+ 1 5 code
+ 1 BUTTON detail
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW root
+ 4 WINDOW event
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 event-x
+ 2 INT16 event-y
+ 2 SETofKEYBUTMASK state
+ 1 BOOL same-screen
+ 1 unused
+
+<link linkend="events:MotionNotify"><emphasis role='bold'>MotionNotify</emphasis></link>
+ 1 6 code
+ 1 detail
+ 0 Normal
+ 1 Hint
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW root
+ 4 WINDOW event
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 event-x
+ 2 INT16 event-y
+ 2 SETofKEYBUTMASK state
+ 1 BOOL same-screen
+ 1 unused
+
+<link linkend="events:EnterNotify"><emphasis role='bold'>EnterNotify</emphasis></link>
+ 1 7 code
+ 1 detail
+ 0 Ancestor
+ 1 Virtual
+ 2 Inferior
+ 3 Nonlinear
+ 4 NonlinearVirtual
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW root
+ 4 WINDOW event
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 event-x
+ 2 INT16 event-y
+ 2 SETofKEYBUTMASK state
+ 1 mode
+ 0 Normal
+ 1 Grab
+ 2 Ungrab
+ 1 same-screen, focus
+ #x01 focus (1 is True, 0 is False)
+ #x02 same-screen (1 is True, 0 is False)
+ #xFC unused
+
+<link linkend="events:LeaveNotify"><emphasis role='bold'>LeaveNotify</emphasis></link>
+ 1 8 code
+ 1 detail
+ 0 Ancestor
+ 1 Virtual
+ 2 Inferior
+ 3 Nonlinear
+ 4 NonlinearVirtual
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW root
+ 4 WINDOW event
+ 4 WINDOW child
+ 0 None
+ 2 INT16 root-x
+ 2 INT16 root-y
+ 2 INT16 event-x
+ 2 INT16 event-y
+ 2 SETofKEYBUTMASK state
+ 1 mode
+ 0 Normal
+ 1 Grab
+ 2 Ungrab
+ 1 same-screen, focus
+ #x01 focus (1 is True, 0 is False)
+ #x02 same-screen (1 is True, 0 is False)
+ #xFC unused
+
+<link linkend="events:FocusIn"><emphasis role='bold'>FocusIn</emphasis></link>
+ 1 9 code
+ 1 detail
+ 0 Ancestor
+ 1 Virtual
+ 2 Inferior
+ 3 Nonlinear
+ 4 NonlinearVirtual
+ 5 Pointer
+ 6 PointerRoot
+ 7 None
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 1 mode
+ 0 Normal
+ 1 Grab
+ 2 Ungrab
+ 3 WhileGrabbed
+ 23 unused
+
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>
+ 1 10 code
+ 1 detail
+ 0 Ancestor
+ 1 Virtual
+ 2 Inferior
+ 3 Nonlinear
+ 4 NonlinearVirtual
+ 5 Pointer
+ 6 PointerRoot
+ 7 None
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 1 mode
+ 0 Normal
+ 1 Grab
+ 2 Ungrab
+ 3 WhileGrabbed
+ 23 unused
+
+<link linkend="events:KeymapNotify"><emphasis role='bold'>KeymapNotify</emphasis></link>
+ 1 11 code
+ 31 LISTofCARD8 keys (byte for keycodes 0-7 is
+ omitted)
+
+<link linkend="events:Expose"><emphasis role='bold'>Expose</emphasis></link>
+ 1 12 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW window
+ 2 CARD16 x
+ 2 CARD16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 count
+ 14 unused
+
+<link linkend="events:GraphicsExposure"><emphasis role='bold'>GraphicsExposure</emphasis></link>
+ 1 13 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 DRAWABLE drawable
+ 2 CARD16 x
+ 2 CARD16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 minor-opcode
+ 2 CARD16 count
+ 1 CARD8 major-opcode
+ 11 unused
+
+<link linkend="events:NoExposure"><emphasis role='bold'>NoExposure</emphasis></link>
+ 1 14 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 DRAWABLE drawable
+ 2 CARD16 minor-opcode
+ 1 CARD8 major-opcode
+ 21 unused
+
+<link linkend="events:VisibilityNotify"><emphasis role='bold'>VisibilityNotify</emphasis></link>
+ 1 15 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW window
+ 1 state
+ 0 Unobscured
+ 1 PartiallyObscured
+ 2 FullyObscured
+ 23 unused
+
+<link linkend="events:CreateNotify"><emphasis role='bold'>CreateNotify</emphasis></link>
+ 1 16 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW parent
+ 4 WINDOW window
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 border-width
+ 1 BOOL override-redirect
+ 9 unused
+
+<link linkend="events:DestroyNotify"><emphasis role='bold'>DestroyNotify</emphasis></link>
+ 1 17 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 4 WINDOW window
+ 20 unused
+
+<link linkend="events:UnmapNotify"><emphasis role='bold'>UnmapNotify</emphasis></link>
+ 1 18 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 4 WINDOW window
+ 1 BOOL from-configure
+ 19 unused
+
+<link linkend="events:MapNotify"><emphasis role='bold'>MapNotify</emphasis></link>
+ 1 19 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 4 WINDOW window
+ 1 BOOL override-redirect
+ 19 unused
+
+<link linkend="events:MapRequest"><emphasis role='bold'>MapRequest</emphasis></link>
+ 1 20 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW parent
+ 4 WINDOW window
+ 20 unused
+
+<link linkend="events:ReparentNotify"><emphasis role='bold'>ReparentNotify</emphasis></link>
+ 1 21 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 4 WINDOW window
+ 4 WINDOW parent
+ 2 INT16 x
+ 2 INT16 y
+ 1 BOOL override-redirect
+ 11 unused
+
+<link linkend="events:ConfigureNotify"><emphasis role='bold'>ConfigureNotify</emphasis></link>
+ 1 22 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 4 WINDOW window
+ 4 WINDOW above-sibling
+ 0 None
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 border-width
+ 1 BOOL override-redirect
+ 5 unused
+
+<link linkend="events:ConfigureRequest"><emphasis role='bold'>ConfigureRequest</emphasis></link>
+ 1 23 code
+ 1 stack-mode
+ 0 Above
+ 1 Below
+ 2 TopIf
+ 3 BottomIf
+ 4 Opposite
+ 2 CARD16 sequence number
+ 4 WINDOW parent
+ 4 WINDOW window
+ 4 WINDOW sibling
+ 0 None
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 border-width
+ 2 BITMASK value-mask
+ #x0001 x
+ #x0002 y
+ #x0004 width
+ #x0008 height
+ #x0010 border-width
+ #x0020 sibling
+ #x0040 stack-mode
+ 4 unused
+
+<link linkend="events:GravityNotify"><emphasis role='bold'>GravityNotify</emphasis></link>
+ 1 24 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 4 WINDOW window
+ 2 INT16 x
+ 2 INT16 y
+ 16 unused
+
+<link linkend="events:ResizeRequest"><emphasis role='bold'>ResizeRequest</emphasis></link>
+ 1 25 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW window
+ 2 CARD16 width
+ 2 CARD16 height
+ 20 unused
+
+<link linkend="events:CirculateNotify"><emphasis role='bold'>CirculateNotify</emphasis></link>
+ 1 26 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW event
+ 4 WINDOW window
+ 4 WINDOW unused
+ 1 place
+ 0 Top
+ 1 Bottom
+ 15 unused
+
+<link linkend="events:CirculateRequest"><emphasis role='bold'>CirculateRequest</emphasis></link>
+ 1 27 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW parent
+ 4 WINDOW window
+ 4 unused
+ 1 place
+ 0 Top
+ 1 Bottom
+ 15 unused
+
+<link linkend="events:PropertyNotify"><emphasis role='bold'>PropertyNotify</emphasis></link>
+ 1 28 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW window
+ 4 ATOM atom
+ 4 TIMESTAMP time
+ 1 state
+ 0 NewValue
+ 1 Deleted
+ 15 unused
+
+<link linkend="events:SelectionClear"><emphasis role='bold'>SelectionClear</emphasis></link>
+ 1 29 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 4 WINDOW owner
+ 4 ATOM selection
+ 16 unused
+
+<link linkend="events:SelectionRequest"><emphasis role='bold'>SelectionRequest</emphasis></link>
+ 1 30 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 0 CurrentTime
+ 4 WINDOW owner
+ 4 WINDOW requestor
+ 4 ATOM selection
+ 4 ATOM target
+ 4 ATOM property
+ 0 None
+ 4 unused
+
+<link linkend="events:SelectionNotify"><emphasis role='bold'>SelectionNotify</emphasis></link>
+ 1 31 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 TIMESTAMP time
+ 0 CurrentTime
+ 4 WINDOW requestor
+ 4 ATOM selection
+ 4 ATOM target
+ 4 ATOM property
+ 0 None
+ 8 unused
+
+<link linkend="events:ColormapNotify"><emphasis role='bold'>ColormapNotify</emphasis></link>
+ 1 32 code
+ 1 unused
+ 2 CARD16 sequence number
+ 4 WINDOW window
+ 4 COLORMAP colormap
+ 0 None
+ 1 BOOL new
+ 1 state
+ 0 Uninstalled
+ 1 Installed
+ 18 unused
+
+<link linkend="events:ClientMessage"><emphasis role='bold'>ClientMessage</emphasis></link>
+ 1 33 code
+ 1 CARD8 format
+ 2 CARD16 sequence number
+ 4 WINDOW window
+ 4 ATOM type
+ 20 data
+
+<link linkend="events:MappingNotify"><emphasis role='bold'>MappingNotify</emphasis></link>
+ 1 34 code
+ 1 unused
+ 2 CARD16 sequence number
+ 1 request
+ 0 Modifier
+ 1 Keyboard
+ 2 Pointer
+ 1 KEYCODE first-keycode
+ 1 CARD8 count
+ 25 unused
+</literallayout>
+
+</sect1>
+</appendix>
diff --git a/specs/fsproto.xml b/specs/fsproto.xml
new file mode 100644
index 0000000..74f2428
--- /dev/null
+++ b/specs/fsproto.xml
@@ -0,0 +1,4417 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
+
+
+<book id="fsproto">
+
+<bookinfo>
+ <title>The X Font Service Protocol</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
+ <releaseinfo>Version 2.0</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Jim</firstname><surname>Fulton</surname>
+ <affiliation><orgname>Network Computing Devices, Inc.</orgname></affiliation>
+ </author>
+ </authorgroup>
+ <edition>Revised May 2, 1994</edition>
+ <copyright><year>1991</year><holder>Network Computing Devices, Inc.</holder></copyright>
+
+<legalnotice>
+<para>
+Permission to use, copy, modify, distribute, and sell this
+documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice and this permission
+notice appear in all copies. Network Computing Devices, Inc.
+makes no representations about the suitability for any purpose
+of the information in this document. This documentation is
+provided &ldquo;as is&rdquo; without express or implied warranty.
+</para>
+</legalnotice>
+
+<legalnotice>
+<para role="multiLicensing">Copyright © 1994 X Consortium</para>
+<para>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the &ldquo;Software&rdquo;), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+</para>
+<para>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+</para>
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+</para>
+<para>
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+</para>
+</legalnotice>
+</bookinfo>
+
+<chapter id='Introduction'>
+<title>Introduction</title>
+<para>
+The management of fonts in large, heterogeneous environments is one of the
+hardest aspects of using the X Window System
+<footnote id='footnote1'><para>
+<firstterm><trademark>X Window System</trademark></firstterm>
+is a trademark of The Open Group.
+</para></footnote>
+. Multiple formats and the lack of
+a consistent mechanism for exporting font data to all displays on a network
+prevent the transparent use of applications across different display platforms.
+The X Font Service protocol is designed to address this and other issues, with
+specific emphasis on the needs of the core X protocol. Upward-compatible
+changes (typically in the form of new requests) are expected as consensus is
+reached on new features (particularly outline font support).
+</para>
+<para>
+Currently, most X displays use network file protocols such as
+<acronym>NFS</acronym> and <acronym>TFTP</acronym> to
+obtain raw font data which they parse directly. Since a common binary format
+for this data doesn't exist, displays must be able to interpret a variety of
+formats if they are to be used with different application hosts. This leads to
+wasted code and data space and a loss of interoperability as displays are used
+in unforeseen environments.
+</para>
+<para>
+By moving the interpretation of font data out of the X server into a separate
+service on the network, these problems can be greatly reduced. In addition,
+new technologies, such as dynamically generating bitmaps from scaled or outline
+fonts, can be provided to all displays transparently. For horizontal text,
+caching techniques and increased processor power can potentially make
+rasterization more efficient on large, centralized hosts than on individual
+displays.
+</para>
+<para>
+Each font server provides sets of fonts that may be listed and queried for
+header, property, glyph extents, and bitmap information. This data is
+transmitted over the network using a binary format (with variations to support
+different bit- and byte-orders) designed to minimize the amount of processing
+required by the display. Since the font server, rather than the display, is
+responsible for parsing the raw font data, new formats can be used by all
+displays by modifying a single font server.
+</para>
+<para>
+From the user's point of view, font servers are simply a new type of name in
+the X font path. Network name services allow descriptive names (such as
+DEPARTMENT-FONTS or APPLICATION-FONTS) to be translated into proper network
+addresses. X displays send requests to and read replies from the font server
+rather than reading directly from files. Since the X Font Service protocol is
+designed to allow subsets of the font data to be requested, displays may easily
+implement a variety of strategies for fine-grained demand-loading of glyphs.
+</para>
+</chapter>
+
+<chapter id='Architectural_Model'>
+<title>Architectural Model</title>
+<!-- .XS -->
+<!-- (SN Architectural Model -->
+<!-- .XE -->
+<para>
+In this document, the words <firstterm>client</firstterm> and
+<firstterm>server</firstterm> refer to the consumer and
+provider of a font, respectively, unless otherwise indicated. It is important
+to note that in this context, the X server is also a font client.
+</para>
+<para>
+The X Font Service protocol does not require any changes to the core X protocol
+or to any applications. To the user, font servers are simply additional types
+of font path elements. As such, X servers may connect to multiple font
+servers, as shown in Figure 2.1. Although the font protocol is geared towards
+the X Window System, it may be also used by other consumers of font data (such
+as printer drivers).
+</para>
+
+<figure id="figure2.1" label="2.1"><title>Connecting to a Font Server</title>
+<literallayout class="monospaced">
+ ┌────────┐ ┌───────────────┐
+ │ X1 ├──────────────┤ │
+ │ Server │ │ Font Server │
+ └────────┘ ┌───────┤ 1 │
+ │ └───────────────┘
+ ┌────────┐ │
+ │ X2 ├──────┘ ┌───────────────┐
+ │ Server ├──────────────┤ │
+ └────────┘ │ Font Server │
+ ┌───────┤ 2 │
+┌─────────┐ │ └───────────────┘
+│ other │ │
+│ clients ├──────┘
+└─────────┘
+</literallayout>
+</figure>
+
+<para>
+Clients communicate with the font server using the request/reply/event model
+over any mutually-understood virtual stream connection (such as
+<acronym>TCP/IP</acronym>, DECnet,
+<footnote id='footnote2'><para>
+<firstterm><trademark>DECnet</trademark></firstterm> is a trademark
+of Digital Equipment Corporation.
+</para></footnote>
+etc.). Font servers are responsible for providing data in the bit and byte
+orders requested by the client. The set of requests and events provided in the
+first version of the X Font Service protocol is limited to supporting the needs
+of the bitmap-oriented core X Window System protocol. Extensions are expected
+as new needs evolve.
+</para>
+<para>
+A font server reads raw font data from a variety of sources (possibly
+including other font servers) and converts it into a common format that is
+transmitted to the client using the protocol described in
+<link linkend='Protocol'>Section 4</link>. New font
+formats are handled by adding new converters to a font server, as shown in
+Figure 2.2.
+</para>
+
+<figure id="figure2.2" label="2.2"><title>Where Font Data Comes From</title>
+<literallayout class="monospaced">
+ ┌────────────┐
+ │ client │
+ │ (X server) │
+ └─────┬──────┘
+ │
+ network
+ │
+┌─────────────────────┴──────────────────────┐
+│ │
+│ font server 1 │
+│ │
+├─────┬─────┬─────┬─────┬────┬─────┬───┬─────┤
+│ bdf │ snf │ pcf │ atm │ f3 │ dwf │ │ │ ... │
+└─────┴─────┴─────┴─────┴────┴─────┴─│─┴─────┘
+ │
+ network
+ │
+ ┌─────┴────┐
+ │ font │
+ │ server 2 │
+ └──────────┘
+</literallayout>
+</figure>
+
+<para>
+The server may choose to provide named sets of fonts called
+<firstterm>catalogues</firstterm>.
+Clients may specify which of the sets should be used in listing or opening a
+font.
+</para>
+
+<para>
+An event mechanism similar to that used in the X protocol is provided for
+asynchronous notification of clients by the server.
+</para>
+
+<para>
+Clients may provide authorization data for the server to be used in determining
+(according to the server's licensing policy) whether or not access should be
+granted to particular fonts. This is particularly useful for clients whose
+authorization changes over time (such as an X server that can verify the
+identity of the user).
+</para>
+<para>
+Implementations that wish to provide additional requests or events may use the
+extension mechanism. Adding to the core font service protocol (with the
+accompanying change in the major or minor version numbers) is reserved to the X
+Consortium.
+</para>
+</chapter>
+
+<chapter id='Font_Server_Naming'>
+<title>Font Server Naming</title>
+<!-- .XS -->
+<!-- (SN Font Server Naming -->
+<!-- .XE -->
+<para>
+Font clients that expose font server names to the user are encouraged to
+provide ways of naming font servers symbolically (e.g. DEPARTMENT-FONTS).
+However, for environments that lack appropriate name services
+transport-specific names are necessary. Since these names do occur in the
+protocol, clients and servers should support at least the applicable formats
+described below. Formats for additional transports may be registered with the
+X Consortium.
+</para>
+
+<section id='TCPIP_Names'>
+<title>TCP/IP Names</title>
+<!-- .XS -->
+<!-- (SN TCP/IP Names -->
+<!-- .XE -->
+<para>
+The following syntax should be used for TCP/IP names:
+
+<literallayout class="monospaced">
+ <replaceable>TCP name</replaceable> ::= <literal>tcp/</literal> <replaceable>hostname</replaceable> <literal>:</literal> <replaceable>ipportnumber</replaceable> <optional><literal>/</literal> <replaceable>cataloguelist</replaceable></optional>
+</literallayout>
+
+where <replaceable>hostname</replaceable> is either symbolic (such as
+<systemitem class="systemname">expo.lcs.mit.edu</systemitem>) or numeric
+decimal (such as <systemitem class="ipaddress">18.30.0.212</systemitem>).
+The <replaceable>ipportnumber</replaceable> is the port on which the
+font server is listening for connections.
+The <replaceable>cataloguelist</replaceable> string at
+the end is optional and specifies a plus-separated list of catalogues
+that may be requested. For example:
+<literallayout class="monospaced">
+ tcp/expo.lcs.mit.edu:8012/available+special
+ tcp/18.30.0.212:7890
+</literallayout>
+</para>
+</section>
+
+<section id='DECnet_Names'>
+<title>DECnet Names</title>
+<!-- .XS -->
+<!-- (SN DECnet Names -->
+<!-- .XE -->
+<para>
+The following syntax should be used for DECnet names:
+
+<literallayout class="monospaced">
+ <replaceable>DECnet name</replaceable> ::= <literal>decnet/</literal> <replaceable>nodename</replaceable> <literal>::font$</literal> <replaceable>objname</replaceable> <optional><literal>/</literal> <replaceable>cataloguelist</replaceable></optional>
+</literallayout>
+
+where <replaceable>nodename</replaceable> is either symbolic (such as
+<systemitem class="systemname">SRVNOD</systemitem>) or the
+numeric decimal form of the DECnet address (such as
+<systemitem class="ipaddress">44.70</systemitem>).
+The <replaceable>objname</replaceable> is normal, case-insensitive DECnet
+object name. The <replaceable>cataloguelist</replaceable> string
+at the end is
+optional and specifies a plus-separated list of catalogues that may be
+requested. For example:
+
+<literallayout class="monospaced">
+ DECNET/SRVNOD::FONT$DEFAULT/AVAILABLE
+ decnet/44.70::font$other
+</literallayout>
+</para>
+</section>
+</chapter>
+
+<chapter id='Protocol'>
+<title>Protocol</title>
+<!-- .XS -->
+<!-- (SN Protocol -->
+<!-- .XE -->
+<para>
+The protocol described below uses the request/reply/error model and is
+specified using the same conventions outlined in
+<olink targetdoc='x11protocol' targetptr='Syntactic_Conventions'>Section 2
+of the core X Window System protocol</olink>
+<xref linkend="References:x11proto"/>:
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+<!-- .IP \(bu 5 -->
+Data type names are spelled in upper case with no word separators,
+as in: <link linkend="Data_Types:FONTID"><type>FONTID</type></link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<!-- .IP \(bu 5 -->
+Alternate values are capitalized with no word separators,
+as in: <constant>MaxWidth</constant>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<!-- .IP \(bu 5 -->
+Structure element declarations are in lower case with hyphens
+as word separators, as in: <structfield>byte-order-msb</structfield>
+ </para>
+ <note>
+ <para>
+Structure element names are referred to in
+upper case (e.g. <structfield>BYTE-ORDER-MSB</structfield>) when used in
+descriptions to set them off from the surrounding
+text. When this document is typeset they will be
+printed in lower case in a distinct font.
+ </para>
+ </note>
+ </listitem>
+ <listitem>
+ <para>
+Type declarations have the form <quote><type>name</type>: type</quote>,
+as in: <type>CARD8</type>: 8-bit byte
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Comma-separated lists of alternate values are enclosed in
+braces, as in: { <constant>Min</constant>, <constant>MaxWidth</constant>,
+<constant>Max</constant> }
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Comma-separated lists of structure elements are enclosed in
+brackets, as in: [ <structfield>byte1</structfield>: <type>CARD8</type>,
+<structfield>byte2</structfield>: <type>CARD8</type> ]
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+A type with a prefix <quote>LISTof</quote> represents a counted list of
+elements of that type, as in: <type>LISTofCARD8</type>
+</para>
+
+<section id='Data_Types'>
+<title>Data Types</title>
+<!-- .XS -->
+<!-- (SN Data Types -->
+<!-- .XE -->
+<para>
+The following data types are used in the core X Font Server protocol:
+</para>
+
+<section id="Data_Types:ACCESSCONTEXT">
+ <title><type>ACCESSCONTEXT</type></title>
+ <indexterm zone="Data_Types:ACCESSCONTEXT" significance="preferred"><primary>ACCESSCONTEXT</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>ACCESSCONTEXT</type>:</entry><entry><link linkend="Data_Types:ID"><type>ID</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<para>
+This value is specified in the CreateAC request as the identifier
+to be used when referring to a particular AccessContext resource
+within the server. These resources are used by the server to
+store client-specified authorization information. This
+information may be used by the server to determine whether or not
+the client should be granted access to particular font data.
+</para>
+<para>
+In order to preserve the integrity of font licensing being performed by
+the font server, care must be taken by a client to properly represent the
+identity of the true user of the font. Some font clients will in fact
+be servers (for example, X servers) requesting fonts for their own clients.
+Other font clients may be doing work on behalf of a number of different
+users over time (for example, print spoolers).
+</para>
+<para>
+<type>AccessContext</type>s
+must be created (with
+<link linkend="Requests:CreateAC"><function>CreateAC</function></link>)
+and switched among (with
+<link linkend="Requests:SetAuthorization"><function>SetAuthorization</function></link>)
+to represent all of these <quote>font users</quote> properly.
+ </para>
+</section>
+
+<section id="Data_Types:ALTERNATESERVER">
+ <title><type>ALTERNATESERVER</type></title>
+ <indexterm zone="Data_Types:ALTERNATESERVER" significance="preferred"><primary>ALTERNATESERVER</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows="1"><type>ALTERNATESERVER</type>:</entry>
+ <entry> [ <structfield>name</structfield>:</entry><entry> <link linkend="Data_Types:STRING8"><type>STRING8</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>subset</structfield>:</entry><entry> <link linkend="Data_Types:BOOL"><type>BOOL</type></link> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This structure specifies the <structfield>NAME</structfield>,
+encoded in <acronym>ISO</acronym> 8859-1 according
+to <link linkend='Font_Server_Naming'>Section 3</link>,
+of another font server that may be useful as a
+substitute for this font server.
+The <structfield>SUBSET</structfield> field indicates
+whether or not the alternate server is likely to only contain a
+subset of the fonts available from this font server. This
+information is returned during the initial connection setup and
+may be used by the client to find a backup server in case of
+failure.
+ </para>
+</section>
+
+<section id="Data_Types:AUTH">
+ <title><type>AUTH</type></title>
+ <indexterm zone="Data_Types:AUTH" significance="preferred"><primary>AUTH</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows="1"><type>AUTH</type>:</entry><entry>[ <structfield>name</structfield>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>data</structfield>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+This structure specifies the name of an authorization protocol and
+initial data for that protocol. It is used in the authorization
+negotiation in the initial connection setup and in the CreateAC
+request.
+</para>
+</section>
+
+<section id="Data_Types:BITMAPFORMAT">
+ <title><type>BITMAPFORMAT</type></title>
+ <indexterm zone="Data_Types:BITMAPFORMAT" significance="preferred"><primary>BITMAPFORMAT</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>BITMAPFORMAT</type>:</entry><entry><type>CARD32</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ <type>CARD32</type> containing the following fields defined by the
+ sets of values given further below
+ </para>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>[</entry></row>
+ <row><entry>&emsp;<structfield>byte-order-msb</structfield>:</entry><entry> 1 bit,</entry></row>
+ <row><entry>&emsp;<structfield>bit-order-msb</structfield>:</entry><entry> 1 bit,</entry></row>
+ <row><entry>&emsp;<structfield>image-rect</structfield>:</entry><entry> 2 bits</entry><entry>{ <constant>Min</constant>,
+ <constant>MaxWidth</constant>,
+ <constant>Max</constant> },</entry></row>
+ <row><entry>&emsp;<structfield>zero-pad</structfield>:</entry><entry> 4 bits,</entry></row>
+ <row><entry>&emsp;<structfield>scanline-pad</structfield>:</entry><entry> 2 bits</entry><entry>{ <constant>ScanlinePad8</constant>,
+ <constant>ScanlinePad16</constant>,
+ <constant>ScanlinePad32</constant>,
+ <constant>ScanlinePad64</constant> },</entry></row>
+ <row><entry>&emsp;<structfield>zero-pad</structfield>:</entry><entry> 2 bits,</entry></row>
+ <row><entry>&emsp;<structfield>scanline-unit</structfield>:</entry><entry> 2 bits</entry><entry>{ <constant>ScanlineUnit8</constant>,
+ <constant>ScanlineUnit16</constant>,
+ <constant>ScanlineUnit32</constant>,
+ <constant>ScanlineUnit64</constant> },</entry></row>
+ <row><entry>&emsp;<structfield>zero-pad</structfield>:</entry><entry> 2 bits,</entry></row>
+ <row><entry>&emsp;<structfield>zero-pad</structfield>:</entry><entry> 16 bits,</entry></row>
+ <row><entry>]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+This structure specifies how glyph images are transmitted in
+response to
+<link linkend="Requests:QueryXBitmaps8"><function>QueryXBitmaps8</function></link>
+and
+<link linkend="Requests:QueryXBitmaps16"><function>QueryXBitmaps16</function></link>
+requests.
+</para>
+<para>
+If the <structfield>BYTE-ORDER-MSB</structfield> bit
+<literal>(1 &lt;&lt; 0)</literal> is set, the Most Significant
+Byte of each scanline unit is returned first. Otherwise, the
+Least Significant Byte is returned first.
+</para>
+<para>
+If the <structfield>BIT-ORDER-MSB</structfield> bit
+<literal>(1 &lt;&lt; 1)</literal> is set, the left-most bit in
+each glyph scanline unit is stored in the Most Significant Bit of
+each transmitted scanline unit. Otherwise, the left-most bit is
+stored in the Least Significant Bit.
+</para>
+<para>
+The <structfield>IMAGE-RECT</structfield> field specifies a rectangle of
+pixels within the
+glyph image. It contains one of the following alternate values:
+
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>ImageRectMin</constant></entry><entry><literal>(0 &lt;&lt; 2)</literal></entry></row>
+ <row><entry><constant>ImageRectMaxWidth</constant></entry><entry><literal>(1 &lt;&lt; 2)</literal></entry></row>
+ <row><entry><constant>ImageRectMax</constant></entry><entry><literal>(2 &lt;&lt; 2)</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+For a glyph with extents <link linkend="Data_Types:XCHARINFO"><type>XCHARINFO</type></link> in a font with header
+information <link linkend="Data_Types:XFONTINFO"><type>XFONTINFO</type></link>, the <structfield>IMAGE-RECT</structfield>
+values have the following meanings:
+<variablelist>
+ <varlistentry id="Constant:ImageRectMin">
+ <term><constant>ImageRectMin</constant></term>
+ <listitem>
+ <indexterm zone="Constant:ImageRectMin" significance="preferred"><primary>ImageRectMin</primary></indexterm>
+ <para>
+This refers to the minimal bounding rectangle
+surrounding the inked pixels in the glyph. This is the
+most compact representation. The edges of the rectangle
+are:
+<literallayout class="monospaced">
+ left: <structfield>XCHARINFO.LBEARING</structfield>
+ right: <structfield>XCHARINFO.RBEARING</structfield>
+ top: <structfield>XCHARINFO.ASCENT</structfield>
+ bottom: <structfield>XCHARINFO.DESCENT</structfield>
+</literallayout>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="Constant:ImageRectMaxWidth">
+ <term><constant>ImageRectMaxWidth</constant></term>
+ <listitem>
+ <indexterm zone="Constant:ImageRectMaxWidth" significance="preferred"><primary>ImageRectMaxWidth</primary></indexterm>
+ <para>
+This refers to the scanlines between the
+glyph's ascent and descent, padded on the left to the minimum
+left-bearing (or 0, whichever is less) and on the right to
+the maximum right-bearing (or logical-width, whichever is
+greater). All glyph images share a common horizontal
+origin. This is a combination of <constant>ImageRectMax</constant> in the
+horizontal direction and <constant>ImageRectMin</constant> in the vertical
+direction. The edges of the rectangle are:
+
+<literallayout class="monospaced">
+left: min (<structfield>XFONTINFO.MIN-BOUNDS.LBEARING</structfield>, 0)
+right: max (<structfield>XFONTINFO.MAX-BOUNDS.RBEARING</structfield>,
+ <structfield>XFONTINFO.MAX-BOUNDS.WIDTH</structfield>)
+top: <structfield>XCHARINFO.ASCENT</structfield>
+bottom: <structfield>XCHARINFO.DESCENT</structfield>
+</literallayout>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="Constant:ImageRectMax">
+ <term><constant>ImageRectMax</constant></term>
+ <listitem>
+ <indexterm zone="Constant:ImageRectMax" significance="preferred"><primary>ImageRectMax</primary></indexterm>
+ <para>
+This refers to all scanlines, from the maximum
+ascent (or the font ascent, whichever is greater) to the
+maximum descent (or the font descent, whichever is greater),
+padded to the same horizontal extents as <constant>MaxWidth</constant>.
+All glyph images have the same sized bitmap and share a
+common origin. This is the least compact representation,
+but may be the easiest or most efficient (particularly for
+character cell fonts) for some clients to use. The edges of
+the rectangle are:
+
+<literallayout class="monospaced">
+left: min (<structfield>XFONTINFO.MIN-BOUNDS.LBEARING</structfield>, 0)
+right: max (<structfield>XFONTINFO.MAX-BOUNDS.RBEARING</structfield>,
+ <structfield>XFONTINFO.MAX-BOUNDS.WIDTH</structfield>)
+top: max (<structfield>XFONTINFO.FONT-ASCENT</structfield>,
+ <structfield>XFONTINFO.MAX-BOUNDS.ASCENT</structfield>)
+bottom: max (<structfield>XFONTINFO.FONT-DESCENT</structfield>,
+ <structfield>XFONTINFO.MAX-BOUNDS.DESCENT</structfield>)
+</literallayout>
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</para>
+<para>
+The <structfield>SCANLINE-PAD</structfield> field specifies the number of
+bits (8, 16, 32,
+or 64) to which each glyph scanline is padded before transmitting.
+It contains one of the following alternate values:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>ScanlinePad8</constant></entry><entry><literal>(0 &lt;&lt; 8)</literal></entry></row>
+ <row><entry><constant>ScanlinePad16</constant></entry><entry><literal>(1 &lt;&lt; 8)</literal></entry></row>
+ <row><entry><constant>ScanlinePad32</constant></entry><entry><literal>(2 &lt;&lt; 8)</literal></entry></row>
+ <row><entry><constant>ScanlinePad64</constant></entry><entry><literal>(3 &lt;&lt; 8)</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+The <structfield>SCANLINE-UNIT</structfield> field specifies the number of
+bits (8, 16, 32, or 64) that should be treated as a unit for swapping.
+This value must be less than or equal to the number of bits specified by the
+<structfield>SCANLINE-PAD</structfield>. It contains one of the following
+alternate values:
+
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>ScanlineUnit8</constant></entry><entry><literal>(0 &lt;&lt; 12)</literal></entry></row>
+ <row><entry><constant>ScanlineUnit16</constant></entry><entry><literal>(1 &lt;&lt; 12)</literal></entry></row>
+ <row><entry><constant>ScanlineUnit32</constant></entry><entry><literal>(2 &lt;&lt; 12)</literal></entry></row>
+ <row><entry><constant>ScanlineUnit64</constant></entry><entry><literal>(3 &lt;&lt; 12)</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+<link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link>s are byte-swapped as <type>CARD32</type>s.
+All unspecified bits must be zero.
+</para>
+<para>
+Use of an invalid <link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link> causes a
+<link linkend="Errors:Format"><errorname>Format</errorname></link> error to be returned.
+</para>
+</section>
+
+<section id="Data_Types:BITMAPFORMATMASK">
+ <title><type>BITMAPFORMATMASK</type></title>
+ <indexterm zone="Data_Types:BITMAPFORMATMASK" significance="preferred"><primary>BITMAPFORMATMASK</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>BITMAPFORMATMASK</type>:</entry><entry> <type>CARD32</type> mask</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<para>
+This is a mask of bits representing the fields in a <link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link>:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>ByteOrderMask</constant></entry><entry><literal>(1 &lt;&lt; 0)</literal></entry></row>
+ <row><entry><constant>BitOrderMask</constant></entry><entry><literal>(1 &lt;&lt; 1)</literal></entry></row>
+ <row><entry><constant>ImageRectMask</constant></entry><entry><literal>(1 &lt;&lt; 2)</literal></entry></row>
+ <row><entry><constant>ScanlinePadMask</constant></entry><entry><literal>(1 &lt;&lt; 3)</literal></entry></row>
+ <row><entry><constant>ScanlineUnitMask</constant></entry><entry><literal>(1 &lt;&lt; 4)</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+Unspecified bits are required to be zero or else a
+<link linkend="Errors:Format"><errorname>Format</errorname></link> error is returned.
+</para>
+</section>
+
+<section id="Data_Types:BOOL">
+ <title><type>BOOL</type></title>
+ <indexterm zone="Data_Types:BOOL" significance="preferred"><primary>BOOL</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>BOOL</type>:</entry><entry> <type>CARD8</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<para>
+This is a boolean value containing one of the following alternate
+values:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>False</constant></entry><entry><literal>0</literal></entry></row>
+ <row><entry><constant>True</constant></entry><entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+</section>
+
+<section id="Data_Types:BYTE">
+ <title><type>BYTE</type></title>
+ <indexterm zone="Data_Types:BYTE" significance="preferred"><primary>BYTE</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>BYTE</type>:</entry><entry> 8-bit value</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+This is an unsigned byte of data whose encoding
+is determined by the context in which it is used.
+</para>
+
+</section>
+
+<section id="Data_Types:CARDn">
+ <title><type>CARD8</type>, <type>CARD16</type>, <type>CARD32</type></title>
+ <indexterm zone="Data_Types:CARDn" significance="preferred"><primary>CARD8</primary></indexterm>
+ <indexterm zone="Data_Types:CARDn" significance="preferred"><primary>CARD16</primary></indexterm>
+ <indexterm zone="Data_Types:CARDn" significance="preferred"><primary>CARD32</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>CARD8</type>:</entry><entry> 8-bit unsigned integer</entry></row>
+ <row><entry><type>CARD16</type>:</entry><entry> 16-bit unsigned integer</entry></row>
+ <row><entry><type>CARD32</type>:</entry><entry> 32-bit unsigned integer</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+These are unsigned numbers. The latter two are byte-swapped when
+the server and client have different byte orders.
+</para>
+
+</section>
+
+<section id="Data_Types:CHAR2B">
+ <title><type>CHAR2B</type></title>
+ <indexterm zone="Data_Types:CHAR2B" significance="preferred"><primary>CHAR2B</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>CHAR2B</type>:</entry><entry>[ <structfield>byte1</structfield>, <structfield>byte2</structfield>:</entry><entry><type>CARD8</type> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<para>
+This structure specifies an individual character code within
+either a 2-dimensional matrix (using <structfield>BYTE1</structfield>
+and <structfield>BYTE2</structfield> as the row and column indices,
+respectively) or a vector (using <structfield>BYTE1</structfield> and
+<structfield>BYTE2</structfield> as most- and least-significant bytes,
+respectively). This data type is treated as a pair of 8-bit values and
+is never byte-swapped. Therefore, the client should always transmit
+<structfield>BYTE1</structfield> first.
+</para>
+
+</section>
+
+<section id="Data_Types:EVENTMASK">
+ <title><type>EVENTMASK</type></title>
+ <indexterm zone="Data_Types:EVENTMASK" significance="preferred"><primary>EVENTMASK</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>EVENTMASK</type>:</entry><entry> <type>CARD32</type> mask</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+This is a mask of bits indicating which of an extension's (or the
+core's) maskable events the client would like to receive. Each
+bit indicates one or more events, and a bit value of one indicates
+interest in a corresponding set of events. The following bits are
+defined for event masks specified for the core protocol (i.e. an
+<parameter>EXTENSION-OPCODE</parameter> of zero in
+<link linkend="Requests:SetEventMask"><function>SetEventMask</function></link>
+and
+<link linkend="Requests:GetEventMask"><function>GetEventMask</function></link>
+requests):
+
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>CatalogueListChangeMask</constant></entry><entry><literal>(1 &lt;&lt; 0)</literal></entry></row>
+ <row><entry><constant>FontListChangeMask</constant></entry><entry><literal>(1 &lt;&lt; 1)</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+
+<para>
+If
+<constant>CatalogueListChangeMask</constant>
+is set, client is interested in
+receiving
+<link linkend="Events:CatalogueListNotify"><function>CatalogueListNotify</function></link>
+events. If
+<constant>FontListChangeMask</constant>
+is set, the client is interested in
+receiving
+<link linkend="Events:FontListNotify"><function>FontListNotify</function></link>
+events.
+</para>
+<para>
+Extensions that provide additional events may define their own
+event masks. These event masks have their own scope and may use
+the same bit values as the core or other extensions.
+ </para>
+ <para>
+All unused bits must be set to zero. In
+<link linkend="Requests:SetEventMask"><function>SetEventMask</function></link>
+requests, if
+any bits are set that are not defined for the extension (or core)
+for which this <type>EVENTMASK</type> is intended (according to the
+<parameter>EXTENSION-OPCODE</parameter> given in the
+<link linkend="Requests:SetEventMask"><function>SetEventMask</function></link>
+request), an
+<link linkend="Errors:EventMask"><errorname>EventMask</errorname></link>
+error is generated.
+ </para>
+ <para>
+This value is swapped as a <type>CARD32</type>.
+ </para>
+
+</section>
+
+<section id="Data_Types:FONTID">
+ <title><type>FONTID</type></title>
+ <indexterm zone="Data_Types:FONTID" significance="preferred"><primary>FONTID</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>FONTID</type>:</entry><entry> <link linkend="Data_Types:ID"><type>ID</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+This is specified by the client in the request
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>
+as the identifier to be used when referring to a particular open
+font.
+</para>
+
+</section>
+
+<section id="Data_Types:ID">
+ <title><type>ID</type></title>
+ <indexterm zone="Data_Types:ID" significance="preferred"><primary>ID</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>ID</type>:</entry><entry> <type>CARD32</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+This is a 32-bit value in which the top 3 bits must be clear, and
+at least 1 other bit must be set (yielding a range of 1 through
+2<superscript>29</superscript>-1).
+It is specified by the client to represent objects in
+the server. Identifiers are scoped according to their type are
+private to the client; thus, the same identifier may be used for
+both a <link linkend="Data_Types:FONTID"><type>FONTID</type></link> and an <link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link>
+as well as by multiple clients.
+</para>
+<para>
+An <type>ID</type> of zero is referred to as <constant>None</constant>.
+</para>
+</section>
+
+<section id="Data_Types:INTn">
+ <title><type>INT8</type>, <type>INT16</type>, <type>INT32</type></title>
+ <indexterm zone="Data_Types:INTn" significance="preferred"><primary>INT8</primary></indexterm>
+ <indexterm zone="Data_Types:INTn" significance="preferred"><primary>INT16</primary></indexterm>
+ <indexterm zone="Data_Types:INTn" significance="preferred"><primary>INT32</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>INT8</type>:</entry><entry> 8-bit signed integer</entry></row>
+ <row><entry><type>INT16</type>:</entry><entry> 16-bit signed integer</entry></row>
+ <row><entry><type>INT32</type>:</entry><entry> 32-bit signed integer</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+<para>
+These are signed numbers. The latter two are byte-swapped when
+the client and server have different byte orders.
+</para>
+</section>
+
+<section id="Data_Types:OFFSET32">
+ <title><type>OFFSET32</type></title>
+ <indexterm zone="Data_Types:OFFSET32" significance="preferred"><primary>OFFSET32</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows='1'><type>OFFSET32</type>:</entry>
+ <entry>[ <structfield>position</structfield>:</entry><entry><type>CARD32</type>,</entry></row>
+ <row><entry>&emsp;<structfield>length</structfield>:</entry><entry><type>CARD32</type> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This structure indicates a position and length within a block of
+data.
+ </para>
+</section>
+
+<section id="Data_Types:PROPINFO">
+ <title><type>PROPINFO</type></title>
+ <indexterm zone="Data_Types:PROPINFO" significance="preferred"><primary>PROPINFO</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows='1'><type>PROPINFO</type>:</entry>
+ <entry>[ <structfield>offsets</structfield>:</entry><entry><link linkend="Data_Types:PROPOFFSET"><type>LISTofPROPOFFSET</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>data</structfield>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This structure describes the list of properties provided by a
+font. Strings for all of the properties names and values are
+stored within the data block and are located using a table of
+offsets and lengths.
+ </para>
+ <para>
+This structure is padded to 32-bit alignment.
+ </para>
+
+</section>
+
+<section id="Data_Types:PROPOFFSET">
+ <title><type>PROPOFFSET</type></title>
+ <indexterm zone="Data_Types:PROPOFFSET" significance="preferred"><primary>PROPOFFSET</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows='3'><type>PROPOFFSET</type>:</entry>
+ <entry>[ <structfield>name</structfield>:</entry><entry><link linkend="Data_Types:OFFSET32"><type>OFFSET32</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>value</structfield>:</entry><entry><link linkend="Data_Types:OFFSET32"><type>OFFSET32</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>type</structfield>:</entry><entry><type>CARD8</type>,</entry></row>
+ <row><entry>&emsp;<structfield>zero-pad3</structfield>:</entry><entry><link linkend="Data_Types:BYTE"><type>BYTE</type></link>, <link linkend="Data_Types:BYTE"><type>BYTE</type></link>, <link linkend="Data_Types:BYTE"><type>BYTE</type></link> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This structure specifies the position, length, and type of
+of data for a property.
+ </para>
+ <para>
+The <structfield>NAME</structfield> field specifies the position and length
+(which must be
+greater than zero) of the property name relative to the beginning
+of the <structfield>PROPINFO.DATA</structfield> block for this font.
+The interpretation of
+the position and length of the <structfield>VALUE</structfield> field is
+determined by the <structfield>TYPE</structfield> field, which contains
+one of the following alternate values:
+
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>String</constant></entry><entry><literal>0</literal></entry></row>
+ <row><entry><constant>Unsigned</constant></entry><entry><literal>1</literal></entry></row>
+ <row><entry><constant>Signed</constant></entry><entry><literal>2</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+which have the following meanings:
+<variablelist>
+ <varlistentry id="Constant:String">
+ <term><constant>String</constant></term>
+ <listitem>
+ <indexterm zone="Constant:String" significance="preferred"><primary>String</primary></indexterm>
+ <para>
+This property contains a counted string of bytes. The
+data is stored in the <structfield>PROPINFO.DATA</structfield>
+block beginning at
+relative byte VALUE.POSITION (beginning with zero), extending
+for VALUE.LENGTH (at least zero) bytes.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="Constant:Unsigned">
+ <term><constant>Unsigned</constant></term>
+ <listitem>
+ <indexterm zone="Constant:Unsigned" significance="preferred"><primary>Unsigned</primary></indexterm>
+ <para>
+This property contains a unsigned, 32-bit number stored
+as a <type>CARD32</type> in VALUE.POSITION (VALUE.LENGTH is zero).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="Constant:Signed">
+ <term><constant>Signed</constant></term>
+ <listitem>
+ <indexterm zone="Constant:Signed" significance="preferred"><primary>Signed</primary></indexterm>
+ <para>
+This property contains a signed, 32-bit number stored as
+an <type>INT32</type> in VALUE.POSITION (VALUE.LENGTH is zero).
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+This structure is zero-padded to 32-bit alignment.
+</para>
+
+</section>
+
+<section id="Data_Types:RANGE">
+ <title><type>RANGE</type></title>
+ <indexterm zone="Data_Types:RANGE" significance="preferred"><primary>RANGE</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>RANGE</type>:</entry>
+ <entry>[ <structfield>min-char</structfield>, <structfield>max-char</structfield>:</entry><entry><link linkend="Data_Types:CHAR2B"><type>CHAR2B</type></link> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This structure specifies a range of character codes. A single
+character is represented by <structfield>MIN-CHAR</structfield> equals
+<structfield>MAX-CHAR</structfield>. If the linear interpretation of
+<structfield>MAX-CHAR</structfield> is less than that of
+<structfield>MIN-CHAR</structfield>, or if
+<structfield>MIN-CHAR</structfield> is less than the font's
+<structfield>XFONTINFO.CHAR-RANGE.MIN-CHAR</structfield>, or if
+<structfield>MAX-CHAR</structfield> is greater than the
+font's <structfield>XFONTINFO.CHAR-RANGE.MAX-CHAR</structfield>,
+the range is invalid.
+ </para>
+
+</section>
+
+<section id="Data_Types:RESOLUTION">
+ <title><type>RESOLUTION</type></title>
+ <indexterm zone="Data_Types:RESOLUTION" significance="preferred"><primary>RESOLUTION</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows='2'><type>RESOLUTION</type>:</entry>
+ <entry>[ <structfield>x-resolution</structfield>:</entry><entry><type>CARD16</type>,</entry></row>
+ <row><entry>&emsp;<structfield>y-resolution</structfield>:</entry><entry><type>CARD16</type>,</entry></row>
+ <row><entry>&emsp;<structfield>decipoint-size</structfield>:</entry><entry><type>CARD16</type> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This structure specifies resolution and point size to be used in
+resolving partially-specified scaled font names. The
+<structfield>X-RESOLUTION</structfield> and
+<structfield>Y-RESOLUTION</structfield> are measured in
+pixels-per-inch and must be greater than zero.
+The <structfield>DECIPOINT-SIZE</structfield> is the preferred font
+size, measured in tenths of a point, and must be greater than zero.
+ </para>
+
+</section>
+
+<section id="Data_Types:STRING8">
+ <title><type>STRING8</type></title>
+ <indexterm zone="Data_Types:STRING8" significance="preferred"><primary>STRING8</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>STRING8</type>:</entry><entry> <type>LISTofCARD8</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This is a counted list of 1-byte character codes, typically
+encoded in <acronym>ISO</acronym> 8859-1. A character code
+<quote><literal>c</literal></quote> is equivalent to a
+<link linkend="Data_Types:CHAR2B"><type>CHAR2B</type></link> structure whose <structfield>BYTE1</structfield>
+is zero and whose <structfield>BYTE2</structfield> is
+<quote><literal>c</literal></quote>.
+ </para>
+
+</section>
+
+<section id="Data_Types:TIMESTAMP">
+ <title><type>TIMESTAMP</type></title>
+ <indexterm zone="Data_Types:TIMESTAMP" significance="preferred"><primary>TIMESTAMP</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><type>TIMESTAMP</type>:</entry><entry> <type>CARD32</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This is the number of milliseconds that have passed since a
+server-dependent origin. It is provided in errors and events and is
+permitted to wrap.
+ </para>
+</section>
+
+<section id="Data_Types:XCHARINFO">
+ <title><type>XCHARINFO</type></title>
+ <indexterm zone="Data_Types:XCHARINFO" significance="preferred"><primary>XCHARINFO</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows='3'><type>XCHARINFO</type>:</entry>
+ <entry>[ <structfield>lbearing</structfield>, <structfield>rbearing</structfield>:</entry><entry><type>INT16</type>,</entry></row>
+ <row><entry>&emsp;<structfield>width</structfield>:</entry><entry><type>INT16</type>,</entry></row>
+ <row><entry>&emsp;<structfield>ascent</structfield>, <structfield>descent</structfield>:</entry><entry><type>INT16</type>,</entry></row>
+ <row><entry>&emsp;<structfield>attributes</structfield>:</entry><entry><type>CARD16</type> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This structure specifies the ink extents and horizontal escapement
+(also known as the set- or logical width) of an individual
+character. The first five values represent directed distances in
+a coordinate system whose origin is aligned with the lower-left
+edge of the left-most pixel of the glyph baseline (i.e. the
+baseline falls between two pixels as shown in Figure 3-1 of the
+<citetitle>Bitmap Distribution Format 2.1</citetitle> Consortium standard
+<xref linkend="References:bdf-spec"/>).
+ </para>
+ <para>
+The <structfield>LBEARING</structfield> field specifies the
+directed distance measured to the
+right from the origin to the left edge of the left-most inked
+pixel in the glyph.
+ </para>
+ <para>
+The <structfield>RBEARING</structfield> field specifies the
+directed distance (measured to
+the right) from the origin to the right edge of the right-most
+inked pixel in the glyph.
+ </para>
+ <para>
+The <structfield>WIDTH</structfield> field specifies the
+directed distance (measured to the
+right) from the origin to the position where the next character
+should appear (called the <firstterm>escapement point</firstterm>). This
+distance includes any whitespace used for intercharacter padding and is
+also referred to as the <firstterm>logical width</firstterm> or
+<firstterm>horizontal escapement</firstterm>.
+<indexterm zone="Data_Types:XCHARINFO" significance="preferred"><primary>horizontal escapement</primary></indexterm>
+ </para>
+ <para>
+The <structfield>ASCENT</structfield> field specifies the
+directed distance (measured up)
+from the baseline to the top edge of the top-most inked pixel
+in the glyph.
+ </para>
+ <para>
+The <structfield>DESCENT</structfield> field specifies the
+directed distance (measured
+down) from the baseline to the bottom edge of the bottom-most
+inked pixel.
+ </para>
+ <para>
+The <structfield>ATTRIBUTES</structfield> field specifies
+glyph-specific information that
+is passed through the application. If this value is not being
+used, it should be zero.
+ </para>
+ <para>
+The ink bounding box of a glyph is defined to be the smallest
+rectangle that encloses all of the inked pixels. This box has
+a width of
+<structfield>RBEARING</structfield> &minus; <structfield>LBEARING</structfield>
+pixels and a height of
+<structfield>ASCENT</structfield> + <structfield>DESCENT</structfield> pixels.
+ </para>
+</section>
+
+<section id="Data_Types:XFONTINFO">
+ <title><type>XFONTINFO</type></title>
+ <indexterm zone="Data_Types:XFONTINFO" significance="preferred"><primary>XFONTINFO</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry morerows='8'><type>XFONTINFO</type>:</entry>
+ <entry>[ <structfield>flags</structfield>:</entry><entry><type>CARD32</type>,</entry></row>
+ <row><entry>&emsp;<structfield>drawing-direction</structfield>:</entry><entry>{ <constant>LeftToRight</constant>, <constant>RightToLeft</constant> }</entry></row>
+ <row><entry>&emsp;<structfield>char-range</structfield>:</entry><entry><link linkend="Data_Types:RANGE"><type>RANGE</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>default-char</structfield>:</entry><entry><link linkend="Data_Types:CHAR2B"><type>CHAR2B</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>min-bounds</structfield>:</entry><entry><link linkend="Data_Types:XCHARINFO"><type>XCHARINFO</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>max-bounds</structfield>:</entry><entry><link linkend="Data_Types:XCHARINFO"><type>XCHARINFO</type></link>,</entry></row>
+ <row><entry>&emsp;<structfield>font-ascent</structfield>:</entry><entry><type>INT16</type>,</entry></row>
+ <row><entry>&emsp;<structfield>font-descent</structfield>:</entry><entry><type>INT16</type>,</entry></row>
+ <row><entry>&emsp;<structfield>properties</structfield>:</entry><entry><link linkend="Data_Types:PROPINFO"><type>PROPINFO</type></link> ]</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This structure specifies attributes related to the font as a
+whole.
+ </para>
+ <para>
+The <structfield>FLAGS</structfield> field is a bit mask containing zero
+or more of the following boolean values (unspecified bits must be zero):
+
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>AllCharactersExist</constant></entry><entry><literal>(1 &lt;&lt; 0)</literal></entry></row>
+ <row><entry><constant>InkInside</constant></entry><entry><literal>(1 &lt;&lt; 1)</literal></entry></row>
+ <row><entry><constant>HorizontalOverlap</constant></entry><entry><literal>(1 &lt;&lt; 2)</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+which have the following meanings:
+<variablelist>
+ <varlistentry id="Constant:AllCharactersExist">
+ <term><constant>AllCharactersExist</constant></term>
+ <listitem>
+ <indexterm zone="Constant:AllCharactersExist" significance="preferred"><primary>AllCharactersExist</primary></indexterm>
+ <para>
+If this bit is set, all of the characters in the range given by
+<structfield>CHAR-RANGE</structfield> have glyphs encoded in
+the font. If this bit is clear, some of the characters
+may not have encoded glyphs.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="Constant:InkInside">
+ <term><constant>InkInside</constant></term>
+ <listitem>
+ <indexterm zone="Constant:InkInside" significance="preferred"><primary>InkInside</primary></indexterm>
+ <para>
+If this bit is set, the inked pixels of each glyph
+fall within the rectangle described by the font's ascent,
+descent, origin, and the glyph's escapement point. If
+this bit is clear, there may be glyphs whose ink extends
+outside this rectangle.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry id="Constant:HorizontalOverlap">
+ <term><constant>HorizontalOverlap</constant></term>
+ <listitem>
+ <indexterm zone="Constant:HorizontalOverlap" significance="preferred"><primary>HorizontalOverlap</primary></indexterm>
+ <para>
+If this bit is set, the two ink bounding
+boxes (smallest rectangle enclosing the inked pixels) of
+some pairs of glyphs in the font may overlap when displayed
+side-by-side (i.e. the second character is imaged at the
+escapement point of the first) on a common baseline. If
+this bit is clear, there are no pairs of glyphs whose ink
+bounding boxes overlap.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</para>
+<para id="Data_Types:XFONTINFO.DRAWING-DIRECTION">
+ <indexterm zone="Data_Types:XFONTINFO.DRAWING-DIRECTION" significance="preferred"><primary>LeftToRight</primary></indexterm>
+ <indexterm zone="Data_Types:XFONTINFO.DRAWING-DIRECTION" significance="preferred"><primary>RightToLeft</primary></indexterm>
+The <structfield>DRAWING-DIRECTION</structfield> field contains a hint
+indicating whether most of the character metrics have a positive (or
+<quote><constant>LeftToRight</constant></quote>) logical width or a
+negative (<quote><constant>RightToLeft</constant></quote>) logical width. It
+contains the following alternate values:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>LeftToRight</constant></entry><entry><literal>0</literal></entry></row>
+ <row><entry><constant>RightToLeft</constant></entry><entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+The <structfield>CHAR-RANGE.MIN-CHAR</structfield>
+and <structfield>CHAR-RANGE.MAX-CHAR</structfield> fields specify the
+first and last character codes that have glyphs encoded in this font.
+All fonts must have at least one encoded glyph (in which case the
+<structfield>MIN-CHAR</structfield> and <structfield>MAX-CHAR</structfield>
+are equal), but are not required to have glyphs
+encoded at all positions between the first and last characters.
+</para>
+<para>
+The <structfield>DEFAULT-CHAR</structfield> field specifies
+the character code of the glyph
+that the client should substitute for unencoded characters. Requests
+for extents or bitmaps for an unencoded character generate zero-filled
+metrics and a zero-length glyph bitmap, respectively.
+</para>
+<para>
+The <structfield>MIN-BOUNDS</structfield> and
+<structfield>MAX-BOUNDS</structfield> fields contain the minimum and maximum
+values of each of the extents field of all encoded characters in the
+font (i.e. non-existent characters are ignored).
+</para>
+<para>
+The <structfield>FONT-ASCENT</structfield> and
+<structfield>FONT-DESCENT</structfield> fields specify the font designer's
+logical height of the font, above and below the baseline,
+respectively. The sum of the two values is often used as the
+vertical line spacing of the font. Individual glyphs are permitted
+to have ascents and descents that are greater than these values.
+</para>
+<para>
+The <structfield>PROPERTIES</structfield> field contains the
+property data associated with this font.
+</para>
+<para>
+This structure is padded to 32-bit alignment.
+</para>
+</section>
+</section>
+
+<section id='Requests'>
+<title>Requests</title>
+<!-- .XS -->
+<!-- (SN Requests -->
+<!-- .XE -->
+<para>
+This section describes the requests that may be sent by the client and the
+replies or errors that are generated in response. Versions of the protocol
+with the same major version are required to be upward-compatible.
+</para>
+<para>
+Every request on a given connection is implicitly assigned a sequence number,
+starting with 1, that is used in replies, error, and events. Servers are
+required to generate replies and errors in the order in which the corresponding
+requests are received. Servers are permitted to add or remove fonts to the
+list visible to the client between any two requests, but requests must be
+processed atomically. Each request packet is at least 4 bytes long and
+contains the following fields:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>major-opcode</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>minor-opcode</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>length</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+
+The <parameter>MAJOR-OPCODE</parameter> specifies which core request or
+extension package this packet represents. If the
+<parameter>MAJOR-OPCODE</parameter> corresponds to a core request, the
+<parameter>MINOR-OPCODE</parameter> contains 8 bits of request-specific data.
+Otherwise, the <parameter>MINOR-OPCODE</parameter> specifies which extension
+request this packet represents. The <parameter>LENGTH</parameter> field
+specifies the number of 4-byte units contained within the packet
+and must be at least one. If this field contains a value greater than one it
+is followed by (<parameter>LENGTH</parameter> - 1) * 4 bytes
+of request-specific data. Unless
+otherwise specified, unused bytes are not required to be zero.
+</para>
+<para>
+If a request packet contains too little or too much data, the server returns
+a <link linkend="Errors:Length"><errorname>Length</errorname></link> error.
+If the server runs out of internal
+resources (such as memory) while processing a request, it returns an
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link> error.
+If a server is deficient (and therefore non-compliant) and is unable to
+process a request, it may return an
+<link linkend="Errors:Implementation"><errorname>Implementation</errorname></link> error.
+If a client uses an extension request without previously having issued a
+<link linkend="Requests:QueryExtension"><function>QueryExtension</function></link>
+request for that extension, the server responds with a
+<link linkend="Errors:Request"><errorname>Request</errorname></link>
+error. If the server encounters a request with an unknown
+<parameter>MAJOR-OPCODE</parameter> or <parameter>MINOR-OPCODE</parameter>,
+it responds with a
+<link linkend="Errors:Request"><errorname>Request</errorname></link>
+error.
+At most one error is generated per request. If more than one error condition
+is encountered in processing a requests, the choice of which error is returned
+is server-dependent.
+</para>
+<para>
+Core requests have <parameter>MAJOR-OPCODE</parameter> values between 0 and
+127, inclusive. Extension requests have <parameter>MAJOR-OPCODE</parameter>
+values between 128 and 255, inclusive, that are assigned by by the server.
+All <parameter>MINOR-OPCODE</parameter> values in extension requests are
+between 0 and 255, inclusive.
+</para>
+<para>
+Each reply is at least 8 bytes long and contains the following fields:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>type</parameter>:</entry><entry><type>CARD8</type></entry><entry>value of 0</entry></row>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>sequence-number</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>length</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+The <parameter>TYPE</parameter> field has a value of zero.
+The <parameter>DATA-OR-UNUSED</parameter> field may be used to
+encode one byte of reply-specific data (see
+<link linkend="Encoding::Requests">Section 5.2 on request encoding</link>).
+The least-significant 16 bits of the sequence number of the request that
+generated the reply are stored in the <parameter>SEQUENCE-NUMBER</parameter>
+field. The <parameter>LENGTH</parameter> field specifies the number of
+4-byte units in this reply packet, including the fields described above,
+and must be at least two. If <parameter>LENGTH</parameter> is greater
+than two, the fields described above are followed by
+(<parameter>LENGTH</parameter> - 2) * 4 bytes of additional data.
+</para>
+<para>
+Requests that have replies are described using the following syntax:
+ <blockquote><para>
+ <emphasis role="bold"><function>RequestName</function></emphasis>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>arg1</parameter>:</entry><entry><type>type1</type></entry></row>
+ <row><entry><parameter>arg2</parameter>:</entry><entry><type>type2</type></entry></row>
+ <row><entry> ...</entry></row>
+ <row><entry><parameter>argN</parameter>:</entry><entry><type>typeN</type></entry></row>
+ <row><entry> ▶</entry></row>
+ <row><entry><parameter>result1</parameter>:</entry><entry><type>type1</type></entry></row>
+ <row><entry><parameter>result2</parameter>:</entry><entry><type>type2</type></entry></row>
+ <row><entry> ...</entry></row>
+ <row rowsep="1"><entry><parameter>resultM</parameter>:</entry><entry><type>typeM</type></entry></row>
+ <row><entry>Errors:</entry><entry><errorname>kind1</errorname>, <errorname>kind2</errorname> ..., <errorname>kindK</errorname></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ Description
+ </para></blockquote>
+</para>
+<para>
+If a request does not generate a reply, the ▶ and result lines are
+omitted. If a request may generate multiple replies, the ▶ is replaced by
+a ▶+. In the authorization data exchanges in the initial connection setup
+and the CreateAC request, ◀ indicates data sent by the client in response
+to data sent by the server.
+</para>
+<para>
+The protocol begins with the establishment of a connection over a
+mutually-understood virtual stream:
+</para>
+
+<section id="Requests:open_connection">
+ <title>open connection</title>
+ <indexterm zone="Requests:open_connection" significance="preferred"><primary>open connection</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='2.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>byte-order</parameter>:</entry><entry><link linkend="Data_Types:BYTE"><type>BYTE</type></link></entry></row>
+ <row><entry><parameter>client-major-protocol-version</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>client-minor-protocol-version</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>authorization-protocols</parameter>:</entry><entry><link linkend="Data_Types:AUTH"><type>LISTofAUTH</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<para>
+The initial byte of the connection specifies the
+<parameter>BYTE-ORDER</parameter> in
+which subsequent 16-bit and 32-bit numeric values are to be
+transmitted. The octal value <literal>102</literal>
+(<acronym>ASCII</acronym> uppercase <quote><literal>B</literal></quote>)
+indicates that the most-significant byte is to be transmitted
+first; the octal value <literal>154</literal>
+(<acronym>ASCII</acronym> lowercase <quote><literal>l</literal></quote>)
+indicates that the least-significant byte is to be transmitted first.
+If any other value is encountered the server closes the
+connection without any response.
+</para>
+ <para>
+The <parameter>CLIENT-MAJOR-PROTOCOL-VERSION</parameter> and
+<parameter>CLIENT-MINOR-PROTOCOL-VERSION</parameter> specify
+which version of the
+font service protocol the client would like to use. If the
+client can support multiple versions, the highest version
+should be given. This version of the protocol has a
+major version of 2 and a minor version of 0.
+ </para>
+ <para>
+The <parameter>AUTHORIZATION-PROTOCOLS</parameter>
+contains a list of protocol names and
+optional initial data for which the client can provide
+information. The server may use this to determine which
+protocol to use or as part of the initial exchange of
+authorization data.
+ </para>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='2.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>▶</entry></row>
+ <row><entry><parameter>status</parameter>:</entry><entry>{ <constant>Success</constant>, <constant>Continue</constant>,
+ <constant>Busy</constant>, <constant>Denied</constant> }</entry></row>
+ <row><entry><parameter>server-major-protocol-version</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>server-minor-protocol-version</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>alternate-servers-hint</parameter>:</entry><entry><link linkend="Data_Types:ALTERNATESERVER"><type>LISTofALTERNATESERVER</type></link></entry></row>
+ <row><entry><parameter>authorization-index</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>authorization-data</parameter>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+The <parameter>SERVER-MAJOR-PROTOCOL-VERSION</parameter> and
+<parameter>SERVER-MINOR-PROTOCOL-VERSION</parameter> specify
+the version of the font
+service protocol that the server expects from the client. If
+the server supports the version specified by the client, this
+version number should be returned. If the client has
+requested a higher version than is supported by the server,
+the server's highest version should be returned. Otherwise,
+if the client has requested a lower version than is supported
+by the server, the server's lowest version should be returned.
+It is the client's responsibility to decide whether or not it
+can match this version of the protocol.
+ </para>
+ <para>
+The <parameter>ALTERNATE-SERVERS-HINT</parameter>
+is a list of other font servers
+that may have related sets of fonts (determined by means
+outside this protocol, typically by the system administrator).
+Clients may choose to contact these font servers if the
+connection is rejected or lost.
+ </para>
+ <para>
+The <parameter>STATUS</parameter> field indicates whether the server accepted,
+rejected, or would like more information about the connection.
+It has one of the following alternate values:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='2.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><constant>Success</constant></entry><entry><literal>0</literal></entry></row>
+ <row><entry><constant>Continue</constant></entry><entry><literal>1</literal></entry></row>
+ <row><entry><constant>Busy</constant></entry><entry><literal>2</literal></entry></row>
+ <row><entry><constant>Denied</constant></entry><entry><literal>3</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ <para>
+If <parameter>STATUS</parameter> is <constant>Denied</constant>,
+the server has rejected the client's authorization information.
+If <parameter>STATUS</parameter> is <constant>Busy</constant>, the server has
+simply decided that it cannot provide fonts to this client at
+this time (it may be able to at a later time). In both cases,
+<parameter>AUTHORIZATION-INDEX</parameter> is set to zero,
+no authorization-data is
+returned, and the server closes the connection after sending
+the data described so far.
+ </para>
+ <para>
+Otherwise the <parameter>AUTHORIZATION-INDEX</parameter> is set to the index
+(beginning with 1) into the <parameter>AUTHORIZATION-PROTOCOLS</parameter>
+list of the protocol that the server will use for this connection. If
+the server does not want to use any of the given protocols,
+this value is set to zero. The <parameter>AUTHORIZATION-DATA</parameter>
+field is used to send back authorization protocol-dependent data to the
+client (such as a challenge, authentication of the server,
+etc.).
+ </para>
+<para>
+If <parameter>STATUS</parameter> is <constant>Success</constant>,
+the following section of protocol is omitted. Otherwise, if
+<parameter>STATUS</parameter> is <constant>Continue</constant>,
+the server expects
+more authorization data from the client (i.e. the connection
+setup is not finished, so no requests or events may be sent):
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>◀</entry></row>
+ <row><entry><parameter>more-authorization-data</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry>▶</entry></row>
+ <row><entry><parameter>status</parameter>:</entry><entry>{ <constant>Success</constant>, <constant>Continue</constant>, <constant>Busy</constant>, <constant>Denied</constant> }</entry></row>
+ <row><entry><parameter>more-authorization-data</parameter>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+The values in <parameter>STATUS</parameter> have the same meanings as described
+above. This section of protocol is repeated until the server
+either accepts (sets <parameter>STATUS</parameter> to
+<constant>Success</constant>) or rejects (sets <parameter>STATUS</parameter>
+to <constant>Denied</constant> or <constant>Busy</constant>) the connection.
+</para>
+<para>
+Once the connection has been accepted and <parameter>STATUS</parameter>
+is <constant>Success</constant>,
+an implicit AccessContext is created for the authorization
+data and the protocol continues with the following data sent
+from the server:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>▶</entry></row>
+ <row><entry><parameter>remaining-length</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry><parameter>maximum-request-length</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>release-number</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry><parameter>vendor</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+The <parameter>REMAINING-LENGTH</parameter> specifies the length in 4-byte
+units of the remaining data to be transmitted to the client. The
+<parameter>MAXIMUM-REQUEST-LENGTH</parameter> specifies the largest request
+size in 4-byte units that is accepted by the server and must have a
+value of at least 4096. Requests with a length field larger
+than this value are ignored and a
+<link linkend="Errors:Length"><errorname>Length</errorname></link>
+error is returned.
+The <parameter>VENDOR</parameter> string specifies the name of the
+manufacturer of the font server. The
+<parameter>RELEASE-NUMBER</parameter> specifies the particular
+release of the server in a manufacturer-dependent manner.
+</para>
+</section>
+<section><title />
+<para>
+After the connection is established and the setup information has been
+exchanged, the client may issue any of requests described below:
+</para>
+</section>
+<section id="Requests:NoOp">
+ <title><function>NoOp</function></title>
+ <indexterm zone="Requests:NoOp" significance="preferred"><primary>NoOp</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request does nothing. It is typically used in response
+to a
+<link linkend="Events:KeepAlive"><function>KeepAlive</function></link>
+event.
+ </para>
+</section>
+
+<section id="Requests:ListExtensions">
+ <title><function>ListExtensions</function></title>
+ <indexterm zone="Requests:ListExtensions" significance="preferred"><primary>ListExtensions</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>▶</entry></row>
+ <row rowsep='1'><entry><parameter>names</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>LISTofSTRING8</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+This request returns the names of the extension packages
+that are supported by the server. Extension names are
+case-sensitive and are encoded in <acronym>ISO</acronym> 8859-1.
+ </para>
+
+</section>
+
+<section id="Requests:QueryExtension">
+ <title><function>QueryExtension</function></title>
+ <indexterm zone="Requests:QueryExtension" significance="preferred"><primary>QueryExtension</primary></indexterm>
+
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>name</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry>▶</entry></row>
+ <row><entry><parameter>present</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry><parameter>major-version</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>minor-version</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>major-opcode</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>first-event</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>number-events</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>first-error</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row rowsep='1'><entry><parameter>number-errors</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request determines whether or not the extension package specified by
+<parameter>NAME</parameter> (encoded in <acronym>ISO</acronym> 8859-1) is
+supported by the server and that there is sufficient number of major opcode,
+event, and error codes available. If so, then <parameter>PRESENT</parameter>
+is set to <constant>True</constant>, <parameter>MAJOR-VERSION</parameter>
+and <parameter>MINOR-VERSION</parameter> are set to the
+respective major and minor version numbers of the protocol
+that the server would prefer; <parameter>MAJOR-OPCODE</parameter> is set to
+the value to use in extension requests; <parameter>FIRST-EVENT</parameter>
+is set to the value of the first extension-specific event code or zero if the
+extension does not have any events; <parameter>NUMBER-EVENTS</parameter> is
+set to the number of new events that the event defines;
+<parameter>FIRST-ERROR</parameter>
+is set to the value of the first extension-specific error code
+or zero if the extension does not define any new errors; and
+<parameter>NUMBER-ERRORS</parameter> is set to the number of
+new errors the extension defines.
+ </para>
+ <para>
+Otherwise, <parameter>PRESENT</parameter> is set to
+<constant>False</constant> and the remaining fields are
+set to zero.
+ </para>
+ <para>
+The server is free to return different values to different
+clients. Therefore, clients must use this request before
+issuing any of the requests in the named extension package or
+using the
+<link linkend="Requests:SetEventMask"><function>SetEventMask</function></link> request to express interest in any of
+this extension's events. Otherwise, a
+<link linkend="Errors:Request"><errorname>Request</errorname></link>
+error is returned.
+ </para>
+</section>
+
+<section id="Requests:ListCatalogues">
+ <title><function>ListCatalogues</function></title>
+ <indexterm zone="Requests:ListCatalogues" significance="preferred"><primary>ListCatalogues</primary></indexterm>
+
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>pattern</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry><parameter>max-names</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry>▶+</entry></row>
+ <row><entry><parameter>replies-following-hint</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row rowsep='1'><entry><parameter>names</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>LISTofSTRING8</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns a list of at most <parameter>MAX-NAMES</parameter> names
+of collections (called catalogues) of fonts that match
+the specified <parameter>PATTERN</parameter>. In the pattern (which is encoded
+in <acronym>ISO</acronym> 8859-1), the
+<quote><literal>?</literal></quote> character (octal <literal>77</literal>)
+matches any single character; the
+<quote><literal>*</literal></quote> character (octal <literal>52</literal>)
+matches any series of zero or more characters; and alphabetic
+characters match either upper- or lowercase. The
+returned <parameter>NAMES</parameter> are encoded in
+<acronym>ISO</acronym> 8859-1 and may contain
+mixed character cases.
+ </para>
+ <para>
+If <parameter>PATTERN</parameter> is of zero length or
+<parameter>MAX-NAMES</parameter> is equal to zero,
+one reply containing a zero-length list of names is returned.
+This may be used to synchronize the client with the server.
+ </para>
+ <para>
+Servers are free to add or remove catalogues to the set returned by
+<function>ListCatalogues</function>
+between any two requests. This request is not
+cumulative; repeated uses are processed in isolation and do
+result in an iteration through the list.
+ </para>
+ <para>
+To reduce the amount of buffering needed by the server, the
+list of names may be split across several reply packets, so
+long as the names arrive in the same order that they would
+have appeared had they been in a single packet. The
+<parameter>REPLIES-FOLLOWING-HINT</parameter> field in all but the last reply
+contains a positive value that specifies the number of
+replies that are likely, but not required, to follow. In the
+last reply, which may contain zero or more names, this field
+is set to zero.
+ </para>
+</section>
+
+<section id="Requests:SetCatalogues">
+ <title><function>SetCatalogues</function></title>
+ <indexterm zone="Requests:SetCatalogues" significance="preferred"><primary>SetCatalogues</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row rowsep='1'><entry><parameter>names</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>LISTofSTRING8</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link>,
+<link linkend="Errors:Name"><errorname>Name</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request sets the list of catalogues whose fonts should be
+visible to the client. The union of the fonts provided by
+each of the named catalogues forms the set of fonts whose
+names match patterns in
+<link linkend="Requests:ListFonts"><function>ListFonts</function></link>,
+<link linkend="Requests:ListFontsWithXInfo"><function>ListFontsWithXInfo</function></link>,
+and
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>
+requests. The catalogue names are
+case-insensitive and are encoded in <acronym>ISO</acronym> 8859-1. A zero-length
+list resets the client's catalogue list to the
+server-dependent default.
+ </para>
+ <para>
+If any of the catalogue names are invalid, a
+<link linkend="Errors:Name"><errorname>Name</errorname></link>
+error is returned and the request is ignored.
+ </para>
+</section>
+
+<section id="Requests:GetCatalogues">
+ <title><function>GetCatalogues</function></title>
+ <indexterm zone="Requests:GetCatalogues" significance="preferred"><primary>GetCatalogues</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>▶</entry></row>
+ <row rowsep='1'><entry><parameter>names</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>LISTofSTRING8</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns the current list of catalogue names
+(encoded in <acronym>ISO</acronym> 8859-1) associated with the client. These
+catalogues determine the set of fonts that are visible
+to
+<link linkend="Requests:ListFonts"><function>ListFonts</function></link>,
+<link linkend="Requests:ListFontsWithXInfo"><function>ListFontsWithXInfo</function></link>,
+and
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>.
+A zero-length list indicates the server's default set of
+fonts. Catalogue names are case-insensitive and may be
+returned in mixed case.
+ </para>
+</section>
+
+<section id="Requests:SetEventMask">
+ <title><function>SetEventMask</function></title>
+ <indexterm zone="Requests:SetEventMask" significance="preferred"><primary>SetEventMask</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>extension-opcode</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row rowsep='1'><entry><parameter>event-mask</parameter>:</entry><entry><link linkend="Data_Types:EVENTMASK"><type>EVENTMASK</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:EventMask"><errorname>EventMask</errorname></link>,
+<link linkend="Errors:Request"><errorname>Request</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request specifies the set of maskable events that the
+extension indicated by <parameter>EXTENSION-OPCODE</parameter>
+(or zero for the core)
+should generate for the client. Event masks are limited in
+scope to the extension (or core) for which they are defined,
+so expressing interest in events from one or more extensions
+requires multiple uses of this request.
+ </para>
+ <para>
+The default event mask if
+<function>SetEventMask</function>
+has not been called
+is zero, indicating no interest in any maskable events.
+Some events are not maskable and cannot be blocked.
+ </para>
+ <para>
+If <parameter>EXTENSION-OPCODE</parameter> is not a valid extension
+opcode previously returned by
+<link linkend="Requests:QueryExtension"><function>QueryExtension</function></link>
+or zero, a
+<link linkend="Errors:Request"><errorname>Request</errorname></link>
+error is
+returned. If <parameter>EVENT-MASK</parameter> contains any bits that do not
+correspond to valid events for the specified extension (or
+core), an
+<link linkend="Errors:EventMask"><errorname>EventMask</errorname></link>
+error is returned and the request is
+ignored.
+ </para>
+</section>
+
+<section id="Requests:GetEventMask">
+ <title><function>GetEventMask</function></title>
+ <indexterm zone="Requests:GetEventMask" significance="preferred"><primary>GetEventMask</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>extension-opcode</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry>▶</entry></row>
+ <row rowsep='1'><entry><parameter>event-mask</parameter>:</entry><entry><link linkend="Data_Types:EVENTMASK"><type>EVENTMASK</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Request"><errorname>Request</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns the set of maskable core events the
+extension indicated by <parameter>EXTENSION-OPCODE</parameter>
+(or the core if zero)
+should generate for the client. Non-maskable events are
+always sent to the client.
+ </para>
+ <para>
+If <parameter>EXTENSION-OPCODE</parameter> is not a valid extension opcode
+previously returned by
+<link linkend="Requests:QueryExtension"><function>QueryExtension</function></link>
+or zero, a
+<link linkend="Errors:Request"><errorname>Request</errorname></link>
+error is returned.
+ </para>
+</section>
+
+<section id="Requests:CreateAC">
+ <title><function>CreateAC</function></title>
+ <indexterm zone="Requests:CreateAC" significance="preferred"><primary>CreateAC</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>ac</parameter>:</entry><entry><link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link></entry></row>
+ <row><entry><parameter>authorization-protocols</parameter>:</entry><entry><link linkend="Data_Types:AUTH"><type>LISTofAUTH</type></link></entry></row>
+ <row><entry>▶</entry></row>
+ <row><entry><parameter>status</parameter>:</entry><entry>{ <constant>Success</constant>, <constant>Continue</constant>, <constant>Denied</constant> }</entry></row>
+ <row><entry><parameter>authorization-index</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row rowsep='1'><entry><parameter>authorization-data</parameter>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:IDChoice"><errorname>IDChoice</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request creates a new
+<type>AccessContext</type>
+object within the
+server containing the specified authorization data. When
+this
+<type>AccessContext</type>
+is selected by the client using the
+<link linkend="Requests:SetAuthorization"><function>SetAuthorization</function></link>
+request, the data may be used by the server
+to determine whether or not the client should be granted
+access to particular font information.
+ </para>
+ <para>
+If <parameter>STATUS</parameter> is <constant>Denied</constant>, the server
+rejects the client's authorization information and does not associate
+<parameter>AC</parameter> with any valid <type>AccessContext</type>.
+In this case, <parameter>AUTHORIZATION-INDEX</parameter> is set
+to zero, and zero bytes of <parameter>AUTHORIZATION-DATA</parameter>
+is returned.
+ </para>
+ <para>
+Otherwise, <parameter>AUTHORIZATION-INDEX</parameter> is set to the index
+(beginning with 1) into the <parameter>AUTHORIZATION-PROTOCOLS</parameter>
+list of the protocol
+that the server will use for this connection. If the server
+does not want to use any of the given protocols, this value is
+set to zero. The <parameter>AUTHORIZATION-DATA</parameter> field is used
+to send back authorization protocol-dependent data to the client (such
+as a challenge, authentication of the server, etc.).
+ </para>
+ <para>
+If <parameter>STATUS</parameter> is <constant>Continue</constant>,
+the client is expected to continue
+the request by sending the following protocol and receiving
+the indicated response from the server. This continues
+until <parameter>STATUS</parameter> is set to either
+<constant>Success</constant> or <constant>Denied</constant>.
+ </para>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry> ◀</entry></row>
+ <row><entry><parameter> more-authorization-data</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry> ▶</entry></row>
+ <row><entry><parameter>status</parameter>:</entry><entry>{ <constant>Success</constant>, <constant>Continue</constant>, <constant>Denied</constant> }</entry></row>
+ <row><entry><parameter> more-authorization-data</parameter>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+Once the connection has been accepted and <parameter>STATUS</parameter>
+is <constant>Success</constant>, the request is complete.
+ </para>
+ <para>
+If <parameter>AC</parameter> is not in the range
+[1..2<superscript>29</superscript>-1] or is already associated
+with an access context, an <link linkend="Errors:IDChoice"><errorname>IDChoice</errorname></link> error is returned.
+ </para>
+</section>
+
+<section id="Requests:FreeAC">
+ <title><function>FreeAC</function></title>
+ <indexterm zone="Requests:FreeAC" significance="preferred"><primary>FreeAC</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>ac</parameter>:</entry><entry><link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link></entry></row>
+ <row rowsep='1'><entry>Errors:</entry><entry><link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link>,
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request indicates that the specified <parameter>AC</parameter> should
+no longer be associated with a valid access context.
+If <parameter>AC</parameter> is also the current
+<type>AccessContext</type>
+(as set by the
+<link linkend="Requests:SetAuthorization"><function>SetAuthorization</function></link>
+request), an implicit
+<link linkend="Requests:SetAuthorization"><function>SetAuthorization</function></link>
+of <constant>None</constant> is done to
+restore the
+<type>AccessContext</type>
+established for the initial
+connection setup. Operations on fonts that were opened under
+<parameter>AC</parameter> are not affected. The client may reuse the
+value of <parameter>AC</parameter> in a subsequent
+<link linkend="Requests:CreateAC"><function>CreateAC</function></link>
+request.
+ </para>
+ <para>
+If <parameter>AC</parameter> isn't associated with any valid authorization
+previously created by
+<link linkend="Requests:CreateAC"><function>CreateAC</function></link>, an
+<link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link>
+error is returned.
+ </para>
+</section>
+
+<section id="Requests:SetAuthorization">
+ <title><function>SetAuthorization</function></title>
+ <indexterm zone="Requests:SetAuthorization" significance="preferred"><primary>SetAuthorization</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>ac</parameter>:</entry><entry><link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link></entry></row>
+ <row rowsep='1'><entry>Errors:</entry><entry><link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request sets the
+<type>AccessContext</type>
+to be used for subsequent
+requests (except for
+<link linkend="Requests:QueryXInfo"><function>QueryXInfo</function></link>,
+<link linkend="Requests:QueryXExtents8"><function>QueryXExtents8</function></link>,
+<link linkend="Requests:QueryXExtents16"><function>QueryXExtents16</function></link>,
+<link linkend="Requests:QueryXBitmaps8"><function>QueryXBitmaps8</function></link>,
+<link linkend="Requests:QueryXBitmaps16"><function>QueryXBitmaps16</function></link>
+and
+<link linkend="Requests:CloseFont"><function>CloseFont</function></link>
+which are done under the
+<type>AccessContext</type>
+of the
+corresponding
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>
+).
+An <parameter>AC</parameter> of <constant>None</constant> restores the
+<type>AccessContext</type>
+established for the initial connection setup.
+ </para>
+ <para>
+If <parameter>AC</parameter> is neither <constant>None</constant>
+nor a value associated with a valid <type>AccessContext</type>
+previously created by
+<link linkend="Requests:CreateAC"><function>CreateAC</function></link>,
+an
+<link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link>
+error is returned.
+ </para>
+</section>
+
+<section id="Requests:SetResolution">
+ <title><function>SetResolution</function></title>
+ <indexterm zone="Requests:SetResolution" significance="preferred"><primary>SetResolution</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row rowsep='1'><entry><parameter>resolutions</parameter>:</entry><entry><link linkend="Data_Types:RESOLUTION"><type>LISTofRESOLUTION</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Resolution"><errorname>Resolution</errorname></link>,
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request provides a hint as to the resolution and
+preferred point size of the drawing surfaces for which the
+client will be requesting fonts. The server may use this
+information to set the RESOLUTION_X and RESOLUTION_Y fields
+of scalable <acronym>XLFD</acronym> font names, to order sets of names based on
+their resolutions, and to choose the server-dependent
+instance that is used when a partially-specified scalable
+fontname is opened.
+ </para>
+ <para>
+If a zero-length list of <link linkend="Data_Types:RESOLUTION"><type>RESOLUTION</type></link>s is given, the
+server-dependent default value is restored. Otherwise, if
+elements of all of the specified <link linkend="Data_Types:RESOLUTION"><type>RESOLUTION</type></link>s are non-zero, the
+default resolutions for this client are changed.
+ </para>
+ <para>
+If a <link linkend="Data_Types:RESOLUTION"><type>RESOLUTION</type></link> entry contains a zero,
+a <link linkend="Errors:Resolution"><errorname>Resolution</errorname></link> error is
+returned and the default resolutions are not changed.
+ </para>
+</section>
+
+<section id="Requests:GetResolution">
+ <title><function>GetResolution</function></title>
+ <indexterm zone="Requests:GetResolution" significance="preferred"><primary>GetResolution</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry>▶</entry></row>
+ <row rowsep='1'><entry><parameter>resolutions</parameter>:</entry><entry><link linkend="Data_Types:RESOLUTION"><type>LISTofRESOLUTION</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns the current list of default resolutions.
+If a client has not performed a
+<link linkend="Requests:SetResolution"><function>SetResolution</function></link>,
+a server-dependent default value is returned.
+ </para>
+</section>
+
+<section id="Requests:ListFonts">
+ <title><function>ListFonts</function></title>
+ <indexterm zone="Requests:ListFonts" significance="preferred"><primary>ListFonts</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>pattern</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry><parameter>max-names</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry>▶+</entry></row>
+ <row><entry><parameter>replies-following-hint</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row rowsep='1'><entry><parameter>names</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>LISTofSTRING8</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns a list of at most <parameter>MAX-NAMES</parameter>
+font names that match the specified <parameter>PATTERN</parameter>,
+according to matching rules
+of the <olink targetdoc='xlfd' targetptr='xlfd'><citetitle>X Logical
+Font Description Conventions</citetitle></olink>
+<xref linkend="References:xlfd-spec"/>.
+In the pattern (which is encoded in <acronym>ISO</acronym> 8859-1) the
+<quote><literal>?</literal></quote> character (octal <literal>77</literal>)
+matches any single character; the
+<quote><literal>*</literal></quote> character (octal <literal>52</literal>)
+matches any series of zero or more characters; and
+alphabetic characters match either upper- or lowercase. The
+returned <parameter>NAMES</parameter> are encoded in
+<acronym>ISO</acronym> 8859-1 and may contain mixed
+character cases. Font names are not required to be in <acronym>XLFD</acronym>
+format.
+ </para>
+ <para>
+If <parameter>PATTERN</parameter> is of zero length or
+<parameter>MAX-NAMES</parameter> is equal to zero,
+one reply containing a zero-length list of names is returned.
+This may be used to synchronize the client with the server.
+ </para>
+ <para>
+Servers are free to add or remove fonts to the set returned by
+<function>ListFonts</function>
+between any two requests. This request is not
+cumulative; repeated uses are processed in isolation and do
+result in an iteration through the list.
+ </para>
+ <para>
+To reduce the amount of buffering needed by the server, the
+list of names may be split across several reply packets, so
+long as the names arrive in the same order that they would
+have appeared had they been in a single packet. The
+<parameter>REPLIES-FOLLOWING-HINT</parameter> field in all but the last reply
+contains a positive value that specifies the number of
+replies that are likely, but not required, to follow. In the
+last reply, which may contain zero or more names, this field
+is set to zero.
+ </para>
+</section>
+
+<section id="Requests:ListFontsWithXInfo">
+ <title><function>ListFontsWithXInfo</function></title>
+ <indexterm zone="Requests:ListFontsWithXInfo" significance="preferred"><primary>ListFontsWithXInfo</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>pattern</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry><parameter>pattern</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry><parameter>pattern</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry><parameter>max-names</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry>▶+</entry></row>
+ <row><entry><parameter>replies-following-hint</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry><parameter>info</parameter>:</entry><entry><link linkend="Data_Types:XFONTINFO"><type>XFONTINFO</type></link></entry></row>
+ <row rowsep='1'><entry><parameter>name</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request is similar to
+<link linkend="Requests:ListFonts"><function>ListFonts</function></link>
+except that a separate
+reply containing the name, header, and property data is
+generated for each matching font name. Following these
+replies, if any, a final reply containing a zero-length
+<parameter>NAME</parameter> and no <parameter>INFO</parameter> is sent.
+ </para>
+ <para>
+The <parameter>REPLIES-FOLLOWING-HINT</parameter> field in all but the
+last reply contains a positive value that specifies the number of replies
+that are likely, but not required, to follow. In the last
+reply, this field is set to zero.
+ </para>
+ <para>
+If <parameter>PATTERN</parameter> is of zero length or if
+<parameter>MAX-NAMES</parameter> is equal to zero, only the final reply
+containing a zero-length <parameter>NAME</parameter> and no
+<parameter>INFO</parameter> is returned. This may be used to synchronize the
+client with the server.
+ </para>
+</section>
+
+<section id="Requests:OpenBitmapFont">
+ <title><function>OpenBitmapFont</function></title>
+ <indexterm zone="Requests:OpenBitmapFont" significance="preferred"><primary>OpenBitmapFont</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry></row>
+ <row><entry><parameter>pattern</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry><parameter>format-mask</parameter>:</entry><entry><link linkend="Data_Types:BITMAPFORMATMASK"><type>BITMAPFORMATMASK</type></link></entry></row>
+ <row><entry><parameter>format-hint</parameter>:</entry><entry><link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link></entry></row>
+ <row><entry>▶</entry></row>
+ <row><entry><parameter>otherid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link> or <constant>None</constant></entry></row>
+ <row><entry><parameter>otherid-valid</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row rowsep='1'><entry><parameter>cachable</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry>Errors:</entry><entry>
+<link linkend="Errors:IDChoice"><errorname>IDChoice</errorname></link>,
+<link linkend="Errors:Name"><errorname>Name</errorname></link>,
+<link linkend="Errors:Format"><errorname>Format</errorname></link>,
+<link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link>,
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request looks for a server-dependent choice of the
+font names that match the specified <parameter>PATTERN</parameter>
+according to the rules described for
+<link linkend="Requests:ListFonts"><function>ListFonts</function></link>.
+If no matches are found, a
+<link linkend="Errors:Name"><errorname>Name</errorname></link>
+error is returned. Otherwise, the server attempts to
+open the font associated with the chosen name.
+ </para>
+ <para>
+Permission to access the font is determined by the server
+according the licensing policy used for this font. The server
+may use the client's current
+<type>AccessContext</type>
+(as set by the most
+recent
+<link linkend="Requests:SetAuthorization"><function>SetAuthorization</function></link>
+request or the original connection
+setup) to determine any client-specific sets of permissions.
+After the font has been opened, the client is allowed to
+specify a new
+<type>AccessContext</type>
+with
+<link linkend="Requests:SetAuthorization"><function>SetAuthorization</function></link>
+or release
+the
+<type>AccessContext</type>
+using
+<link linkend="Requests:FreeAC"><function>FreeAC</function></link>
+. Subsequent
+<link linkend="Requests:QueryXInfo"><function>QueryXInfo</function></link>,
+<link linkend="Requests:QueryXExtents8"><function>QueryXExtents8</function></link>,
+<link linkend="Requests:QueryXExtents16"><function>QueryXExtents16</function></link>,
+<link linkend="Requests:QueryXBitmaps8"><function>QueryXBitmaps8</function></link>,
+<link linkend="Requests:QueryXBitmaps16"><function>QueryXBitmaps16</function></link>
+and
+<link linkend="Requests:CloseFont"><function>CloseFont</function></link>
+requests on this <link linkend="Data_Types:FONTID"><type>FONTID</type></link> are
+performed according to permissions granted at the time of the
+<function>OpenBitmapFont</function>
+request.
+ </para>
+ <para>
+If the server is willing and able to detect that the client
+has already opened the font successfully (possibly under a
+different name), the <parameter>OTHERID</parameter> field
+may be set to one of the
+identifiers previously used to open the font. The
+<parameter>OTHERID-VALID</parameter> field indicates whether or not
+<parameter>OTHERID</parameter> is still associated with an open font:
+if it is <constant>True</constant>, the client may use
+<parameter>OTHERID</parameter> as an alternative to
+<parameter>FONTID</parameter>. Otherwise, if
+<parameter>OTHERID-VALID</parameter> is <constant>False</constant>,
+<parameter>OTHERID</parameter> is no longer
+open but has not been reused by a subsequent
+<function>OpenBitmapFont</function>
+request.
+ </para>
+ <para>
+If <parameter>OTHERID</parameter> is set to <constant>None</constant>,
+then <parameter>OTHERID-VALID</parameter> should be set
+to <constant>False</constant>.
+ </para>
+ <para>
+The <parameter>FORMAT-MASK</parameter> indicates which fields in
+<parameter>FORMAT-HINT</parameter>
+the client is likely to use in subsequent
+<function>GetXBitmaps8</function>
+and
+<function>GetXBitmaps16</function>
+requests. Servers may wish to use
+this information to precompute certain values.
+ </para>
+ <para>
+If <parameter>CACHABLE</parameter> is set to <constant>True</constant>,
+the client may cache the font
+(so that redundant opens of the same font may be avoided)
+and use it with all
+<type>AccessContext</type>s
+during the life of the
+client without violating the font's licensing policy. This
+flag is typically set whenever a font is unlicensed or is
+licensed on a per-display basis. If <parameter>CACHABLE</parameter>
+is <constant>False</constant>, the
+client should reopen the font for each
+<type>AccessContext</type>.
+ </para>
+ <para>
+The server is permitted to add to or remove from the set of
+fonts returned by
+<link linkend="Requests:ListFonts"><function>ListFonts</function></link>
+between any two requests, though
+mechanisms outside the protocol. Therefore, it is possible
+for this request (which is atomic) to return a different font
+than would result from separate a
+<link linkend="Requests:ListFonts"><function>ListFonts</function></link>
+followed by an
+<function>OpenBitmapFont</function>
+with a non-wildcarded font name.
+ </para>
+ <para>
+If <parameter>FONTID</parameter> is not in the range
+[1..2<superscript>29</superscript>-1] or if it is already
+associated with an open font, an
+<link linkend="Errors:IDChoice"><errorname>IDChoice</errorname></link>
+error is returned.
+If no font is available that matches the specified
+<parameter>PATTERN</parameter>, a
+<link linkend="Errors:Name"><errorname>Name</errorname></link>
+error is returned. If the font is present but the client
+is not permitted access, an
+<link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link>
+error is returned.
+If <parameter>FORMAT-MASK</parameter> has any unspecified bits set or if any
+of the fields in <parameter>FORMAT-HINT</parameter> indicated by
+<parameter>FORMAT-MASK</parameter> are invalid, a
+<link linkend="Errors:Format"><errorname>Format</errorname></link>
+error is returned.
+ </para>
+</section>
+
+<section id="Requests:QueryXInfo">
+ <title><function>QueryXInfo</function></title>
+ <indexterm zone="Requests:QueryXInfo" significance="preferred"><primary>QueryXInfo</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry></row>
+ <row><entry>▶</entry></row>
+ <row rowsep='1'><entry><parameter>info</parameter>:</entry><entry><link linkend="Data_Types:XFONTINFO"><type>XFONTINFO</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Font"><errorname>Font</errorname></link>,
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns the font header and property information
+for the open font associated with <parameter>FONTID</parameter>.
+ </para>
+ <para>
+If <parameter>FONTID</parameter> is not associated with any open fonts, a
+<link linkend="Errors:Font"><errorname>Font</errorname></link>
+error
+is returned.
+ </para>
+</section>
+
+<section id="Requests:QueryXExtents8">
+ <title><function>QueryXExtents8</function></title>
+ <indexterm zone="Requests:QueryXExtents8" significance="preferred"><primary>QueryXExtents8</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry></row>
+ <row><entry><parameter>range</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry><parameter>chars</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry>▶</entry></row>
+ <row rowsep='1'><entry><parameter>extents</parameter>:</entry><entry><link linkend="Data_Types:XCHARINFO"><type>LISTofXCHARINFO</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Font"><errorname>Font</errorname></link>,
+<link linkend="Errors:Range"><errorname>Range</errorname></link>,
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request is equivalent to
+<link linkend="Requests:QueryXExtents16"><function>QueryXExtents16</function></link>
+except that it
+uses 1-byte character codes.
+ </para>
+</section>
+
+<section id="Requests:QueryXExtents16">
+ <title><function>QueryXExtents16</function></title>
+ <indexterm zone="Requests:QueryXExtents16" significance="preferred"><primary>QueryXExtents16</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry></row>
+ <row><entry><parameter>range</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry><parameter>chars</parameter>:</entry><entry><link linkend="Data_Types:CHAR2B"><type>LISTofCHAR2B</type></link></entry></row>
+ <row><entry>▶</entry></row>
+ <row rowsep='1'><entry><parameter>extents</parameter>:</entry><entry><link linkend="Data_Types:XCHARINFO"><type>LISTofXCHARINFO</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Font"><errorname>Font</errorname></link>,
+<link linkend="Errors:Range"><errorname>Range</errorname></link>,
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns a list of glyph extents from the open
+font associated with FONTID for the series of characters
+specified by <parameter>RANGE</parameter> and <parameter>CHARS</parameter>.
+ </para>
+ <para>
+If <parameter>RANGE</parameter> is <constant>True</constant>,
+each succeeding pair of elements in <parameter>CHARS</parameter> is
+treated as a range of characters for which extents should be
+returned. If <parameter>CHARS</parameter> contains an odd number of elements,
+the font's <structfield>XFONTINFO.CHAR-RANGE.MAX-CHAR</structfield>
+is implicitly appended to
+the list. If <parameter>CHARS</parameter> contains no elements, the list is
+implicitly replaced with the font's
+<structfield>XFONTINFO.CHAR-RANGE.</structfield> If
+any of the resulting character ranges are invalid, a
+<link linkend="Errors:Range"><errorname>Range</errorname></link>
+error is returned. Otherwise, the character ranges are
+concatenated in the order given by <parameter>CHARS</parameter> to produce
+a set of character codes for which extents are returned.
+ </para>
+ <para>
+If <parameter>RANGE</parameter> is <constant>False</constant>,
+then <parameter>CHARS</parameter> specifies the set of character
+codes for which extents are returned. If <parameter>CHARS</parameter> is of
+zero length, then a zero-length list of extents is returned.
+ </para>
+ <para>
+The extents for each character code in the resulting set (which
+may contain duplicates) are returned in the order in
+which the character codes appear in the set.
+At least one metric for each character shall be non-zero
+unless the character is not encoded in the font, in which case
+all-zero metrics are returned.
+A blank, zero-width character can be encoded
+with non-zero but equal left and right bearings.
+ </para>
+ <para>
+If <parameter>FONTID</parameter> is not associated with any open fonts, a
+<link linkend="Errors:Font"><errorname>Font</errorname></link>
+error is
+returned. If <parameter>RANGE</parameter> is <constant>True</constant>
+and <parameter>CHARS</parameter> contains any invalid ranges, a
+<link linkend="Errors:Range"><errorname>Range</errorname></link>
+error is returned.
+ </para>
+</section>
+
+<section id="Requests:QueryXBitmaps8">
+ <title><function>QueryXBitmaps8</function></title>
+ <indexterm zone="Requests:QueryXBitmaps8" significance="preferred"><primary>QueryXBitmaps8</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry></row>
+ <row><entry><parameter>range</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry><parameter>chars</parameter>:</entry><entry><link linkend="Data_Types:STRING8"><type>STRING8</type></link></entry></row>
+ <row><entry><parameter>format</parameter>:</entry><entry><link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link></entry></row>
+ <row><entry>▶+</entry></row>
+ <row><entry><parameter>replies-following-hint</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry><parameter>offsets</parameter>:</entry><entry><link linkend="Data_Types:OFFSET32"><type>LISTofOFFSET32</type></link></entry></row>
+ <row><entry><parameter>bitmaps</parameter>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link></entry></row>
+ <row rowsep='1'><entry>Errors:</entry><entry><link linkend="Errors:Font"><errorname>Font</errorname></link>,
+<link linkend="Errors:Range"><errorname>Range</errorname></link>,
+<link linkend="Errors:Format"><errorname>Format</errorname></link>,
+<link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request is equivalent to
+<link linkend="Requests:QueryXBitmaps16"><function>QueryXBitmaps16</function></link>
+except that it
+uses 1-byte character codes.
+ </para>
+</section>
+
+<section id="Requests:QueryXBitmaps16">
+ <title><function>QueryXBitmaps16</function></title>
+ <indexterm zone="Requests:QueryXBitmaps16" significance="preferred"><primary>QueryXBitmaps16</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry></row>
+ <row><entry><parameter>range</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry><parameter>chars</parameter>:</entry><entry><link linkend="Data_Types:CHAR2B"><type>LISTofCHAR2B</type></link></entry></row>
+ <row><entry><parameter>format</parameter>:</entry><entry><link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link></entry></row>
+ <row><entry>▶+</entry></row>
+ <row><entry><parameter>replies-following-hint</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry><parameter>offsets</parameter>:</entry><entry><link linkend="Data_Types:OFFSET32"><type>LISTofOFFSET32</type></link></entry></row>
+ <row rowsep='1'><entry><parameter>bitmaps</parameter>:</entry><entry><link linkend="Data_Types:BYTE"><type>LISTofBYTE</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Font"><errorname>Font</errorname></link>,
+ <link linkend="Errors:Range"><errorname>Range</errorname></link>,
+ <link linkend="Errors:Format"><errorname>Format</errorname></link>,
+ <link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request returns a list of glyph bitmaps from the open font associated
+with <parameter>FONTID</parameter> for the series of characters
+specified by <parameter>RANGE</parameter> and <parameter>CHARS</parameter>.
+ </para>
+ <para>
+If <parameter>RANGE</parameter> is <constant>True</constant>, each succeeding
+pair of elements in <parameter>CHARS</parameter> is
+treated as a range of characters for which bitmaps should be
+returned. If <parameter>CHARS</parameter> contains an odd number of elements,
+the font's <structfield>XFONTINFO.CHAR-RANGE.MAX-CHAR</structfield>
+is implicitly appended to
+the list. If <parameter>CHARS</parameter> contains no elements, the list is
+implicitly replaced with the font's
+<structfield>XFONTINFO.CHAR-RANGE.</structfield> If
+any of the resulting character ranges are invalid, a <link linkend="Errors:Range"><errorname>Range</errorname></link>
+error is returned. Otherwise, the character ranges are
+concatenated in the order given by <parameter>CHARS</parameter> to produce
+a set of character codes for which bitmaps are returned.
+ </para>
+ <para>
+If <parameter>RANGE</parameter> is <constant>False</constant>,
+then <parameter>CHARS</parameter> specifies the set of character
+codes for which bitmaps are returned. If <parameter>CHARS</parameter>
+is of zero length, then a single reply containing a zero-length list of
+offsets and bitmaps is returned.
+ </para>
+ <para>
+If any of the resulting character ranges are invalid, a
+<link linkend="Errors:Range"><errorname>Range</errorname></link>
+error is returned. Otherwise, the resulting character ranges
+are concatenated in the order given by <parameter>CHARS</parameter>
+to produce a set of character codes for which bitmaps are returned.
+ </para>
+ <para>
+The server is free to return the glyph bitmaps in multiple
+replies to reduce the amount of buffering that is necessary.
+In this situation, the set of characters obtained above is
+partitioned into an implementation-dependent number of
+ordered, non-overlapping subsets containing runs of one or
+more consecutive characters. The global ordering of
+characters must be maintained such that concatenating the
+subsets in order that they were produced yields the original
+set. A reply is generated for each subset, in the order that
+it was produced.
+ </para>
+ <para>
+For each character in a subset, an image of that character's
+glyph is described by a rectangle of bits corresponding to the
+pixels specified by FORMAT.IMAGE-RECT. Within the image, set
+and clear bits represent inked and non-inked pixels,
+respectively.
+ </para>
+ <para>
+Each scanline of a glyph image, from top to bottom, is zero-padded
+on the right to a multiple of the number of bits specified by
+FORMAT.SCANLINE-PAD. The scanline is then divided from left
+to right into a sequence of FORMAT.SCANLINE-UNIT bits. The
+bits of each unit are then arranged such that the left-most
+pixel is stored in the most- or least-significant bit,
+according to FORMAT.BIT-ORDER-MSB. The bytes of each unit are
+then arranged such that the most- or least-significant byte,
+according to FORMAT.BYTE-ORDER-MSB, is transmitted first.
+Finally, the units are arranged such that the left-most is
+transmitted first and the right-most is transmitted last.
+ </para>
+ <para>
+The individual images within a subset are then concatenated in
+a server-dependent order to form the <parameter>BITMAPS</parameter> data
+of the reply. If a glyph image is duplicated within a reply, the
+server is free to return fewer (but at least one) copies of
+the image. If a character is not encoded within the font, a
+zero-length bitmap is substituted for this character. Each
+glyph image must begin at a bit position that is a multiple of
+the FORMAT.SCANLINE-UNIT.
+ </para>
+ <para>
+The <parameter>OFFSETS</parameter> array in a reply contains one entry
+for each character in the subset being returned, in the order that the
+characters appear in the subset. Each entry specifies the
+starting location in bytes and size in bytes of the
+corresponding glyph image in the <parameter>BITMAPS</parameter> data of that
+reply (i.e. an offset may not refer to data in another reply).
+ </para>
+ <para>
+The <parameter>REPLIES-FOLLOWING-HINT</parameter> field in all but the
+last reply contains a positive value that specifies the number of replies
+that are likely, but not required, to follow. In the last
+reply, which may contain data for zero or more characters,
+this field is set to zero.
+ </para>
+ <para>
+If <parameter>FONTID</parameter> is not associated with any open fonts,
+a <link linkend="Errors:Font"><errorname>Font</errorname></link>
+error is returned. If <parameter>RANGE</parameter> is
+<constant>True</constant> and <parameter>CHARS</parameter> contains any
+invalid ranges, a
+<link linkend="Errors:Range"><errorname>Range</errorname></link> error
+is returned. If <parameter>FORMAT</parameter> is invalid, a
+<link linkend="Errors:Format"><errorname>Format</errorname></link> error
+is returned.
+ </para>
+</section>
+
+<section id="Requests:CloseFont">
+ <title><function>CloseFont</function></title>
+ <indexterm zone="Requests:CloseFont" significance="preferred"><primary>CloseFont</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row rowsep='1'><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry></row>
+ <row><entry>Errors:</entry><entry><link linkend="Errors:Font"><errorname>Font</errorname></link>, <link linkend="Errors:Alloc"><errorname>Alloc</errorname></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This request indicates that the specified <parameter>FONTID</parameter>
+should no longer be associated with an open font. The server is free to
+release any client-specific storage or licenses allocated for
+the font. The client may reuse the value of <parameter>FONTID</parameter>
+in a subsequent
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>
+request.
+ </para>
+ <para>
+If <parameter>FONTID</parameter> is not associated with any open fonts, a
+<link linkend="Errors:Font"><errorname>Font</errorname></link>
+error is returned.
+ </para>
+</section>
+
+<section id="Requests:close_connection">
+ <title>close connection</title>
+ <indexterm zone="Requests:close_connection" significance="preferred"><primary>close connection</primary></indexterm>
+
+ <para>
+When a connection is closed, a
+<link linkend="Requests:CloseFont"><function>CloseFont</function></link>
+is done on all fonts
+that are open on the connection. In addition, the server is
+free to release any storage or licenses allocated on behalf of
+the client that made the connection.
+ </para>
+</section>
+</section>
+
+<section id='Errors'>
+<title>Errors</title>
+<!-- .XS -->
+<!-- (SN Errors -->
+<!-- .XE -->
+<para>
+All errors are at least 16 bytes long and contain the following fields:
+</para>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>type</parameter>:</entry><entry><type>CARD8</type></entry><entry>value of 1</entry></row>
+ <row><entry><parameter>error-code</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>sequence-number</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>length</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry><parameter>timestamp</parameter>:</entry><entry><link linkend="Data_Types:TIMESTAMP"><type>TIMESTAMP</type></link></entry></row>
+ <row><entry><parameter>major-opcode</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>minor-opcode</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<para>
+The TYPE field has a value of one. The ERROR-CODE field specifies which error
+occurred. Core errors codes are in the range 0 through 127, extension error
+codes are in the range 128 through 255. The SEQUENCE-NUMBER field contains the
+least significant 16 bits of the sequence number of the request that caused the
+error. The LENGTH field specifies the length of the error packet in 4-byte
+units and must have a value of at least 4. The TIMESTAMP specifies the server
+time when the error occurred. The MAJOR-OPCODE and MINOR-OPCODE (zero for core
+requests) fields specify the type of request that generated the error. The
+DATA-OR-UNUSED field may be used for 16 bits of error-specific information. If
+LENGTH is greater than four, these fields are followed by (LENGTH - 4) * 4
+bytes of extra data.
+</para>
+<para>
+The following errors are defined for the core protocol:
+</para>
+
+<section id="Errors:Request">
+ <title><errorname>Request</errorname></title>
+ <indexterm zone="Errors:Request" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Request</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by any request that has an unknown
+combination of major and minor request numbers, or by any
+extension request that is issued before a
+<link linkend="Requests:QueryExtension"><function>QueryExtension</function></link>
+of that extension.
+ </para>
+</section>
+
+<section id="Errors:Format">
+ <title><errorname>Format</errorname></title>
+ <indexterm zone="Errors:Format" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Format</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ <row><entry><parameter>format</parameter>:</entry><entry><link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link></entry><entry>bad format value</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by the use of an invalid <link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link>
+in the
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>,
+<link linkend="Requests:QueryXBitmaps8"><function>QueryXBitmaps8</function></link>, and
+<link linkend="Requests:QueryXBitmaps16"><function>QueryXBitmaps16</function></link>
+requests.
+The value that caused the error is included as extra data.
+ </para>
+</section>
+
+<section id="Errors:Font">
+ <title><errorname>Font</errorname></title>
+ <indexterm zone="Errors:Font" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Font</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ <row><entry><parameter>fontid</parameter>:</entry><entry><link linkend="Data_Types:FONTID"><type>FONTID</type></link></entry><entry>bad font identifier</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by an invalid <link linkend="Data_Types:FONTID"><type>FONTID</type></link> in the
+<link linkend="Requests:QueryXInfo"><function>QueryXInfo</function></link>,
+<link linkend="Requests:QueryXExtents8"><function>QueryXExtents8</function></link>,
+<link linkend="Requests:QueryXExtents16"><function>QueryXExtents16</function></link>,
+<link linkend="Requests:QueryXBitmaps8"><function>QueryXBitmaps8</function></link>,
+<link linkend="Requests:QueryXBitmaps16"><function>QueryXBitmaps16</function></link>
+and
+<link linkend="Requests:CloseFont"><function>CloseFont</function></link>
+requests. The value that caused
+the error is included as extra data.
+ </para>
+</section>
+
+<section id="Errors:Range">
+ <title><errorname>Range</errorname></title>
+ <indexterm zone="Errors:Range" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Range</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ <row><entry><parameter>range</parameter>:</entry><entry><link linkend="Data_Types:RANGE"><type>RANGE</type></link></entry><entry>bad range</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by an invalid <link linkend="Data_Types:RANGE"><type>RANGE</type></link> in the
+<link linkend="Requests:QueryXExtents8"><function>QueryXExtents8</function></link>,
+<link linkend="Requests:QueryXExtents16"><function>QueryXExtents16</function></link>,
+<link linkend="Requests:QueryXBitmaps8"><function>QueryXBitmaps8</function></link>
+and
+<link linkend="Requests:QueryXBitmaps16"><function>QueryXBitmaps16</function></link>
+requests. The
+value that caused the error is included as extra data.
+ </para>
+</section>
+
+<section id="Errors:EventMask">
+ <title><errorname>EventMask</errorname></title>
+ <indexterm zone="Errors:EventMask" significance="preferred"><primary>Error Codes</primary><secondary><errorname>EventMask</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ <row><entry><parameter>event-mask</parameter>:</entry><entry><link linkend="Data_Types:EVENTMASK"><type>EVENTMASK</type></link></entry><entry>bad event mask</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by an invalid <link linkend="Data_Types:EVENTMASK"><type>EVENTMASK</type></link> in the
+<link linkend="Requests:SetEventMask"><function>SetEventMask</function></link>
+request. The value that caused the error is
+included as extra data.
+ </para>
+</section>
+
+<section id="Errors:AccessContext">
+ <title><errorname>AccessContext</errorname></title>
+ <indexterm zone="Errors:AccessContext" significance="preferred"><primary>Error Codes</primary><secondary><errorname>AccessContext</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ <row><entry><parameter>ac</parameter>:</entry><entry><link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link></entry><entry>unaccepted <type>AccessContext</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by an invalid <link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link> in the
+<link linkend="Requests:FreeAC"><function>FreeAC</function></link>
+or
+<link linkend="Requests:SetAuthorization"><function>SetAuthorization</function></link>
+request or by an
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>
+request performed without sufficient authorization. In the
+first two cases, the <link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link> of the errant request is
+returned as extra data. In the third case, the current
+<link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link> is returned as extra data.
+ </para>
+</section>
+
+<section id="Errors:IDChoice">
+ <title><errorname>IDChoice</errorname></title>
+ <indexterm zone="Errors:IDChoice" significance="preferred"><primary>Error Codes</primary><secondary><errorname>IDChoice</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ <row><entry><parameter>id</parameter>:</entry><entry><link linkend="Data_Types:ID"><type>ID</type></link></entry><entry>bad identifier</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by an invalid or already associated
+<link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link> identifier in a
+<link linkend="Requests:CreateAC"><function>CreateAC</function></link>
+request or <link linkend="Data_Types:FONTID"><type>FONTID</type></link> identifier
+in an
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>
+request. The value that caused the error
+is included as extra data.
+ </para>
+</section>
+
+<section id="Errors:Name">
+ <title><errorname>Name</errorname></title>
+ <indexterm zone="Errors:Name" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Name</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by a font name pattern that matches
+no fonts in an
+<link linkend="Requests:OpenBitmapFont"><function>OpenBitmapFont</function></link>
+request or no catalogue names in a
+<link linkend="Requests:SetCatalogues"><function>SetCatalogues</function></link>
+request.
+ </para>
+</section>
+
+<section id="Errors:Resolution">
+ <title><errorname>Resolution</errorname></title>
+ <indexterm zone="Errors:Resolution" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Resolution</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>X value of errant resolution</entry></row>
+ <row><entry><parameter>y-resolution</parameter>:</entry><entry><type>CARD16</type></entry><entry>Y value of errant resolution</entry></row>
+ <row><entry><parameter>point-size</parameter>:</entry><entry><type>CARD16</type></entry><entry>point size of errant resolution</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated in response to an invalid <link linkend="Data_Types:RESOLUTION"><type>RESOLUTION</type></link>
+structure in a
+<link linkend="Requests:SetResolution"><function>SetResolution</function></link>
+request. The value that caused the
+error is included in the DATA-OR-UNUSED field and as extra data.
+ </para>
+</section>
+
+<section id="Errors:Alloc">
+ <title><errorname>Alloc</errorname></title>
+ <indexterm zone="Errors:Length" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Alloc</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by any request for which the server
+lacks sufficient resources (especially memory).
+ </para>
+</section>
+
+<section id="Errors:Length">
+ <title><errorname>Length</errorname></title>
+ <indexterm zone="Errors:Length" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Length</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ <row><entry><parameter>length</parameter>:</entry><entry><type>CARD32</type></entry><entry>bad length value</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error is generated by any request that has a length field
+greater than (MAXIMUM-REQUEST-LENGTH * 4) bytes. The value that
+caused the error is included as extra data.
+ </para>
+</section>
+
+<section id="Errors:Implementation">
+ <title><errorname>Implementation</errorname></title>
+ <indexterm zone="Errors:Implementation" significance="preferred"><primary>Error Codes</primary><secondary><errorname>Implementation</errorname></secondary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>data-or-unused</parameter>:</entry><entry><type>CARD16</type></entry><entry>unused</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This error may be generated in response to any request that
+the server is unable to process because it is deficient. Use
+of this error is highly discouraged and indicates lack of
+conformance to the protocol.
+ </para>
+</section>
+<section id="Errors:Extensions">
+ <title>Extensions</title>
+ <para>
+Additional errors may be defined by extensions.
+ </para>
+</section>
+</section>
+
+<section id='Events'>
+<title>Events</title>
+<!-- .XS -->
+<!-- (SN Events -->
+<!-- .XE -->
+<para>
+Events may be generated in response to requests or at the server's discretion
+after the initial connection setup information has been exchanged. Each event
+is at least 12 bytes long and contains the following fields:
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>type</parameter>:</entry><entry><type>CARD8</type></entry><entry>value of 2</entry></row>
+ <row><entry><parameter>event-code</parameter>:</entry><entry><type>CARD8</type></entry></row>
+ <row><entry><parameter>sequence-number</parameter>:</entry><entry><type>CARD16</type></entry></row>
+ <row><entry><parameter>length</parameter>:</entry><entry><type>CARD32</type></entry></row>
+ <row><entry><parameter>timestamp</parameter>:</entry><entry><link linkend="Data_Types:TIMESTAMP"><type>TIMESTAMP</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+</para>
+<para>
+The TYPE field contains the value 2. The EVENT-CODE field specifies the number
+of the event and is in the range 0-127 for core events or the range 128-255 for
+extensions. The SEQUENCE-NUMBER field specifies the least significant 16 bits
+of the sequence number of the last request to have been processed by the
+server. The LENGTH field specifies the number of 4-byte units in this event
+packet and must always have a value of at least 3. The <link linkend="Data_Types:TIMESTAMP"><type>TIMESTAMP</type></link> field
+specifies the server time when the event occurred. If LENGTH is greater than
+three, these fields are followed by (LENGTH - 3) * 4 bytes of additional data.
+</para>
+<para>
+Events are described using the following syntax:
+ <blockquote><para>
+ <emphasis role="bold"><function>EventName</function></emphasis>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>arg1</parameter>:</entry><entry><type>type1</type></entry></row>
+ <row><entry> ...</entry></row>
+ <row><entry><parameter>argN</parameter>:</entry><entry><type>typeN</type></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ Description
+ </para></blockquote>
+</para>
+<para>
+If an event does not provide any extra arguments, the
+<parameter>arg1</parameter>...<parameter>argN</parameter>
+lines are omitted from the description.
+</para>
+<para>
+The core X Font Service protocol defines the following events:
+</para>
+
+<section id="Events:KeepAlive">
+ <title><function>KeepAlive</function></title>
+ <indexterm zone="Events:KeepAlive" significance="preferred"><primary>KeepAlive</primary></indexterm>
+ <para>
+This unsolicited, nonmaskable event may be sent by the
+server to verify that the connection has not been broken
+(for transports that do not provide this information).
+Clients should acknowledge receipt of this request
+by sending any request (such as
+<link linkend="Requests:NoOp"><function>NoOp</function></link>
+).
+ </para>
+</section>
+
+<section id="Events:CatalogueListNotify">
+ <title><function>CatalogueListNotify</function></title>
+ <indexterm zone="Events:CatalogueListNotify" significance="preferred"><primary>CatalogueListNotify</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>added</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry><parameter>deleted</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This event is sent to clients that have included
+<function><constant>CatalogueListChangeMask</constant></function>
+in their core event mask
+whenever the list of catalogues that are available has
+changed. The ADDED field is <constant>True</constant> if new catalogues have
+been added to the server, otherwise it is <constant>False</constant>. The
+DELETED field is <constant>True</constant> if any existing catalogues have
+been removed from the server, otherwise it is <constant>False</constant>.
+ </para>
+</section>
+
+<section id="Events:FontListNotify">
+ <title><function>FontListNotify</function></title>
+ <indexterm zone="Events:FontListNotify" significance="preferred"><primary>FontListNotify</primary></indexterm>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <tbody>
+ <row><entry><parameter>added</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ <row><entry><parameter>deleted</parameter>:</entry><entry><link linkend="Data_Types:BOOL"><type>BOOL</type></link></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+This event is sent to clients that have included
+<function><constant>FontListChangeMask</constant></function>
+in their event mask whenever the
+list of fonts that are provided by the currently selected
+catalogues has changed. The ADDED field is <constant>True</constant> if new
+fonts have been added to any of the catalogues currently
+used by the client, otherwise it is <constant>False</constant>. The DELETED
+field is <constant>True</constant> if any existing fonts have been removed
+from any of catalogues used by the client, otherwise it
+is <constant>False</constant>.
+ </para>
+</section>
+<section id="Events:Extensions">
+ <title>Extensions</title>
+ <para>
+Additional events may be defined by extensions.
+ </para>
+</section>
+</section>
+</chapter>
+
+<chapter id='Protocol_Encoding'>
+<title>Protocol Encoding</title>
+<!-- .XS -->
+<!-- (SN Protocol Encoding -->
+<!-- .XE -->
+<para>
+Numbers that are prefixed with <quote><literal>#x</literal></quote>
+are in hexadecimal (base 16). All other
+numbers are in decimal. Requests, replies, errors, events, and compound types
+are described using the syntax:
+</para>
+<!-- .RS -->
+<literallayout class="monospaced">
+
+ Name
+ <emphasis remap='I'>count</emphasis> <emphasis remap='I'>contents</emphasis> <emphasis remap='I'>name</emphasis>
+ ...
+ <emphasis remap='I'>count</emphasis> <emphasis remap='I'>contents</emphasis> <emphasis remap='I'>name</emphasis>
+</literallayout>
+
+<!-- .RE -->
+<para>
+where COUNT is the number of bytes in the data stream occupied by this
+field, CONTENTS is the name of the type as given in
+<link linkend='Data_Types'>Section 4</link> or the value if
+this field contains a constant, and NAME is a description of this field.
+</para>
+<para>
+Objects containing counted lists use a lowercase single-letter variable (whose
+scope is limited to the request, reply, event, or error in which it is found)
+to represent the number of objects in the list. These variables, and any
+expressions in which they are used, should be treated as unsigned integers.
+Multiple copies of an object are indicated by CONTENTS prefix
+<quote>LISTof</quote>.
+</para>
+<para>
+Unused bytes (whose value is undefined) will have a blank CONTENTS field and a
+NAME field of <quote>unused</quote>. Zeroed bytes (whose value must be zero)
+will have a blank CONTENTS field and a NAME field of <quote>zero</quote>.
+The expression pad(e) refers to the number of bytes
+needed to round a value <quote>e</quote> up to the closed
+multiple of four:
+</para>
+<!-- .RS -->
+<literallayout class="monospaced">
+
+ pad(e) = (4 - (e mod 4)) mod 4
+</literallayout>
+
+<section id='Encoding::Data_Types'>
+<title>Data Types</title>
+<!-- .XS -->
+<!-- (SN Data Types -->
+<!-- .XE -->
+<literallayout class="monospaced">
+<link linkend="Data_Types:ACCESSCONTEXT"><type>ACCESSCONTEXT</type></link>
+4 <type>CARD32</type> access context
+
+ with at least one of the following bits set:
+
+ #x1fffffff
+
+ but none of the following bits set:
+
+ #xe0000000 zero
+
+
+<link linkend="Data_Types:ALTERNATESERVER"><type>ALTERNATESERVER</type></link>
+1 <type>BOOL</type> subset
+1 n length of name
+n <type>STRING8</type> name
+p unused, p=pad(n+2)
+
+<link linkend="Data_Types:AUTH"><type>AUTH</type></link>
+2 n length of name
+2 d length of data
+n <type>STRING8</type> name
+p unused, p=pad(n)
+d <type>STRING8</type> data
+q unused, q=pad(d)
+
+
+<link linkend="Data_Types:BITMAPFORMAT"><type>BITMAPFORMAT</type></link>
+4 <type>CARD32</type> value, union of the following bits:
+
+ #x00000001 ByteOrderMSB
+ #x00000002 BitOrderMSB
+ #x00000000 <constant>ImageRectMin</constant>
+ #x00000004 <constant>ImageRectMaxWidth</constant>
+ #x00000008 <constant>ImageRectMax</constant>
+ #x00000000 <constant>ScanlinePad8</constant>
+ #x00000100 <constant>ScanlinePad16</constant>
+ #x00000200 <constant>ScanlinePad32</constant>
+ #x00000300 <constant>ScanlinePad64</constant>
+ #x00000000 <constant>ScanlineUnit8</constant>
+ #x00001000 <constant>ScanlineUnit16</constant>
+ #x00002000 <constant>ScanlineUnit32</constant>
+ #x00003000 <constant>ScanlineUnit64</constant>
+
+ except for the following bits which must be zero:
+
+ #xffffccf0 zero
+
+ and the following of which at most one bit may be set:
+
+ #x0000000c at most one bit can be set
+
+
+<link linkend="Data_Types:BITMAPFORMATMASK"><type>BITMAPFORMATMASK</type></link>
+4 <type>CARD32</type> value, mask of the following bits:
+
+ #x00000001 <constant>ByteOrderMask</constant>
+ #x00000002 <constant>BitOrderMask</constant>
+ #x00000004 <constant>ImageRectMask</constant>
+ #x00000008 <constant>ScanlinePadMask</constant>
+ #x00000010 <constant>ScanlineUnitMask</constant>
+
+ except for the following bits which must be zero:
+
+ #xffffffe0 zero
+
+<link linkend="Data_Types:BOOL"><type>BOOL</type></link>
+1 <type>BOOL</type> boolean, one of the following values:
+ 0 <constant>False</constant>
+ 1 <constant>True</constant>
+
+<link linkend="Data_Types:BYTE"><type>BYTE</type></link>
+1 <type>BYTE</type> unsigned byte of data
+
+<type>CARD8</type>
+1 <type>CARD8</type> 8-bit unsigned integer
+
+<type>CARD16</type>
+2 <type>CARD16</type> 16-bit unsigned integer
+
+<type>CARD32</type>
+4 <type>CARD32</type> 32-bit unsigned integer
+
+<link linkend="Data_Types:CHAR2B"><type>CHAR2B</type></link>
+1 <type>CARD8</type> byte1
+1 <type>CARD8</type> byte2
+
+<link linkend="Data_Types:EVENTMASK"><type>EVENTMASK</type></link>
+4 <type>CARD32</type> event mask
+
+ for core events, this is union of the following bits:
+
+ #00000001 <constant>CatalogueListChangeMask</constant>
+ #00000002 <constant>FontListChangeMask</constant>
+
+ but none of the following bits set:
+
+ #fffffffc
+
+ extensions define their own sets of bits
+
+<link linkend="Data_Types:FONTID"><type>FONTID</type></link>
+4 <type>CARD32</type> font identifier
+
+ with at least one of the following bits set:
+
+ #x1fffffff
+
+ but none of the following bits set:
+
+ #xe0000000 zero
+
+<type>INT8</type>
+1 <type>INT8</type> 8-bit signed integer
+
+<type>INT16</type>
+2 <type>INT16</type> 16-bit signed integer
+
+<type>INT32</type>
+4 <type>INT32</type> 32-bit signed integer
+
+<link linkend="Data_Types:OFFSET32"><type>OFFSET32</type></link>
+4 <type>CARD32</type> position (or integer value)
+4 <type>CARD32</type> length
+
+<link linkend="Data_Types:PROPINFO"><type>PROPINFO</type></link>
+4 n number of <type>PROPOFFSET</type> components
+4 m number of bytes of property data
+20*n <type>PROPOFFSET</type> property offsets into data block
+m <type>LISTofBYTE</type> property data block
+
+<link linkend="Data_Types:PROPOFFSET"><type>PROPOFFSET</type></link>
+8 <type>OFFSET32</type> name in data block
+8 <type>OFFSET32</type> value in data block
+1 <type>CARD8</type> type, one of the following values:
+ 0 <constant>String</constant>
+ 1 <constant>Unsigned</constant>
+ 2 <constant>Signed</constant>
+ 3 zero
+
+<link linkend="Data_Types:RANGE"><type>RANGE</type></link>
+2 <type>CHAR2B</type> minimum character code
+2 <type>CHAR2B</type> maximum character code
+
+<link linkend="Data_Types:RESOLUTION"><type>RESOLUTION</type></link>
+2 <type>CARD16</type> x resolution in pixels per inch
+2 <type>CARD16</type> y resolution in pixels per inch
+2 <type>CARD16</type> point size in decipoints
+
+STRNAME
+1 n length of name
+n <type>STRING8</type> name
+
+<link linkend="Data_Types:STRING8"><type>STRING8</type></link>
+n <type>LISTofBYTE</type> array of 8-bit character values
+
+<link linkend="Data_Types:TIMESTAMP"><type>TIMESTAMP</type></link>
+4 <type>CARD32</type> milliseconds since server time origin
+
+<link linkend="Data_Types:XCHARINFO"><type>XCHARINFO</type></link>
+2 <type>INT16</type> left bearing
+2 <type>INT16</type> right bearing
+2 <type>INT16</type> width
+2 <type>INT16</type> ascent
+2 <type>INT16</type> descent
+2 <type>CARD16</type> attributes
+
+<link linkend="Data_Types:XFONTINFO"><type>XFONTINFO</type></link>
+4 <type>CARD32</type> flags, union of the following bits:
+
+ #x00000001 <constant>AllCharactersExist</constant>
+ #x00000002 <constant>InkInside</constant>
+ #x00000004 <constant>HorizontalOverlap</constant>
+
+ but none of the following bits set:
+
+ #xfffffff8 zero
+
+4 <type>RANGE</type> range of characters in font
+1 <type>CARD8</type> drawing direction
+ 0 <constant>LeftToRight</constant>
+ 1 <constant>RightToLeft</constant>
+1 unused
+2 <type>CHAR2B</type> default character
+12 <type>XCHARINFO</type> minimum bounds
+12 <type>XCHARINFO</type> maximum bounds
+2 <type>INT16</type> font ascent
+2 <type>INT16</type> font descent
+n <type>PROPINFO</type> property data
+</literallayout>
+</section>
+
+<section id='Encoding::Requests'>
+<title>Requests</title>
+<para><link linkend="Requests:open_connection"><emphasis role="bold">open connection</emphasis></link></para>
+<literallayout class="monospaced">
+1 <type>BYTE</type> byteorder, one of the values:
+ #x42 MostSignificant Byte first
+ #x6c LeastSignificant Byte first
+1 <type>CARD8</type> numberof auth in auth-data
+2 2 client-major-protocol-version
+2 0 client-minor-protocol-version
+2 a/4 lengthof auth-data
+a <type>LISTofAUTH</type> auth-data
+▶
+2 <type>CARD16</type> status
+ 0 <constant>Success</constant>
+ 1 <constant>Continue</constant>
+ 2 <constant>Busy</constant>
+ 3 <constant>Denied</constant>
+2 2 major version
+2 0 version
+1 <type>CARD8</type> numberof alternate-servers-hint
+1 <type>CARD8</type> authorization-index
+2 a/4 lengthof alternate-servers-hint
+2 (d+q)/4 lengthof authorization-data
+a <type>LISTofALTERNATESERVER</type> alternate-servers-hint
+d <type>LISTofBYTE</type> authorization-data
+q unused, q=pad(d)
+</literallayout>
+
+<para>
+If STATUS is <constant>Busy</constant> or <constant>Denied</constant>, the protocol stops and the connection is
+closed. If STATUS is <constant>Continue</constant>, the client is expected to respond with
+additional data, to which the server responds with
+a new status value and more data. This dialog continues until the status
+is set to <constant>Success</constant>, or until the server sets STATUS to <constant>Busy</constant> or <constant>Denied</constant>
+and closes the connection:
+</para>
+
+<literallayout class="monospaced">
+◀
+4 1+(d+q)/4 length
+d <type>LISTofBYTE</type> more-authorization-data
+q unused, q=pad(d)
+▶
+4 2+(d+q)/4 length
+2 <type>CARD16</type> status
+ 0 <constant>Success</constant>
+ 1 <constant>Continue</constant>
+ 2 <constant>Busy</constant>
+ 3 <constant>Denied</constant>
+2 unused
+d <type>LISTofBYTE</type> more-authorization-data
+q unused, q=pad(d)
+</literallayout>
+<para>
+When STATUS is <constant>Success</constant>, the protocol resumes with the following
+sent by the server:
+</para>
+
+<literallayout class="monospaced">
+4 3+(v+w)/4 length of rest of data
+2 <type>CARD16</type> maximum-request-length
+2 v length of vendor string
+4 <type>CARD32</type> release-number
+v <type>STRING8</type> vendor-string
+w unused, w=pad(v)
+</literallayout>
+<para>
+Once the connection has been established, the client may send the
+following requests:
+</para>
+
+<literallayout class="monospaced">
+<link linkend="Requests:NoOp"><emphasis role="bold"><function>NoOp</function></emphasis></link>
+1 0 major-opcode
+1 unused
+2 1 length
+
+<link linkend="Requests:ListExtensions"><emphasis role="bold"><function>ListExtensions</function></emphasis></link>
+1 1 major-opcode
+1 unused
+2 1 length
+▶
+1 0 type reply
+1 <type>CARD8</type> numberof names
+2 <type>CARD16</type> sequence-number
+4 2+(n+p)/4 length
+n LISTofSTRNAME names
+p unused, p=pad(n)
+
+<link linkend="Requests:QueryExtension"><emphasis role="bold"><function>QueryExtension</function></emphasis></link>
+1 2 major-opcode
+1 n length of name
+2 1+(n+p)/4 length
+n <type>STRING8</type> name
+p unused, p=pad(n)
+▶
+1 0 type reply
+1 <type>BOOL</type> present
+2 <type>CARD16</type> sequence-number
+4 5 length
+2 <type>CARD16</type> major-version
+2 <type>CARD16</type> minor-version
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> first-event
+1 <type>CARD8</type> number-events
+1 <type>CARD8</type> first-error
+1 <type>CARD8</type> number-errors
+3 unused
+
+<link linkend="Requests:ListCatalogues"><emphasis role="bold"><function>ListCatalogues</function></emphasis></link>
+1 3 major-opcode
+1 unused
+2 3+(n+p)/4 length
+4 <type>CARD32</type> max-names
+2 n length of pattern
+2 unused
+n <type>STRING8</type> pattern
+p unused, p=pad(n)
+▶+
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 4+(n+p)/4 length
+4 <type>CARD32</type> replies-following-hint
+4 <type>CARD32</type> numberof catalogue-names
+n LISTofSTRNAME catalogue-names
+p unused, p=pad(n)
+
+<link linkend="Requests:SetCatalogues"><emphasis role="bold"><function>SetCatalogues</function></emphasis></link>
+1 4 major-opcode
+1 <type>CARD8</type> numberof catalogue-names
+2 1+(n+p)/4 length
+n LISTofSTRNAME catalogue-names
+p unused, p=pad(n)
+
+<link linkend="Requests:GetCatalogues"><emphasis role="bold"><function>GetCatalogues</function></emphasis></link>
+1 5 major-opcode
+1 unused
+2 1 length
+▶
+1 0 type reply
+1 <type>CARD8</type> numberof catalogue-names
+2 <type>CARD16</type> sequence-number
+4 2+(n+p)/4 length
+n LISTofSTRNAME catalogue-names
+p unused, p=pad(n)
+
+<link linkend="Requests:SetEventMask"><emphasis role="bold"><function>SetEventMask</function></emphasis></link>
+1 6 major-opcode
+1 <type>CARD8</type> extension-opcode
+2 2 length
+4 <type>EVENTMASK</type> event-mask
+
+<link linkend="Requests:GetEventMask"><emphasis role="bold"><function>GetEventMask</function></emphasis></link>
+1 7 major-opcode
+1 <type>CARD8</type> extension-opcode
+2 1 length
+▶
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 3 length
+4 <type>EVENTMASK</type> event-mask
+
+<link linkend="Requests:CreateAC"><emphasis role="bold"><function>CreateAC</function></emphasis></link>
+1 8 major-opcode
+1 <type>CARD8</type> numberof authorization-protocols
+2 2+a/4 length
+4 <type>ACCESSCONTEXT</type> ac
+a <type>LISTofAUTH</type> authorization-protocols
+▶
+1 0 type reply
+1 <type>CARD8</type> authorization-index
+2 <type>CARD16</type> sequence-number
+4 3+(d+q)/4 length
+2 <type>CARD16</type> status
+ 0 <constant>Success</constant>
+ 1 <constant>Continue</constant>
+ 2 <constant>Busy</constant>
+ 3 <constant>Denied</constant>
+2 unused
+d <type>LISTofBYTE</type> authorization-data
+q unused, q=pad(d)
+</literallayout>
+
+<para>
+If STATUS is <constant>Continue</constant>, the client is expected to respond with additional
+data, to which the server
+responds with a new status value and more data. This dialog continues
+until the status is set to
+<constant>Success</constant>, <constant>Busy</constant>, or <constant>Denied</constant> at which point the request is finished.
+</para>
+
+<literallayout class="monospaced">
+◀
+4 1+(d+q)/4 length
+d <type>LISTofBYTE</type> more-authorization-data
+q unused, q=pad(d)
+▶
+4 2+(d+q)/4 length
+2 <type>CARD16</type> status
+ 0 <constant>Success</constant>
+ 1 <constant>Continue</constant>
+ 2 <constant>Busy</constant>
+ 3 <constant>Denied</constant>
+2 unused
+d <type>LISTofBYTE</type> authorization-data
+q unused, q=pad(d)
+
+<link linkend="Requests:FreeAC"><emphasis role="bold"><function>FreeAC</function></emphasis></link>
+1 9 major-opcode
+1 unused
+2 2 length
+4 <type>ACCESSCONTEXT</type> ac
+
+<link linkend="Requests:SetAuthorization"><emphasis role="bold"><function>SetAuthorization</function></emphasis></link>
+1 10 major-opcode
+1 unused
+2 2 length
+4 <type>ACCESSCONTEXT</type> ac
+
+<link linkend="Requests:SetResolution"><emphasis role="bold"><function>SetResolution</function></emphasis></link>
+1 11 major-opcode
+1 n number of resolutions
+2 1+(6*n+p)/4 length
+6*n <type>LISTofRESOLUTION</type> resolutions
+p p=pad(6*n)
+
+<link linkend="Requests:GetResolution"><emphasis role="bold"><function>GetResolution</function></emphasis></link>
+1 12 major-opcode
+1 unused
+2 1 length
+▶
+1 0 type reply
+1 n number of resolutions
+2 <type>CARD16</type> sequence-number
+4 2+(6*n+p)/4 length
+6*n <type>LISTofRESOLUTION</type> resolutions
+p p=pad(6*n)
+
+<link linkend="Requests:ListFonts"><emphasis role="bold"><function>ListFonts</function></emphasis></link>
+1 13 major-opcode
+1 unused
+2 3+(n+p)/4 length
+4 <type>CARD32</type> max-names
+2 n length of pattern
+2 unused
+n <type>STRING8</type> pattern
+p unused, p=pad(n)
+▶+
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 4+(n+p)/4 length
+4 <type>CARD32</type> replies-following-hint
+4 <type>CARD32</type> numberof font-names
+n LISTofSTRNAME font-names
+p unused, p=pad(n)
+
+<link linkend="Requests:ListFontsWithXInfo"><emphasis role="bold"><function>ListFontsWithXInfo</function></emphasis></link>
+1 14 major-opcode
+1 unused
+2 3+(n+p)/4 length
+4 <type>CARD32</type> max-names
+2 n length of pattern
+2 unused
+n <type>STRING8</type> pattern
+p unused, p=pad(n)
+▶+ (except for last in series)
+1 0 type reply
+1 n length of name
+2 <type>CARD16</type> sequence-number
+4 3+(n+p+f)/4 length
+4 <type>CARD32</type> replies-hint
+f <type>XFONTINFO</type> fontinfo
+n <type>STRING8</type> name
+p unused, p=pad(n)
+▶ (last in series)
+1 0 type reply
+1 0 last-reply indicator
+2 <type>CARD16</type> sequence-number
+4 2 reply length
+
+<link linkend="Requests:OpenBitmapFont"><emphasis role="bold"><function>OpenBitmapFont</function></emphasis></link>
+1 15 major-opcode
+1 unused
+2 4+(n+p)/4 length
+4 <type>FONTID</type> fontid
+4 <type>BITMAPFORMATMASK</type> format-mask
+4 <type>BITMAPFORMAT</type> format
+n STRNAME pattern
+p unused, p=pad(n)
+▶
+1 0 type reply
+1 <type>BOOL</type> otherid-valid
+2 <type>CARD16</type> sequence-number
+4 4 length
+4 <type>FONTID</type> otherid
+1 <type>BOOL</type> cachable
+3 unused
+
+<link linkend="Requests:QueryXInfo"><emphasis role="bold"><function>QueryXInfo</function></emphasis></link>
+1 16 major-opcode
+1 unused
+2 2 length
+4 <type>FONTID</type> fontid
+▶
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 2+f/4 length
+f <type>XFONTINFO</type> fontinfo
+p unused, p=pad(f)
+
+<link linkend="Requests:QueryXExtents8"><emphasis role="bold"><function>QueryXExtents8</function></emphasis></link>
+1 17 major-opcode
+1 <type>BOOL</type> range
+2 3+(n+p)/4 length
+4 <type>FONTID</type> fontid
+4 n number chars entries
+n <type>STRING8</type> chars
+p unused, p=pad(n)
+▶
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 3+3*n length
+4 n number of extents
+12*n <type>LISTofXCHARINFO</type> extents
+
+<link linkend="Requests:QueryXExtents16"><emphasis role="bold"><function>QueryXExtents16</function></emphasis></link>
+1 18 major-opcode
+1 <type>BOOL</type> range
+2 3+(2*n+p)/4 length
+4 <type>FONTID</type> fontid
+4 n number chars entries
+2*n <type>LISTofCHAR2B</type> chars
+p unused, p=pad(2*n)
+▶
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 3+3*n length
+4 n number of extents
+12*n <type>LISTofXCHARINFO</type> extents
+
+<link linkend="Requests:QueryXBitmaps8"><emphasis role="bold"><function>QueryXBitmaps8</function></emphasis></link>
+1 19 major-opcode
+1 <type>BOOL</type> range
+2 4+(n+p)/4 length
+4 <type>FONTID</type> fontid
+4 <type>BITMAPFORMAT</type> format
+4 n number of chars entries
+n <type>STRING8</type> chars
+p unused, p=pad(n)
+▶+
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 5+2*n+(m+p)/4 length
+4 <type>CARD32</type> replies-following-hint
+4 n number of offsets
+4 m number of bytes of glyph images
+8*n <type>LISTofOFFSET32</type> offsets
+m <type>LISTofBYTE</type> glyphimages
+p unused, p=pad(m)
+
+<link linkend="Requests:QueryXBitmaps16"><emphasis role="bold"><function>QueryXBitmaps16</function></emphasis></link>
+1 20 major-opcode
+1 <type>BOOL</type> range
+2 4+(2*n+p)/4 length
+4 <type>FONTID</type> fontid
+4 <type>BITMAPFORMAT</type> format
+4 n number of chars entries
+2*n <type>LISTofCHAR2B</type> chars
+p unused, p=pad(2*n)
+▶
+1 0 type reply
+1 unused
+2 <type>CARD16</type> sequence-number
+4 5+2*n+(m+p)/4 length
+4 <type>CARD32</type> replies-following-hint
+4 n number of offsets
+4 m number of bytes of glyph images
+8*n <type>LISTofOFFSET32</type> offsets
+m <type>LISTofBYTE</type> glyphimages
+p unused, p=pad(m)
+
+<link linkend="Requests:CloseFont"><emphasis role="bold"><function>CloseFont</function></emphasis></link>
+1 21 major-opcode
+1 unused
+2 2 length
+4 <type>FONTID</type> fontid
+</literallayout>
+</section>
+
+<section id='Encoding::Errors'>
+<title>Errors</title>
+<literallayout class="monospaced">
+
+<link linkend="Errors:Request"><emphasis role="bold"><errorname>Request</errorname></emphasis></link>
+1 1 type error
+1 0 <errorname>Request</errorname>
+2 <type>CARD16</type> sequence-number
+4 4 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+
+<link linkend="Errors:Format"><emphasis role="bold"><errorname>Format</errorname></emphasis></link>
+1 1 type error
+1 1 <errorname>Format</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+4 <type>BITMAPFORMAT</type> bad-format
+
+<link linkend="Errors:Font"><emphasis role="bold"><errorname>Font</errorname></emphasis></link>
+1 1 type error
+1 2 <errorname>Font</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+4 <type>FONTID</type> bad-fontid
+
+<link linkend="Errors:Range"><emphasis role="bold"><errorname>Range</errorname></emphasis></link>
+1 1 type error
+1 3 <errorname>Range</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+4 <type>RANGE</type> bad-range
+
+<link linkend="Errors:EventMask"><emphasis role="bold"><errorname>EventMask</errorname></emphasis></link>
+1 1 type error
+1 4 <errorname>EventMask</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+4 <type>EVENTMASK</type> event-mask
+
+<link linkend="Errors:AccessContext"><emphasis role="bold"><errorname>AccessContext</errorname></emphasis></link>
+1 1 type error
+1 5 <errorname>AccessContext</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+4 <type>ACCESSCONTEXT</type> access context
+
+<link linkend="Errors:IDChoice"><emphasis role="bold"><errorname>IDChoice</errorname></emphasis></link>
+1 1 type error
+1 6 <errorname>IDChoice</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+4 <type>FONTID</type> bad-fontid
+
+<link linkend="Errors:Name"><emphasis role="bold"><errorname>Name</errorname></emphasis></link>
+1 1 type error
+1 7 <errorname>Name</errorname>
+2 <type>CARD16</type> sequence-number
+4 4 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+
+<link linkend="Errors:Resolution"><emphasis role="bold"><errorname>Resolution</errorname></emphasis></link>
+1 1 type error
+1 8 <errorname>Resolution</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+6 <type>RESOLUTION</type> resolution
+
+<link linkend="Errors:Alloc"><emphasis role="bold"><errorname>Alloc</errorname></emphasis></link>
+1 1 type error
+1 9 <errorname>Alloc</errorname>
+2 <type>CARD16</type> sequence-number
+4 4 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+
+<link linkend="Errors:Length"><emphasis role="bold"><errorname>Length</errorname></emphasis></link>
+1 1 type error
+1 10 <errorname>Length</errorname>
+2 <type>CARD16</type> sequence-number
+4 5 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+4 <type>CARD32</type> bad-length
+
+<link linkend="Errors:Implementation"><emphasis role="bold"><errorname>Implementation</errorname></emphasis></link>
+1 1 type error
+1 11 <errorname>Implementation</errorname>
+2 <type>CARD16</type> sequence-number
+4 4 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>CARD8</type> major-opcode
+1 <type>CARD8</type> minor-opcode
+2 unused
+
+</literallayout>
+</section>
+
+<section id='Encoding::Events'>
+<title>Events</title>
+<literallayout class="monospaced">
+<link linkend="Events:KeepAlive"><emphasis role="bold"><function>KeepAlive</function></emphasis></link>
+1 2 type event
+1 0 event KeepAlive
+2 <type>CARD16</type> sequence-number
+4 3 length
+4 <type>TIMESTAMP</type> timestamp
+
+<link linkend="Events:CatalogueListNotify"><emphasis role="bold"><function>CatalogueListNotify</function></emphasis></link>
+1 2 type event
+1 1 event CatalogueListNotify
+2 <type>CARD16</type> sequence-number
+4 4 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>BOOL</type> added
+1 <type>BOOL</type> deleted
+2 unused
+
+<link linkend="Events:FontListNotify"><emphasis role="bold"><function>FontListNotify</function></emphasis></link>
+1 2 type event
+1 2 event FontListNotify
+2 <type>CARD16</type> sequence-number
+4 4 length
+4 <type>TIMESTAMP</type> timestamp
+1 <type>BOOL</type> added
+1 <type>BOOL</type> deleted
+2 unused
+
+</literallayout>
+</section>
+</chapter>
+
+<chapter id='Acknowledgements'>
+<title>Acknowledgements</title>
+<!-- .XS -->
+<!-- (SN Acknowledgements -->
+<!-- .XE -->
+<para>
+This document represents the culmination of several years of debate and
+experiments done under the auspices of the
+<orgname class="consortium">MIT X Consortium</orgname> font working group.
+Although this was a group effort, the author remains responsible for any errors
+or omissions. The protocol presented here was primarily designed by
+<personname><firstname>Jim</firstname><surname>Fulton</surname></personname>,
+<personname><firstname>Keith</firstname><surname>Packard</surname></personname>,
+and
+<personname><firstname>Bob</firstname><surname>Scheifler</surname></personname>.
+Special thanks goes to
+<personname><firstname>Ned</firstname><surname>Batchelder</surname></personname>,
+<personname><firstname>Jim</firstname><surname>Flowers</surname></personname>,
+and
+<personname><firstname>Axel</firstname><surname>Deininger</surname></personname>
+for their invigorating comments
+which never failed to make this a better document.
+<personname><firstname>Stephen</firstname><surname>Gildea</surname></personname>
+edited version 2 of this document. Finally,
+<personname><firstname>David</firstname><surname>Lemke</surname></personname>
+deserves great credit for designing and coding the sample implementation.
+</para>
+</chapter>
+
+<bibliography id='References'>
+<title>References</title>
+<para>
+All of the following documents are X Consortium standards available from
+the X Consortium.
+</para>
+<biblioentry id='References:x11proto'>
+ <abbrev>1</abbrev>
+ <title><olink targetdoc='x11protocol' targetptr='x11protocol'>X Window System Protocol Version 11</olink></title>
+ <author><firstname>Robert W.</firstname><surname>Scheifler</surname></author>
+</biblioentry>
+
+<biblioentry id='References:bdf-spec'>
+ <abbrev>2</abbrev>
+ <corpauthor>Adobe Systems</corpauthor>
+ <title>Bitmap Distribution Format 2.1</title>
+</biblioentry>
+
+<biblioentry id='References:xlfd-spec'>
+ <abbrev>3</abbrev>
+ <corpauthor>X Consortium</corpauthor>
+ <title><olink targetdoc='xlfd' targetptr='xlfd'>X Logical Font
+ Description Conventions, Version 1.5</olink></title>
+</biblioentry>
+
+</bibliography>
+
+<appendix id="suggested_licensing_policies">
+<title>Suggested Licensing Policies</title>
+<para>
+The authorization data passed by the client in the initial connection
+setup information may be used by the font server to implement restrictions
+on which fonts may be accessed. Furthermore, the font server is free to
+refuse new connections at any time.
+</para>
+<para>
+Configuration or management of the license restrictions is outside the scope of
+the font service protocol and is done in a server-dependent manner. Possible
+policies might include, but are not limited to, combinations of the following:
+
+<variablelist>
+ <?dbhtml list-presentation="list"?>
+ <varlistentry>
+ <term>No restrictions</term>
+ <listitem>
+ <para>
+anyone may access any fonts. The server neither refuses any connections
+nor generates <link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link> errors on any
+fonts. For environments without specially-licensed fonts, this is
+sufficient.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Per-machine</term>
+ <listitem>
+ <para>
+only those clients connecting from a known set of
+machines are permitted access. The server could get the address
+of the connection and look in a list of allowed machines.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Per-user</term>
+ <listitem>
+ <para>
+only a known set of users may access the fonts. The
+server can use the authorization data (such as a Kerberos ticket
+or a Secure RPC credential) to verify the identity of the user
+and then look in a list of allowed users.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Simultaneous Use</term>
+ <listitem>
+ <para>
+only a certain number of clients may use a given font at any one time.
+Additional clients would receive <link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link>
+errors if they attempt to open the font. This is only effective if
+the initial clients keep the font open for the entire time that it
+is being used (even if all of the data has been transmitted and is
+being cached).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Postage Meter</term>
+ <listitem>
+ <para>
+a particular font may only be accessed a limited
+number of times before its license must be renewed. Each time
+the font is opened, the server decrements a counter. When the
+counter reaches zero, all further attempts to open the font
+return an <link linkend="Errors:AccessContext"><errorname>AccessContext</errorname></link> error.
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+</para>
+
+<para>
+It should be noted that chaining of font servers (obtaining font data from
+other font servers) may conflict with certain license policies.
+</para>
+</appendix>
+
+<appendix id="implementation_suggestions">
+<title>Implementation Suggestions</title>
+<para>
+Font server implementations will probably wish to use techniques such as the
+following to avoid limits on the number of simultaneous connections:
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+The initial connection information returned by the font
+server contains the names of other font servers that
+may be used as substitutes. A font server may refuse to
+accept a connection, indicating that the client should
+try one of the alternatives instead.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+On operating systems that support processing forking, font
+servers might choose to fork so that the child can continue
+processing the existing connections and the parent can accept
+new connections. Such implementations are encouraged to use
+shared memory so that in-memory font databases can be shared.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+On operating systems that support passing stream file descriptors
+between processes, cooperating font servers could collect
+connections in a single process when there are few connections
+and spread them among several processes as the load increases.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If a font client is unable to connect to a server (as opposed
+to having the connection terminated), it should retry for an
+implementation-dependent length of time (see Xlib's
+handling of ECONNREFUSED in XConnDis.c).
+ </para>
+ </listitem>
+</itemizedlist>
+</appendix>
+<index id="index" />
+</book>
diff --git a/specs/glossary.xml b/specs/glossary.xml
new file mode 100644
index 0000000..61233e3
--- /dev/null
+++ b/specs/glossary.xml
@@ -0,0 +1,1320 @@
+<glossary id='glossary'>
+<title>Glossary</title>
+
+
+<glossentry id="glossary:Access_control_list">
+ <glossterm>Access control list</glossterm>
+ <indexterm zone="glossary:Access_control_list" significance="preferred"><primary>Access control list</primary></indexterm>
+ <glossdef>
+ <para>
+X maintains a list of hosts from which client programs can be run.
+By default,
+only programs on the local host and hosts specified in an initial list read
+by the server can use the display.
+Clients on the local host can change this access control list.
+Some server implementations can also implement other authorization mechanisms
+in addition to or in place of this mechanism.
+The action of this mechanism can be conditional based on the authorization
+protocol name and data received by the server at connection setup.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Active_grab">
+ <glossterm>Active grab</glossterm>
+ <indexterm zone="glossary:Active_grab" significance="preferred"><primary>Active grab</primary></indexterm>
+ <glossdef>
+ <para>
+A grab is active when the pointer or keyboard is actually owned by
+the single grabbing client.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Ancestors">
+ <glossterm>Ancestors</glossterm>
+ <indexterm zone="glossary:Ancestors" significance="preferred"><primary>Ancestors</primary></indexterm>
+ <glossdef>
+ <para>
+If W is an <glossterm linkend="glossary:Inferiors">inferior</glossterm> of A, then A is an ancestor of W.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Atom">
+ <glossterm>Atom</glossterm>
+ <indexterm zone="glossary:Atom" significance="preferred"><primary>Atom</primary></indexterm>
+ <glossdef>
+ <para>
+An atom is a unique ID corresponding to a string name.
+Atoms are used to identify properties, types, and selections.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Background">
+ <glossterm>Background</glossterm>
+ <indexterm zone="glossary:Background" significance="preferred"><primary>Background</primary></indexterm>
+ <glossdef>
+ <para>
+An
+<glossterm linkend="glossary:InputOutput_window"><emphasis role='bold'>InputOutput</emphasis></glossterm>
+window can have a background, which is defined as a pixmap.
+When regions of the window have their contents lost or invalidated,
+the server will automatically tile those regions with the background.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Backing_store">
+ <glossterm>Backing store</glossterm>
+ <indexterm zone="glossary:Backing_store" significance="preferred"><primary>Backing store</primary></indexterm>
+ <glossdef>
+ <para>
+When a server maintains the contents of a window,
+the pixels saved off screen are known as a backing store.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Bit_gravity">
+ <glossterm>Bit gravity</glossterm>
+ <indexterm zone="glossary:Bit_gravity" significance="preferred"><primary>Bit</primary><secondary>gravity</secondary></indexterm>
+ <glossdef>
+ <para>
+When a window is resized,
+the contents of the window are not necessarily discarded.
+It is possible to request that the server relocate the previous contents
+to some region of the window (though no guarantees are made).
+This attraction of window contents for some location of
+a window is known as bit gravity.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Bit_plane">
+ <glossterm>Bit plane</glossterm>
+ <indexterm zone="glossary:Bit_plane" significance="preferred"><primary>Bit</primary><secondary>plane</secondary></indexterm>
+ <glossdef>
+ <para>
+When a pixmap or window is thought of as a stack of bitmaps,
+each bitmap is called a bit plane or plane.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Bitmap">
+ <glossterm>Bitmap</glossterm>
+ <indexterm zone="glossary:Bitmap" significance="preferred"><primary>Bitmap</primary></indexterm>
+ <glossdef>
+ <para>
+A bitmap is a <glossterm linkend="glossary:Pixmap">pixmap</glossterm> of depth one.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Border">
+ <glossterm>Border</glossterm>
+ <indexterm zone="glossary:Border" significance="preferred"><primary>Border</primary></indexterm>
+ <glossdef>
+ <para>
+An
+<glossterm linkend="glossary:InputOutput_window"><emphasis role='bold'>InputOutput</emphasis></glossterm>
+window can have a border of equal thickness on all four sides of the window.
+A pixmap defines the contents of the border,
+and the server automatically maintains the contents of the border.
+Exposure events are never generated for border regions.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Button_grabbing">
+ <glossterm>Button grabbing</glossterm>
+ <indexterm zone="glossary:Button_grabbing" significance="preferred"><primary>Button</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
+ <para>
+Buttons on the pointer may be passively grabbed by a client.
+When the button is pressed,
+the pointer is then actively grabbed by the client.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Byte_order">
+ <glossterm>Byte order</glossterm>
+ <indexterm zone="glossary:Byte_order" significance="preferred"><primary>Byte order</primary></indexterm>
+ <glossdef>
+ <para>
+For image (pixmap/bitmap) data,
+the server defines the byte order,
+and clients with different native byte ordering must swap bytes as necessary.
+For all other parts of the protocol,
+the client defines the byte order,
+and the server swaps bytes as necessary.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Children">
+ <glossterm>Children</glossterm>
+ <indexterm zone="glossary:Children" significance="preferred"><primary>Children</primary></indexterm>
+ <indexterm zone="glossary:Children" significance="preferred"><primary>Window</primary><secondary>children</secondary></indexterm>
+ <glossdef>
+ <para>
+The children of a window are its first-level subwindows.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Client">
+ <glossterm>Client</glossterm>
+ <indexterm zone="glossary:Client" significance="preferred"><primary>Client</primary></indexterm>
+ <glossdef>
+ <para>
+An application program connects to the window system server by some
+interprocess communication path, such as a TCP connection or a
+shared memory buffer.
+This program is referred to as a client of the window system server.
+More precisely,
+the client is the communication path itself;
+a program with multiple paths open to the server is viewed as
+multiple clients by the protocol.
+Resource lifetimes are controlled by connection lifetimes,
+not by program lifetimes.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Clipping_region">
+ <glossterm>Clipping region</glossterm>
+ <indexterm zone="glossary:Clipping_region" significance="preferred"><primary>Clipping region</primary></indexterm>
+ <glossdef>
+ <para>
+In a <glossterm linkend="glossary:Graphics_context">graphics context</glossterm>,
+a bitmap or list of rectangles can be specified
+to restrict output to a particular region of the window.
+The image defined by the bitmap or rectangles is called a clipping region.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Colormap">
+ <glossterm>Colormap</glossterm>
+ <indexterm zone="glossary:Colormap" significance="preferred"><primary>Colormap</primary></indexterm>
+ <glossdef>
+ <para>
+A colormap consists of a set of entries defining color values.
+The colormap associated with a window is used to display the contents of
+the window; each pixel value indexes the colormap to produce RGB values
+that drive the guns of a monitor.
+Depending on hardware limitations,
+one or more colormaps may be installed at one time,
+so that windows associated with those maps display with correct colors.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Connection">
+ <glossterm>Connection</glossterm>
+ <indexterm zone="glossary:Connection" significance="preferred"><primary>Connection</primary></indexterm>
+ <glossdef>
+ <para>
+The interprocess communication path between the server and client
+program is known as a connection.
+A client program typically (but not necessarily) has one
+connection to the server over which requests and events are sent.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Containment">
+ <glossterm>Containment</glossterm>
+ <indexterm zone="glossary:Containment" significance="preferred"><primary>Containment</primary></indexterm>
+ <glossdef>
+ <para>
+A window <quote>contains</quote> the pointer if the window is viewable and the
+<glossterm linkend="glossary:Hotspot">hotspot</glossterm> of the cursor is
+within a visible region of the window or a
+visible region of one of its inferiors.
+The border of the window is included as part of the window for containment.
+The pointer is <quote>in</quote> a window if the window contains the pointer
+but no inferior contains the pointer.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Coordinate_system">
+ <glossterm>Coordinate system</glossterm>
+ <indexterm zone="glossary:Coordinate_system" significance="preferred"><primary>Coordinate system</primary></indexterm>
+ <glossdef>
+ <para>
+The coordinate system has the X axis horizontal and the Y axis vertical,
+with the origin [0, 0] at the upper left.
+Coordinates are integral,
+in terms of pixels,
+and coincide with pixel centers.
+Each window and pixmap has its own coordinate system.
+For a window,
+the origin is inside the border at the inside upper left.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Cursor">
+ <glossterm>Cursor</glossterm>
+ <indexterm zone="glossary:Cursor" significance="preferred"><primary>Cursor</primary></indexterm>
+ <glossdef>
+ <para>
+A cursor is the visible shape of the pointer on a screen.
+It consists of a <glossterm linkend="glossary:Hotspot">hotspot</glossterm>,
+a source bitmap, a shape bitmap, and a pair of colors.
+The cursor defined for a window controls the visible appearance
+when the pointer is in that window.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Depth">
+ <glossterm>Depth</glossterm>
+ <indexterm zone="glossary:Depth" significance="preferred"><primary>Depth</primary></indexterm>
+ <glossdef>
+ <para>
+The depth of a window or pixmap is the number of bits per pixel that it has.
+The depth of a graphics context is the depth of the drawables it can be
+used in conjunction with for graphics output.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Device">
+ <glossterm>Device</glossterm>
+ <indexterm zone="glossary:Device" significance="preferred"><primary>Device</primary></indexterm>
+ <glossdef>
+ <para>
+Keyboards, mice, tablets, track-balls, button boxes, and so on are all
+collectively known as input devices.
+The core protocol only deals with two devices,
+<quote>the keyboard</quote> and <quote>the pointer.</quote>
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:DirectColor">
+ <glossterm>DirectColor</glossterm>
+ <indexterm zone="glossary:DirectColor" significance="preferred"><primary>DirectColor</primary></indexterm>
+ <glossdef>
+ <para>
+<emphasis role='bold'>DirectColor</emphasis>
+is a class of colormap in which a pixel value is decomposed into three
+separate subfields for indexing.
+The first subfield indexes an array to produce red intensity values.
+The second subfield indexes a second array to produce blue intensity values.
+The third subfield indexes a third array to produce green intensity values.
+The RGB values can be changed dynamically.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Display">
+ <glossterm>Display</glossterm>
+ <indexterm zone="glossary:Display" significance="preferred"><primary>Display</primary></indexterm>
+ <glossdef>
+ <para>
+A server, together with its screens and input devices, is called a display.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Drawable">
+ <glossterm>Drawable</glossterm>
+ <indexterm zone="glossary:Drawable" significance="preferred"><primary>Drawable</primary></indexterm>
+ <glossdef>
+ <para>
+Both windows and pixmaps can be used as sources and destinations in
+graphics operations.
+These windows and pixmaps are collectively known as drawables.
+However, an
+<glossterm linkend="glossary:InputOnly_window"><emphasis role='bold'>InputOnly</emphasis></glossterm>
+window cannot be used as a source or destination in a graphics operation.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Event">
+ <glossterm>Event</glossterm>
+ <indexterm zone="glossary:Event" significance="preferred"><primary>Event</primary></indexterm>
+ <glossdef>
+ <para>
+Clients are informed of information asynchronously by means of events.
+These events can be generated either asynchronously from devices
+or as side effects of client requests.
+Events are grouped into types.
+The server never sends events to a client unless the
+client has specificially asked to be informed of that type of event.
+However, other clients can force events to be sent to other clients.
+Events are typically reported relative to a window.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Event_mask">
+ <glossterm>Event mask</glossterm>
+ <indexterm zone="glossary:Event_mask" significance="preferred"><primary>Event</primary><secondary>mask</secondary></indexterm>
+ <glossdef>
+ <para>
+Events are requested relative to a window.
+The set of event types that a client requests relative to a window
+is described by using an event mask.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Event_synchronization">
+ <glossterm>Event synchronization</glossterm>
+ <indexterm zone="glossary:Event_synchronization" significance="preferred"><primary>Event</primary><secondary>synchronization</secondary></indexterm>
+ <glossdef>
+ <para>
+There are certain race conditions possible when demultiplexing device
+events to clients (in particular deciding where pointer and keyboard
+events should be sent when in the middle of window management
+operations).
+The event synchronization mechanism allows synchronous processing
+of device events.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Event_propagation">
+ <glossterm>Event propagation</glossterm>
+ <indexterm zone="glossary:Event_propagation" significance="preferred"><primary>Event</primary><secondary>propagation</secondary></indexterm>
+ <glossdef>
+ <para>
+Device-related events propagate from the source window to ancestor
+windows until some client has expressed interest in handling that type
+of event or until the event is discarded explicitly.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Event_source">
+ <glossterm>Event source</glossterm>
+ <indexterm zone="glossary:Event_source" significance="preferred"><primary>Event</primary><secondary>source</secondary></indexterm>
+ <glossdef>
+ <para>
+The window the pointer is in is the source of a device-related
+event.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Exposure_event">
+ <glossterm>Exposure event</glossterm>
+ <indexterm zone="glossary:Exposure_event" significance="preferred"><primary>Event</primary><secondary>Exposure</secondary></indexterm>
+ <glossdef>
+ <para>
+Servers do not guarantee to preserve the contents of windows when
+windows are obscured or reconfigured.
+Exposure events are sent to clients to inform them when contents
+of regions of windows have been lost.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Extension">
+ <glossterm>Extension</glossterm>
+ <indexterm zone="glossary:Extension" significance="preferred"><primary>Extension</primary></indexterm>
+ <glossdef>
+ <para>
+Named extensions to the core protocol can be defined to extend the
+system.
+Extension to output requests, resources, and event types are
+all possible and are expected.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Focus_window">
+ <glossterm>Focus window</glossterm>
+ <indexterm zone="glossary:Focus_window" significance="preferred"><primary>Focus window</primary></indexterm>
+ <glossdef>
+ <para>
+The focus window is another term for the <glossterm linkend="glossary:Input_focus">input focus</glossterm>.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Font">
+ <glossterm>Font</glossterm>
+ <indexterm zone="glossary:Font" significance="preferred"><primary>Font</primary></indexterm>
+ <glossdef>
+ <para>
+A font is a matrix of glyphs (typically characters).
+The protocol does no translation or interpretation of character sets.
+The client simply indicates values used to index the glyph array.
+A font contains additional metric information to determine interglyph
+and interline spacing.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:GC">
+ <glossterm>GC, GContext</glossterm>
+ <indexterm zone="glossary:GC" significance="preferred"><primary>GC</primary><seealso>Graphics context</seealso></indexterm>
+ <indexterm zone="glossary:GC" significance="preferred"><primary>GContext</primary><seealso>Graphics context</seealso></indexterm>
+ <glossdef>
+ <para>
+GC and gcontext are abbreviations for <glossterm linkend="glossary:Graphics_context">graphics context</glossterm>.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Glyph">
+ <glossterm>Glyph</glossterm>
+ <indexterm zone="glossary:Glyph" significance="preferred"><primary>Glyph</primary></indexterm>
+ <glossdef>
+ <para>
+A glyph is an image, typically of a character, in a font.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Grab">
+ <glossterm>Grab</glossterm>
+ <indexterm zone="glossary:Grab" significance="preferred"><primary>Grab</primary><seealso>Active grab</seealso><seealso>Passive grab</seealso></indexterm>
+ <glossdef>
+ <para>
+Keyboard keys, the keyboard, pointer buttons, the pointer, and the
+server can be grabbed for exclusive use by a client.
+In general,
+these facilities are not intended to be used by normal applications
+but are intended for various input and window managers to implement
+various styles of user interfaces.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Graphics_context">
+ <glossterm>Graphics context</glossterm>
+ <indexterm zone="glossary:Graphics_context" significance="preferred"><primary>Graphics context</primary></indexterm>
+ <glossdef>
+ <para>
+Various information for graphics output is stored in a graphics context
+such as foreground pixel, background pixel, line width,
+<glossterm linkend="glossary:Clipping_region">clipping region</glossterm>,
+and so on.
+A graphics context can only be used with drawables that have the same root
+and the same depth as the graphics context.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Gravity">
+ <glossterm>Gravity</glossterm>
+ <indexterm zone="glossary:Gravity" significance="preferred"><primary>Gravity</primary></indexterm>
+ <glossdef>
+ <para>
+See <glossterm linkend="glossary:Bit_gravity">bit gravity</glossterm>
+and <glossterm linkend="glossary:Window_gravity">window gravity</glossterm>.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:GrayScale">
+ <glossterm>GrayScale</glossterm>
+ <indexterm zone="glossary:GrayScale" significance="preferred"><primary>GrayScale</primary></indexterm>
+ <glossdef>
+ <para>
+<emphasis role='bold'>GrayScale</emphasis>
+can be viewed as a degenerate case of
+<glossterm linkend="glossary:PseudoColor"><emphasis role='bold'>PseudoColor</emphasis></glossterm>,
+in which the red, green, and blue values in any given colormap entry are equal,
+thus producing shades of gray.
+The gray values can be changed dynamically.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Hotspot">
+ <glossterm>Hotspot</glossterm>
+ <indexterm zone="glossary:Hotspot" significance="preferred"><primary>Hotspot</primary></indexterm>
+ <glossdef>
+ <para>
+A cursor has an associated hotspot that defines the point in the
+cursor corresponding to the coordinates reported for the pointer.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Identifier">
+ <glossterm>Identifier</glossterm>
+ <indexterm zone="glossary:Identifier" significance="preferred"><primary>Identifier</primary></indexterm>
+ <glossdef>
+ <para>
+An identifier is a unique value associated with a resource that clients use
+to name that resource.
+The identifier can be used over any connection.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Inferiors">
+ <glossterm>Inferiors</glossterm>
+ <indexterm zone="glossary:Inferiors" significance="preferred"><primary>Inferiors</primary></indexterm>
+ <glossdef>
+ <para>
+The inferiors of a window are all of the subwindows nested below it:
+the children, the children's children, and so on.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Input_focus">
+ <glossterm>Input focus</glossterm>
+ <indexterm zone="glossary:Input_focus" significance="preferred"><primary>Input focus</primary></indexterm>
+ <glossdef>
+ <para>
+The input focus is normally a window defining the scope for
+processing of keyboard input.
+If a generated keyboard event would normally be reported to this window
+or one of its inferiors,
+the event is reported normally.
+Otherwise, the event is reported with respect to
+the focus window.
+The input focus also can be set such that all
+keyboard events are discarded and such that the focus
+window is dynamically taken to be the root window of whatever screen
+the pointer is on at each keyboard event.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Input_manager">
+ <glossterm>Input manager</glossterm>
+ <indexterm zone="glossary:Input_manager" significance="preferred"><primary>Input manager</primary></indexterm>
+ <glossdef>
+ <para>
+Control over keyboard input is typically provided by an input manager client.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:InputOnly_window">
+ <glossterm>InputOnly window</glossterm>
+ <indexterm zone="glossary:InputOnly_window" significance="preferred"><primary>Window</primary><secondary>InputOnly</secondary></indexterm>
+ <glossdef>
+ <para>
+An
+<emphasis role='bold'>InputOnly</emphasis>
+window is a window that cannot be used for graphics requests.
+<emphasis role='bold'>InputOnly</emphasis>
+windows are invisible and can be used to control such things
+as cursors, input event generation, and grabbing.
+<emphasis role='bold'>InputOnly</emphasis>
+windows cannot have
+<emphasis role='bold'>InputOutput</emphasis>
+windows as inferiors.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:InputOutput_window">
+ <glossterm>InputOutput window</glossterm>
+ <indexterm zone="glossary:InputOutput_window" significance="preferred"><primary>Window</primary><secondary>InputOutput</secondary></indexterm>
+ <glossdef>
+ <para>
+An
+<emphasis role='bold'>InputOutput</emphasis>
+window is the normal kind of opaque window, used for both input and output.
+<emphasis role='bold'>InputOutput</emphasis>
+windows can have both
+<emphasis role='bold'>InputOutput</emphasis>
+and
+<emphasis role='bold'>InputOnly</emphasis>
+windows as inferiors.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Key_grabbing">
+ <glossterm>Key grabbing</glossterm>
+ <indexterm zone="glossary:Key_grabbing" significance="preferred"><primary>Key</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
+ <para>
+Keys on the keyboard can be passively grabbed by a client.
+When the key is pressed,
+the keyboard is then actively grabbed by the client.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Keyboard_grabbing">
+ <glossterm>Keyboard grabbing</glossterm>
+ <indexterm zone="glossary:Keyboard_grabbing" significance="preferred"><primary>Keyboard</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
+ <para>
+A client can actively grab control of the keyboard, and key events
+will be sent to that client rather than the client the events would
+normally have been sent to.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Keysym">
+ <glossterm>Keysym</glossterm>
+ <indexterm zone="glossary:Keysym" significance="preferred"><primary>Keysym</primary></indexterm>
+ <glossdef>
+ <para>
+An encoding of a symbol on a keycap on a keyboard.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Mapped">
+ <glossterm>Mapped</glossterm>
+ <indexterm zone="glossary:Mapped" significance="preferred"><primary>Mapped window</primary></indexterm>
+ <glossdef>
+ <para>
+A window is said to be mapped if a map call has been performed on it.
+Unmapped windows and their inferiors are never viewable or visible.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Modifier_keys">
+ <glossterm>Modifier keys</glossterm>
+ <indexterm zone="glossary:Modifier_keys" significance="preferred"><primary>Modifier keys</primary></indexterm>
+ <indexterm zone="glossary:Modifier_keys"><primary>Key</primary><secondary>modifier</secondary><see>Modifier keys</see></indexterm>
+ <glossdef>
+ <para>
+Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock,
+ShiftLock, and similar keys are called modifier keys.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Monochrome">
+ <glossterm>Monochrome</glossterm>
+ <indexterm zone="glossary:Monochrome" significance="preferred"><primary>Monochrome</primary></indexterm>
+ <glossdef>
+ <para>
+Monochrome is a special case of
+<glossterm linkend="glossary:StaticGray"><emphasis role='bold'>StaticGray</emphasis></glossterm>
+in which there are only two colormap entries.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Obscure">
+ <glossterm>Obscure</glossterm>
+ <indexterm zone="glossary:Obscure" significance="preferred"><primary>Obscure</primary></indexterm>
+ <glossdef>
+ <para>
+A window is obscured if some other window obscures it.
+Window A obscures window B if both are viewable
+<glossterm linkend="glossary:InputOutput_window"><emphasis role='bold'>InputOutput</emphasis></glossterm>
+windows, A is higher in the global stacking order,
+and the rectangle defined by the outside edges of A intersects
+the rectangle defined by the outside edges of B.
+Note the distinction between obscure and occludes.
+Also note that window borders are included in the calculation
+and that a window can be obscured and yet still have visible regions.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Occlude">
+ <glossterm>Occlude</glossterm>
+ <indexterm zone="glossary:Occlude" significance="preferred"><primary>Occlude</primary></indexterm>
+ <glossdef>
+ <para>
+A window is occluded if some other window occludes it.
+Window A occludes window B if both are mapped, A is higher in the global
+stacking order, and the rectangle defined by the outside edges of A
+intersects the rectangle defined by the outside edges of B.
+Note the distinction between occludes and obscures.
+Also note that window borders are included in the calculation.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Padding">
+ <glossterm>Padding</glossterm>
+ <indexterm zone="glossary:Padding" significance="preferred"><primary>Padding</primary></indexterm>
+ <glossdef>
+ <para>
+Some padding bytes are inserted in the data stream to maintain
+alignment of the protocol requests on natural boundaries.
+This increases ease of portability to some machine architectures.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Parent_window">
+ <glossterm>Parent window</glossterm>
+ <indexterm zone="glossary:Parent_window" significance="preferred"><primary>Window</primary><secondary>parent</secondary></indexterm>
+ <glossdef>
+ <para>
+If C is a <glossterm linkend="glossary:Children">child</glossterm> of P,
+then P is the parent of C.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Passive_grab">
+ <glossterm>Passive grab</glossterm>
+ <indexterm zone="glossary:Passive_grab" significance="preferred"><primary>Passive grab</primary></indexterm>
+ <glossdef>
+ <para>
+Grabbing a key or button is a passive grab.
+The grab activates when the key or button is actually pressed.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Pixel_value">
+ <glossterm>Pixel value</glossterm>
+ <indexterm zone="glossary:Pixel_value" significance="preferred"><primary>Pixel value</primary></indexterm>
+ <glossdef>
+ <para>
+A pixel is an N-bit value, where N is the number of bit planes used
+in a particular window or pixmap (that is,
+N is the depth of the window or pixmap).
+For a window,
+a pixel value indexes a colormap to derive an actual color to be displayed.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Pixmap">
+ <glossterm>Pixmap</glossterm>
+ <indexterm zone="glossary:Pixmap" significance="preferred"><primary>Pixmap</primary></indexterm>
+ <glossdef>
+ <para>
+A pixmap is a three-dimensional array of bits.
+A pixmap is normally thought of as a two-dimensional array of pixels,
+where each pixel can be a value from 0 to (2^N)-1
+and where N is the depth (z axis) of the pixmap.
+A pixmap can also be thought of as a stack of N bitmaps.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Plane">
+ <glossterm>Plane</glossterm>
+ <indexterm zone="glossary:Plane" significance="preferred"><primary>Plane</primary></indexterm>
+ <glossdef>
+ <para>
+When a pixmap or window is thought of as a stack of bitmaps,
+each bitmap is called a plane or bit plane.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Plane_mask">
+ <glossterm>Plane mask</glossterm>
+ <indexterm zone="glossary:Plane_mask" significance="preferred"><primary>Plane</primary><secondary>mask</secondary></indexterm>
+ <glossdef>
+ <para>
+Graphics operations can be restricted to only affect a subset of bit
+planes of a destination.
+A plane mask is a bit mask describing which planes are to be modified.
+The plane mask is stored in a graphics context.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Pointer">
+ <glossterm>Pointer</glossterm>
+ <indexterm zone="glossary:Pointer" significance="preferred"><primary>Pointer</primary></indexterm>
+ <glossdef>
+ <para>
+The pointer is the pointing device attached to the cursor
+and tracked on the screens.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Pointer_grabbing">
+ <glossterm>Pointer grabbing</glossterm>
+ <indexterm zone="glossary:Pointer_grabbing" significance="preferred"><primary>Pointer</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
+ <para>
+A client can actively grab control of the pointer.
+Then button and motion events will be sent to that client
+rather than the client the events would normally have been sent to.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Pointing_device">
+ <glossterm>Pointing device</glossterm>
+ <indexterm zone="glossary:Pointing_device" significance="preferred"><primary>Pointing device</primary></indexterm>
+ <glossdef>
+ <para>
+A pointing device is typically a mouse, tablet, or some other
+device with effective dimensional motion.
+There is only one visible cursor defined by the core protocol,
+and it tracks whatever pointing device is attached as the pointer.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Property">
+ <glossterm>Property</glossterm>
+ <indexterm zone="glossary:Property" significance="preferred"><primary>Property</primary></indexterm>
+ <glossdef>
+ <para>
+Windows may have associated properties,
+which consist of a name, a type, a data format, and some data.
+The protocol places no interpretation on properties.
+They are intended as a general-purpose naming mechanism for clients.
+For example, clients might use properties to share information such as resize
+hints, program names, and icon formats with a window manager.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Property_list">
+ <glossterm>Property list</glossterm>
+ <indexterm zone="glossary:Property_list" significance="preferred"><primary>Property list</primary></indexterm>
+ <glossdef>
+ <para>
+The property list of a window is the list of properties that have
+been defined for the window.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:PseudoColor">
+ <glossterm>PseudoColor</glossterm>
+ <indexterm zone="glossary:PseudoColor" significance="preferred"><primary>PseudoColor</primary></indexterm>
+ <glossdef>
+ <para>
+<emphasis role='bold'>PseudoColor</emphasis>
+is a class of colormap in which a pixel value indexes the colormap to
+produce independent red, green, and blue values;
+that is, the colormap is viewed as an array of triples (RGB values).
+The RGB values can be changed dynamically.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Redirecting_control">
+ <glossterm>Redirecting control</glossterm>
+ <indexterm zone="glossary:Redirecting_control" significance="preferred"><primary>Redirecting control</primary></indexterm>
+ <glossdef>
+ <para>
+Window managers (or client programs) may want to enforce window layout
+policy in various ways.
+When a client attempts to change the size or position of a window,
+the operation may be redirected to a specified client
+rather than the operation actually being performed.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Reply">
+ <glossterm>Reply</glossterm>
+ <indexterm zone="glossary:Reply" significance="preferred"><primary>Reply</primary></indexterm>
+ <glossdef>
+ <para>
+Information requested by a client program is sent back to the client
+with a reply.
+Both events and replies are multiplexed on the same connection.
+Most requests do not generate replies,
+although some requests generate multiple replies.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Request">
+ <glossterm>Request</glossterm>
+ <indexterm zone="glossary:Request" significance="preferred"><primary>Request</primary></indexterm>
+ <glossdef>
+ <para>
+A command to the server is called a request.
+It is a single block of data sent over a connection.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Resource">
+ <glossterm>Resource</glossterm>
+ <indexterm zone="glossary:Resource" significance="preferred"><primary>Resource</primary></indexterm>
+ <glossdef>
+ <para>
+Windows, pixmaps, cursors, fonts, graphics contexts, and colormaps are
+known as resources.
+They all have unique identifiers associated with them for naming purposes.
+The lifetime of a resource usually is bounded by the lifetime of the connection
+over which the resource was created.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:RGB_values">
+ <glossterm>RGB values</glossterm>
+ <indexterm zone="glossary:RGB_values" significance="preferred"><primary>RGB values</primary></indexterm>
+ <glossdef>
+ <para>
+Red, green, and blue (RGB) intensity values are used to define color.
+These values are always represented as 16-bit unsigned numbers,
+with 0 being the minimum intensity and 65535 being the maximum intensity.
+The server scales the values to match the display hardware.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Root">
+ <glossterm>Root</glossterm>
+ <indexterm zone="glossary:Root" significance="preferred"><primary>Root</primary></indexterm>
+ <glossdef>
+ <para>
+The root of a pixmap, colormap, or graphics context is the same as the root of
+whatever drawable was used when the pixmap, colormap, or graphics context was
+created.
+The root of a window is the root window under which the window was created.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Root_window">
+ <glossterm>Root window</glossterm>
+ <indexterm zone="glossary:Root_window" significance="preferred"><primary>Window</primary><secondary>root</secondary></indexterm>
+ <glossdef>
+ <para>
+Each screen has a root window covering it.
+It cannot be reconfigured or unmapped,
+but it otherwise acts as a full-fledged window.
+A root window has no parent.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Save_set">
+ <glossterm>Save set</glossterm>
+ <indexterm zone="glossary:Save_set" significance="preferred"><primary>Save set</primary></indexterm>
+ <glossdef>
+ <para>
+The save set of a client is a list of other clients' windows that,
+if they are inferiors of one of the client's windows at connection close,
+should not be destroyed and that should be remapped if currently unmapped.
+Save sets are typically used by window managers to avoid
+lost windows if the manager terminates abnormally.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Scanline">
+ <glossterm>Scanline</glossterm>
+ <indexterm zone="glossary:Scanline" significance="preferred"><primary>Scanline</primary></indexterm>
+ <glossdef>
+ <para>
+A scanline is a list of pixel or bit values viewed as a horizontal
+row (all values having the same y coordinate) of an image, with the
+values ordered by increasing x coordinate.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Scanline_order">
+ <glossterm>Scanline order</glossterm>
+ <indexterm zone="glossary:Scanline_order" significance="preferred"><primary>Scanline order</primary></indexterm>
+ <glossdef>
+ <para>
+An image represented in scanline order contains scanlines ordered by
+increasing y coordinate.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Screen">
+ <glossterm>Screen</glossterm>
+ <indexterm zone="glossary:Screen" significance="preferred"><primary>Screen</primary></indexterm>
+ <glossdef>
+ <para>
+A server can provide several independent screens,
+which typically have physically independent monitors.
+This would be the expected configuration when there is only a single keyboard
+and pointer shared among the screens.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Selection">
+ <glossterm>Selection</glossterm>
+ <indexterm zone="glossary:Selection" significance="preferred"><primary>Selection</primary></indexterm>
+ <glossdef>
+ <para>
+A selection can be thought of as an indirect property with dynamic
+type; that is, rather than having the property stored in the server,
+it is maintained by some client (the <quote>owner</quote>).
+A selection is global in nature and is thought of as belonging to the user
+(although maintained by clients), rather than as being private to a particular
+window subhierarchy or a particular set of clients.
+When a client asks for the contents of a selection,
+it specifies a selection <quote>target type</quote>.
+This target type can be used to control the transmitted representation of the
+contents.
+For example,
+if the selection is <quote>the last thing the user clicked on</quote>
+and that is currently an image, then the target type might specify
+whether the contents of the image should be sent in XY format or Z format.
+The target type can also be used to control the class of contents transmitted;
+for example, asking for the <quote>looks</quote> (fonts, line
+spacing, indentation, and so on) of a paragraph selection rather than the
+text of the paragraph.
+The target type can also be used for other purposes.
+The protocol does not constrain the semantics.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Server">
+ <glossterm>Server</glossterm>
+ <indexterm zone="glossary:Server" significance="preferred"><primary>Server</primary></indexterm>
+ <glossdef>
+ <para>
+The server provides the basic windowing mechanism.
+It handles connections from clients,
+multiplexes graphics requests onto the screens,
+and demultiplexes input back to the appropriate clients.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Server_grabbing">
+ <glossterm>Server grabbing</glossterm>
+ <indexterm zone="glossary:Server_grabbing" significance="preferred"><primary>Server</primary><secondary>grabbing</secondary></indexterm>
+ <glossdef>
+ <para>
+The server can be grabbed by a single client for exclusive use.
+This prevents processing of any requests from other client connections until
+the grab is completed.
+This is typically only a transient state for
+such things as rubber-banding, pop-up menus, or to execute requests
+indivisibly.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Sibling">
+ <glossterm>Sibling</glossterm>
+ <indexterm zone="glossary:Sibling" significance="preferred"><primary>Sibling</primary></indexterm>
+ <glossdef>
+ <para>
+Children of the same parent window are known as sibling windows.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Stacking_order">
+ <glossterm>Stacking order</glossterm>
+ <indexterm zone="glossary:Stacking_order" significance="preferred"><primary>Stacking order</primary></indexterm>
+ <glossdef>
+ <para>
+Sibling windows may stack on top of each other.
+Windows above other windows both obscure and occlude those lower windows.
+This is similar to paper on a desk.
+The relationship between sibling windows is known as the stacking order.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:StaticColor">
+ <glossterm>StaticColor</glossterm>
+ <indexterm zone="glossary:StaticColor" significance="preferred"><primary>StaticColor</primary></indexterm>
+ <glossdef>
+ <para>
+<emphasis role='bold'>StaticColor</emphasis>
+can be viewed as a degenerate case of
+<glossterm linkend="glossary:PseudoColor"><emphasis role='bold'>PseudoColor</emphasis></glossterm>
+in which the RGB values are predefined and read-only.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:StaticGray">
+ <glossterm>StaticGray</glossterm>
+ <indexterm zone="glossary:StaticGray" significance="preferred"><primary>StaticGray</primary></indexterm>
+ <glossdef>
+ <para>
+<emphasis role='bold'>StaticGray</emphasis>
+can be viewed as a degenerate case of
+<glossterm linkend="glossary:GrayScale"><emphasis role='bold'>GrayScale</emphasis></glossterm>
+in which the gray values are predefined and read-only.
+The values are typically linear or near-linear increasing ramps.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Stipple">
+ <glossterm>Stipple</glossterm>
+ <indexterm zone="glossary:Stipple" significance="preferred"><primary>Stipple</primary></indexterm>
+ <glossdef>
+ <para>
+A stipple pattern is a bitmap that is used to tile a region that will serve
+as an additional clip mask for a fill operation with the foreground
+color.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:String_Equivalence">
+ <glossterm>String Equivalence</glossterm>
+ <indexterm zone="glossary:String_Equivalence" significance="preferred"><primary>String Equivalence</primary></indexterm>
+ <glossdef>
+ <para>
+Two ISO Latin-1 STRING8 values are considered equal if they are the same
+length and if corresponding bytes are either equal or are equivalent as
+follows: decimal values 65 to 90 inclusive (characters <quote>A</quote> to <quote>Z</quote>) are
+pairwise equivalent to decimal values 97 to 122 inclusive
+(characters <quote>a</quote> to <quote>z</quote>), decimal values 192 to 214 inclusive
+(characters <quote>A grave</quote> to <quote>O diaeresis</quote>) are pairwise equivalent to decimal
+values 224 to 246 inclusive (characters <quote>a grave</quote> to <quote>o diaeresis</quote>),
+and decimal values 216 to 222 inclusive (characters <quote>O oblique</quote> to <quote>THORN</quote>)
+are pairwise equivalent to decimal values 246 to 254 inclusive
+(characters <quote>o oblique</quote> to <quote>thorn</quote>).
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Tile">
+ <glossterm>Tile</glossterm>
+ <indexterm zone="glossary:Tile" significance="preferred"><primary>Tile</primary></indexterm>
+ <glossdef>
+ <para>
+A pixmap can be replicated in two dimensions to tile a region.
+The pixmap itself is also known as a tile.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Timestamp">
+ <glossterm>Timestamp</glossterm>
+ <indexterm zone="glossary:Timestamp" significance="preferred"><primary>Timestamp</primary></indexterm>
+ <indexterm zone="glossary:Timestamp" significance="preferred"><primary>CurrentTime</primary></indexterm>
+ <glossdef>
+ <para>
+A timestamp is a time value, expressed in milliseconds.
+It typically is the time since the last
+server reset.
+Timestamp values wrap around (after about 49.7 days).
+The server, given its current time is represented by timestamp T,
+always interprets timestamps from clients by treating half of the
+timestamp space as being earlier in time than T and half of the
+timestamp space as being later in time than T.
+One timestamp value (named
+<emphasis role='bold'>CurrentTime</emphasis>)
+is never generated by the server.
+This value is reserved for use in requests to represent the current
+server time.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:TrueColor">
+ <glossterm>TrueColor</glossterm>
+ <indexterm zone="glossary:TrueColor" significance="preferred"><primary>TrueColor</primary></indexterm>
+ <glossdef>
+ <para>
+<emphasis role='bold'>TrueColor</emphasis>
+can be viewed as a degenerate case of
+<glossterm linkend="glossary:DirectColor"><emphasis role='bold'>DirectColor</emphasis></glossterm>
+in which the subfields in the pixel value directly encode
+the corresponding RGB values; that is, the colormap has predefined
+read-only RGB values.
+The values are typically linear or near-linear increasing ramps.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Type">
+ <glossterm>Type</glossterm>
+ <indexterm zone="glossary:Type" significance="preferred"><primary>Type</primary></indexterm>
+ <glossdef>
+ <para>
+A type is an arbitrary atom used to identify the interpretation of
+property data.
+Types are completely uninterpreted by the server
+and are solely for the benefit of clients.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Viewable">
+ <glossterm>Viewable</glossterm>
+ <indexterm zone="glossary:Viewable" significance="preferred"><primary>Viewable</primary></indexterm>
+ <glossdef>
+ <para>
+A window is viewable if it and all of its ancestors are mapped.
+This does not imply that any portion of the window is actually visible.
+Graphics requests can be performed on a window when it is not viewable,
+but output will not be retained unless the server is maintaining
+backing store.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Visible">
+ <glossterm>Visible</glossterm>
+ <indexterm zone="glossary:Visible" significance="preferred"><primary>Visible</primary></indexterm>
+ <glossdef>
+ <para>
+A region of a window is visible if someone looking at the screen can
+actually see it;
+that is, the window is viewable and the region is not occluded by any
+other window.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Window_gravity">
+ <glossterm>Window gravity</glossterm>
+ <indexterm zone="glossary:Window_gravity" significance="preferred"><primary>Window</primary><secondary>gravity</secondary></indexterm>
+ <glossdef>
+ <para>
+When windows are resized,
+subwindows may be repositioned automatically relative to some position
+in the window.
+This attraction of a subwindow to some part of its parent is known
+as window gravity.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:Window_manager">
+ <glossterm>Window manager</glossterm>
+ <indexterm zone="glossary:Window_manager" significance="preferred"><primary>Window</primary><secondary>manager</secondary></indexterm>
+ <glossdef>
+ <para>
+Manipulation of windows on the screen and much of the user interface
+(policy) is typically provided by a window manager client.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:XYFormat">
+ <glossterm>XYFormat</glossterm>
+ <indexterm zone="glossary:XYFormat" significance="preferred"><primary>XYFormat</primary></indexterm>
+ <glossdef>
+ <para>
+The data for a pixmap is said to be in XY format if it is organized as
+a set of bitmaps representing individual bit planes, with the planes
+appearing from most-significant to least-significant in bit order.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+<glossentry id="glossary:ZFormat">
+ <glossterm>ZFormat</glossterm>
+ <indexterm zone="glossary:ZFormat" significance="preferred"><primary>ZFormat</primary></indexterm>
+ <glossdef>
+ <para>
+The data for a pixmap is said to be in Z format if it is organized as
+a set of pixel values in scanline order.
+<!-- .KE -->
+ </para>
+ </glossdef>
+</glossentry>
+</glossary>
diff --git a/specs/keysyms.xml b/specs/keysyms.xml
new file mode 100644
index 0000000..e2fa0d0
--- /dev/null
+++ b/specs/keysyms.xml
@@ -0,0 +1,6050 @@
+<appendix id="keysym_encoding">
+<title>KEYSYM Encoding</title>
+<indexterm zone="keysym_encoding"><primary>Types</primary><secondary>KEYSYM</secondary></indexterm>
+<indexterm zone="keysym_encoding"><primary>Keysym</primary></indexterm>
+
+<para>
+KEYSYM values are 32-bit integers that encode the symbols on the
+keycaps of a keyboard. The three most significant bits are always
+zero, which leaves a 29-bit number space. For convenience, KEYSYM
+values can be viewed as split into four bytes:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+Byte 1 is the most significant eight bits (three zero bits and
+the most-significant five bits of the 29-bit effective value)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Byte 2 is the next most-significant eight bits
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Byte 3 is the next most-significant eight bits
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Byte 4 is the least-significant eight bits
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+There are six categories of KEYSYM values.
+</para>
+
+<sect1 id='Special_KEYSYMs'>
+<title>Special KEYSYMs</title>
+<para>
+There are two special values:
+<keysym>NoSymbol</keysym>
+and
+<keysym>VoidSymbol</keysym>.
+They are used to indicate the absence of symbols (see
+<link linkend='Keyboards'>Section 5, Keyboards</link>).
+</para>
+
+<informaltable frame="topbot">
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='6' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <colspec colname='c4' colwidth='1.0*'/>
+ <colspec colname='c5' colwidth='1.0*'/>
+ <colspec colname='c6' colwidth='1.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Byte 1</entry>
+ <entry>Byte 2</entry>
+ <entry>Byte 3</entry>
+ <entry>Byte 4</entry>
+ <entry>Hex. value</entry>
+ <entry>Name</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>0</entry>
+ <entry>0</entry>
+ <entry>0</entry>
+ <entry>0</entry>
+ <entry>#x00000000</entry>
+ <entry><keysym>NoSymbol</keysym></entry>
+ </row>
+ <row>
+ <entry>0</entry>
+ <entry>255</entry>
+ <entry>255</entry>
+ <entry>255</entry>
+ <entry>#x00FFFFFF</entry>
+ <entry><keysym>VoidSymbol</keysym></entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+</sect1>
+
+<sect1 id='Latin_1_KEYSYMs'>
+<title>Latin-1 KEYSYMs</title>
+
+<para>
+The Latin-1 KEYSYMs occupy the range #x0020 to #x007E and #x00A0 to
+#00FF and represent the ISO 10646 / Unicode characters U+0020 to
+U+007E and U+00A0 to U+00FF, respectively.
+</para>
+</sect1>
+
+<sect1 id='Unicode_KEYSYMs'>
+<title>Unicode KEYSYMs</title>
+<indexterm zone="Unicode_KEYSYMs"><primary>Keysym</primary><secondary>Unicode</secondary></indexterm>
+
+<para>
+These occupy the range #x01000100 to #x0110FFFF and represent the ISO
+10646 / Unicode characters U+0100 to U+10FFFF, respectively. The
+numeric value of a Unicode KEYSYM is the Unicode position of the
+corresponding character plus #x01000000. In the interest of backwards
+compatibility, clients should be able to process both the Unicode
+KEYSYM and the Legacy KEYSYM for those characters where both exist.
+</para>
+<para>
+Dead keys, which place an accent on the next character entered, shall
+be encoded as Function KEYSYMs, and not as the Unicode KEYSYM
+corresponding to an equivalent combining character. Where a keycap
+indicates a specific function with a graphical symbol that is also
+available in Unicode (e.g., an upwards arrow for the cursor up
+function), the appropriate Function KEYSYM should be used, and not
+the Unicode KEYSYM corresponding to the depicted symbol.
+</para>
+</sect1>
+<sect1 id='Function_KEYSYMs'>
+<title>Function KEYSYMs</title>
+
+<para>
+These represent keycap symbols that do not directly represent elements
+of a coded character set. Instead, they typically identify a software
+function, mode, or operation (e.g., cursor up, caps lock, insert) that
+can be activated using a dedicated key. Function KEYSYMs have zero
+values for bytes 1 and 2. Byte 3 distinguishes between several 8-bit
+sets within which byte 4 identifies the individual function key.
+</para>
+
+<informaltable frame="topbot">
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Byte 3</entry>
+ <entry>Byte 4</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>255</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>254</entry>
+ <entry>Keyboard (XKB) Extension</entry>
+ </row>
+ <row>
+ <entry>253</entry>
+ <entry>3270</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Within a national market, keyboards tend to be comparatively standard
+with respect to the character keys, but they can differ significantly
+on the miscellaneous function keys. Some have function keys left over
+from early timesharing days, others were designed for a specific
+application, such as text processing, web browsing, or accessing
+audiovisual data. The symbols on the keycaps can differ significantly
+between manufacturers and national markets, even where they denote the
+same software function (e.g., Ctrl in the U.S. versus Strg in Germany)
+</para>
+<para>
+<!-- .LP -->
+There are two ways of thinking about how to define KEYSYMs for such a
+world:
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+The Engraving approach
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The Common approach
+ </para>
+ </listitem>
+</itemizedlist>
+<para>
+<!-- .LP -->
+The Engraving approach is to create a KEYSYM for every unique key
+engraving. This is effectively taking the union of all key engravings
+on all keyboards. For example, some keyboards label function keys
+across the top as F1 through Fn, and others label them as PF1 through
+PFn. These would be different keys under the Engraving
+approach. Likewise, Lock would differ from Shift Lock, which is
+different from the up-arrow symbol that has the effect of changing
+lowercase to uppercase. There are lots of other aliases such as Del,
+DEL, Delete, Remove, and so forth. The Engraving approach makes it
+easy to decide if a new entry should be added to the KEYSYM set: if it
+does not exactly match an existing one, then a new one is created.
+</para>
+<para>
+<!-- .LP -->
+The Common approach tries to capture all of the keys present on an
+interesting number of keyboards, folding likely aliases into the same
+KEYSYM. For example, Del, DEL, and Delete are all merged into a single
+KEYSYM. Vendors can augment the KEYSYM set (using the vendor-specific
+encoding space) to include all of their unique keys that were not
+included in the standard set. Each vendor decides which of its keys
+map into the standard KEYSYMs, which presumably can be overridden by a
+user. It is more difficult to implement this approach, because
+judgment is required about when a sufficient set of keyboards
+implements an engraving to justify making it a KEYSYM in the standard
+set and about which engravings should be merged into a single
+KEYSYM.
+</para>
+<para>
+<!-- .LP -->
+Although neither scheme is perfect or elegant, the Common approach has
+been selected because it makes it easier to write a portable
+application. Having the Delete functionality merged into a single
+KEYSYM allows an application to implement a deletion function and
+expect reasonable bindings on a wide set of workstations. Under the
+Common approach, application writers are still free to look for and
+interpret vendor-specific KEYSYMs, but because they are in the
+extended set, the application developer is more conscious that they
+are writing the application in a nonportable fashion.
+</para>
+<para>
+<!-- .LP -->
+The Keyboard set is a miscellaneous collection of commonly occurring
+keys on keyboards. Within this set, the numeric keypad symbols are
+generally duplicates of symbols found on keys on the main part of the
+keyboard, but they are distinguished here because they often have a
+distinguishable semantics associated with them.
+</para>
+
+<informaltable frame="topbot">
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='3.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <thead>
+ <row rowsep="1">
+ <entry>KEYSYM value</entry>
+ <entry>Name</entry>
+ <entry>Set</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>#xFF08</entry>
+ <entry>BACKSPACE, BACK SPACE, BACK CHAR</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF09</entry>
+ <entry>TAB</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF0A</entry>
+ <entry>LINEFEED, LF</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF0B</entry>
+ <entry>CLEAR</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF0D</entry>
+ <entry>RETURN, ENTER</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF13</entry>
+ <entry>PAUSE, HOLD</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF14</entry>
+ <entry>SCROLL LOCK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF15</entry>
+ <entry>SYS REQ, SYSTEM REQUEST</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF1B</entry>
+ <entry>ESCAPE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF20</entry>
+ <entry>MULTI-KEY CHARACTER PREFACE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF21</entry>
+ <entry>KANJI, KANJI CONVERT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF22</entry>
+ <entry>MUHENKAN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF23</entry>
+ <entry>HENKAN MODE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF24</entry>
+ <entry>ROMAJI</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF25</entry>
+ <entry>HIRAGANA</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF26</entry>
+ <entry>KATAKANA</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF27</entry>
+ <entry>HIRAGANA/KATAKANA TOGGLE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF28</entry>
+ <entry>ZENKAKU</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF29</entry>
+ <entry>HANKAKU</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF2A</entry>
+ <entry>ZENKAKU/HANKAKU TOGGLE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF2B</entry>
+ <entry>TOUROKU</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF2C</entry>
+ <entry>MASSYO</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF2D</entry>
+ <entry>KANA LOCK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF2E</entry>
+ <entry>KANA SHIFT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF2F</entry>
+ <entry>EISU SHIFT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF30</entry>
+ <entry>EISU TOGGLE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF31</entry>
+ <entry>HANGUL START/STOP (TOGGLE)</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF32</entry>
+ <entry>HANGUL START</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF33</entry>
+ <entry>HANGUL END, ENGLISH START</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF34</entry>
+ <entry>START HANGUL/HANJA CONVERSION</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF35</entry>
+ <entry>HANGUL JAMO MODE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF36</entry>
+ <entry>HANGUL ROMAJA MODE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF37</entry>
+ <entry>HANGUL CODE INPUT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF38</entry>
+ <entry>HANGUL JEONJA MODE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF39</entry>
+ <entry>HANGUL BANJA MODE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF3A</entry>
+ <entry>HANGUL PREHANJA CONVERSION</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF3B</entry>
+ <entry>HANGUL POSTHANJA CONVERSION</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF3C</entry>
+ <entry>HANGUL SINGLE CANDIDATE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF3D</entry>
+ <entry>HANGUL MULTIPLE CANDIDATE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF3E</entry>
+ <entry>HANGUL PREVIOUS CANDIDATE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF3F</entry>
+ <entry>HANGUL SPECIAL SYMBOLS</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF50</entry>
+ <entry>HOME</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF51</entry>
+ <entry>LEFT, MOVE LEFT, LEFT ARROW</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF52</entry>
+ <entry>UP, MOVE UP, UP ARROW</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF53</entry>
+ <entry>RIGHT, MOVE RIGHT, RIGHT ARROW</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF54</entry>
+ <entry>DOWN, MOVE DOWN, DOWN ARROW</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF55</entry>
+ <entry>PRIOR, PREVIOUS, PAGE UP</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF56</entry>
+ <entry>NEXT, PAGE DOWN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF57</entry>
+ <entry>END, EOL</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF58</entry>
+ <entry>BEGIN, BOL</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF60</entry>
+ <entry>SELECT, MARK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF61</entry>
+ <entry>PRINT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF62</entry>
+ <entry>EXECUTE, RUN, DO</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF63</entry>
+ <entry>INSERT, INSERT HERE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF65</entry>
+ <entry>UNDO, OOPS</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF66</entry>
+ <entry>REDO, AGAIN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF67</entry>
+ <entry>MENU</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF68</entry>
+ <entry>FIND, SEARCH</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF69</entry>
+ <entry>CANCEL, STOP, ABORT, EXIT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF6A</entry>
+ <entry>HELP</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF6B</entry>
+ <entry>BREAK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF7E</entry>
+ <entry>MODE SWITCH, SCRIPT SWITCH, CHARACTER SET SWITCH</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF7F</entry>
+ <entry>NUM LOCK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF80</entry>
+ <entry>KEYPAD SPACE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF89</entry>
+ <entry>KEYPAD TAB</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF8D</entry>
+ <entry>KEYPAD ENTER</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF91</entry>
+ <entry>KEYPAD F1, PF1, A</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF92</entry>
+ <entry>KEYPAD F2, PF2, B</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF93</entry>
+ <entry>KEYPAD F3, PF3, C</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF94</entry>
+ <entry>KEYPAD F4, PF4, D</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF95</entry>
+ <entry>KEYPAD HOME</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF96</entry>
+ <entry>KEYPAD LEFT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF97</entry>
+ <entry>KEYPAD UP</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF98</entry>
+ <entry>KEYPAD RIGHT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF99</entry>
+ <entry>KEYPAD DOWN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF9A</entry>
+ <entry>KEYPAD PRIOR, PAGE UP</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF9B</entry>
+ <entry>KEYPAD NEXT, PAGE DOWN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF9C</entry>
+ <entry>KEYPAD END</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF9D</entry>
+ <entry>KEYPAD BEGIN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF9E</entry>
+ <entry>KEYPAD INSERT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFF9F</entry>
+ <entry>KEYPAD DELETE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFAA</entry>
+ <entry>KEYPAD MULTIPLICATION SIGN, ASTERISK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFAB</entry>
+ <entry>KEYPAD PLUS SIGN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFAC</entry>
+ <entry>KEYPAD SEPARATOR, COMMA</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFAD</entry>
+ <entry>KEYPAD MINUS SIGN, HYPHEN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFAE</entry>
+ <entry>KEYPAD DECIMAL POINT, FULL STOP</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFAF</entry>
+ <entry>KEYPAD DIVISION SIGN, SOLIDUS</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB0</entry>
+ <entry>KEYPAD DIGIT ZERO</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB1</entry>
+ <entry>KEYPAD DIGIT ONE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB2</entry>
+ <entry>KEYPAD DIGIT TWO</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB3</entry>
+ <entry>KEYPAD DIGIT THREE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB4</entry>
+ <entry>KEYPAD DIGIT FOUR</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB5</entry>
+ <entry>KEYPAD DIGIT FIVE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB6</entry>
+ <entry>KEYPAD DIGIT SIX</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB7</entry>
+ <entry>KEYPAD DIGIT SEVEN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB8</entry>
+ <entry>KEYPAD DIGIT EIGHT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFB9</entry>
+ <entry>KEYPAD DIGIT NINE</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFBD</entry>
+ <entry>KEYPAD EQUALS SIGN</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFBE</entry>
+ <entry>F1</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFBF</entry>
+ <entry>F2</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC0</entry>
+ <entry>F3</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC1</entry>
+ <entry>F4</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC2</entry>
+ <entry>F5</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC3</entry>
+ <entry>F6</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC4</entry>
+ <entry>F7</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC5</entry>
+ <entry>F8</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC6</entry>
+ <entry>F9</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC7</entry>
+ <entry>F10</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC8</entry>
+ <entry>F11, L1</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFC9</entry>
+ <entry>F12, L2</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFCA</entry>
+ <entry>F13, L3</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFCB</entry>
+ <entry>F14, L4</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFCC</entry>
+ <entry>F15, L5</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFCD</entry>
+ <entry>F16, L6</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFCE</entry>
+ <entry>F17, L7</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFCF</entry>
+ <entry>F18, L8</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD0</entry>
+ <entry>F19, L9</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD1</entry>
+ <entry>F20, L10</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD2</entry>
+ <entry>F21, R1</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD3</entry>
+ <entry>F22, R2</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD4</entry>
+ <entry>F23, R3</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD5</entry>
+ <entry>F24, R4</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD6</entry>
+ <entry>F25, R5</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD7</entry>
+ <entry>F26, R6</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD8</entry>
+ <entry>F27, R7</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFD9</entry>
+ <entry>F28, R8</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFDA</entry>
+ <entry>F29, R9</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFDB</entry>
+ <entry>F30, R10</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFDC</entry>
+ <entry>F31, R11</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFDD</entry>
+ <entry>F32, R12</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFDE</entry>
+ <entry>F33, R13</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFDF</entry>
+ <entry>F34, R14</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE0</entry>
+ <entry>F35, R15</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE1</entry>
+ <entry>LEFT SHIFT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE2</entry>
+ <entry>RIGHT SHIFT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE3</entry>
+ <entry>LEFT CONTROL</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE4</entry>
+ <entry>RIGHT CONTROL</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE5</entry>
+ <entry>CAPS LOCK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE6</entry>
+ <entry>SHIFT LOCK</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE7</entry>
+ <entry>LEFT META</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE8</entry>
+ <entry>RIGHT META</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFE9</entry>
+ <entry>LEFT ALT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFEA</entry>
+ <entry>RIGHT ALT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFEB</entry>
+ <entry>LEFT SUPER</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFEC</entry>
+ <entry>RIGHT SUPER</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFED</entry>
+ <entry>LEFT HYPER</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFEE</entry>
+ <entry>RIGHT HYPER</entry>
+ <entry>Keyboard</entry>
+ </row>
+ <row>
+ <entry>#xFFFF</entry>
+ <entry>DELETE, RUBOUT</entry>
+ <entry>Keyboard</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The Keyboard (XKB) Extension set, which provides among other things
+a range of dead keys, is defined in "The X Keyboard Extension:
+Protocol Specification", Appendix C. <!-- xref -->
+</para>
+
+<para>
+The 3270 set defines additional keys that are specific to IBM 3270
+terminals.
+</para>
+
+<informaltable frame="topbot">
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*' />
+ <colspec colname='c2' colwidth='3.0*' />
+ <colspec colname='c3' colwidth='1.0*' />
+ <thead>
+ <row rowsep="1">
+ <entry>KEYSYM value</entry>
+ <entry>Name</entry>
+ <entry>Set</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>#xFD01</entry>
+ <entry>3270 DUPLICATE</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD02</entry>
+ <entry>3270 FIELDMARK</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD03</entry>
+ <entry>3270 RIGHT2</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD04</entry>
+ <entry>3270 LEFT2</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD05</entry>
+ <entry>3270 BACKTAB</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD06</entry>
+ <entry>3270 ERASEEOF</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD07</entry>
+ <entry>3270 ERASEINPUT</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD08</entry>
+ <entry>3270 RESET</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD09</entry>
+ <entry>3270 QUIT</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD0A</entry>
+ <entry>3270 PA1</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD0B</entry>
+ <entry>3270 PA2</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD0C</entry>
+ <entry>3270 PA3</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD0D</entry>
+ <entry>3270 TEST</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD0E</entry>
+ <entry>3270 ATTN</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD0F</entry>
+ <entry>3270 CURSORBLINK</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD10</entry>
+ <entry>3270 ALTCURSOR</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD11</entry>
+ <entry>3270 KEYCLICK</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD12</entry>
+ <entry>3270 JUMP</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD13</entry>
+ <entry>3270 IDENT</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD14</entry>
+ <entry>3270 RULE</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD15</entry>
+ <entry>3270 COPY</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD16</entry>
+ <entry>3270 PLAY</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD17</entry>
+ <entry>3270 SETUP</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD18</entry>
+ <entry>3270 RECORD</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD19</entry>
+ <entry>3270 CHANGESCREEN</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD1A</entry>
+ <entry>3270 DELETEWORD</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD1B</entry>
+ <entry>3270 EXSELECT</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD1C</entry>
+ <entry>3270 CURSORSELECT</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD1D</entry>
+ <entry>3270 PRINTSCREEN</entry>
+ <entry>3270</entry>
+ </row>
+ <row>
+ <entry>#xFD1E</entry>
+ <entry>3270 ENTER</entry>
+ <entry>3270</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+
+<sect1 id='Vendor_KEYSYMs'>
+<title>Vendor KEYSYMs</title>
+
+<para>
+The KEYSYM number range #x10000000 to #x1FFFFFFF is available for
+vendor-specific extentions. Among these, the range #x11000000 to
+#x1100FFFF is designated for keypad KEYSYMs.
+</para>
+</sect1>
+
+<sect1 id='Legacy_KEYSYMs'>
+<title>Legacy KEYSYMs</title>
+
+<para>
+These date from the time before ISO 10646 / Unicode was
+available. They represent characters from a number of different older
+8-bit coded character sets and have zero values for bytes 1 and
+2. Byte 3 indicates a coded character set and byte 4 is the 8-bit
+value of the particular character within that set.
+</para>
+
+<informaltable frame="topbot">
+ <tgroup cols='4' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*' />
+ <colspec colname='c2' colwidth='2.0*' />
+ <colspec colname='c3' colwidth='1.0*' />
+ <colspec colname='c4' colwidth='1.0*' />
+ <thead>
+ <row rowsep="1">
+ <entry>Byte 3</entry>
+ <entry>Byte 4</entry>
+ <entry>Byte 3</entry>
+ <entry>Byte 4</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>1</entry>
+ <entry>Latin-2</entry>
+ <entry>11</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry>Latin-3</entry>
+ <entry>12</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>3</entry>
+ <entry>Latin-4</entry>
+ <entry>13</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry>Kana</entry>
+ <entry>14</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>5</entry>
+ <entry>Arabic</entry>
+ <entry>15</entry>
+ <entry>Latin-5</entry>
+ </row>
+ <row>
+ <entry>6</entry>
+ <entry>Cyrillic</entry>
+ <entry>16</entry>
+ <entry>Latin-6</entry>
+ </row>
+ <row>
+ <entry>7</entry>
+ <entry>Greek</entry>
+ <entry>17</entry>
+ <entry>Latin-7</entry>
+ </row>
+ <row>
+ <entry>8</entry>
+ <entry>Technical</entry>
+ <entry>18</entry>
+ <entry>Latin-8</entry>
+ </row>
+ <row>
+ <entry>9</entry>
+ <entry>Special</entry>
+ <entry>19</entry>
+ <entry>Latin-9</entry>
+ </row>
+ <row>
+ <entry>10</entry>
+ <entry>Publishing</entry>
+ <entry>32</entry>
+ <entry>Currency</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Each character set contains gaps where codes have been removed that
+were duplicates with codes in previous character sets (that is,
+character sets with lesser byte 3 value).
+</para>
+
+<para>
+The Latin, Arabic, Cyrillic, Greek, Hebrew, and Thai sets were taken
+from the early drafts of the relevant ISO 8859 parts available at the
+time. However, in the case of the Cyrillic and Greek sets, these
+turned out differently in the final versions of the ISO standard. The
+Technical, Special, and Publishing sets are based on Digital Equipment
+Corporation standards, as no equivalent international standards were
+available at the time.
+</para>
+
+<para>
+The table below lists all standardized Legacy KEYSYMs, along with the
+name used in the source document. Where there exists an unambiguous
+equivalent in Unicode, as it is the case with all ISO 8859 characters,
+it is given in the second column as a cross reference. Where there is
+no Unicode number provided, the exact semantics of the KEYSYM may have
+been lost and a Unicode KEYSYM should be used instead, if available.
+</para>
+
+<para>
+As support of Unicode KEYSYMs increases, some or all of the Legacy
+KEYSYMs may be phased out and withdrawn in future versions of this
+standard. Most KEYSYMs in the sets Technical, Special, Publishing, APL
+and Currency (with the exception of #x20AC) were probably never used
+in practice, and were not supported by pre-Unicode fonts. In
+particular, the Currency set, which was copied from Unicode, has
+already been deprecated by the introduction of the Unicode KEYSYMs.
+</para>
+
+<informaltable frame="topbot">
+ <tgroup cols='4' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*' />
+ <colspec colname='c2' colwidth='1.0*' />
+ <colspec colname='c3' colwidth='5.0*' />
+ <colspec colname='c4' colwidth='1.0*' />
+ <thead>
+ <row rowsep="1">
+ <entry>KEYSYM value</entry>
+ <entry>Unicode value</entry>
+ <entry>Name</entry>
+ <entry>Set</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>#x01A1</entry>
+ <entry>U+0104</entry>
+ <entry>LATIN CAPITAL LETTER A WITH OGONEK</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01A2</entry>
+ <entry>U+02D8</entry>
+ <entry>BREVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01A3</entry>
+ <entry>U+0141</entry>
+ <entry>LATIN CAPITAL LETTER L WITH STROKE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01A5</entry>
+ <entry>U+013D</entry>
+ <entry>LATIN CAPITAL LETTER L WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01A6</entry>
+ <entry>U+015A</entry>
+ <entry>LATIN CAPITAL LETTER S WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01A9</entry>
+ <entry>U+0160</entry>
+ <entry>LATIN CAPITAL LETTER S WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01AA</entry>
+ <entry>U+015E</entry>
+ <entry>LATIN CAPITAL LETTER S WITH CEDILLA</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01AB</entry>
+ <entry>U+0164</entry>
+ <entry>LATIN CAPITAL LETTER T WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01AC</entry>
+ <entry>U+0179</entry>
+ <entry>LATIN CAPITAL LETTER Z WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01AE</entry>
+ <entry>U+017D</entry>
+ <entry>LATIN CAPITAL LETTER Z WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01AF</entry>
+ <entry>U+017B</entry>
+ <entry>LATIN CAPITAL LETTER Z WITH DOT ABOVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01B1</entry>
+ <entry>U+0105</entry>
+ <entry>LATIN SMALL LETTER A WITH OGONEK</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01B2</entry>
+ <entry>U+02DB</entry>
+ <entry>OGONEK</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01B3</entry>
+ <entry>U+0142</entry>
+ <entry>LATIN SMALL LETTER L WITH STROKE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01B5</entry>
+ <entry>U+013E</entry>
+ <entry>LATIN SMALL LETTER L WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01B6</entry>
+ <entry>U+015B</entry>
+ <entry>LATIN SMALL LETTER S WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01B7</entry>
+ <entry>U+02C7</entry>
+ <entry>CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01B9</entry>
+ <entry>U+0161</entry>
+ <entry>LATIN SMALL LETTER S WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01BA</entry>
+ <entry>U+015F</entry>
+ <entry>LATIN SMALL LETTER S WITH CEDILLA</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01BB</entry>
+ <entry>U+0165</entry>
+ <entry>LATIN SMALL LETTER T WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01BC</entry>
+ <entry>U+017A</entry>
+ <entry>LATIN SMALL LETTER Z WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01BD</entry>
+ <entry>U+02DD</entry>
+ <entry>DOUBLE ACUTE ACCENT</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01BE</entry>
+ <entry>U+017E</entry>
+ <entry>LATIN SMALL LETTER Z WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01BF</entry>
+ <entry>U+017C</entry>
+ <entry>LATIN SMALL LETTER Z WITH DOT ABOVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01C0</entry>
+ <entry>U+0154</entry>
+ <entry>LATIN CAPITAL LETTER R WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01C3</entry>
+ <entry>U+0102</entry>
+ <entry>LATIN CAPITAL LETTER A WITH BREVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01C5</entry>
+ <entry>U+0139</entry>
+ <entry>LATIN CAPITAL LETTER L WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01C6</entry>
+ <entry>U+0106</entry>
+ <entry>LATIN CAPITAL LETTER C WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01C8</entry>
+ <entry>U+010C</entry>
+ <entry>LATIN CAPITAL LETTER C WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01CA</entry>
+ <entry>U+0118</entry>
+ <entry>LATIN CAPITAL LETTER E WITH OGONEK</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01CC</entry>
+ <entry>U+011A</entry>
+ <entry>LATIN CAPITAL LETTER E WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01CF</entry>
+ <entry>U+010E</entry>
+ <entry>LATIN CAPITAL LETTER D WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01D0</entry>
+ <entry>U+0110</entry>
+ <entry>LATIN CAPITAL LETTER D WITH STROKE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01D1</entry>
+ <entry>U+0143</entry>
+ <entry>LATIN CAPITAL LETTER N WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01D2</entry>
+ <entry>U+0147</entry>
+ <entry>LATIN CAPITAL LETTER N WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01D5</entry>
+ <entry>U+0150</entry>
+ <entry>LATIN CAPITAL LETTER O WITH DOUBLE ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01D8</entry>
+ <entry>U+0158</entry>
+ <entry>LATIN CAPITAL LETTER R WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01D9</entry>
+ <entry>U+016E</entry>
+ <entry>LATIN CAPITAL LETTER U WITH RING ABOVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01DB</entry>
+ <entry>U+0170</entry>
+ <entry>LATIN CAPITAL LETTER U WITH DOUBLE ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01DE</entry>
+ <entry>U+0162</entry>
+ <entry>LATIN CAPITAL LETTER T WITH CEDILLA</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01E0</entry>
+ <entry>U+0155</entry>
+ <entry>LATIN SMALL LETTER R WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01E3</entry>
+ <entry>U+0103</entry>
+ <entry>LATIN SMALL LETTER A WITH BREVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01E5</entry>
+ <entry>U+013A</entry>
+ <entry>LATIN SMALL LETTER L WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01E6</entry>
+ <entry>U+0107</entry>
+ <entry>LATIN SMALL LETTER C WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01E8</entry>
+ <entry>U+010D</entry>
+ <entry>LATIN SMALL LETTER C WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01EA</entry>
+ <entry>U+0119</entry>
+ <entry>LATIN SMALL LETTER E WITH OGONEK</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01EC</entry>
+ <entry>U+011B</entry>
+ <entry>LATIN SMALL LETTER E WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01EF</entry>
+ <entry>U+010F</entry>
+ <entry>LATIN SMALL LETTER D WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01F0</entry>
+ <entry>U+0111</entry>
+ <entry>LATIN SMALL LETTER D WITH STROKE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01F1</entry>
+ <entry>U+0144</entry>
+ <entry>LATIN SMALL LETTER N WITH ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01F2</entry>
+ <entry>U+0148</entry>
+ <entry>LATIN SMALL LETTER N WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01F5</entry>
+ <entry>U+0151</entry>
+ <entry>LATIN SMALL LETTER O WITH DOUBLE ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01F8</entry>
+ <entry>U+0159</entry>
+ <entry>LATIN SMALL LETTER R WITH CARON</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01F9</entry>
+ <entry>U+016F</entry>
+ <entry>LATIN SMALL LETTER U WITH RING ABOVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01FB</entry>
+ <entry>U+0171</entry>
+ <entry>LATIN SMALL LETTER U WITH DOUBLE ACUTE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01FE</entry>
+ <entry>U+0163</entry>
+ <entry>LATIN SMALL LETTER T WITH CEDILLA</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x01FF</entry>
+ <entry>U+02D9</entry>
+ <entry>DOT ABOVE</entry>
+ <entry>Latin-2</entry>
+ </row>
+ <row>
+ <entry>#x02A1</entry>
+ <entry>U+0126</entry>
+ <entry>LATIN CAPITAL LETTER H WITH STROKE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02A6</entry>
+ <entry>U+0124</entry>
+ <entry>LATIN CAPITAL LETTER H WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02A9</entry>
+ <entry>U+0130</entry>
+ <entry>LATIN CAPITAL LETTER I WITH DOT ABOVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02AB</entry>
+ <entry>U+011E</entry>
+ <entry>LATIN CAPITAL LETTER G WITH BREVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02AC</entry>
+ <entry>U+0134</entry>
+ <entry>LATIN CAPITAL LETTER J WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02B1</entry>
+ <entry>U+0127</entry>
+ <entry>LATIN SMALL LETTER H WITH STROKE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02B6</entry>
+ <entry>U+0125</entry>
+ <entry>LATIN SMALL LETTER H WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02B9</entry>
+ <entry>U+0131</entry>
+ <entry>LATIN SMALL LETTER DOTLESS I</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02BB</entry>
+ <entry>U+011F</entry>
+ <entry>LATIN SMALL LETTER G WITH BREVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02BC</entry>
+ <entry>U+0135</entry>
+ <entry>LATIN SMALL LETTER J WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02C5</entry>
+ <entry>U+010A</entry>
+ <entry>LATIN CAPITAL LETTER C WITH DOT ABOVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02C6</entry>
+ <entry>U+0108</entry>
+ <entry>LATIN CAPITAL LETTER C WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02D5</entry>
+ <entry>U+0120</entry>
+ <entry>LATIN CAPITAL LETTER G WITH DOT ABOVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02D8</entry>
+ <entry>U+011C</entry>
+ <entry>LATIN CAPITAL LETTER G WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02DD</entry>
+ <entry>U+016C</entry>
+ <entry>LATIN CAPITAL LETTER U WITH BREVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02DE</entry>
+ <entry>U+015C</entry>
+ <entry>LATIN CAPITAL LETTER S WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02E5</entry>
+ <entry>U+010B</entry>
+ <entry>LATIN SMALL LETTER C WITH DOT ABOVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02E6</entry>
+ <entry>U+0109</entry>
+ <entry>LATIN SMALL LETTER C WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02F5</entry>
+ <entry>U+0121</entry>
+ <entry>LATIN SMALL LETTER G WITH DOT ABOVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02F8</entry>
+ <entry>U+011D</entry>
+ <entry>LATIN SMALL LETTER G WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02FD</entry>
+ <entry>U+016D</entry>
+ <entry>LATIN SMALL LETTER U WITH BREVE</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x02FE</entry>
+ <entry>U+015D</entry>
+ <entry>LATIN SMALL LETTER S WITH CIRCUMFLEX</entry>
+ <entry>Latin-3</entry>
+ </row>
+ <row>
+ <entry>#x03A2</entry>
+ <entry>U+0138</entry>
+ <entry>LATIN SMALL LETTER KRA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03A3</entry>
+ <entry>U+0156</entry>
+ <entry>LATIN CAPITAL LETTER R WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03A5</entry>
+ <entry>U+0128</entry>
+ <entry>LATIN CAPITAL LETTER I WITH TILDE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03A6</entry>
+ <entry>U+013B</entry>
+ <entry>LATIN CAPITAL LETTER L WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03AA</entry>
+ <entry>U+0112</entry>
+ <entry>LATIN CAPITAL LETTER E WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03AB</entry>
+ <entry>U+0122</entry>
+ <entry>LATIN CAPITAL LETTER G WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03AC</entry>
+ <entry>U+0166</entry>
+ <entry>LATIN CAPITAL LETTER T WITH STROKE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03B3</entry>
+ <entry>U+0157</entry>
+ <entry>LATIN SMALL LETTER R WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03B5</entry>
+ <entry>U+0129</entry>
+ <entry>LATIN SMALL LETTER I WITH TILDE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03B6</entry>
+ <entry>U+013C</entry>
+ <entry>LATIN SMALL LETTER L WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03BA</entry>
+ <entry>U+0113</entry>
+ <entry>LATIN SMALL LETTER E WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03BB</entry>
+ <entry>U+0123</entry>
+ <entry>LATIN SMALL LETTER G WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03BC</entry>
+ <entry>U+0167</entry>
+ <entry>LATIN SMALL LETTER T WITH STROKE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03BD</entry>
+ <entry>U+014A</entry>
+ <entry>LATIN CAPITAL LETTER ENG</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03BF</entry>
+ <entry>U+014B</entry>
+ <entry>LATIN SMALL LETTER ENG</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03C0</entry>
+ <entry>U+0100</entry>
+ <entry>LATIN CAPITAL LETTER A WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03C7</entry>
+ <entry>U+012E</entry>
+ <entry>LATIN CAPITAL LETTER I WITH OGONEK</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03CC</entry>
+ <entry>U+0116</entry>
+ <entry>LATIN CAPITAL LETTER E WITH DOT ABOVE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03CF</entry>
+ <entry>U+012A</entry>
+ <entry>LATIN CAPITAL LETTER I WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03D1</entry>
+ <entry>U+0145</entry>
+ <entry>LATIN CAPITAL LETTER N WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03D2</entry>
+ <entry>U+014C</entry>
+ <entry>LATIN CAPITAL LETTER O WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03D3</entry>
+ <entry>U+0136</entry>
+ <entry>LATIN CAPITAL LETTER K WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03D9</entry>
+ <entry>U+0172</entry>
+ <entry>LATIN CAPITAL LETTER U WITH OGONEK</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03DD</entry>
+ <entry>U+0168</entry>
+ <entry>LATIN CAPITAL LETTER U WITH TILDE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03DE</entry>
+ <entry>U+016A</entry>
+ <entry>LATIN CAPITAL LETTER U WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03E0</entry>
+ <entry>U+0101</entry>
+ <entry>LATIN SMALL LETTER A WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03E7</entry>
+ <entry>U+012F</entry>
+ <entry>LATIN SMALL LETTER I WITH OGONEK</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03EC</entry>
+ <entry>U+0117</entry>
+ <entry>LATIN SMALL LETTER E WITH DOT ABOVE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03EF</entry>
+ <entry>U+012B</entry>
+ <entry>LATIN SMALL LETTER I WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03F1</entry>
+ <entry>U+0146</entry>
+ <entry>LATIN SMALL LETTER N WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03F2</entry>
+ <entry>U+014D</entry>
+ <entry>LATIN SMALL LETTER O WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03F3</entry>
+ <entry>U+0137</entry>
+ <entry>LATIN SMALL LETTER K WITH CEDILLA</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03F9</entry>
+ <entry>U+0173</entry>
+ <entry>LATIN SMALL LETTER U WITH OGONEK</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03FD</entry>
+ <entry>U+0169</entry>
+ <entry>LATIN SMALL LETTER U WITH TILDE</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x03FE</entry>
+ <entry>U+016B</entry>
+ <entry>LATIN SMALL LETTER U WITH MACRON</entry>
+ <entry>Latin-4</entry>
+ </row>
+ <row>
+ <entry>#x047E</entry>
+ <entry>U+203E</entry>
+ <entry>OVERLINE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A1</entry>
+ <entry>U+3002</entry>
+ <entry>KANA FULL STOP</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A2</entry>
+ <entry>U+300C</entry>
+ <entry>KANA OPENING BRACKET</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A3</entry>
+ <entry>U+300D</entry>
+ <entry>KANA CLOSING BRACKET</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A4</entry>
+ <entry>U+3001</entry>
+ <entry>KANA COMMA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A5</entry>
+ <entry>U+30FB</entry>
+ <entry>KANA CONJUNCTIVE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A6</entry>
+ <entry>U+30F2</entry>
+ <entry>KANA LETTER WO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A7</entry>
+ <entry>U+30A1</entry>
+ <entry>KANA LETTER SMALL A</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A8</entry>
+ <entry>U+30A3</entry>
+ <entry>KANA LETTER SMALL I</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04A9</entry>
+ <entry>U+30A5</entry>
+ <entry>KANA LETTER SMALL U</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04AA</entry>
+ <entry>U+30A7</entry>
+ <entry>KANA LETTER SMALL E</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04AB</entry>
+ <entry>U+30A9</entry>
+ <entry>KANA LETTER SMALL O</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04AC</entry>
+ <entry>U+30E3</entry>
+ <entry>KANA LETTER SMALL YA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04AD</entry>
+ <entry>U+30E5</entry>
+ <entry>KANA LETTER SMALL YU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04AE</entry>
+ <entry>U+30E7</entry>
+ <entry>KANA LETTER SMALL YO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04AF</entry>
+ <entry>U+30C3</entry>
+ <entry>KANA LETTER SMALL TSU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B0</entry>
+ <entry>U+30FC</entry>
+ <entry>PROLONGED SOUND SYMBOL</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B1</entry>
+ <entry>U+30A2</entry>
+ <entry>KANA LETTER A</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B2</entry>
+ <entry>U+30A4</entry>
+ <entry>KANA LETTER I</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B3</entry>
+ <entry>U+30A6</entry>
+ <entry>KANA LETTER U</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B4</entry>
+ <entry>U+30A8</entry>
+ <entry>KANA LETTER E</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B5</entry>
+ <entry>U+30AA</entry>
+ <entry>KANA LETTER O</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B6</entry>
+ <entry>U+30AB</entry>
+ <entry>KANA LETTER KA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B7</entry>
+ <entry>U+30AD</entry>
+ <entry>KANA LETTER KI</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B8</entry>
+ <entry>U+30AF</entry>
+ <entry>KANA LETTER KU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04B9</entry>
+ <entry>U+30B1</entry>
+ <entry>KANA LETTER KE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04BA</entry>
+ <entry>U+30B3</entry>
+ <entry>KANA LETTER KO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04BB</entry>
+ <entry>U+30B5</entry>
+ <entry>KANA LETTER SA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04BC</entry>
+ <entry>U+30B7</entry>
+ <entry>KANA LETTER SHI</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04BD</entry>
+ <entry>U+30B9</entry>
+ <entry>KANA LETTER SU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04BE</entry>
+ <entry>U+30BB</entry>
+ <entry>KANA LETTER SE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04BF</entry>
+ <entry>U+30BD</entry>
+ <entry>KANA LETTER SO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C0</entry>
+ <entry>U+30BF</entry>
+ <entry>KANA LETTER TA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C1</entry>
+ <entry>U+30C1</entry>
+ <entry>KANA LETTER CHI</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C2</entry>
+ <entry>U+30C4</entry>
+ <entry>KANA LETTER TSU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C3</entry>
+ <entry>U+30C6</entry>
+ <entry>KANA LETTER TE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C4</entry>
+ <entry>U+30C8</entry>
+ <entry>KANA LETTER TO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C5</entry>
+ <entry>U+30CA</entry>
+ <entry>KANA LETTER NA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C6</entry>
+ <entry>U+30CB</entry>
+ <entry>KANA LETTER NI</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C7</entry>
+ <entry>U+30CC</entry>
+ <entry>KANA LETTER NU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C8</entry>
+ <entry>U+30CD</entry>
+ <entry>KANA LETTER NE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04C9</entry>
+ <entry>U+30CE</entry>
+ <entry>KANA LETTER NO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04CA</entry>
+ <entry>U+30CF</entry>
+ <entry>KANA LETTER HA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04CB</entry>
+ <entry>U+30D2</entry>
+ <entry>KANA LETTER HI</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04CC</entry>
+ <entry>U+30D5</entry>
+ <entry>KANA LETTER FU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04CD</entry>
+ <entry>U+30D8</entry>
+ <entry>KANA LETTER HE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04CE</entry>
+ <entry>U+30DB</entry>
+ <entry>KANA LETTER HO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04CF</entry>
+ <entry>U+30DE</entry>
+ <entry>KANA LETTER MA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D0</entry>
+ <entry>U+30DF</entry>
+ <entry>KANA LETTER MI</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D1</entry>
+ <entry>U+30E0</entry>
+ <entry>KANA LETTER MU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D2</entry>
+ <entry>U+30E1</entry>
+ <entry>KANA LETTER ME</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D3</entry>
+ <entry>U+30E2</entry>
+ <entry>KANA LETTER MO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D4</entry>
+ <entry>U+30E4</entry>
+ <entry>KANA LETTER YA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D5</entry>
+ <entry>U+30E6</entry>
+ <entry>KANA LETTER YU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D6</entry>
+ <entry>U+30E8</entry>
+ <entry>KANA LETTER YO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D7</entry>
+ <entry>U+30E9</entry>
+ <entry>KANA LETTER RA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D8</entry>
+ <entry>U+30EA</entry>
+ <entry>KANA LETTER RI</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04D9</entry>
+ <entry>U+30EB</entry>
+ <entry>KANA LETTER RU</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04DA</entry>
+ <entry>U+30EC</entry>
+ <entry>KANA LETTER RE</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04DB</entry>
+ <entry>U+30ED</entry>
+ <entry>KANA LETTER RO</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04DC</entry>
+ <entry>U+30EF</entry>
+ <entry>KANA LETTER WA</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04DD</entry>
+ <entry>U+30F3</entry>
+ <entry>KANA LETTER N</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04DE</entry>
+ <entry>U+309B</entry>
+ <entry>VOICED SOUND SYMBOL</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x04DF</entry>
+ <entry>U+309C</entry>
+ <entry>SEMIVOICED SOUND SYMBOL</entry>
+ <entry>Kana</entry>
+ </row>
+ <row>
+ <entry>#x05AC</entry>
+ <entry>U+060C</entry>
+ <entry>ARABIC COMMA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05BB</entry>
+ <entry>U+061B</entry>
+ <entry>ARABIC SEMICOLON</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05BF</entry>
+ <entry>U+061F</entry>
+ <entry>ARABIC QUESTION MARK</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C1</entry>
+ <entry>U+0621</entry>
+ <entry>ARABIC LETTER HAMZA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C2</entry>
+ <entry>U+0622</entry>
+ <entry>ARABIC LETTER ALEF WITH MADDA ABOVE</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C3</entry>
+ <entry>U+0623</entry>
+ <entry>ARABIC LETTER ALEF WITH HAMZA ABOVE</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C4</entry>
+ <entry>U+0624</entry>
+ <entry>ARABIC LETTER WAW WITH HAMZA ABOVE</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C5</entry>
+ <entry>U+0625</entry>
+ <entry>ARABIC LETTER ALEF WITH HAMZA BELOW</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C6</entry>
+ <entry>U+0626</entry>
+ <entry>ARABIC LETTER YEH WITH HAMZA ABOVE</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C7</entry>
+ <entry>U+0627</entry>
+ <entry>ARABIC LETTER ALEF</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C8</entry>
+ <entry>U+0628</entry>
+ <entry>ARABIC LETTER BEH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05C9</entry>
+ <entry>U+0629</entry>
+ <entry>ARABIC LETTER TEH MARBUTA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05CA</entry>
+ <entry>U+062A</entry>
+ <entry>ARABIC LETTER TEH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05CB</entry>
+ <entry>U+062B</entry>
+ <entry>ARABIC LETTER THEH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05CC</entry>
+ <entry>U+062C</entry>
+ <entry>ARABIC LETTER JEEM</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05CD</entry>
+ <entry>U+062D</entry>
+ <entry>ARABIC LETTER HAH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05CE</entry>
+ <entry>U+062E</entry>
+ <entry>ARABIC LETTER KHAH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05CF</entry>
+ <entry>U+062F</entry>
+ <entry>ARABIC LETTER DAL</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D0</entry>
+ <entry>U+0630</entry>
+ <entry>ARABIC LETTER THAL</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D1</entry>
+ <entry>U+0631</entry>
+ <entry>ARABIC LETTER REH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D2</entry>
+ <entry>U+0632</entry>
+ <entry>ARABIC LETTER ZAIN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D3</entry>
+ <entry>U+0633</entry>
+ <entry>ARABIC LETTER SEEN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D4</entry>
+ <entry>U+0634</entry>
+ <entry>ARABIC LETTER SHEEN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D5</entry>
+ <entry>U+0635</entry>
+ <entry>ARABIC LETTER SAD</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D6</entry>
+ <entry>U+0636</entry>
+ <entry>ARABIC LETTER DAD</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D7</entry>
+ <entry>U+0637</entry>
+ <entry>ARABIC LETTER TAH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D8</entry>
+ <entry>U+0638</entry>
+ <entry>ARABIC LETTER ZAH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05D9</entry>
+ <entry>U+0639</entry>
+ <entry>ARABIC LETTER AIN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05DA</entry>
+ <entry>U+063A</entry>
+ <entry>ARABIC LETTER GHAIN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E0</entry>
+ <entry>U+0640</entry>
+ <entry>ARABIC TATWEEL</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E1</entry>
+ <entry>U+0641</entry>
+ <entry>ARABIC LETTER FEH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E2</entry>
+ <entry>U+0642</entry>
+ <entry>ARABIC LETTER QAF</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E3</entry>
+ <entry>U+0643</entry>
+ <entry>ARABIC LETTER KAF</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E4</entry>
+ <entry>U+0644</entry>
+ <entry>ARABIC LETTER LAM</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E5</entry>
+ <entry>U+0645</entry>
+ <entry>ARABIC LETTER MEEM</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E6</entry>
+ <entry>U+0646</entry>
+ <entry>ARABIC LETTER NOON</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E7</entry>
+ <entry>U+0647</entry>
+ <entry>ARABIC LETTER HEH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E8</entry>
+ <entry>U+0648</entry>
+ <entry>ARABIC LETTER WAW</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05E9</entry>
+ <entry>U+0649</entry>
+ <entry>ARABIC LETTER ALEF MAKSURA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05EA</entry>
+ <entry>U+064A</entry>
+ <entry>ARABIC LETTER YEH</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05EB</entry>
+ <entry>U+064B</entry>
+ <entry>ARABIC FATHATAN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05EC</entry>
+ <entry>U+064C</entry>
+ <entry>ARABIC DAMMATAN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05ED</entry>
+ <entry>U+064D</entry>
+ <entry>ARABIC KASRATAN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05EE</entry>
+ <entry>U+064E</entry>
+ <entry>ARABIC FATHA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05EF</entry>
+ <entry>U+064F</entry>
+ <entry>ARABIC DAMMA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05F0</entry>
+ <entry>U+0650</entry>
+ <entry>ARABIC KASRA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05F1</entry>
+ <entry>U+0651</entry>
+ <entry>ARABIC SHADDA</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x05F2</entry>
+ <entry>U+0652</entry>
+ <entry>ARABIC SUKUN</entry>
+ <entry>Arabic</entry>
+ </row>
+ <row>
+ <entry>#x06A1</entry>
+ <entry>U+0452</entry>
+ <entry>CYRILLIC SMALL LETTER DJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A2</entry>
+ <entry>U+0453</entry>
+ <entry>CYRILLIC SMALL LETTER GJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A3</entry>
+ <entry>U+0451</entry>
+ <entry>CYRILLIC SMALL LETTER IO</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A4</entry>
+ <entry>U+0454</entry>
+ <entry>CYRILLIC SMALL LETTER UKRAINIAN IE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A5</entry>
+ <entry>U+0455</entry>
+ <entry>CYRILLIC SMALL LETTER DZE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A6</entry>
+ <entry>U+0456</entry>
+ <entry>CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A7</entry>
+ <entry>U+0457</entry>
+ <entry>CYRILLIC SMALL LETTER YI</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A8</entry>
+ <entry>U+0458</entry>
+ <entry>CYRILLIC SMALL LETTER JE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06A9</entry>
+ <entry>U+0459</entry>
+ <entry>CYRILLIC SMALL LETTER LJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06AA</entry>
+ <entry>U+045A</entry>
+ <entry>CYRILLIC SMALL LETTER NJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06AB</entry>
+ <entry>U+045B</entry>
+ <entry>CYRILLIC SMALL LETTER TSHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06AC</entry>
+ <entry>U+045C</entry>
+ <entry>CYRILLIC SMALL LETTER KJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06AD</entry>
+ <entry>U+0491</entry>
+ <entry>CYRILLIC SMALL LETTER GHE WITH UPTURN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06AE</entry>
+ <entry>U+045E</entry>
+ <entry>CYRILLIC SMALL LETTER SHORT U</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06AF</entry>
+ <entry>U+045F</entry>
+ <entry>CYRILLIC SMALL LETTER DZHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B0</entry>
+ <entry>U+2116</entry>
+ <entry>NUMERO SIGN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B1</entry>
+ <entry>U+0402</entry>
+ <entry>CYRILLIC CAPITAL LETTER DJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B2</entry>
+ <entry>U+0403</entry>
+ <entry>CYRILLIC CAPITAL LETTER GJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B3</entry>
+ <entry>U+0401</entry>
+ <entry>CYRILLIC CAPITAL LETTER IO</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B4</entry>
+ <entry>U+0404</entry>
+ <entry>CYRILLIC CAPITAL LETTER UKRAINIAN IE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B5</entry>
+ <entry>U+0405</entry>
+ <entry>CYRILLIC CAPITAL LETTER DZE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B6</entry>
+ <entry>U+0406</entry>
+ <entry>CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B7</entry>
+ <entry>U+0407</entry>
+ <entry>CYRILLIC CAPITAL LETTER YI</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B8</entry>
+ <entry>U+0408</entry>
+ <entry>CYRILLIC CAPITAL LETTER JE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06B9</entry>
+ <entry>U+0409</entry>
+ <entry>CYRILLIC CAPITAL LETTER LJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06BA</entry>
+ <entry>U+040A</entry>
+ <entry>CYRILLIC CAPITAL LETTER NJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06BB</entry>
+ <entry>U+040B</entry>
+ <entry>CYRILLIC CAPITAL LETTER TSHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06BC</entry>
+ <entry>U+040C</entry>
+ <entry>CYRILLIC CAPITAL LETTER KJE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06BD</entry>
+ <entry>U+0490</entry>
+ <entry>CYRILLIC CAPITAL LETTER GHE WITH UPTURN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06BE</entry>
+ <entry>U+040E</entry>
+ <entry>CYRILLIC CAPITAL LETTER SHORT U</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06BF</entry>
+ <entry>U+040F</entry>
+ <entry>CYRILLIC CAPITAL LETTER DZHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C0</entry>
+ <entry>U+044E</entry>
+ <entry>CYRILLIC SMALL LETTER YU</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C1</entry>
+ <entry>U+0430</entry>
+ <entry>CYRILLIC SMALL LETTER A</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C2</entry>
+ <entry>U+0431</entry>
+ <entry>CYRILLIC SMALL LETTER BE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C3</entry>
+ <entry>U+0446</entry>
+ <entry>CYRILLIC SMALL LETTER TSE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C4</entry>
+ <entry>U+0434</entry>
+ <entry>CYRILLIC SMALL LETTER DE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C5</entry>
+ <entry>U+0435</entry>
+ <entry>CYRILLIC SMALL LETTER IE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C6</entry>
+ <entry>U+0444</entry>
+ <entry>CYRILLIC SMALL LETTER EF</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C7</entry>
+ <entry>U+0433</entry>
+ <entry>CYRILLIC SMALL LETTER GHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C8</entry>
+ <entry>U+0445</entry>
+ <entry>CYRILLIC SMALL LETTER HA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06C9</entry>
+ <entry>U+0438</entry>
+ <entry>CYRILLIC SMALL LETTER I</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06CA</entry>
+ <entry>U+0439</entry>
+ <entry>CYRILLIC SMALL LETTER SHORT I</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06CB</entry>
+ <entry>U+043A</entry>
+ <entry>CYRILLIC SMALL LETTER KA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06CC</entry>
+ <entry>U+043B</entry>
+ <entry>CYRILLIC SMALL LETTER EL</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06CD</entry>
+ <entry>U+043C</entry>
+ <entry>CYRILLIC SMALL LETTER EM</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06CE</entry>
+ <entry>U+043D</entry>
+ <entry>CYRILLIC SMALL LETTER EN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06CF</entry>
+ <entry>U+043E</entry>
+ <entry>CYRILLIC SMALL LETTER O</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D0</entry>
+ <entry>U+043F</entry>
+ <entry>CYRILLIC SMALL LETTER PE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D1</entry>
+ <entry>U+044F</entry>
+ <entry>CYRILLIC SMALL LETTER YA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D2</entry>
+ <entry>U+0440</entry>
+ <entry>CYRILLIC SMALL LETTER ER</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D3</entry>
+ <entry>U+0441</entry>
+ <entry>CYRILLIC SMALL LETTER ES</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D4</entry>
+ <entry>U+0442</entry>
+ <entry>CYRILLIC SMALL LETTER TE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D5</entry>
+ <entry>U+0443</entry>
+ <entry>CYRILLIC SMALL LETTER U</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D6</entry>
+ <entry>U+0436</entry>
+ <entry>CYRILLIC SMALL LETTER ZHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D7</entry>
+ <entry>U+0432</entry>
+ <entry>CYRILLIC SMALL LETTER VE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D8</entry>
+ <entry>U+044C</entry>
+ <entry>CYRILLIC SMALL LETTER SOFT SIGN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06D9</entry>
+ <entry>U+044B</entry>
+ <entry>CYRILLIC SMALL LETTER YERU</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06DA</entry>
+ <entry>U+0437</entry>
+ <entry>CYRILLIC SMALL LETTER ZE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06DB</entry>
+ <entry>U+0448</entry>
+ <entry>CYRILLIC SMALL LETTER SHA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06DC</entry>
+ <entry>U+044D</entry>
+ <entry>CYRILLIC SMALL LETTER E</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06DD</entry>
+ <entry>U+0449</entry>
+ <entry>CYRILLIC SMALL LETTER SHCHA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06DE</entry>
+ <entry>U+0447</entry>
+ <entry>CYRILLIC SMALL LETTER CHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06DF</entry>
+ <entry>U+044A</entry>
+ <entry>CYRILLIC SMALL LETTER HARD SIGN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E0</entry>
+ <entry>U+042E</entry>
+ <entry>CYRILLIC CAPITAL LETTER YU</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E1</entry>
+ <entry>U+0410</entry>
+ <entry>CYRILLIC CAPITAL LETTER A</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E2</entry>
+ <entry>U+0411</entry>
+ <entry>CYRILLIC CAPITAL LETTER BE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E3</entry>
+ <entry>U+0426</entry>
+ <entry>CYRILLIC CAPITAL LETTER TSE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E4</entry>
+ <entry>U+0414</entry>
+ <entry>CYRILLIC CAPITAL LETTER DE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E5</entry>
+ <entry>U+0415</entry>
+ <entry>CYRILLIC CAPITAL LETTER IE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E6</entry>
+ <entry>U+0424</entry>
+ <entry>CYRILLIC CAPITAL LETTER EF</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E7</entry>
+ <entry>U+0413</entry>
+ <entry>CYRILLIC CAPITAL LETTER GHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E8</entry>
+ <entry>U+0425</entry>
+ <entry>CYRILLIC CAPITAL LETTER HA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06E9</entry>
+ <entry>U+0418</entry>
+ <entry>CYRILLIC CAPITAL LETTER I</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06EA</entry>
+ <entry>U+0419</entry>
+ <entry>CYRILLIC CAPITAL LETTER SHORT I</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06EB</entry>
+ <entry>U+041A</entry>
+ <entry>CYRILLIC CAPITAL LETTER KA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06EC</entry>
+ <entry>U+041B</entry>
+ <entry>CYRILLIC CAPITAL LETTER EL</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06ED</entry>
+ <entry>U+041C</entry>
+ <entry>CYRILLIC CAPITAL LETTER EM</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06EE</entry>
+ <entry>U+041D</entry>
+ <entry>CYRILLIC CAPITAL LETTER EN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06EF</entry>
+ <entry>U+041E</entry>
+ <entry>CYRILLIC CAPITAL LETTER O</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F0</entry>
+ <entry>U+041F</entry>
+ <entry>CYRILLIC CAPITAL LETTER PE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F1</entry>
+ <entry>U+042F</entry>
+ <entry>CYRILLIC CAPITAL LETTER YA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F2</entry>
+ <entry>U+0420</entry>
+ <entry>CYRILLIC CAPITAL LETTER ER</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F3</entry>
+ <entry>U+0421</entry>
+ <entry>CYRILLIC CAPITAL LETTER ES</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F4</entry>
+ <entry>U+0422</entry>
+ <entry>CYRILLIC CAPITAL LETTER TE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F5</entry>
+ <entry>U+0423</entry>
+ <entry>CYRILLIC CAPITAL LETTER U</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F6</entry>
+ <entry>U+0416</entry>
+ <entry>CYRILLIC CAPITAL LETTER ZHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F7</entry>
+ <entry>U+0412</entry>
+ <entry>CYRILLIC CAPITAL LETTER VE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F8</entry>
+ <entry>U+042C</entry>
+ <entry>CYRILLIC CAPITAL LETTER SOFT SIGN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06F9</entry>
+ <entry>U+042B</entry>
+ <entry>CYRILLIC CAPITAL LETTER YERU</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06FA</entry>
+ <entry>U+0417</entry>
+ <entry>CYRILLIC CAPITAL LETTER ZE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06FB</entry>
+ <entry>U+0428</entry>
+ <entry>CYRILLIC CAPITAL LETTER SHA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06FC</entry>
+ <entry>U+042D</entry>
+ <entry>CYRILLIC CAPITAL LETTER E</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06FD</entry>
+ <entry>U+0429</entry>
+ <entry>CYRILLIC CAPITAL LETTER SHCHA</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06FE</entry>
+ <entry>U+0427</entry>
+ <entry>CYRILLIC CAPITAL LETTER CHE</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x06FF</entry>
+ <entry>U+042A</entry>
+ <entry>CYRILLIC CAPITAL LETTER HARD SIGN</entry>
+ <entry>Cyrillic</entry>
+ </row>
+ <row>
+ <entry>#x07A1</entry>
+ <entry>U+0386</entry>
+ <entry>GREEK CAPITAL LETTER ALPHA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07A2</entry>
+ <entry>U+0388</entry>
+ <entry>GREEK CAPITAL LETTER EPSILON WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07A3</entry>
+ <entry>U+0389</entry>
+ <entry>GREEK CAPITAL LETTER ETA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07A4</entry>
+ <entry>U+038A</entry>
+ <entry>GREEK CAPITAL LETTER IOTA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07A5</entry>
+ <entry>U+03AA</entry>
+ <entry>GREEK CAPITAL LETTER IOTA WITH DIALYTIKA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07A7</entry>
+ <entry>U+038C</entry>
+ <entry>GREEK CAPITAL LETTER OMICRON WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07A8</entry>
+ <entry>U+038E</entry>
+ <entry>GREEK CAPITAL LETTER UPSILON WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07A9</entry>
+ <entry>U+03AB</entry>
+ <entry>GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07AB</entry>
+ <entry>U+038F</entry>
+ <entry>GREEK CAPITAL LETTER OMEGA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07AE</entry>
+ <entry>U+0385</entry>
+ <entry>GREEK DIALYTIKA TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07AF</entry>
+ <entry>U+2015</entry>
+ <entry>HORIZONTAL BAR</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B1</entry>
+ <entry>U+03AC</entry>
+ <entry>GREEK SMALL LETTER ALPHA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B2</entry>
+ <entry>U+03AD</entry>
+ <entry>GREEK SMALL LETTER EPSILON WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B3</entry>
+ <entry>U+03AE</entry>
+ <entry>GREEK SMALL LETTER ETA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B4</entry>
+ <entry>U+03AF</entry>
+ <entry>GREEK SMALL LETTER IOTA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B5</entry>
+ <entry>U+03CA</entry>
+ <entry>GREEK SMALL LETTER IOTA WITH DIALYTIKA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B6</entry>
+ <entry>U+0390</entry>
+ <entry>GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B7</entry>
+ <entry>U+03CC</entry>
+ <entry>GREEK SMALL LETTER OMICRON WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B8</entry>
+ <entry>U+03CD</entry>
+ <entry>GREEK SMALL LETTER UPSILON WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07B9</entry>
+ <entry>U+03CB</entry>
+ <entry>GREEK SMALL LETTER UPSILON WITH DIALYTIKA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07BA</entry>
+ <entry>U+03B0</entry>
+ <entry>GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07BB</entry>
+ <entry>U+03CE</entry>
+ <entry>GREEK SMALL LETTER OMEGA WITH TONOS</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C1</entry>
+ <entry>U+0391</entry>
+ <entry>GREEK CAPITAL LETTER ALPHA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C2</entry>
+ <entry>U+0392</entry>
+ <entry>GREEK CAPITAL LETTER BETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C3</entry>
+ <entry>U+0393</entry>
+ <entry>GREEK CAPITAL LETTER GAMMA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C4</entry>
+ <entry>U+0394</entry>
+ <entry>GREEK CAPITAL LETTER DELTA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C5</entry>
+ <entry>U+0395</entry>
+ <entry>GREEK CAPITAL LETTER EPSILON</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C6</entry>
+ <entry>U+0396</entry>
+ <entry>GREEK CAPITAL LETTER ZETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C7</entry>
+ <entry>U+0397</entry>
+ <entry>GREEK CAPITAL LETTER ETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C8</entry>
+ <entry>U+0398</entry>
+ <entry>GREEK CAPITAL LETTER THETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07C9</entry>
+ <entry>U+0399</entry>
+ <entry>GREEK CAPITAL LETTER IOTA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07CA</entry>
+ <entry>U+039A</entry>
+ <entry>GREEK CAPITAL LETTER KAPPA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07CB</entry>
+ <entry>U+039B</entry>
+ <entry>GREEK CAPITAL LETTER LAMDA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07CC</entry>
+ <entry>U+039C</entry>
+ <entry>GREEK CAPITAL LETTER MU</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07CD</entry>
+ <entry>U+039D</entry>
+ <entry>GREEK CAPITAL LETTER NU</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07CE</entry>
+ <entry>U+039E</entry>
+ <entry>GREEK CAPITAL LETTER XI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07CF</entry>
+ <entry>U+039F</entry>
+ <entry>GREEK CAPITAL LETTER OMICRON</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D0</entry>
+ <entry>U+03A0</entry>
+ <entry>GREEK CAPITAL LETTER PI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D1</entry>
+ <entry>U+03A1</entry>
+ <entry>GREEK CAPITAL LETTER RHO</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D2</entry>
+ <entry>U+03A3</entry>
+ <entry>GREEK CAPITAL LETTER SIGMA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D4</entry>
+ <entry>U+03A4</entry>
+ <entry>GREEK CAPITAL LETTER TAU</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D5</entry>
+ <entry>U+03A5</entry>
+ <entry>GREEK CAPITAL LETTER UPSILON</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D6</entry>
+ <entry>U+03A6</entry>
+ <entry>GREEK CAPITAL LETTER PHI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D7</entry>
+ <entry>U+03A7</entry>
+ <entry>GREEK CAPITAL LETTER CHI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D8</entry>
+ <entry>U+03A8</entry>
+ <entry>GREEK CAPITAL LETTER PSI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07D9</entry>
+ <entry>U+03A9</entry>
+ <entry>GREEK CAPITAL LETTER OMEGA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E1</entry>
+ <entry>U+03B1</entry>
+ <entry>GREEK SMALL LETTER ALPHA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E2</entry>
+ <entry>U+03B2</entry>
+ <entry>GREEK SMALL LETTER BETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E3</entry>
+ <entry>U+03B3</entry>
+ <entry>GREEK SMALL LETTER GAMMA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E4</entry>
+ <entry>U+03B4</entry>
+ <entry>GREEK SMALL LETTER DELTA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E5</entry>
+ <entry>U+03B5</entry>
+ <entry>GREEK SMALL LETTER EPSILON</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E6</entry>
+ <entry>U+03B6</entry>
+ <entry>GREEK SMALL LETTER ZETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E7</entry>
+ <entry>U+03B7</entry>
+ <entry>GREEK SMALL LETTER ETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E8</entry>
+ <entry>U+03B8</entry>
+ <entry>GREEK SMALL LETTER THETA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07E9</entry>
+ <entry>U+03B9</entry>
+ <entry>GREEK SMALL LETTER IOTA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07EA</entry>
+ <entry>U+03BA</entry>
+ <entry>GREEK SMALL LETTER KAPPA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07EB</entry>
+ <entry>U+03BB</entry>
+ <entry>GREEK SMALL LETTER LAMDA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07EC</entry>
+ <entry>U+03BC</entry>
+ <entry>GREEK SMALL LETTER MU</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07ED</entry>
+ <entry>U+03BD</entry>
+ <entry>GREEK SMALL LETTER NU</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07EE</entry>
+ <entry>U+03BE</entry>
+ <entry>GREEK SMALL LETTER XI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07EF</entry>
+ <entry>U+03BF</entry>
+ <entry>GREEK SMALL LETTER OMICRON</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F0</entry>
+ <entry>U+03C0</entry>
+ <entry>GREEK SMALL LETTER PI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F1</entry>
+ <entry>U+03C1</entry>
+ <entry>GREEK SMALL LETTER RHO</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F2</entry>
+ <entry>U+03C3</entry>
+ <entry>GREEK SMALL LETTER SIGMA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F3</entry>
+ <entry>U+03C2</entry>
+ <entry>GREEK SMALL LETTER FINAL SIGMA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F4</entry>
+ <entry>U+03C4</entry>
+ <entry>GREEK SMALL LETTER TAU</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F5</entry>
+ <entry>U+03C5</entry>
+ <entry>GREEK SMALL LETTER UPSILON</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F6</entry>
+ <entry>U+03C6</entry>
+ <entry>GREEK SMALL LETTER PHI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F7</entry>
+ <entry>U+03C7</entry>
+ <entry>GREEK SMALL LETTER CHI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F8</entry>
+ <entry>U+03C8</entry>
+ <entry>GREEK SMALL LETTER PSI</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x07F9</entry>
+ <entry>U+03C9</entry>
+ <entry>GREEK SMALL LETTER OMEGA</entry>
+ <entry>Greek</entry>
+ </row>
+ <row>
+ <entry>#x08A1</entry>
+ <entry>U+23B7</entry>
+ <entry>LEFT RADICAL</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A2</entry>
+ <entry>-</entry>
+ <entry>TOP LEFT RADICAL</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A3</entry>
+ <entry>-</entry>
+ <entry>HORIZONTAL CONNECTOR</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A4</entry>
+ <entry>U+2320</entry>
+ <entry>TOP INTEGRAL</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A5</entry>
+ <entry>U+2321</entry>
+ <entry>BOTTOM INTEGRAL</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A6</entry>
+ <entry>-</entry>
+ <entry>VERTICAL CONNECTOR</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A7</entry>
+ <entry>U+23A1</entry>
+ <entry>TOP LEFT SQUARE BRACKET</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A8</entry>
+ <entry>U+23A3</entry>
+ <entry>BOTTOM LEFT SQUARE BRACKET</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08A9</entry>
+ <entry>U+23A4</entry>
+ <entry>TOP RIGHT SQUARE BRACKET</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08AA</entry>
+ <entry>U+23A6</entry>
+ <entry>BOTTOM RIGHT SQUARE BRACKET</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08AB</entry>
+ <entry>U+239B</entry>
+ <entry>TOP LEFT PARENTHESIS</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08AC</entry>
+ <entry>U+239D</entry>
+ <entry>BOTTOM LEFT PARENTHESIS</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08AD</entry>
+ <entry>U+239E</entry>
+ <entry>TOP RIGHT PARENTHESIS</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08AE</entry>
+ <entry>U+23A0</entry>
+ <entry>BOTTOM RIGHT PARENTHESIS</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08AF</entry>
+ <entry>U+23A8</entry>
+ <entry>LEFT MIDDLE CURLY BRACE</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B0</entry>
+ <entry>U+23AC</entry>
+ <entry>RIGHT MIDDLE CURLY BRACE</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B1</entry>
+ <entry>-</entry>
+ <entry>TOP LEFT SUMMATION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B2</entry>
+ <entry>-</entry>
+ <entry>BOTTOM LEFT SUMMATION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B3</entry>
+ <entry>-</entry>
+ <entry>TOP VERTICAL SUMMATION CONNECTOR</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B4</entry>
+ <entry>-</entry>
+ <entry>BOTTOM VERTICAL SUMMATION CONNECTOR</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B5</entry>
+ <entry>-</entry>
+ <entry>TOP RIGHT SUMMATION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B6</entry>
+ <entry>-</entry>
+ <entry>BOTTOM RIGHT SUMMATION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08B7</entry>
+ <entry>-</entry>
+ <entry>RIGHT MIDDLE SUMMATION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08BC</entry>
+ <entry>U+2264</entry>
+ <entry>LESS THAN OR EQUAL SIGN</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08BD</entry>
+ <entry>U+2260</entry>
+ <entry>NOT EQUAL SIGN</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08BE</entry>
+ <entry>U+2265</entry>
+ <entry>GREATER THAN OR EQUAL SIGN</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08BF</entry>
+ <entry>U+222B</entry>
+ <entry>INTEGRAL</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08C0</entry>
+ <entry>U+2234</entry>
+ <entry>THEREFORE</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08C1</entry>
+ <entry>U+221D</entry>
+ <entry>VARIATION, PROPORTIONAL TO</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08C2</entry>
+ <entry>U+221E</entry>
+ <entry>INFINITY</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08C5</entry>
+ <entry>U+2207</entry>
+ <entry>NABLA, DEL</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08C8</entry>
+ <entry>U+223C</entry>
+ <entry>IS APPROXIMATE TO</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08C9</entry>
+ <entry>U+2243</entry>
+ <entry>SIMILAR OR EQUAL TO</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08CD</entry>
+ <entry>U+21D4</entry>
+ <entry>IF AND ONLY IF</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08CE</entry>
+ <entry>U+21D2</entry>
+ <entry>IMPLIES</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08CF</entry>
+ <entry>U+2261</entry>
+ <entry>IDENTICAL TO</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08D6</entry>
+ <entry>U+221A</entry>
+ <entry>RADICAL</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08DA</entry>
+ <entry>U+2282</entry>
+ <entry>IS INCLUDED IN</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08DB</entry>
+ <entry>U+2283</entry>
+ <entry>INCLUDES</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08DC</entry>
+ <entry>U+2229</entry>
+ <entry>INTERSECTION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08DD</entry>
+ <entry>U+222A</entry>
+ <entry>UNION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08DE</entry>
+ <entry>U+2227</entry>
+ <entry>LOGICAL AND</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08DF</entry>
+ <entry>U+2228</entry>
+ <entry>LOGICAL OR</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08EF</entry>
+ <entry>U+2202</entry>
+ <entry>PARTIAL DERIVATIVE</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08F6</entry>
+ <entry>U+0192</entry>
+ <entry>FUNCTION</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08FB</entry>
+ <entry>U+2190</entry>
+ <entry>LEFT ARROW</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08FC</entry>
+ <entry>U+2191</entry>
+ <entry>UPWARD ARROW</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08FD</entry>
+ <entry>U+2192</entry>
+ <entry>RIGHT ARROW</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x08FE</entry>
+ <entry>U+2193</entry>
+ <entry>DOWNWARD ARROW</entry>
+ <entry>Technical</entry>
+ </row>
+ <row>
+ <entry>#x09DF</entry>
+ <entry>-</entry>
+ <entry>BLANK</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E0</entry>
+ <entry>U+25C6</entry>
+ <entry>SOLID DIAMOND</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E1</entry>
+ <entry>U+2592</entry>
+ <entry>CHECKERBOARD</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E2</entry>
+ <entry>U+2409</entry>
+ <entry>"HT"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E3</entry>
+ <entry>U+240C</entry>
+ <entry>"FF"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E4</entry>
+ <entry>U+240D</entry>
+ <entry>"CR"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E5</entry>
+ <entry>U+240A</entry>
+ <entry>"LF"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E8</entry>
+ <entry>U+2424</entry>
+ <entry>"NL"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09E9</entry>
+ <entry>U+240B</entry>
+ <entry>"VT"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09EA</entry>
+ <entry>U+2518</entry>
+ <entry>LOWER-RIGHT CORNER</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09EB</entry>
+ <entry>U+2510</entry>
+ <entry>UPPER-RIGHT CORNER</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09EC</entry>
+ <entry>U+250C</entry>
+ <entry>UPPER-LEFT CORNER</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09ED</entry>
+ <entry>U+2514</entry>
+ <entry>LOWER-LEFT CORNER</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09EE</entry>
+ <entry>U+253C</entry>
+ <entry>CROSSING-LINES</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09EF</entry>
+ <entry>U+23BA</entry>
+ <entry>HORIZONTAL LINE, SCAN 1</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F0</entry>
+ <entry>U+23BB</entry>
+ <entry>HORIZONTAL LINE, SCAN 3</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F1</entry>
+ <entry>U+2500</entry>
+ <entry>HORIZONTAL LINE, SCAN 5</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F2</entry>
+ <entry>U+23BC</entry>
+ <entry>HORIZONTAL LINE, SCAN 7</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F3</entry>
+ <entry>U+23BD</entry>
+ <entry>HORIZONTAL LINE, SCAN 9</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F4</entry>
+ <entry>U+251C</entry>
+ <entry>LEFT "T"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F5</entry>
+ <entry>U+2524</entry>
+ <entry>RIGHT "T"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F6</entry>
+ <entry>U+2534</entry>
+ <entry>BOTTOM "T"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F7</entry>
+ <entry>U+252C</entry>
+ <entry>TOP "T"</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x09F8</entry>
+ <entry>U+2502</entry>
+ <entry>VERTICAL BAR</entry>
+ <entry>Special</entry>
+ </row>
+ <row>
+ <entry>#x0AA1</entry>
+ <entry>U+2003</entry>
+ <entry>EM SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA2</entry>
+ <entry>U+2002</entry>
+ <entry>EN SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA3</entry>
+ <entry>U+2004</entry>
+ <entry>3/EM SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA4</entry>
+ <entry>U+2005</entry>
+ <entry>4/EM SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA5</entry>
+ <entry>U+2007</entry>
+ <entry>DIGIT SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA6</entry>
+ <entry>U+2008</entry>
+ <entry>PUNCTUATION SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA7</entry>
+ <entry>U+2009</entry>
+ <entry>THIN SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA8</entry>
+ <entry>U+200A</entry>
+ <entry>HAIR SPACE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AA9</entry>
+ <entry>U+2014</entry>
+ <entry>EM DASH</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AAA</entry>
+ <entry>U+2013</entry>
+ <entry>EN DASH</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AAC</entry>
+ <entry>-</entry>
+ <entry>SIGNIFICANT BLANK SYMBOL</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AAE</entry>
+ <entry>U+2026</entry>
+ <entry>ELLIPSIS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AAF</entry>
+ <entry>U+2025</entry>
+ <entry>DOUBLE BASELINE DOT</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB0</entry>
+ <entry>U+2153</entry>
+ <entry>VULGAR FRACTION ONE THIRD</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB1</entry>
+ <entry>U+2154</entry>
+ <entry>VULGAR FRACTION TWO THIRDS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB2</entry>
+ <entry>U+2155</entry>
+ <entry>VULGAR FRACTION ONE FIFTH</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB3</entry>
+ <entry>U+2156</entry>
+ <entry>VULGAR FRACTION TWO FIFTHS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB4</entry>
+ <entry>U+2157</entry>
+ <entry>VULGAR FRACTION THREE FIFTHS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB5</entry>
+ <entry>U+2158</entry>
+ <entry>VULGAR FRACTION FOUR FIFTHS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB6</entry>
+ <entry>U+2159</entry>
+ <entry>VULGAR FRACTION ONE SIXTH</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB7</entry>
+ <entry>U+215A</entry>
+ <entry>VULGAR FRACTION FIVE SIXTHS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AB8</entry>
+ <entry>U+2105</entry>
+ <entry>CARE OF</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ABB</entry>
+ <entry>U+2012</entry>
+ <entry>FIGURE DASH</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ABC</entry>
+ <entry>-</entry>
+ <entry>LEFT ANGLE BRACKET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ABD</entry>
+ <entry>-</entry>
+ <entry>DECIMAL POINT</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ABE</entry>
+ <entry>-</entry>
+ <entry>RIGHT ANGLE BRACKET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ABF</entry>
+ <entry>-</entry>
+ <entry>MARKER</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AC3</entry>
+ <entry>U+215B</entry>
+ <entry>VULGAR FRACTION ONE EIGHTH</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AC4</entry>
+ <entry>U+215C</entry>
+ <entry>VULGAR FRACTION THREE EIGHTHS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AC5</entry>
+ <entry>U+215D</entry>
+ <entry>VULGAR FRACTION FIVE EIGHTHS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AC6</entry>
+ <entry>U+215E</entry>
+ <entry>VULGAR FRACTION SEVEN EIGHTHS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AC9</entry>
+ <entry>U+2122</entry>
+ <entry>TRADEMARK SIGN</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ACA</entry>
+ <entry>-</entry>
+ <entry>SIGNATURE MARK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ACB</entry>
+ <entry>-</entry>
+ <entry>TRADEMARK SIGN IN CIRCLE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ACC</entry>
+ <entry>-</entry>
+ <entry>LEFT OPEN TRIANGLE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ACD</entry>
+ <entry>-</entry>
+ <entry>RIGHT OPEN TRIANGLE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ACE</entry>
+ <entry>-</entry>
+ <entry>EM OPEN CIRCLE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ACF</entry>
+ <entry>-</entry>
+ <entry>EM OPEN RECTANGLE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD0</entry>
+ <entry>U+2018</entry>
+ <entry>LEFT SINGLE QUOTATION MARK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD1</entry>
+ <entry>U+2019</entry>
+ <entry>RIGHT SINGLE QUOTATION MARK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD2</entry>
+ <entry>U+201C</entry>
+ <entry>LEFT DOUBLE QUOTATION MARK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD3</entry>
+ <entry>U+201D</entry>
+ <entry>RIGHT DOUBLE QUOTATION MARK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD4</entry>
+ <entry>U+211E</entry>
+ <entry>PRESCRIPTION, TAKE, RECIPE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD5</entry>
+ <entry>U+2030</entry>
+ <entry>PER MILLE SIGN</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD6</entry>
+ <entry>U+2032</entry>
+ <entry>MINUTES</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD7</entry>
+ <entry>U+2033</entry>
+ <entry>SECONDS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AD9</entry>
+ <entry>U+271D</entry>
+ <entry>LATIN CROSS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ADA</entry>
+ <entry>-</entry>
+ <entry>HEXAGRAM</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ADB</entry>
+ <entry>-</entry>
+ <entry>FILLED RECTANGLE BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ADC</entry>
+ <entry>-</entry>
+ <entry>FILLED LEFT TRIANGLE BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ADD</entry>
+ <entry>-</entry>
+ <entry>FILLED RIGHT TRIANGLE BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ADE</entry>
+ <entry>-</entry>
+ <entry>EM FILLED CIRCLE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0ADF</entry>
+ <entry>-</entry>
+ <entry>EM FILLED RECTANGLE</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE0</entry>
+ <entry>-</entry>
+ <entry>EN OPEN CIRCLE BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE1</entry>
+ <entry>-</entry>
+ <entry>EN OPEN SQUARE BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE2</entry>
+ <entry>-</entry>
+ <entry>OPEN RECTANGULAR BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE3</entry>
+ <entry>-</entry>
+ <entry>OPEN TRIANGULAR BULLET UP</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE4</entry>
+ <entry>-</entry>
+ <entry>OPEN TRIANGULAR BULLET DOWN</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE5</entry>
+ <entry>-</entry>
+ <entry>OPEN STAR</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE6</entry>
+ <entry>-</entry>
+ <entry>EN FILLED CIRCLE BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE7</entry>
+ <entry>-</entry>
+ <entry>EN FILLED SQUARE BULLET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE8</entry>
+ <entry>-</entry>
+ <entry>FILLED TRIANGULAR BULLET UP</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AE9</entry>
+ <entry>-</entry>
+ <entry>FILLED TRIANGULAR BULLET DOWN</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AEA</entry>
+ <entry>-</entry>
+ <entry>LEFT POINTER</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AEB</entry>
+ <entry>-</entry>
+ <entry>RIGHT POINTER</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AEC</entry>
+ <entry>U+2663</entry>
+ <entry>CLUB</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AED</entry>
+ <entry>U+2666</entry>
+ <entry>DIAMOND</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AEE</entry>
+ <entry>U+2665</entry>
+ <entry>HEART</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF0</entry>
+ <entry>U+2720</entry>
+ <entry>MALTESE CROSS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF1</entry>
+ <entry>U+2020</entry>
+ <entry>DAGGER</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF2</entry>
+ <entry>U+2021</entry>
+ <entry>DOUBLE DAGGER</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF3</entry>
+ <entry>U+2713</entry>
+ <entry>CHECK MARK, TICK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF4</entry>
+ <entry>U+2717</entry>
+ <entry>BALLOT CROSS</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF5</entry>
+ <entry>U+266F</entry>
+ <entry>MUSICAL SHARP</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF6</entry>
+ <entry>U+266D</entry>
+ <entry>MUSICAL FLAT</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF7</entry>
+ <entry>U+2642</entry>
+ <entry>MALE SYMBOL</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF8</entry>
+ <entry>U+2640</entry>
+ <entry>FEMALE SYMBOL</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AF9</entry>
+ <entry>U+260E</entry>
+ <entry>TELEPHONE SYMBOL</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AFA</entry>
+ <entry>U+2315</entry>
+ <entry>TELEPHONE RECORDER SYMBOL</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AFB</entry>
+ <entry>U+2117</entry>
+ <entry>PHONOGRAPH COPYRIGHT SIGN</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AFC</entry>
+ <entry>U+2038</entry>
+ <entry>CARET</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AFD</entry>
+ <entry>U+201A</entry>
+ <entry>SINGLE LOW QUOTATION MARK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AFE</entry>
+ <entry>U+201E</entry>
+ <entry>DOUBLE LOW QUOTATION MARK</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0AFF</entry>
+ <entry>-</entry>
+ <entry>CURSOR</entry>
+ <entry>Publish</entry>
+ </row>
+ <row>
+ <entry>#x0BA3</entry>
+ <entry>-</entry>
+ <entry>LEFT CARET</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BA6</entry>
+ <entry>-</entry>
+ <entry>RIGHT CARET</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BA8</entry>
+ <entry>-</entry>
+ <entry>DOWN CARET</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BA9</entry>
+ <entry>-</entry>
+ <entry>UP CARET</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BC0</entry>
+ <entry>-</entry>
+ <entry>OVERBAR</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BC2</entry>
+ <entry>U+22A5</entry>
+ <entry>DOWN TACK</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BC3</entry>
+ <entry>-</entry>
+ <entry>UP SHOE (CAP)</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BC4</entry>
+ <entry>U+230A</entry>
+ <entry>DOWN STILE</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BC6</entry>
+ <entry>-</entry>
+ <entry>UNDERBAR</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BCA</entry>
+ <entry>U+2218</entry>
+ <entry>JOT</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BCC</entry>
+ <entry>U+2395</entry>
+ <entry>QUAD</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BCE</entry>
+ <entry>U+22A4</entry>
+ <entry>UP TACK</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BCF</entry>
+ <entry>U+25CB</entry>
+ <entry>CIRCLE</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BD3</entry>
+ <entry>U+2308</entry>
+ <entry>UP STILE</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BD6</entry>
+ <entry>-</entry>
+ <entry>DOWN SHOE (CUP)</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BD8</entry>
+ <entry>-</entry>
+ <entry>RIGHT SHOE</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BDA</entry>
+ <entry>-</entry>
+ <entry>LEFT SHOE</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BDC</entry>
+ <entry>U+22A2</entry>
+ <entry>LEFT TACK</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0BFC</entry>
+ <entry>U+22A3</entry>
+ <entry>RIGHT TACK</entry>
+ <entry>APL</entry>
+ </row>
+ <row>
+ <entry>#x0CDF</entry>
+ <entry>U+2017</entry>
+ <entry>DOUBLE LOW LINE</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE0</entry>
+ <entry>U+05D0</entry>
+ <entry>HEBREW LETTER ALEF</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE1</entry>
+ <entry>U+05D1</entry>
+ <entry>HEBREW LETTER BET</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE2</entry>
+ <entry>U+05D2</entry>
+ <entry>HEBREW LETTER GIMEL</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE3</entry>
+ <entry>U+05D3</entry>
+ <entry>HEBREW LETTER DALET</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE4</entry>
+ <entry>U+05D4</entry>
+ <entry>HEBREW LETTER HE</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE5</entry>
+ <entry>U+05D5</entry>
+ <entry>HEBREW LETTER VAV</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE6</entry>
+ <entry>U+05D6</entry>
+ <entry>HEBREW LETTER ZAYIN</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE7</entry>
+ <entry>U+05D7</entry>
+ <entry>HEBREW LETTER HET</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE8</entry>
+ <entry>U+05D8</entry>
+ <entry>HEBREW LETTER TET</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CE9</entry>
+ <entry>U+05D9</entry>
+ <entry>HEBREW LETTER YOD</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CEA</entry>
+ <entry>U+05DA</entry>
+ <entry>HEBREW LETTER FINAL KAF</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CEB</entry>
+ <entry>U+05DB</entry>
+ <entry>HEBREW LETTER KAF</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CEC</entry>
+ <entry>U+05DC</entry>
+ <entry>HEBREW LETTER LAMED</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CED</entry>
+ <entry>U+05DD</entry>
+ <entry>HEBREW LETTER FINAL MEM</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CEE</entry>
+ <entry>U+05DE</entry>
+ <entry>HEBREW LETTER MEM</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CEF</entry>
+ <entry>U+05DF</entry>
+ <entry>HEBREW LETTER FINAL NUN</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF0</entry>
+ <entry>U+05E0</entry>
+ <entry>HEBREW LETTER NUN</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF1</entry>
+ <entry>U+05E1</entry>
+ <entry>HEBREW LETTER SAMEKH</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF2</entry>
+ <entry>U+05E2</entry>
+ <entry>HEBREW LETTER AYIN</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF3</entry>
+ <entry>U+05E3</entry>
+ <entry>HEBREW LETTER FINAL PE</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF4</entry>
+ <entry>U+05E4</entry>
+ <entry>HEBREW LETTER PE</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF5</entry>
+ <entry>U+05E5</entry>
+ <entry>HEBREW LETTER FINAL TSADI</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF6</entry>
+ <entry>U+05E6</entry>
+ <entry>HEBREW LETTER TSADI</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF7</entry>
+ <entry>U+05E7</entry>
+ <entry>HEBREW LETTER QOF</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF8</entry>
+ <entry>U+05E8</entry>
+ <entry>HEBREW LETTER RESH</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CF9</entry>
+ <entry>U+05E9</entry>
+ <entry>HEBREW LETTER SHIN</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0CFA</entry>
+ <entry>U+05EA</entry>
+ <entry>HEBREW LETTER TAV</entry>
+ <entry>Hebrew</entry>
+ </row>
+ <row>
+ <entry>#x0DA1</entry>
+ <entry>U+0E01</entry>
+ <entry>THAI CHARACTER KO KAI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA2</entry>
+ <entry>U+0E02</entry>
+ <entry>THAI CHARACTER KHO KHAI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA3</entry>
+ <entry>U+0E03</entry>
+ <entry>THAI CHARACTER KHO KHUAT</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA4</entry>
+ <entry>U+0E04</entry>
+ <entry>THAI CHARACTER KHO KHWAI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA5</entry>
+ <entry>U+0E05</entry>
+ <entry>THAI CHARACTER KHO KHON</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA6</entry>
+ <entry>U+0E06</entry>
+ <entry>THAI CHARACTER KHO RAKHANG</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA7</entry>
+ <entry>U+0E07</entry>
+ <entry>THAI CHARACTER NGO NGU</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA8</entry>
+ <entry>U+0E08</entry>
+ <entry>THAI CHARACTER CHO CHAN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DA9</entry>
+ <entry>U+0E09</entry>
+ <entry>THAI CHARACTER CHO CHING</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DAA</entry>
+ <entry>U+0E0A</entry>
+ <entry>THAI CHARACTER CHO CHANG</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DAB</entry>
+ <entry>U+0E0B</entry>
+ <entry>THAI CHARACTER SO SO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DAC</entry>
+ <entry>U+0E0C</entry>
+ <entry>THAI CHARACTER CHO CHOE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DAD</entry>
+ <entry>U+0E0D</entry>
+ <entry>THAI CHARACTER YO YING</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DAE</entry>
+ <entry>U+0E0E</entry>
+ <entry>THAI CHARACTER DO CHADA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DAF</entry>
+ <entry>U+0E0F</entry>
+ <entry>THAI CHARACTER TO PATAK</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB0</entry>
+ <entry>U+0E10</entry>
+ <entry>THAI CHARACTER THO THAN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB1</entry>
+ <entry>U+0E11</entry>
+ <entry>THAI CHARACTER THO NANGMONTHO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB2</entry>
+ <entry>U+0E12</entry>
+ <entry>THAI CHARACTER THO PHUTHAO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB3</entry>
+ <entry>U+0E13</entry>
+ <entry>THAI CHARACTER NO NEN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB4</entry>
+ <entry>U+0E14</entry>
+ <entry>THAI CHARACTER DO DEK</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB5</entry>
+ <entry>U+0E15</entry>
+ <entry>THAI CHARACTER TO TAO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB6</entry>
+ <entry>U+0E16</entry>
+ <entry>THAI CHARACTER THO THUNG</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB7</entry>
+ <entry>U+0E17</entry>
+ <entry>THAI CHARACTER THO THAHAN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB8</entry>
+ <entry>U+0E18</entry>
+ <entry>THAI CHARACTER THO THONG</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DB9</entry>
+ <entry>U+0E19</entry>
+ <entry>THAI CHARACTER NO NU</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DBA</entry>
+ <entry>U+0E1A</entry>
+ <entry>THAI CHARACTER BO BAIMAI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DBB</entry>
+ <entry>U+0E1B</entry>
+ <entry>THAI CHARACTER PO PLA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DBC</entry>
+ <entry>U+0E1C</entry>
+ <entry>THAI CHARACTER PHO PHUNG</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DBD</entry>
+ <entry>U+0E1D</entry>
+ <entry>THAI CHARACTER FO FA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DBE</entry>
+ <entry>U+0E1E</entry>
+ <entry>THAI CHARACTER PHO PHAN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DBF</entry>
+ <entry>U+0E1F</entry>
+ <entry>THAI CHARACTER FO FAN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC0</entry>
+ <entry>U+0E20</entry>
+ <entry>THAI CHARACTER PHO SAMPHAO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC1</entry>
+ <entry>U+0E21</entry>
+ <entry>THAI CHARACTER MO MA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC2</entry>
+ <entry>U+0E22</entry>
+ <entry>THAI CHARACTER YO YAK</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC3</entry>
+ <entry>U+0E23</entry>
+ <entry>THAI CHARACTER RO RUA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC4</entry>
+ <entry>U+0E24</entry>
+ <entry>THAI CHARACTER RU</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC5</entry>
+ <entry>U+0E25</entry>
+ <entry>THAI CHARACTER LO LING</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC6</entry>
+ <entry>U+0E26</entry>
+ <entry>THAI CHARACTER LU</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC7</entry>
+ <entry>U+0E27</entry>
+ <entry>THAI CHARACTER WO WAEN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC8</entry>
+ <entry>U+0E28</entry>
+ <entry>THAI CHARACTER SO SALA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DC9</entry>
+ <entry>U+0E29</entry>
+ <entry>THAI CHARACTER SO RUSI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DCA</entry>
+ <entry>U+0E2A</entry>
+ <entry>THAI CHARACTER SO SUA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DCB</entry>
+ <entry>U+0E2B</entry>
+ <entry>THAI CHARACTER HO HIP</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DCC</entry>
+ <entry>U+0E2C</entry>
+ <entry>THAI CHARACTER LO CHULA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DCD</entry>
+ <entry>U+0E2D</entry>
+ <entry>THAI CHARACTER O ANG</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DCE</entry>
+ <entry>U+0E2E</entry>
+ <entry>THAI CHARACTER HO NOKHUK</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DCF</entry>
+ <entry>U+0E2F</entry>
+ <entry>THAI CHARACTER PAIYANNOI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD0</entry>
+ <entry>U+0E30</entry>
+ <entry>THAI CHARACTER SARA A</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD1</entry>
+ <entry>U+0E31</entry>
+ <entry>THAI CHARACTER MAI HAN-AKAT</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD2</entry>
+ <entry>U+0E32</entry>
+ <entry>THAI CHARACTER SARA AA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD3</entry>
+ <entry>U+0E33</entry>
+ <entry>THAI CHARACTER SARA AM</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD4</entry>
+ <entry>U+0E34</entry>
+ <entry>THAI CHARACTER SARA I</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD5</entry>
+ <entry>U+0E35</entry>
+ <entry>THAI CHARACTER SARA II</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD6</entry>
+ <entry>U+0E36</entry>
+ <entry>THAI CHARACTER SARA UE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD7</entry>
+ <entry>U+0E37</entry>
+ <entry>THAI CHARACTER SARA UEE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD8</entry>
+ <entry>U+0E38</entry>
+ <entry>THAI CHARACTER SARA U</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DD9</entry>
+ <entry>U+0E39</entry>
+ <entry>THAI CHARACTER SARA UU</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DDA</entry>
+ <entry>U+0E3A</entry>
+ <entry>THAI CHARACTER PHINTHU</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DDF</entry>
+ <entry>U+0E3F</entry>
+ <entry>THAI CURRENCY SYMBOL BAHT</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE0</entry>
+ <entry>U+0E40</entry>
+ <entry>THAI CHARACTER SARA E</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE1</entry>
+ <entry>U+0E41</entry>
+ <entry>THAI CHARACTER SARA AE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE2</entry>
+ <entry>U+0E42</entry>
+ <entry>THAI CHARACTER SARA O</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE3</entry>
+ <entry>U+0E43</entry>
+ <entry>THAI CHARACTER SARA AI MAIMUAN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE4</entry>
+ <entry>U+0E44</entry>
+ <entry>THAI CHARACTER SARA AI MAIMALAI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE5</entry>
+ <entry>U+0E45</entry>
+ <entry>THAI CHARACTER LAKKHANGYAO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE6</entry>
+ <entry>U+0E46</entry>
+ <entry>THAI CHARACTER MAIYAMOK</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE7</entry>
+ <entry>U+0E47</entry>
+ <entry>THAI CHARACTER MAITAIKHU</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE8</entry>
+ <entry>U+0E48</entry>
+ <entry>THAI CHARACTER MAI EK</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DE9</entry>
+ <entry>U+0E49</entry>
+ <entry>THAI CHARACTER MAI THO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DEA</entry>
+ <entry>U+0E4A</entry>
+ <entry>THAI CHARACTER MAI TRI</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DEB</entry>
+ <entry>U+0E4B</entry>
+ <entry>THAI CHARACTER MAI CHATTAWA</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DEC</entry>
+ <entry>U+0E4C</entry>
+ <entry>THAI CHARACTER THANTHAKHAT</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DED</entry>
+ <entry>U+0E4D</entry>
+ <entry>THAI CHARACTER NIKHAHIT</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF0</entry>
+ <entry>U+0E50</entry>
+ <entry>THAI DIGIT ZERO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF1</entry>
+ <entry>U+0E51</entry>
+ <entry>THAI DIGIT ONE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF2</entry>
+ <entry>U+0E52</entry>
+ <entry>THAI DIGIT TWO</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF3</entry>
+ <entry>U+0E53</entry>
+ <entry>THAI DIGIT THREE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF4</entry>
+ <entry>U+0E54</entry>
+ <entry>THAI DIGIT FOUR</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF5</entry>
+ <entry>U+0E55</entry>
+ <entry>THAI DIGIT FIVE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF6</entry>
+ <entry>U+0E56</entry>
+ <entry>THAI DIGIT SIX</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF7</entry>
+ <entry>U+0E57</entry>
+ <entry>THAI DIGIT SEVEN</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF8</entry>
+ <entry>U+0E58</entry>
+ <entry>THAI DIGIT EIGHT</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0DF9</entry>
+ <entry>U+0E59</entry>
+ <entry>THAI DIGIT NINE</entry>
+ <entry>Thai</entry>
+ </row>
+ <row>
+ <entry>#x0EA1</entry>
+ <entry>-</entry>
+ <entry>HANGUL KIYEOG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA2</entry>
+ <entry>-</entry>
+ <entry>HANGUL SSANG KIYEOG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA3</entry>
+ <entry>-</entry>
+ <entry>HANGUL KIYEOG SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA4</entry>
+ <entry>-</entry>
+ <entry>HANGUL NIEUN</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA5</entry>
+ <entry>-</entry>
+ <entry>HANGUL NIEUN JIEUJ</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA6</entry>
+ <entry>-</entry>
+ <entry>HANGUL NIEUN HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA7</entry>
+ <entry>-</entry>
+ <entry>HANGUL DIKEUD</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA8</entry>
+ <entry>-</entry>
+ <entry>HANGUL SSANG DIKEUD</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EA9</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EAA</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL KIYEOG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EAB</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL MIEUM</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EAC</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL PIEUB</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EAD</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EAE</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL TIEUT</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EAF</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL PHIEUF</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB0</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB1</entry>
+ <entry>-</entry>
+ <entry>HANGUL MIEUM</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB2</entry>
+ <entry>-</entry>
+ <entry>HANGUL PIEUB</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB3</entry>
+ <entry>-</entry>
+ <entry>HANGUL SSANG PIEUB</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB4</entry>
+ <entry>-</entry>
+ <entry>HANGUL PIEUB SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB5</entry>
+ <entry>-</entry>
+ <entry>HANGUL SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB6</entry>
+ <entry>-</entry>
+ <entry>HANGUL SSANG SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB7</entry>
+ <entry>-</entry>
+ <entry>HANGUL IEUNG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB8</entry>
+ <entry>-</entry>
+ <entry>HANGUL JIEUJ</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EB9</entry>
+ <entry>-</entry>
+ <entry>HANGUL SSANG JIEUJ</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EBA</entry>
+ <entry>-</entry>
+ <entry>HANGUL CIEUC</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EBB</entry>
+ <entry>-</entry>
+ <entry>HANGUL KHIEUQ</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EBC</entry>
+ <entry>-</entry>
+ <entry>HANGUL TIEUT</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EBD</entry>
+ <entry>-</entry>
+ <entry>HANGUL PHIEUF</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EBE</entry>
+ <entry>-</entry>
+ <entry>HANGUL HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EBF</entry>
+ <entry>-</entry>
+ <entry>HANGUL A</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC0</entry>
+ <entry>-</entry>
+ <entry>HANGUL AE</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC1</entry>
+ <entry>-</entry>
+ <entry>HANGUL YA</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC2</entry>
+ <entry>-</entry>
+ <entry>HANGUL YAE</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC3</entry>
+ <entry>-</entry>
+ <entry>HANGUL EO</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC4</entry>
+ <entry>-</entry>
+ <entry>HANGUL E</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC5</entry>
+ <entry>-</entry>
+ <entry>HANGUL YEO</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC6</entry>
+ <entry>-</entry>
+ <entry>HANGUL YE</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC7</entry>
+ <entry>-</entry>
+ <entry>HANGUL O</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC8</entry>
+ <entry>-</entry>
+ <entry>HANGUL WA</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EC9</entry>
+ <entry>-</entry>
+ <entry>HANGUL WAE</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ECA</entry>
+ <entry>-</entry>
+ <entry>HANGUL OE</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ECB</entry>
+ <entry>-</entry>
+ <entry>HANGUL YO</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ECC</entry>
+ <entry>-</entry>
+ <entry>HANGUL U</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ECD</entry>
+ <entry>-</entry>
+ <entry>HANGUL WEO</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ECE</entry>
+ <entry>-</entry>
+ <entry>HANGUL WE</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ECF</entry>
+ <entry>-</entry>
+ <entry>HANGUL WI</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED0</entry>
+ <entry>-</entry>
+ <entry>HANGUL YU</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED1</entry>
+ <entry>-</entry>
+ <entry>HANGUL EU</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED2</entry>
+ <entry>-</entry>
+ <entry>HANGUL YI</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED3</entry>
+ <entry>-</entry>
+ <entry>HANGUL I</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED4</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG KIYEOG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED5</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG SSANG KIYEOG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED6</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG KIYEOG SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED7</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG NIEUN</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED8</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG NIEUN JIEUJ</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0ED9</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG NIEUN HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EDA</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG DIKEUD</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EDB</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EDC</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL KIYEOG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EDD</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL MIEUM</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EDE</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL PIEUB</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EDF</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE0</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL TIEUT</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE1</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL PHIEUF</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE2</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG RIEUL HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE3</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG MIEUM</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE4</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG PIEUB</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE5</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG PIEUB SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE6</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE7</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG SSANG SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE8</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG IEUNG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EE9</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG JIEUJ</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EEA</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG CIEUC</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EEB</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG KHIEUQ</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EEC</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG TIEUT</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EED</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG PHIEUF</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EEE</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EEF</entry>
+ <entry>-</entry>
+ <entry>HANGUL RIEUL YEORIN HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF0</entry>
+ <entry>-</entry>
+ <entry>HANGUL SUNKYEONGEUM MIEUM</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF1</entry>
+ <entry>-</entry>
+ <entry>HANGUL SUNKYEONGEUM PIEUB</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF2</entry>
+ <entry>-</entry>
+ <entry>HANGUL PAN SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF3</entry>
+ <entry>-</entry>
+ <entry>HANGUL KKOGJI DALRIN IEUNG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF4</entry>
+ <entry>-</entry>
+ <entry>HANGUL SUNKYEONGEUM PHIEUF</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF5</entry>
+ <entry>-</entry>
+ <entry>HANGUL YEORIN HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF6</entry>
+ <entry>-</entry>
+ <entry>HANGUL ARAE A</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF7</entry>
+ <entry>-</entry>
+ <entry>HANGUL ARAE AE</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF8</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG PAN SIOS</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EF9</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG KKOGJI DALRIN IEUNG</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EFA</entry>
+ <entry>-</entry>
+ <entry>HANGUL JONG SEONG YEORIN HIEUH</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x0EFF</entry>
+ <entry>-</entry>
+ <entry>KOREAN WON</entry>
+ <entry>Korean</entry>
+ </row>
+ <row>
+ <entry>#x13BC</entry>
+ <entry>U+0152</entry>
+ <entry>LATIN CAPITAL LIGATURE OE</entry>
+ <entry>Latin-9</entry>
+ </row>
+ <row>
+ <entry>#x13BD</entry>
+ <entry>U+0153</entry>
+ <entry>LATIN SMALL LIGATURE OE</entry>
+ <entry>Latin-9</entry>
+ </row>
+ <row>
+ <entry>#x13BE</entry>
+ <entry>U+0178</entry>
+ <entry>LATIN CAPITAL LETTER Y WITH DIAERESIS</entry>
+ <entry>Latin-9</entry>
+ </row>
+ <row>
+ <entry>#x20A0</entry>
+ <entry>-</entry>
+ <entry>CURRENCY ECU SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A1</entry>
+ <entry>-</entry>
+ <entry>CURRENCY COLON SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A2</entry>
+ <entry>-</entry>
+ <entry>CURRENCY CRUZEIRO SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A3</entry>
+ <entry>-</entry>
+ <entry>CURRENCY FRENCH FRANC SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A4</entry>
+ <entry>-</entry>
+ <entry>CURRENCY LIRA SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A5</entry>
+ <entry>-</entry>
+ <entry>CURRENCY MILL SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A6</entry>
+ <entry>-</entry>
+ <entry>CURRENCY NAIRA SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A7</entry>
+ <entry>-</entry>
+ <entry>CURRENCY PESETA SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A8</entry>
+ <entry>-</entry>
+ <entry>CURRENCY RUPEE SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20A9</entry>
+ <entry>-</entry>
+ <entry>CURRENCY WON SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20AA</entry>
+ <entry>-</entry>
+ <entry>CURRENCY NEW SHEQEL SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20AB</entry>
+ <entry>-</entry>
+ <entry>CURRENCY DONG SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ <row>
+ <entry>#x20AC</entry>
+ <entry>U+20AC</entry>
+ <entry>CURRENCY EURO SIGN</entry>
+ <entry>Currency</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</sect1>
+</appendix>
diff --git a/specs/sect1-9.xml b/specs/sect1-9.xml
new file mode 100644
index 0000000..f8e8b7c
--- /dev/null
+++ b/specs/sect1-9.xml
@@ -0,0 +1,15309 @@
+<part id="sect1-9">
+<preface id="acknowledgements">
+<title>Acknowledgements</title>
+<para>
+The primary contributers to the X11 protocol are:
+</para>
+
+<itemizedlist>
+<listitem><para>Dave Carver (Digital HPW)</para></listitem>
+<listitem><para>Branko Gerovac (Digital HPW)</para></listitem>
+<listitem><para>Jim Gettys (MIT/Project Athena, Digital)</para></listitem>
+<listitem><para>Phil Karlton (Digital WSL)</para></listitem>
+<listitem><para>Scott McGregor (Digital SSG)</para></listitem>
+<listitem><para>Ram Rao (Digital UEG)</para></listitem>
+<listitem><para>David Rosenthal (Sun)</para></listitem>
+<listitem><para>Dave Winchell (Digital UEG)</para></listitem>
+</itemizedlist>
+
+<para>
+The implementors of initial server who provided useful
+input are:
+</para>
+
+<itemizedlist>
+<listitem><para>Susan Angebranndt (Digital)</para></listitem>
+<listitem><para>Raymond Drewry (Digital)</para></listitem>
+<listitem><para>Todd Newman (Digital)</para></listitem>
+</itemizedlist>
+
+<para>
+The invited reviewers who provided useful input are:
+</para>
+
+<itemizedlist>
+<listitem><para>Andrew Cherenson (Berkeley)</para></listitem>
+<listitem><para>Burns Fisher (Digital)</para></listitem>
+<listitem><para>Dan Garfinkel (HP)</para></listitem>
+<listitem><para>Leo Hourvitz (Next)</para></listitem>
+<listitem><para>Brock Krizan (HP)</para></listitem>
+<listitem><para>David Laidlaw (Stellar)</para></listitem>
+<listitem><para>Dave Mellinger (Interleaf)</para></listitem>
+<listitem><para>Ron Newman (MIT)</para></listitem>
+<listitem><para>John Ousterhout (Berkeley)</para></listitem>
+<listitem><para>Andrew Palay (ITC CMU)</para></listitem>
+<listitem><para>Ralph Swick (MIT)</para></listitem>
+<listitem><para>Craig Taylor (Sun)</para></listitem>
+<listitem><para>Jeffery Vroom (Stellar)</para></listitem>
+</itemizedlist>
+
+<para>
+Thanks go to Al Mento of Digital's UEG Documentation Group for
+formatting this document.
+</para>
+
+<para>
+This document does not attempt to provide the rationale or pragmatics required
+to fully understand the protocol or to place it in perspective within a
+complete system.
+</para>
+
+<para>
+The protocol contains many management mechanisms that are not intended for
+normal applications.
+Not all mechanisms are needed to build a particular user interface.
+It is important to keep in mind that the protocol is intended to
+provide mechanism, not policy.
+</para>
+
+<para>
+Robert W. Scheifler
+</para>
+<para>
+X Consortium, Inc.
+</para>
+</preface>
+
+<chapter id='Protocol_Formats'>
+ <title>Protocol Formats</title>
+
+ <section id="request_format">
+ <title>Request Format</title>
+ <indexterm zone="request_format" significance="preferred"><primary>Request</primary><secondary>format</secondary></indexterm>
+ <para>
+Every request contains an 8-bit <firstterm id="major_opcode">major opcode</firstterm>
+<indexterm zone="major_opcode" significance="preferred"><primary>Opcode</primary><secondary>major</secondary></indexterm>
+and a 16-bit <firstterm id="request_length">length field</firstterm>
+<indexterm zone="request_length" significance="preferred"><primary>Request</primary><secondary>length</secondary></indexterm>
+expressed in units of four bytes.
+Every request consists of four bytes of a header
+(containing the major opcode, the length field, and a data byte)
+followed by zero or more additional bytes of data.
+The length field defines the total length of the request, including the header.
+The length field in a request must equal the minimum length required to contain
+the request.
+If the specified length is smaller or larger than the required length,
+an error is generated.
+Unused bytes in a request are not required to be zero.
+Major opcodes 128 through 255 are reserved for
+<firstterm id="extension">extensions</firstterm>.
+<indexterm zone="extension"><primary>Extension</primary></indexterm>
+Extensions are intended to contain multiple requests,
+so extension requests typically have an additional
+<firstterm id="minor_opcode">minor opcode</firstterm> encoded
+in the second data byte in the request header.
+<indexterm zone="minor_opcode" significance="preferred"><primary>Opcode</primary><secondary>minor</secondary></indexterm>
+However, the placement and interpretation of this minor opcode and of all
+other fields in extension requests are not defined by the core protocol.
+Every request on a given connection is implicitly assigned a
+<firstterm id="sequence_number">sequence number</firstterm>,
+<indexterm zone="sequence_number" significance="preferred"><primary>Sequence number</primary></indexterm>
+starting with one, that is used in replies, errors, and events.
+ </para>
+ </section>
+
+ <section id="reply_format">
+ <title>Reply Format</title>
+ <indexterm zone="reply_format" significance="preferred"><primary>Reply</primary><secondary>format</secondary></indexterm>
+ <para>
+Every <firstterm>reply</firstterm> contains a 32-bit length field
+expressed in units of four bytes.
+Every reply consists of 32 bytes followed by zero or more additional bytes of
+data, as specified in the length field.
+Unused bytes within a reply are not guaranteed to be zero.
+Every reply also contains the least significant 16 bits of the sequence number
+of the corresponding request.
+ </para>
+ </section>
+
+ <section id="error_format">
+ <title>Error Format</title>
+ <indexterm zone="error_format" significance="preferred"><primary>Error report</primary><secondary>format</secondary></indexterm>
+ <para>
+Error reports are 32 bytes long.
+Every error includes an 8-bit error code.
+<phrase id="errors:extensions">
+Error codes 128 through 255 are reserved for extensions.
+</phrase>
+<indexterm zone="errors:extensions" significance="preferred"><primary>Error Codes</primary><secondary>extensions</secondary></indexterm>
+<indexterm zone="errors:extensions" significance="preferred"><primary>Extension</primary><secondary>error codes</secondary></indexterm>
+Every error also includes the major and minor opcodes of the failed request
+and the least significant 16 bits of the sequence number of the request.
+For the following errors (see <link linkend='Errors'>section 4</link>),
+the failing resource ID is also returned:
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>Font</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Pixmap</emphasis>
+and
+<emphasis role='bold'>Window</emphasis>.
+For
+<emphasis role='bold'>Atom</emphasis>
+errors, the failing atom is returned.
+For
+<emphasis role='bold'>Value</emphasis>
+errors, the failing value is returned.
+Other core errors return no additional data.
+Unused bytes within an error are not guaranteed to be zero.
+ </para>
+ </section>
+
+ <section id="event_format">
+ <title>Event Format</title>
+ <indexterm zone="event_format" significance="preferred"><primary>Event</primary><secondary>format</secondary></indexterm>
+ <para>
+<firstterm>Events</firstterm> are 32 bytes long.
+Unused bytes within an event are not guaranteed to be zero.
+Every event contains an 8-bit type code.
+The most significant bit in this code is set if the event was generated from a
+<link linkend="requests:SendEvent"><emphasis role='bold'>SendEvent</emphasis></link>
+request.
+<phrase id="events:extensions">
+Event codes 64 through 127 are reserved for extensions, although the core
+protocol does not define a mechanism for selecting interest in such events.
+</phrase>
+<indexterm zone="events:extensions" significance="preferred"><primary>Event</primary><secondary>extension</secondary></indexterm>
+<indexterm zone="events:extensions" significance="preferred"><primary>Extension</primary><secondary>event</secondary></indexterm>
+Every core event (with the exception of
+<link linkend="events:KeymapNotify"><emphasis role='bold'>KeymapNotify</emphasis></link>)
+also contains the least significant 16 bits of the sequence number of the last
+request issued by the client that was (or is currently being) processed by
+the server.
+ </para>
+ </section>
+</chapter>
+
+<chapter id='Syntactic_Conventions'>
+<title>Syntactic Conventions</title>
+<!-- .XS -->
+<!-- (SN Syntactic Conventions -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+The rest of this document uses the following syntactic conventions.
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+The syntax {...} encloses a set of alternatives.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The syntax [...] encloses a set of structure components.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+In general, TYPEs are in uppercase and
+<emphasis role='bold'>AlternativeValues</emphasis>
+are capitalized.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Requests in <link linkend='Requests'>section 9</link> are described
+in the following format:
+<literallayout class="monospaced">
+<emphasis role='bold'>RequestName</emphasis>
+ <emphasis remap='I'>arg1</emphasis>: type1
+ ...
+ <emphasis remap='I'>argN</emphasis>: typeN
+ ▶
+ result1: type1
+ ...
+ resultM: typeM
+
+ Errors: kind1, ..., kindK
+
+ Description.
+</literallayout>
+ </para>
+ <para>
+If no ▶ is present in the description,
+then the request has no reply (it is asynchronous),
+although errors may still be reported.
+If ▶+ is used,
+then one or more replies can be generated for a single request.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+Events in <link linkend='Events'>section 11</link> are described
+in the following format:
+<literallayout class="monospaced">
+<emphasis role='bold'>EventName</emphasis>
+ <emphasis remap='I'>value1</emphasis>: type1
+ ...
+ <emphasis remap='I'>valueN</emphasis>: typeN
+
+ Description.
+</literallayout>
+ </para>
+ </listitem>
+</itemizedlist>
+</chapter>
+
+<chapter id='Common_Types'>
+<title>Common Types</title>
+<!-- .XS -->
+<!-- (SN Common Types -->
+<!-- .XE -->
+<informaltable frame="topbot">
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry id="types:LISTofFOO">LISTofFOO<indexterm zone="types:LISTofFOO" significance="preferred"><primary>Types</primary><secondary>LISTofFOO</secondary></indexterm></entry>
+ <entry>
+
+A type name of the form LISTofFOO means a counted list of elements of type
+FOO.
+The size of the length field may vary (it is not necessarily the same
+size as a FOO), and in some cases, it may be implicit.
+It is fully specified in Appendix B.
+Except where explicitly noted,
+zero-length lists are legal.
+ </entry>
+ </row>
+ <row>
+ <entry><para id="types:BITMASK">BITMASK<indexterm zone="types:BITMASK" significance="preferred"><primary>Types</primary><secondary>BITMASK</secondary></indexterm></para><para id="types:LISTofVALUE">LISTofVALUE<indexterm zone="types:LISTofVALUE" significance="preferred"><primary>Types</primary><secondary>LISTofVALUE</secondary></indexterm></para></entry>
+ <entry>
+<para>
+The types BITMASK and LISTofVALUE are somewhat special.
+Various requests contain arguments of the form:
+</para>
+<para>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+</para>
+<para>
+<emphasis remap='I'>value-list</emphasis>: LISTofVALUE
+</para>
+<para>
+These are used to allow the client to specify a subset of a heterogeneous
+collection of optional arguments.
+The value-mask specifies which arguments are to be provided;
+each such argument is assigned a unique bit position.
+The representation of the BITMASK will typically contain more bits than
+there are defined arguments.
+The unused bits in the value-mask must be zero (or the server generates a
+<emphasis role='bold'>Value</emphasis>
+error).
+The value-list contains one value for each bit set to 1 in the mask,
+from least significant to most significant bit in the mask.
+Each value is represented with four bytes,
+but the actual value occupies only the least significant bytes as required.
+The values of the unused bytes do not matter.
+</para>
+ </entry>
+ </row>
+ <row>
+ <entry id="types:OR">OR<indexterm zone="types:OR" significance="preferred"><primary>Types</primary><secondary>OR</secondary></indexterm></entry>
+ <entry>
+A type of the form "T1 or ... or Tn" means the union of the indicated types.
+A single-element type is given as the element without enclosing braces.
+ </entry>
+ </row>
+ <row>
+ <entry id="types:WINDOW">WINDOW<indexterm zone="types:WINDOW" significance="preferred"><primary>Types</primary><secondary>WINDOW</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:PIXMAP">PIXMAP<indexterm zone="types:PIXMAP" significance="preferred"><primary>Types</primary><secondary>PIXMAP</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:CURSOR">CURSOR<indexterm zone="types:CURSOR" significance="preferred"><primary>Types</primary><secondary>CURSOR</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:FONT">FONT<indexterm zone="types:FONT" significance="preferred"><primary>Types</primary><secondary>FONT</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:GCONTEXT">GCONTEXT<indexterm zone="types:GCONTEXT" significance="preferred"><primary>Types</primary><secondary>GCONTEXT</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:COLORMAP">COLORMAP<indexterm zone="types:COLORMAP" significance="preferred"><primary>Types</primary><secondary>COLORMAP</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:DRAWABLE">DRAWABLE<indexterm zone="types:DRAWABLE" significance="preferred"><primary>Types</primary><secondary>DRAWABLE</secondary></indexterm></entry>
+ <entry>WINDOW or PIXMAP</entry>
+ </row>
+ <row>
+ <entry id="types:FONTABLE">FONTABLE<indexterm zone="types:FONTABLE" significance="preferred"><primary>Types</primary><secondary>FONTABLE</secondary></indexterm></entry>
+ <entry>FONT or GCONTEXT</entry>
+ </row>
+ <row>
+ <entry id="types:ATOM">ATOM<indexterm zone="types:ATOM" significance="preferred"><primary>Types</primary><secondary>ATOM</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:VISUALID">VISUALID<indexterm zone="types:VISUALID" significance="preferred"><primary>Types</primary><secondary>VISUALID</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:VALUE">VALUE<indexterm zone="types:VALUE" significance="preferred"><primary>Types</primary><secondary>VALUE</secondary></indexterm></entry>
+ <entry>32-bit quantity (used only in LISTofVALUE)</entry>
+ </row>
+ <row>
+ <entry id="types:BYTE">BYTE<indexterm zone="types:BYTE" significance="preferred"><primary>Types</primary><secondary>BYTE</secondary></indexterm></entry>
+ <entry>8-bit value</entry>
+ </row>
+ <row>
+ <entry id="types:INT8">INT8<indexterm zone="types:INT8" significance="preferred"><primary>Types</primary><secondary>INT8</secondary></indexterm></entry>
+ <entry>8-bit signed integer</entry>
+ </row>
+ <row>
+ <entry id="types:INT16">INT16<indexterm zone="types:INT16" significance="preferred"><primary>Types</primary><secondary>INT16</secondary></indexterm></entry>
+ <entry>16-bit signed integer</entry>
+ </row>
+ <row>
+ <entry id="types:INT32">INT32<indexterm zone="types:INT32" significance="preferred"><primary>Types</primary><secondary>INT32</secondary></indexterm></entry>
+ <entry>32-bit signed integer</entry>
+ </row>
+ <row>
+ <entry id="types:CARD8">CARD8<indexterm zone="types:CARD8" significance="preferred"><primary>Types</primary><secondary>CARD8</secondary></indexterm></entry>
+ <entry>8-bit unsigned integer</entry>
+ </row>
+ <row>
+ <entry id="types:CARD16">CARD16<indexterm zone="types:CARD16" significance="preferred"><primary>Types</primary><secondary>CARD16</secondary></indexterm></entry>
+ <entry>16-bit unsigned integer</entry>
+ </row>
+ <row>
+ <entry id="types:CARD32">CARD32<indexterm zone="types:CARD32" significance="preferred"><primary>Types</primary><secondary>CARD32</secondary></indexterm></entry>
+ <entry>32-bit unsigned integer</entry>
+ </row>
+ <row>
+ <entry id="types:TIMESTAMP">TIMESTAMP<indexterm zone="types:TIMESTAMP" significance="preferred"><primary>Types</primary><secondary>TIMESTAMP</secondary></indexterm></entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry id="types:BITGRAVITY">BITGRAVITY<indexterm zone="types:BITGRAVITY" significance="preferred"><primary>Types</primary><secondary>BITGRAVITY</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>Forget</emphasis>,
+<emphasis role='bold'>Static</emphasis>,
+<emphasis role='bold'>NorthWest</emphasis>,
+<emphasis role='bold'>North</emphasis>,
+<emphasis role='bold'>NorthEast</emphasis>,
+<emphasis role='bold'>West</emphasis>,
+<emphasis role='bold'>Center</emphasis>,
+<emphasis role='bold'>East</emphasis>,
+<emphasis role='bold'>SouthWest</emphasis>,
+<emphasis role='bold'>South</emphasis>,
+<emphasis role='bold'>SouthEast</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:WINGRAVITY">WINGRAVITY<indexterm zone="types:WINGRAVITY" significance="preferred"><primary>Types</primary><secondary>WINGRAVITY</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>Unmap</emphasis>,
+<emphasis role='bold'>Static</emphasis>,
+<emphasis role='bold'>NorthWest</emphasis>,
+<emphasis role='bold'>North</emphasis>,
+<emphasis role='bold'>NorthEast</emphasis>,
+<emphasis role='bold'>West</emphasis>,
+<emphasis role='bold'>Center</emphasis>,
+<emphasis role='bold'>East</emphasis>,
+<emphasis role='bold'>SouthWest</emphasis>,
+<emphasis role='bold'>South</emphasis>,
+<emphasis role='bold'>SouthEast</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:BOOL">BOOL<indexterm zone="types:BOOL" significance="preferred"><primary>Types</primary><secondary>BOOL</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>True</emphasis>,
+<emphasis role='bold'>False</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:EVENT">EVENT<indexterm zone="types:EVENT" significance="preferred"><primary>Types</primary><secondary>EVENT</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>KeyPress</emphasis>,
+<emphasis role='bold'>KeyRelease</emphasis>,
+<emphasis role='bold'>OwnerGrabButton</emphasis>,
+<emphasis role='bold'>ButtonPress</emphasis>,
+<emphasis role='bold'>ButtonRelease</emphasis>,
+<emphasis role='bold'>EnterWindow</emphasis>,
+<emphasis role='bold'>LeaveWindow</emphasis>,
+<emphasis role='bold'>PointerMotion</emphasis>,
+<emphasis role='bold'>PointerMotionHint</emphasis>,
+<emphasis role='bold'>Button1Motion</emphasis>,
+<emphasis role='bold'>Button2Motion</emphasis>,
+<emphasis role='bold'>Button3Motion</emphasis>,
+<emphasis role='bold'>Button4Motion</emphasis>,
+<emphasis role='bold'>Button5Motion</emphasis>,
+<emphasis role='bold'>ButtonMotion</emphasis>,
+<emphasis role='bold'>Exposure</emphasis>,
+<emphasis role='bold'>VisibilityChange</emphasis>,
+<emphasis role='bold'>StructureNotify</emphasis>,
+<emphasis role='bold'>ResizeRedirect</emphasis>,
+<emphasis role='bold'>SubstructureNotify</emphasis>,
+<emphasis role='bold'>SubstructureRedirect</emphasis>,
+<emphasis role='bold'>FocusChange</emphasis>,
+<emphasis role='bold'>PropertyChange</emphasis>,
+<emphasis role='bold'>ColormapChange</emphasis>,
+<emphasis role='bold'>KeymapState</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:POINTEREVENT">POINTEREVENT<indexterm zone="types:POINTEREVENT" significance="preferred"><primary>Types</primary><secondary>POINTEREVENT</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>ButtonPress</emphasis>,
+<emphasis role='bold'>ButtonRelease</emphasis>,
+<emphasis role='bold'>EnterWindow</emphasis>,
+<emphasis role='bold'>LeaveWindow</emphasis>,
+<emphasis role='bold'>PointerMotion</emphasis>,
+<emphasis role='bold'>PointerMotionHint</emphasis>,
+<emphasis role='bold'>Button1Motion</emphasis>,
+<emphasis role='bold'>Button2Motion</emphasis>,
+<emphasis role='bold'>Button3Motion</emphasis>,
+<emphasis role='bold'>Button4Motion</emphasis>,
+<emphasis role='bold'>Button5Motion</emphasis>,
+<emphasis role='bold'>ButtonMotion</emphasis>,
+<emphasis role='bold'>KeymapState</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:DEVICEEVENT">DEVICEEVENT<indexterm zone="types:DEVICEEVENT" significance="preferred"><primary>Types</primary><secondary>DEVICEEVENT</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>KeyPress</emphasis>,
+<emphasis role='bold'>KeyRelease</emphasis>,
+<emphasis role='bold'>ButtonPress</emphasis>,
+<emphasis role='bold'>ButtonRelease</emphasis>,
+<emphasis role='bold'>PointerMotion</emphasis>,
+<emphasis role='bold'>Button1Motion</emphasis>,
+<emphasis role='bold'>Button2Motion</emphasis>,
+<emphasis role='bold'>Button3Motion</emphasis>,
+<emphasis role='bold'>Button4Motion</emphasis>,
+<emphasis role='bold'>Button5Motion</emphasis>,
+<emphasis role='bold'>ButtonMotion</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:KEYSYM">KEYSYM<indexterm zone="types:KEYSYM" significance="preferred"><primary>Types</primary><secondary>KEYSYM</secondary></indexterm></entry>
+ <entry>32-bit value (top three bits guaranteed to be zero)</entry>
+ </row>
+ <row>
+ <entry id="types:KEYCODE">KEYCODE<indexterm zone="types:KEYCODE" significance="preferred"><primary>Types</primary><secondary>KEYCODE</secondary></indexterm></entry>
+ <entry>CARD8</entry>
+ </row>
+ <row>
+ <entry id="types:BUTTON">BUTTON<indexterm zone="types:BUTTON" significance="preferred"><primary>Types</primary><secondary>BUTTON</secondary></indexterm></entry>
+ <entry>CARD8</entry>
+ </row>
+ <row>
+ <entry id="types:KEYMASK">KEYMASK<indexterm zone="types:KEYMASK" significance="preferred"><primary>Types</primary><secondary>KEYMASK</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>Shift</emphasis>,
+<emphasis role='bold'>Lock</emphasis>,
+<emphasis role='bold'>Control</emphasis>,
+<emphasis role='bold'>Mod1</emphasis>,
+<emphasis role='bold'>Mod2</emphasis>,
+<emphasis role='bold'>Mod3</emphasis>,
+<emphasis role='bold'>Mod4</emphasis>,
+<emphasis role='bold'>Mod5</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:BUTMASK">BUTMASK<indexterm zone="types:BUTMASK" significance="preferred"><primary>Types</primary><secondary>BUTMASK</secondary></indexterm></entry>
+ <entry>
+{ <emphasis role='bold'>Button1</emphasis>,
+<emphasis role='bold'>Button2</emphasis>,
+<emphasis role='bold'>Button3</emphasis>,
+<emphasis role='bold'>Button4</emphasis>,
+<emphasis role='bold'>Button5</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry id="types:KEYBUTMASK">KEYBUTMASK<indexterm zone="types:KEYBUTMASK" significance="preferred"><primary>Types</primary><secondary>KEYBUTMASK</secondary></indexterm></entry>
+ <entry>KEYMASK or BUTMASK</entry>
+ </row>
+ <row>
+ <entry id="types:STRING8">STRING8<indexterm zone="types:STRING8" significance="preferred"><primary>Types</primary><secondary>STRING8</secondary></indexterm></entry>
+ <entry>LISTofCARD8</entry>
+ </row>
+ <row>
+ <entry id="types:STRING16">STRING16<indexterm zone="types:STRING16" significance="preferred"><primary>Types</primary><secondary>STRING16</secondary></indexterm></entry>
+ <entry>LISTofCHAR2B</entry>
+ </row>
+ <row>
+ <entry id="types:CHAR2B">CHAR2B<indexterm zone="types:CHAR2B" significance="preferred"><primary>Types</primary><secondary>CHAR2B</secondary></indexterm></entry>
+ <entry>[byte1, byte2: CARD8]</entry>
+ </row>
+ <row>
+ <entry id="types:POINT">POINT<indexterm zone="types:POINT" significance="preferred"><primary>Types</primary><secondary>POINT</secondary></indexterm></entry>
+ <entry>[x, y: INT16]</entry>
+ </row>
+ <row>
+ <entry id="types:RECTANGLE">RECTANGLE<indexterm zone="types:RECTANGLE" significance="preferred"><primary>Types</primary><secondary>RECTANGLE</secondary></indexterm></entry>
+ <entry>
+<para>[x, y: INT16,</para>
+<para>width, height: CARD16]</para>
+ </entry>
+ </row>
+ <row>
+ <entry id="types:ARC">ARC<indexterm zone="types:ARC" significance="preferred"><primary>Types</primary><secondary>ARC</secondary></indexterm></entry>
+ <entry>
+<para>[x, y: INT16,</para>
+<para>width, height: CARD16,</para>
+<para>angle1, angle2: INT16]</para>
+ </entry>
+ </row>
+ <row>
+ <entry id="types:HOST">HOST<indexterm zone="types:HOST" significance="preferred"><primary>Types</primary><secondary>HOST</secondary></indexterm></entry>
+ <entry>
+<para>
+[family:
+{ <emphasis role='bold'>Internet</emphasis>,
+<emphasis role='bold'>InternetV6</emphasis>,
+<emphasis role='bold'>ServerInterpreted</emphasis>,
+<emphasis role='bold'>DECnet</emphasis>,
+<emphasis role='bold'>Chaos</emphasis> }
+</para>
+<para>address: LISTofBYTE]</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The [x,y] coordinates of a RECTANGLE specify the upper-left corner.
+</para>
+
+<para>
+The primary interpretation of large characters in a STRING16 is that they
+are composed of two bytes used to index a two-dimensional matrix,
+hence, the use of CHAR2B rather than CARD16.
+This corresponds to the JIS/ISO method of indexing 2-byte characters.
+It is expected that most large fonts will be defined with 2-byte
+matrix indexing.
+For large fonts constructed with linear indexing,
+a CHAR2B can be interpreted as a 16-bit number by treating byte1 as
+the most significant byte.
+This means that clients should always transmit such
+16-bit character values most significant byte first, as the server will never
+byte-swap CHAR2B quantities.
+</para>
+
+<para>
+The length, format, and interpretation of a HOST address are specific to the
+family (see
+<link linkend="requests:ChangeHosts"><emphasis role='bold'>ChangeHosts</emphasis></link>
+request).
+</para>
+</chapter>
+
+<chapter id='Errors'>
+<title>Errors</title>
+<!-- .XS -->
+<!-- (SN Errors -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+In general, when a request terminates with an error,
+the request has no side effects (that is, there is no partial execution).
+The only requests for which this is not true are
+<link linkend="requests:ChangeWindowAttributes"><emphasis role='bold'>ChangeWindowAttributes</emphasis></link>,
+<link linkend="requests:ChangeGC"><emphasis role='bold'>ChangeGC</emphasis></link>,
+<link linkend="requests:PolyText8"><emphasis role='bold'>PolyText8</emphasis></link>,
+<link linkend="requests:PolyText16"><emphasis role='bold'>PolyText16</emphasis></link>,
+<link linkend="requests:FreeColors"><emphasis role='bold'>FreeColors</emphasis></link>,
+<link linkend="requests:StoreColors"><emphasis role='bold'>StoreColors</emphasis></link>
+and
+<link linkend="requests:ChangeKeyboardControl"><emphasis role='bold'>ChangeKeyboardControl</emphasis></link>.
+</para>
+
+<para>
+The following error codes result from various requests as follows:
+</para>
+
+<informaltable frame="topbot">
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Error</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry id="errors:Access"><emphasis role='bold'>Access</emphasis><indexterm zone="errors:Access" significance="preferred"><primary>Error Codes</primary><secondary>Access</secondary></indexterm></entry>
+ <entry>
+An attempt is made to grab a key/button combination already grabbed by another
+client.
+An attempt is made to free a colormap entry not allocated by the client
+or to free an entry in a colormap that was created with all entries writable.
+An attempt is made to store into a read-only or an unallocated colormap entry.
+An attempt is made to modify the access control list from other than the local
+host (or otherwise authorized client).
+An attempt is made to select an event type that only one client can
+select at a time when another client has already selected it.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Alloc"><emphasis role='bold'>Alloc</emphasis><indexterm zone="errors:Alloc" significance="preferred"><primary>Error Codes</primary><secondary>Alloc</secondary></indexterm></entry>
+ <entry>
+The server failed to allocate the requested resource.
+Note that the explicit listing of
+<emphasis role='bold'>Alloc</emphasis>
+errors in request only covers allocation errors at a very coarse level
+and is not intended to cover all cases
+of a server running out of allocation space in the middle of service.
+The semantics when a server runs out of allocation space are left unspecified,
+but a server may generate an
+<emphasis role='bold'>Alloc</emphasis>
+error on any request for this reason,
+and clients should be prepared to receive such errors and handle
+or discard them.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Atom"><emphasis role='bold'>Atom</emphasis><indexterm zone="errors:Atom" significance="preferred"><primary>Error Codes</primary><secondary>Atom</secondary></indexterm></entry>
+ <entry>
+A value for an ATOM argument does not name a defined ATOM.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Colormap"><emphasis role='bold'>Colormap</emphasis><indexterm zone="errors:Colormap" significance="preferred"><primary>Error Codes</primary><secondary>Colormap</secondary></indexterm></entry>
+ <entry>
+A value for a COLORMAP argument does not name a defined COLORMAP.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Cursor"><emphasis role='bold'>Cursor</emphasis><indexterm zone="errors:Cursor" significance="preferred"><primary>Error Codes</primary><secondary>Cursor</secondary></indexterm></entry>
+ <entry>
+A value for a CURSOR argument does not name a defined CURSOR.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Drawable"><emphasis role='bold'>Drawable</emphasis><indexterm zone="errors:Drawable" significance="preferred"><primary>Error Codes</primary><secondary>Drawable</secondary></indexterm></entry>
+ <entry>
+A value for a DRAWABLE argument does not name a defined WINDOW
+or PIXMAP.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Font"><emphasis role='bold'>Font</emphasis><indexterm zone="errors:Font" significance="preferred"><primary>Error Codes</primary><secondary>Font</secondary></indexterm></entry>
+ <entry>
+A value for a FONT argument does not name a defined FONT.
+A value for a FONTABLE argument does not name a defined FONT or a
+defined GCONTEXT.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:GContext"><emphasis role='bold'>GContext</emphasis><indexterm zone="errors:GContext" significance="preferred"><primary>Error Codes</primary><secondary>GContext</secondary></indexterm></entry>
+ <entry>
+A value for a GCONTEXT argument does not name a defined GCONTEXT.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:IDChoice"><emphasis role='bold'>IDChoice</emphasis><indexterm zone="errors:IDChoice" significance="preferred"><primary>Error Codes</primary><secondary>IDChoice</secondary></indexterm></entry>
+ <entry>
+The value chosen for a resource identifier either is not included
+in the range assigned to the client or is already in use.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Implementation"><emphasis role='bold'>Implementation</emphasis><indexterm zone="errors:Implementation" significance="preferred"><primary>Error Codes</primary><secondary>Implementation</secondary></indexterm></entry>
+ <entry>
+The server does not implement some aspect of the request.
+A server that generates this error for a core request is deficient.
+As such, this error is not listed for any of the requests,
+but clients should be prepared to receive such errors
+and handle or discard them.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Length"><emphasis role='bold'>Length</emphasis><indexterm zone="errors:Length" significance="preferred"><primary>Error Codes</primary><secondary>Length</secondary></indexterm></entry>
+ <entry>
+The length of a request is shorter or longer than that required
+to minimally contain the arguments.
+The length of a request exceeds the maximum length accepted by the
+server.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Match"><emphasis role='bold'>Match</emphasis><indexterm zone="errors:Match" significance="preferred"><primary>Error Codes</primary><secondary>Match</secondary></indexterm></entry>
+ <entry>
+An
+<emphasis role='bold'>InputOnly</emphasis>
+window is used as a DRAWABLE.
+In a graphics request, the GCONTEXT argument does not have the same
+root and depth as the destination DRAWABLE argument.
+Some argument (or pair of arguments) has the correct type and range,
+but it fails to match in some other way required by the request.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Name"><emphasis role='bold'>Name</emphasis><indexterm zone="errors:Name" significance="preferred"><primary>Error Codes</primary><secondary>Name</secondary></indexterm></entry>
+ <entry>
+A font or color of the specified name does not exist.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Pixmap"><emphasis role='bold'>Pixmap</emphasis><indexterm zone="errors:Pixmap" significance="preferred"><primary>Error Codes</primary><secondary>Pixmap</secondary></indexterm></entry>
+ <entry>
+A value for a PIXMAP argument does not name a defined PIXMAP.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Request"><emphasis role='bold'>Request</emphasis><indexterm zone="errors:Request" significance="preferred"><primary>Error Codes</primary><secondary>Request</secondary></indexterm></entry>
+ <entry>
+The major or minor opcode does not specify a valid request.
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Value"><emphasis role='bold'>Value</emphasis><indexterm zone="errors:Value" significance="preferred"><primary>Error Codes</primary><secondary>Value</secondary></indexterm></entry>
+ <entry>
+Some numeric value falls outside the range of values accepted by the request.
+Unless a specific range is specified for an argument,
+the full range defined by the argument's type is accepted.
+Any argument defined as a set of alternatives typically can generate
+this error (due to the encoding).
+ </entry>
+ </row>
+ <row>
+ <entry id="errors:Window"><emphasis role='bold'>Window</emphasis><indexterm zone="errors:Window" significance="preferred"><primary>Error Codes</primary><secondary>Window</secondary></indexterm></entry>
+ <entry>
+A value for a WINDOW argument does not name a defined WINDOW.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<note><para>
+The
+<emphasis role='bold'>Atom</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>Font</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Pixmap</emphasis>
+and
+<emphasis role='bold'>Window</emphasis>
+errors are also used when the argument type is extended by union with a
+set of fixed alternatives, for example, &lt;WINDOW or
+<emphasis role='bold'>PointerRoot</emphasis>
+or
+<emphasis role='bold'>None</emphasis>&gt;.
+</para></note>
+</chapter>
+
+<chapter id='Keyboards'>
+<title>Keyboards</title>
+<indexterm zone="Keyboards"><primary>Keyboard</primary></indexterm>
+<!-- .XS -->
+<!-- (SN Keyboards -->
+<!-- .XE -->
+<para id="keycode">
+A KEYCODE represents a physical (or logical) key.
+<indexterm zone="keycode"><primary>Types</primary><secondary>KEYCODE</secondary></indexterm>
+<indexterm zone="keycode" significance="preferred"><primary>Keycode</primary></indexterm>
+Keycodes lie in the inclusive range [8,255].
+A keycode value carries no intrinsic information,
+although server implementors may attempt to encode geometry information
+(for example, matrix) to be interpreted in a server-dependent fashion.
+The mapping between keys and keycodes cannot be changed using the
+protocol.
+</para>
+<para id="keysym">
+A KEYSYM is an encoding of a symbol on the cap of a key.
+<indexterm zone="keysym"><primary>Types</primary><secondary>KEYSYM</secondary></indexterm>
+<indexterm zone="keysym"><primary>Keysym</primary></indexterm>
+The set of defined KEYSYMs include the character sets Latin-1, Latin-2,
+Latin-3, Latin-4, Kana, Arabic, Cyrillic, Greek, Tech, Special, Publish, APL,
+Hebrew, Thai, and Korean as well as a set of symbols common on keyboards
+(Return, Help, Tab,
+and so on).
+KEYSYMs with the most significant bit (of the 29 bits) set are reserved
+as vendor-specific.
+</para>
+<para>
+A list of KEYSYMs is associated with each KEYCODE.
+The list is intended to convey the set of symbols on the corresponding key.
+If the list (ignoring trailing
+<keysym>NoSymbol</keysym>
+entries) is a single KEYSYM "<emphasis remap='I'>K</emphasis>",
+then the list is treated as if it were
+the list "<emphasis remap='I'>K</emphasis> <keysym>NoSymbol</keysym>
+<emphasis remap='I'>K</emphasis> <keysym>NoSymbol</keysym>".
+If the list (ignoring trailing <keysym>NoSymbol</keysym> entries)
+is a pair of KEYSYMs
+"<emphasis remap='I'>K1 K2</emphasis>", then the list is treated as
+if it were the list
+"<emphasis remap='I'>K1 K2 K1 K2</emphasis>".
+If the list (ignoring trailing
+<keysym>NoSymbol</keysym>
+entries) is
+a triple of KEYSYMs "<emphasis remap='I'>K1 K2 K3</emphasis>",
+then the list is treated as if it were the list "
+<emphasis remap='I'>K1 K2 K3</emphasis> <keysym>NoSymbol</keysym>".
+When an explicit "void" element is desired in the list,
+the value
+<keysym>VoidSymbol</keysym>
+can be used.
+</para>
+<para>
+<!-- .LP -->
+The first four elements of the list are split into two groups of KEYSYMs.
+Group 1 contains the first and second KEYSYMs, Group 2 contains the third and
+fourth KEYSYMs.
+Within each group,
+if the second element of the group is
+<keysym>NoSymbol</keysym>,
+then the group should be treated as if the second element were the
+same as the first element, except when the first element is an alphabetic
+KEYSYM "<emphasis remap='I'>K</emphasis>" for which both lowercase
+and uppercase forms are defined.
+In that case, the group should be treated as if the first element were the
+lowercase form of "<emphasis remap='I'>K</emphasis>" and the second
+element were the uppercase form
+of "<emphasis remap='I'>K</emphasis>".
+</para>
+
+<para id="keysym_from_keypress">
+The standard rules for obtaining a KEYSYM from a
+<link linkend="events:KeyPress"><emphasis role='bold'>KeyPress</emphasis></link>
+<indexterm zone="keysym_from_keypress"><primary>KeyPress</primary></indexterm>
+event make use of only the Group 1 and Group 2 KEYSYMs; no interpretation of
+other KEYSYMs in the list is defined. The modifier state determines which
+group to use. Switching between groups is controlled by the KEYSYM named
+MODE SWITCH, by attaching that KEYSYM to some KEYCODE and attaching that
+KEYCODE to any one of the modifiers
+<emphasis role='bold'>Mod1</emphasis>
+through
+<emphasis role='bold'>Mod5</emphasis>.
+This modifier is
+<indexterm zone="group_modifier" significance="preferred"><primary>modifier</primary><secondary>group</secondary></indexterm>
+called the "<firstterm id="group_modifier">group modifier</firstterm>". For any KEYCODE, Group 1 is used when the
+group modifier is off, and Group 2 is used when the group modifier is on.
+</para>
+
+<para id="modifier:lock">
+The
+<emphasis role='bold'>Lock</emphasis>
+<indexterm zone="modifier:lock" significance="preferred"><primary>modifier</primary><secondary>Lock</secondary></indexterm>
+modifier is interpreted as CapsLock when the KEYSYM named CAPS
+LOCK is attached to some KEYCODE and that KEYCODE is attached to the
+<emphasis role='bold'>Lock</emphasis>
+modifier. The
+<emphasis role='bold'>Lock</emphasis>
+modifier is interpreted as ShiftLock when the KEYSYM
+named SHIFT LOCK is attached to some KEYCODE and that KEYCODE is attached
+to the
+<emphasis role='bold'>Lock</emphasis>
+modifier. If the
+<emphasis role='bold'>Lock</emphasis>
+modifier could be interpreted as both
+CapsLock and ShiftLock, the CapsLock interpretation is used.
+</para>
+
+<para id="modifier:numlock">
+<!-- .LP -->
+The operation of "keypad" keys is controlled by the KEYSYM named NUM LOCK,
+by attaching that KEYSYM to some KEYCODE and attaching that KEYCODE to any
+one of the modifiers
+<emphasis role='bold'>Mod1</emphasis>
+through
+<emphasis role='bold'>Mod5</emphasis>.
+This modifier is called the
+<indexterm zone="modifier:lock" significance="preferred"><primary>modifier</primary><secondary>NumLock</secondary></indexterm>
+"numlock modifier". The standard KEYSYMs with the prefix KEYPAD in their
+name are called "keypad" KEYSYMs; these are KEYSYMS with numeric value in
+the hexadecimal range #xFF80 to #xFFBD inclusive. In addition,
+vendor-specific KEYSYMS in the hexadecimal range #x11000000 to #x1100FFFF
+are also keypad KEYSYMs.
+</para>
+<para>
+<!-- .LP -->
+Within a group, the choice of KEYSYM is determined by applying the first
+rule that is satisfied from the following list:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+The numlock modifier is on and the second KEYSYM is a keypad KEYSYM. In
+this case, if the
+<emphasis role='bold'>Shift</emphasis>
+modifier is on, or if the
+<emphasis role='bold'>Lock</emphasis>
+modifier is on and
+is interpreted as ShiftLock, then the first KEYSYM is used; otherwise, the
+second KEYSYM is used.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The
+<emphasis role='bold'>Shift</emphasis>
+and
+<emphasis role='bold'>Lock</emphasis>
+modifiers are both off. In this case, the first
+KEYSYM is used.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The
+<emphasis role='bold'>Shift</emphasis>
+modifier is off, and the
+<emphasis role='bold'>Lock</emphasis>
+modifier is on and is
+interpreted as CapsLock. In this case, the first KEYSYM is used, but if
+that KEYSYM is lowercase alphabetic, then the corresponding uppercase
+KEYSYM is used instead.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The
+<emphasis role='bold'>Shift</emphasis>
+modifier is on, and the
+<emphasis role='bold'>Lock</emphasis>
+modifier is on and is interpreted
+as CapsLock. In this case, the second KEYSYM is used, but if that KEYSYM
+is lowercase alphabetic, then the corresponding uppercase KEYSYM is used
+instead.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+The
+<emphasis role='bold'>Shift</emphasis>
+modifier is on, or the
+<emphasis role='bold'>Lock</emphasis>
+modifier is on and is interpreted
+as ShiftLock, or both. In this case, the second KEYSYM is used.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+<!-- .LP -->
+The mapping between KEYCODEs and KEYSYMs is not used directly by the server;
+it is merely stored for reading and writing by clients.
+</para>
+</chapter>
+
+<chapter id='Pointers'>
+<title>Pointers</title>
+<!-- .XS -->
+<!-- (SN Pointers -->
+<!-- .XE -->
+<para id="pointers:buttons">
+Buttons are always numbered starting with one.
+<indexterm zone="pointers:buttons"><primary>Button</primary><secondary>number</secondary></indexterm>
+</para>
+</chapter>
+
+<chapter id='Predefined_Atoms'>
+<title>Predefined Atoms</title>
+<!-- .XS -->
+<!-- (SN Predefined Atoms -->
+<!-- .XE -->
+<para>
+<!-- .LP -->
+<indexterm zone="Predefined_Atoms"><primary>Atom</primary><secondary>predefined</secondary></indexterm>
+Predefined atoms are not strictly necessary and may not be useful in all
+environments, but they will eliminate many
+<link linkend="requests:InternAtom"><emphasis role='bold'>InternAtom</emphasis></link>
+requests in most applications.
+Note that they are predefined only in the sense of having numeric values,
+not in the sense of having required semantics.
+The core protocol imposes no semantics on these names,
+but semantics are specified in other X Window System standards,
+such as the
+<citetitle>Inter-Client Communication Conventions Manual</citetitle>
+and the <citetitle>X Logical Font Description Conventions</citetitle>.
+</para>
+
+<para>
+The following names have predefined atom values.
+Note that uppercase and lowercase matter.
+</para>
+
+<simplelist type='vert' columns='3'>
+ <member>ARC</member>
+ <member>ATOM</member>
+ <member>BITMAP</member>
+ <member>CAP_HEIGHT</member>
+ <member>CARDINAL</member>
+ <member>COLORMAP</member>
+ <member>COPYRIGHT</member>
+ <member>CURSOR</member>
+ <member>CUT_BUFFER0</member>
+ <member>CUT_BUFFER1</member>
+ <member>CUT_BUFFER2</member>
+ <member>CUT_BUFFER3</member>
+ <member>CUT_BUFFER4</member>
+ <member>CUT_BUFFER5</member>
+ <member>CUT_BUFFER6</member>
+ <member>CUT_BUFFER7</member>
+ <member>DRAWABLE</member>
+ <member>END_SPACE</member>
+ <member>FAMILY_NAME</member>
+ <member>FONT</member>
+ <member>FONT_NAME</member>
+ <member>FULL_NAME</member>
+ <member>INTEGER</member>
+ <member>ITALIC_ANGLE</member>
+ <member>MAX_SPACE</member>
+ <member>MIN_SPACE</member>
+ <member>NORM_SPACE</member>
+ <member>NOTICE</member>
+ <member>PIXMAP</member>
+ <member>POINT</member>
+ <member>POINT_SIZE</member>
+ <member>PRIMARY</member>
+ <member>QUAD_WIDTH</member>
+ <member>RECTANGLE</member>
+ <member>RESOLUTION</member>
+ <member>RESOURCE_MANAGER</member>
+ <member>RGB_BEST_MAP</member>
+ <member>RGB_BLUE_MAP</member>
+ <member>RGB_COLOR_MAP</member>
+ <member>RGB_DEFAULT_MAP</member>
+ <member>RGB_GRAY_MAP</member>
+ <member>RGB_GREEN_MAP</member>
+ <member>RGB_RED_MAP</member>
+ <member>SECONDARY</member>
+ <member>STRIKEOUT_ASCENT</member>
+ <member>STRIKEOUT_DESCENT</member>
+ <member>STRING</member>
+ <member>SUBSCRIPT_X</member>
+ <member>SUBSCRIPT_Y</member>
+ <member>SUPERSCRIPT_X</member>
+ <member>SUPERSCRIPT_Y</member>
+ <member>UNDERLINE_POSITION</member>
+ <member>UNDERLINE_THICKNESS</member>
+ <member>VISUALID</member>
+ <member>WEIGHT</member>
+ <member>WINDOW</member>
+ <member>WM_CLASS</member>
+ <member>WM_CLIENT_MACHINE</member>
+ <member>WM_COMMAND</member>
+ <member>WM_HINTS</member>
+ <member>WM_ICON_NAME</member>
+ <member>WM_ICON_SIZE</member>
+ <member>WM_NAME</member>
+ <member>WM_NORMAL_HINTS</member>
+ <member>WM_SIZE_HINTS</member>
+ <member>WM_TRANSIENT_FOR</member>
+ <member>WM_ZOOM_HINTS</member>
+ <member>X_HEIGHT</member>
+</simplelist>
+
+<para>
+<!-- .LP -->
+To avoid conflicts with possible future names for which semantics might be
+imposed (either at the protocol level or in terms of higher level user
+interface models),
+names beginning with an underscore should be used for atoms
+that are private to a particular vendor or organization.
+To guarantee no conflicts between vendors and organizations,
+additional prefixes need to be used.
+However, the protocol does not define the mechanism for choosing such prefixes.
+For names private to a single application or end user but stored in globally
+accessible locations,
+it is suggested that two leading underscores be used to avoid conflicts with
+other names.
+</para>
+</chapter>
+
+<chapter id='Connection_Setup'>
+ <title>Connection Setup</title>
+ <indexterm zone="Connection_Setup"><primary>Connection</primary></indexterm>
+
+ <para>
+For remote clients,
+the X protocol can be built on top of any reliable byte stream.
+ </para>
+
+ <section id="connection_initiation">
+ <title>Connection Initiation</title>
+ <indexterm zone="connection_initiation"><primary>Connection</primary><secondary>opening</secondary></indexterm>
+
+ <para id="byte-order">
+The client must send an initial byte of data to identify the byte order to be
+employed.
+<indexterm zone="byte-order"><primary>Byte order</primary></indexterm>
+The value of the byte must be octal 102 or 154.
+The value 102 (ASCII uppercase B) means values are transmitted most significant
+byte first, and value 154 (ASCII lowercase l) means values are transmitted
+least significant byte first.
+Except where explicitly noted in the protocol,
+all 16-bit and 32-bit quantities sent by the client must be transmitted with
+this byte order,
+and all 16-bit and 32-bit quantities returned by the server will be transmitted
+with this byte order.
+ </para>
+ <para>
+Following the byte-order byte,
+the client sends the following information at connection setup:
+ </para>
+ <blockquote>
+ <para>
+protocol-major-version: CARD16
+ </para>
+ <para>
+protocol-minor-version: CARD16
+ </para>
+ <para>
+authorization-protocol-name: STRING8
+ </para>
+ <para>
+authorization-protocol-data: STRING8
+ </para>
+ </blockquote>
+ <para>
+The version numbers indicate what version of the protocol the client
+expects the server to implement.
+ </para>
+ <para id="authorization">
+The authorization name indicates what authorization (and authentication)
+protocol the client
+expects the server to use, and the data is specific to that protocol.
+<indexterm zone="authorization" significance="preferred"><primary>Authorization</primary></indexterm>
+Specification of valid authorization mechanisms is not part of the core
+X protocol.
+A server that does not implement the protocol the client expects
+or that only implements the host-based mechanism may simply ignore this
+information.
+If both name and data strings are empty,
+this is to be interpreted as "no explicit authorization."
+ </para>
+ </section>
+
+ <section id="server_response">
+ <title>Server Response</title>
+
+ <para>
+The client receives the following information at connection setup:
+ </para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+success:
+{ <emphasis role='bold'>Failed</emphasis>,
+<emphasis role='bold'>Success</emphasis>,
+<emphasis role='bold'>Authenticate</emphasis>}
+ </para>
+ </listitem>
+</itemizedlist>
+
+ <para>
+The client receives the following additional data if the returned success
+value is
+<emphasis role='bold'>Failed</emphasis>,
+and the connection is not successfully established:
+ </para>
+
+<blockquote>
+ <para>
+protocol-major-version: CARD16
+ </para>
+ <para>
+protocol-minor-version: CARD16
+ </para>
+ <para>
+reason: STRING8
+ </para>
+</blockquote>
+
+ <para>
+The client receives the following additional data if the returned success
+value is
+<emphasis role='bold'>Authenticate</emphasis>,
+and further authentication negotiation is required:
+ </para>
+
+<blockquote>
+ <para>
+reason: STRING8
+ </para>
+</blockquote>
+
+ <para>
+The contents of the reason string are specific to the authorization
+protocol in use. The semantics of this authentication negotiation are
+not constrained, except that the negotiation must eventually terminate
+with a reply from the server containing a success value of
+<emphasis role='bold'>Failed</emphasis>
+or
+<emphasis role='bold'>Success</emphasis>.
+ </para>
+
+ <para>
+The client receives the following additional data if the returned success
+value is
+<emphasis role='bold'>Success</emphasis>,
+and the connection is successfully established:
+ </para>
+
+<blockquote>
+ <para>
+protocol-major-version: CARD16
+ </para>
+ <para>
+<!-- .br -->
+protocol-minor-version: CARD16
+ </para>
+ <para>
+<!-- .br -->
+vendor: STRING8
+ </para>
+ <para>
+<!-- .br -->
+release-number: CARD32
+ </para>
+ <para>
+<!-- .br -->
+resource-id-base, resource-id-mask: CARD32
+ </para>
+ <para>
+<!-- .br -->
+image-byte-order:
+{ <emphasis role='bold'>LSBFirst</emphasis>,
+<emphasis role='bold'>MSBFirst</emphasis> }
+ </para>
+ <para>
+<!-- .br -->
+bitmap-scanline-unit: {8, 16, 32}
+ </para>
+ <para>
+<!-- .br -->
+bitmap-scanline-pad: {8, 16, 32}
+ </para>
+ <para>
+<!-- .br -->
+bitmap-bit-order:
+{ <emphasis role='bold'>LeastSignificant</emphasis>,
+<emphasis role='bold'>MostSignificant</emphasis> }
+ </para>
+ <para>
+<!-- .br -->
+pixmap-formats: LISTofFORMAT
+ </para>
+ <para>
+<!-- .br -->
+roots: LISTofSCREEN
+ </para>
+ <para>
+<!-- .br -->
+motion-buffer-size: CARD32
+ </para>
+ <para>
+<!-- .br -->
+maximum-request-length: CARD16
+ </para>
+ <para>
+<!-- .br -->
+min-keycode, max-keycode: KEYCODE
+ </para>
+ <para>
+where:
+ </para>
+ <blockquote>
+<informaltable frame="none">
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>FORMAT:</entry>
+ <entry>[depth: CARD8,</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>
+bits-per-pixel: {1, 4, 8, 16, 24, 32}
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>
+scanline-pad: {8, 16, 32}]
+ </entry>
+ </row>
+ <row>
+ <entry>SCREEN:</entry>
+ <entry>[root: WINDOW</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>width-in-pixels, height-in-pixels: CARD16</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>width-in-millimeters, height-in-millimeters: CARD16</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>allowed-depths: LISTofDEPTH</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>root-depth: CARD8</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>root-visual: VISUALID</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>default-colormap: COLORMAP</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>white-pixel, black-pixel: CARD32</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>min-installed-maps, max-installed-maps: CARD16</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>backing-stores: {Never, WhenMapped, Always}</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>save-unders: BOOL</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>current-input-masks: SETofEVENT]</entry>
+ </row>
+ <row>
+ <entry>DEPTH:</entry>
+ <entry>[depth: CARD8</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>visuals: LISTofVISUALTYPE]</entry>
+ </row>
+ <row>
+ <entry>VISUALTYPE:</entry>
+ <entry>[visual-id: VISUALID</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>
+class: {StaticGray, StaticColor, TrueColor, GrayScale,
+PseudoColor, DirectColor}
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>red-mask, green-mask, blue-mask: CARD32</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>bits-per-rgb-value: CARD8</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>colormap-entries: CARD16]</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+ </blockquote>
+</blockquote>
+ </section>
+
+ <section id="server_information">
+ <title>Server Information</title>
+
+ <para>
+The information that is global to the server is:
+ </para>
+
+ <para>
+The protocol version numbers are an escape hatch in case future revisions of
+the protocol are necessary.
+In general,
+the major version would increment for incompatible changes,
+and the minor version would increment for small upward compatible changes.
+Barring changes,
+the major version will be 11, and the minor version will be 0.
+The protocol version numbers returned indicate the protocol the server
+actually supports.
+This might not equal the version sent by the client.
+The server can (but need not) refuse connections from clients that offer a
+different version than the server supports.
+A server can (but need not) support more than one version simultaneously.
+ </para>
+ <para>
+The vendor string gives some identification of the owner of the server
+implementation.
+The vendor controls the semantics of the release number.
+ </para>
+ <para id="resource-id-mask">
+The resource-id-mask contains a single contiguous set of bits (at least 18).
+The client allocates resource IDs for types WINDOW, PIXMAP,
+CURSOR, FONT, GCONTEXT, and COLORMAP by choosing a value with only
+some subset of these bits set and ORing it with resource-id-base.
+<indexterm zone="resource-id-mask"><primary>Resource</primary><secondary>ID</secondary></indexterm>
+Only values constructed in this way can be used to name newly created
+resources over this connection.
+Resource IDs never have the top three bits set.
+The client is not restricted to linear or contiguous allocation
+of resource IDs.
+Once an ID has been freed,
+it can be reused.
+An ID must be unique with respect to the IDs of all other resources,
+not just other resources of the same type.
+However, note that the value spaces of resource identifiers,
+atoms, visualids, and keysyms are distinguished by context, and
+as such, are not required to be disjoint; for example, a given numeric value
+might be both a valid window ID, a valid atom, and a valid keysym.
+ </para>
+ <para>
+Although the server is in general responsible for byte-swapping data to
+match the client,
+images are always transmitted and received in formats (including byte order)
+specified by the server.
+The byte order for images is given by image-byte-order and applies to each
+scanline unit in XY format (bitmap format) and to each pixel value in Z format.
+ </para>
+ <para id="bitmap-format">
+A bitmap is represented in <glossterm linkend="glossary:Scanline_order">scanline order</glossterm>.
+<indexterm zone="bitmap-format"><primary>Bitmap</primary><secondary>format</secondary></indexterm>
+Each <glossterm linkend="glossary:Scanline">scanline</glossterm>
+is padded to a multiple of bits as given by bitmap-scanline-pad.
+The pad bits are of arbitrary value.
+The scanline is quantized in multiples of bits as given by bitmap-scanline-unit.
+The bitmap-scanline-unit is always less than or equal to the
+bitmap-scanline-pad.
+Within each unit,
+the leftmost bit in the bitmap is either the least significant
+or most significant bit in the unit, as given by bitmap-bit-order.
+<indexterm zone="bitmap-format"><primary>XYFormat</primary></indexterm>
+If a pixmap is represented in XY format,
+each plane is represented as a bitmap, and the planes appear from
+most significant to least significant in bit order with no padding
+between planes.
+ </para>
+ <para id="pixmap-formats">
+Pixmap-formats contains one entry for each
+<glossterm linkend="glossary:Depth">depth</glossterm> value.
+<indexterm zone="pixmap-formats"><primary>Pixmap</primary><secondary>format</secondary></indexterm>
+<indexterm zone="pixmap-formats"><primary>ZFormat</primary></indexterm>
+The entry describes the <glossterm linkend="glossary:ZFormat">Z format</glossterm>
+used to represent images of that depth.
+An entry for a depth is included if any screen supports that depth,
+and all screens supporting that depth must support only that Z format for that
+depth.
+In Z format,
+the pixels are in scanline order, left to right within a scanline.
+The number of bits used to hold each pixel is given by bits-per-pixel.
+Bits-per-pixel may be larger than strictly required by the depth,
+in which case the least significant bits are used to hold
+the pixmap data, and the values of the unused high-order bits are
+undefined.
+When the bits-per-pixel is 4,
+the order of nibbles in the byte is the same as the image byte-order.
+When the bits-per-pixel is 1,
+the format is identical for bitmap format.
+Each scanline is padded to a multiple of bits as given by scanline-pad.
+When bits-per-pixel is 1,
+this will be identical to bitmap-scanline-pad.
+ </para>
+ <para>
+How a pointing device roams the screens is up to the server
+implementation and is transparent to the protocol.
+No geometry is defined among screens.
+ </para>
+ <para>
+The server may retain the recent history of pointer motion and do so to a
+finer granularity than is reported by
+<link linkend="events:MotionNotify"><emphasis role='bold'>MotionNotify</emphasis></link>
+events.
+The
+<link linkend="requests:GetMotionEvents"><emphasis role='bold'>GetMotionEvents</emphasis></link>
+request makes such history available.
+The motion-buffer-size gives the approximate maximum number
+of elements in the history buffer.
+ </para>
+ <para id="Maximum-request-length">
+Maximum-request-length specifies the maximum length of a request
+accepted by the server, in 4-byte units.
+<indexterm zone="Maximum-request-length"><primary>Request</primary><secondary>length</secondary></indexterm>
+That is, length is the maximum value that can appear in the length field of a
+request.
+Requests larger than this maximum generate a
+<emphasis role='bold'>Length</emphasis>
+error,
+and the server will read and simply discard the entire request.
+Maximum-request-length will always be at least 4096
+(that is, requests of length up to and including 16384 bytes
+will be accepted by all servers).
+ </para>
+ <para id="keycode_range">
+<indexterm zone="keycode_range"><primary>Types</primary><secondary>KEYCODE</secondary></indexterm>
+<indexterm zone="keycode_range"><primary>Keycode</primary></indexterm>
+Min-keycode and max-keycode specify the smallest and largest keycode
+values transmitted by the server.
+Min-keycode is never less than 8,
+and max-keycode is never greater than 255.
+Not all keycodes in this range are required to have corresponding keys.
+ </para>
+ </section>
+
+ <section id="screen_information">
+ <title>Screen Information</title>
+ <indexterm zone="screen_information"><primary>Screen</primary></indexterm>
+
+ <para>
+The information that applies per screen is:
+ </para>
+
+ <para>
+The allowed-depths specifies what pixmap and window depths are supported.
+Pixmaps are supported for each depth listed,
+and windows of that depth are supported if at least one visual type is listed
+for the depth.
+A pixmap depth of one is always supported and listed,
+but windows of depth one might not be supported.
+A depth of zero is never listed,
+but zero-depth
+<emphasis role='bold'>InputOnly</emphasis>
+windows are always supported.
+ </para>
+ <para>
+Root-depth and root-visual specify the depth and visual type of the
+root window.
+Width-in-pixels and height-in-pixels specify the size of
+the root window (which cannot be changed).
+The class of the root window is always
+<emphasis role='bold'>InputOutput</emphasis>.
+Width-in-millimeters and height-in-millimeters can be used to determine the
+physical size and the aspect ratio.
+ </para>
+ <para>
+The default-colormap is the one initially associated with the root window.
+Clients with minimal color requirements creating windows of
+the same depth as the root may want to allocate from this map by
+default.
+ </para>
+ <para>
+Black-pixel and white-pixel can be used in implementing a monochrome
+application.
+These pixel values are for permanently allocated entries in the
+default-colormap.
+The actual RGB values may be settable on some screens
+and, in any case, may not actually be black and white.
+The names are intended to convey the expected relative intensity of the colors.
+ </para>
+ <para>
+The border of the root window is initially a pixmap filled with the black-pixel.
+The initial background of the root window is a pixmap filled with some
+unspecified two-color pattern using black-pixel and white-pixel.
+ </para>
+ <para>
+Min-installed-maps specifies the number of maps that can be guaranteed
+to be installed simultaneously (with
+<link linkend="requests:InstallColormap"><emphasis role='bold'>InstallColormap</emphasis></link>),
+regardless of the number of entries allocated in each map.
+Max-installed-maps specifies the maximum number of maps that might possibly be
+installed simultaneously, depending on their allocations.
+Multiple static-visual colormaps with identical contents but differing in
+resource ID should be considered as a single map for the purposes of this
+number.
+For the typical case of a single hardware colormap, both values will be 1.
+ </para>
+ <para id="Backing-stores">
+<indexterm zone="Backing-stores"><primary>Backing store</primary></indexterm>
+Backing-stores indicates when the server supports backing stores for
+this screen, although it may be storage limited in the number of
+windows it can support at once.
+If save-unders is
+<emphasis role='bold'>True</emphasis>,
+the server can support the save-under mode in
+<link linkend="requests:CreateWindow"><emphasis role='bold'>CreateWindow</emphasis></link>
+and
+<link linkend="requests:ChangeWindowAttributes"><emphasis role='bold'>ChangeWindowAttributes</emphasis></link>,
+although again it may be storage limited.
+ </para>
+ <para>
+The current-input-events is what
+<link linkend="requests:GetWindowAttributes"><emphasis role='bold'>GetWindowAttributes</emphasis></link>
+would return for the all-event-masks for the root window.
+ </para>
+ </section>
+
+ <section id="visual_information">
+ <title>Visual Information</title>
+ <indexterm zone="visual_information" significance="preferred"><primary>Visual</primary><secondary>information</secondary></indexterm>
+
+ <para>
+The information that applies per visual-type is:
+ </para>
+
+ <para>
+A given visual type might be listed for more than one depth or for
+more than one screen.
+ </para>
+
+ <para id="colormap_types">
+<indexterm zone="colormap_types" significance="preferred"><primary>Colormap</primary><secondary>types</secondary></indexterm>
+<indexterm zone="colormap_types"><primary>Pixel value</primary></indexterm>
+For
+<emphasis role='bold'>PseudoColor</emphasis>,
+a pixel value indexes a colormap to produce independent RGB values;
+the RGB values can be changed dynamically.
+<emphasis role='bold'>GrayScale</emphasis>
+is treated in the same way as
+<emphasis role='bold'>PseudoColor</emphasis>
+except which primary drives the screen is undefined;
+thus, the client should always store the
+same value for red, green, and blue in colormaps.
+For
+<emphasis role='bold'>DirectColor</emphasis>,
+a pixel value is decomposed into separate RGB subfields,
+and each subfield separately indexes the colormap for the corresponding value.
+The RGB values can be changed dynamically.
+<emphasis role='bold'>TrueColor</emphasis>
+is treated in the same way as
+<emphasis role='bold'>DirectColor</emphasis>
+except the colormap has predefined read-only RGB values.
+These values are server-dependent but provide linear or near-linear
+increasing ramps in each primary.
+<emphasis role='bold'>StaticColor</emphasis>
+is treated in the same way as
+<emphasis role='bold'>PseudoColor</emphasis>
+except the colormap has predefined read-only RGB values,
+which are server-dependent.
+<emphasis role='bold'>StaticGray</emphasis>
+is treated in the same way as
+<emphasis role='bold'>StaticColor</emphasis>
+except the red, green, and blue values are equal for any
+single pixel value, resulting in shades of gray.
+<emphasis role='bold'>StaticGray</emphasis>
+with a two-entry colormap can be thought of as monochrome.
+ </para>
+
+ <para>
+The red-mask, green-mask, and blue-mask are only defined for
+<emphasis role='bold'>DirectColor</emphasis>
+and
+<emphasis role='bold'>TrueColor</emphasis>.
+Each has one contiguous set of bits set to 1 with no intersections.
+Usually each mask has the same number of bits set to 1.
+ </para>
+
+ <para>
+The bits-per-rgb-value specifies the log base 2 of the number of
+distinct color intensity values (individually) of red, green, and blue.
+This number need not bear any relation to the number of colormap entries.
+Actual RGB values are always passed in the protocol within a
+16-bit spectrum, with 0 being minimum intensity and 65535 being the
+maximum intensity.
+On hardware that provides a linear zero-based intensity ramp,
+the following relationship exists:
+ </para>
+
+ <para>
+<literallayout class="monospaced">
+ hw-intensity = protocol-intensity / (65536 / total-hw-intensities)
+</literallayout>
+ </para>
+
+ <para>
+Colormap entries are indexed from 0.
+The colormap-entries defines the number of available colormap entries in a
+newly created colormap.
+For
+<emphasis role='bold'>DirectColor</emphasis>
+and
+<emphasis role='bold'>TrueColor</emphasis>,
+this will usually be 2 to the power of the maximum number of bits set to 1 in
+red-mask, green-mask, and blue-mask.
+ </para>
+ </section>
+</chapter>
+
+<chapter id='Requests'>
+ <title>Requests</title>
+ <section id="requests:CreateWindow">
+ <title>CreateWindow</title>
+ <indexterm zone="requests:CreateWindow" significance="preferred"><primary>CreateWindow</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>wid</emphasis>, <emphasis remap='I'>parent</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>class</emphasis>:
+{ <emphasis role='bold'>InputOutput</emphasis>,
+<emphasis role='bold'>InputOnly</emphasis>,
+<emphasis role='bold'>CopyFromParent</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>depth</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>visual</emphasis>: VISUALID or
+<emphasis role='bold'>CopyFromParent</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>, <emphasis remap='I'>border-width</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-list</emphasis>: LISTofVALUE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Pixmap</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request creates an unmapped window and assigns the identifier wid to it.
+</para>
+<para>
+A class of
+<emphasis role='bold'>CopyFromParent</emphasis>
+means the class is taken from the parent.
+A depth of zero for class
+<emphasis role='bold'>InputOutput</emphasis>
+or
+<emphasis role='bold'>CopyFromParent</emphasis>
+means the depth is taken from the parent.
+A visual of
+<emphasis role='bold'>CopyFromParent</emphasis>
+means the visual type is taken from the parent.
+For class
+<emphasis role='bold'>InputOutput</emphasis>,
+the visual type and depth must be a combination supported for the screen
+(or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+The depth need not be the same as the parent,
+but the parent must not be of class
+<emphasis role='bold'>InputOnly</emphasis>
+(or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+For class
+<emphasis role='bold'>InputOnly</emphasis>,
+the depth must be zero (or a
+<emphasis role='bold'>Match</emphasis>
+error results), and the visual must be one supported for the screen (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+However, the parent can have any depth and class.
+</para>
+<para>
+The server essentially acts as if
+<emphasis role='bold'>InputOnly</emphasis>
+windows do not exist for the purposes of graphics requests,
+exposure processing, and
+<link linkend="events:VisibilityNotify"><emphasis role='bold'>VisibilityNotify</emphasis></link>
+events.
+An
+<emphasis role='bold'>InputOnly</emphasis>
+window cannot be used as a drawable (as a source or destination for graphics
+requests).
+<emphasis role='bold'>InputOnly</emphasis>
+and
+<emphasis role='bold'>InputOutput</emphasis>
+windows act identically in other respects-properties,
+grabs, input control, and so on.
+</para>
+<para>
+The coordinate system has the X axis horizontal and the Y axis vertical
+with the origin [0, 0] at the upper-left corner.
+Coordinates are integral,
+in terms of pixels,
+and coincide with pixel centers.
+Each window and pixmap has its own coordinate system.
+For a window,
+the origin is inside the border at the inside, upper-left corner.
+</para>
+<para>
+The x and y coordinates
+for the window are relative to the parent's origin
+and specify the position of the upper-left outer corner of the window
+(not the origin).
+The width and height specify the inside size (not including the border)
+and must be nonzero (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The border-width for an
+<emphasis role='bold'>InputOnly</emphasis>
+window must be zero (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+</para>
+<para>
+The window is placed on top in the stacking order with respect to siblings.
+</para>
+<para>
+The value-mask and value-list specify attributes of the window that are
+to be explicitly initialized.
+The possible values are:
+</para>
+<informaltable frame='topbot'>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Attribute</entry>
+ <entry>Type</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>background-pixmap</entry>
+ <entry>
+PIXMAP or
+<emphasis role='bold'>None</emphasis>
+or
+<emphasis role='bold'>ParentRelative</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>background-pixel</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry>border-pixmap</entry>
+ <entry>
+PIXMAP or
+<emphasis role='bold'>CopyFromParent</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>border-pixel</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry>bit-gravity</entry>
+ <entry>BITGRAVITY</entry>
+ </row>
+ <row>
+ <entry>win-gravity</entry>
+ <entry>WINGRAVITY</entry>
+ </row>
+ <row>
+ <entry>backing-store</entry>
+ <entry>
+{ <emphasis role='bold'>NotUseful</emphasis>,
+<emphasis role='bold'>WhenMapped</emphasis>,
+<emphasis role='bold'>Always</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>backing-planes</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry>backing-pixel</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry>save-under</entry>
+ <entry>BOOL</entry>
+ </row>
+ <row>
+ <entry>event-mask</entry>
+ <entry>SETofEVENT</entry>
+ </row>
+ <row>
+ <entry>do-not-propagate-mask</entry>
+ <entry>SETofDEVICEEVENT</entry>
+ </row>
+ <row>
+ <entry>override-redirect</entry>
+ <entry>BOOL</entry>
+ </row>
+ <row>
+ <entry>colormap</entry>
+ <entry>
+COLORMAP or
+<emphasis role='bold'>CopyFromParent</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>cursor</entry>
+ <entry>
+CURSOR or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The default values when attributes are not explicitly initialized
+are:
+</para>
+
+<informaltable frame='topbot'>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Attribute</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>background-pixmap</entry>
+ <entry>
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>border-pixmap</entry>
+ <entry>
+<emphasis role='bold'>CopyFromParent</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>bit-gravity</entry>
+ <entry>
+<emphasis role='bold'>Forget</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>win-gravity</entry>
+ <entry>
+<emphasis role='bold'>NorthWest</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>backing-store</entry>
+ <entry>
+<emphasis role='bold'>NotUseful</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>backing-planes</entry>
+ <entry>all ones</entry>
+ </row>
+ <row>
+ <entry>backing-pixel</entry>
+ <entry>zero</entry>
+ </row>
+ <row>
+ <entry>save-under</entry>
+ <entry>
+<emphasis role='bold'>False</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>event-mask</entry>
+ <entry>{} (empty set)</entry>
+ </row>
+ <row>
+ <entry>do-not-propagate-mask</entry>
+ <entry>{} (empty set)</entry>
+ </row>
+ <row>
+ <entry>override-redirect</entry>
+ <entry>
+<emphasis role='bold'>False</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>colormap</entry>
+ <entry>
+<emphasis role='bold'>CopyFromParent</emphasis>
+ </entry>
+ </row>
+ <row rowsep='1'>
+ <entry>cursor</entry>
+ <entry>
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Only the following attributes are defined for
+<emphasis role='bold'>InputOnly</emphasis>
+windows:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+win-gravity
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+event-mask
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+do-not-propagate-mask
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+override-redirect
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+cursor
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+It is a
+<emphasis role='bold'>Match</emphasis>
+error to specify any other attributes for
+<emphasis role='bold'>InputOnly</emphasis>
+windows.
+</para>
+<para id="requests:CreateWindow:background">
+<indexterm zone="requests:CreateWindow:background"><primary>Background</primary></indexterm>
+If background-pixmap is given,
+it overrides the default background-pixmap.
+The background pixmap and the window must have the
+same root and the same depth (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+Any size pixmap can be used, although some sizes may be faster than others.
+If background
+<emphasis role='bold'>None</emphasis>
+is specified, the window has no defined background.
+If background
+<emphasis role='bold'>ParentRelative</emphasis>
+is specified, the parent's background is used,
+but the window must have the same depth as the parent (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+If the parent has background
+<emphasis role='bold'>None</emphasis>,
+then the window will also have background
+<emphasis role='bold'>None</emphasis>.
+A copy of the parent's background is not made.
+The parent's background is reexamined each time the window background is
+required.
+If background-pixel is given, it overrides the default
+background-pixmap and any background-pixmap given explicitly,
+and a pixmap of undefined size filled with background-pixel is used for the
+background.
+Range checking is not performed on the background-pixel value;
+it is simply truncated to the appropriate number of bits.
+For a
+<emphasis role='bold'>ParentRelative</emphasis>
+background,
+the background tile origin always aligns with the parent's background tile
+origin.
+Otherwise, the background tile origin is always the window origin.
+</para>
+<para>
+When no valid contents are available for regions of a window
+and the regions are either visible or the server is maintaining backing store,
+the server automatically tiles the regions with the window's background
+unless the window has a background of
+<emphasis role='bold'>None</emphasis>.
+If the background is
+<emphasis role='bold'>None</emphasis>,
+the previous screen contents from other windows of the same depth as the window
+are simply left in place if the contents come from the parent of the window
+or an inferior of the parent;
+otherwise, the initial contents of the exposed regions are undefined.
+Exposure events are then generated for the regions, even if the background is
+<emphasis role='bold'>None</emphasis>.
+</para>
+<para>
+The border tile origin is always the same as the background tile origin.
+If border-pixmap is given,
+it overrides the default border-pixmap.
+The border pixmap and the window must have the same root
+and the same depth (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+Any size pixmap can be used,
+although some sizes may be faster than others.
+If
+<emphasis role='bold'>CopyFromParent</emphasis>
+is given, the parent's border pixmap is copied (subsequent changes to
+the parent's border attribute do not affect the child),
+but the window must have the same depth as the parent (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+The pixmap might be copied by sharing the same pixmap object between the
+child and parent or by making a complete copy of the pixmap contents.
+If border-pixel is given,
+it overrides the default border-pixmap and any border-pixmap given explicitly,
+and a pixmap of undefined size filled with border-pixel is used for the border.
+Range checking is not performed on the border-pixel value;
+it is simply truncated to the appropriate number of bits.
+</para>
+<para>
+Output to a window is always clipped to the inside of the window,
+so that the border is never affected.
+</para>
+<para>
+The bit-gravity defines which region of the window should be retained
+if the window is resized, and win-gravity defines how the window should
+be repositioned if the parent is resized (see
+<link linkend="requests:ConfigureWindow"><emphasis role='bold'>ConfigureWindow</emphasis></link>
+request).
+</para>
+<para>
+A backing-store of
+<emphasis role='bold'>WhenMapped</emphasis>
+advises the server that maintaining contents of obscured regions
+when the window is mapped would be beneficial.
+A backing-store of
+<emphasis role='bold'>Always</emphasis>
+advises the server that maintaining contents even when the window is
+unmapped would be beneficial.
+In this case,
+the server may generate an exposure event when the window is created.
+A value of
+<emphasis role='bold'>NotUseful</emphasis>
+advises the server that maintaining contents is unnecessary,
+although a server may still choose to maintain contents while the window
+is mapped.
+Note that if the server maintains contents,
+then the server should maintain complete contents
+not just the region within the parent boundaries,
+even if the window is larger than its parent.
+While the server maintains contents,
+exposure events will not normally be generated,
+but the server may stop maintaining contents at any time.
+</para>
+<para>
+If save-under is
+<emphasis role='bold'>True</emphasis>,
+the server is advised that when this window is
+mapped, saving the contents of windows it obscures would be beneficial.
+</para>
+<para>
+When the contents of obscured regions of a window are being maintained,
+regions obscured by noninferior windows are included in the
+destination (and source, when the window is the source) of graphics
+requests, but regions obscured by inferior windows are not included.
+</para>
+<para>
+The backing-planes indicates (with bits set to 1) which bit planes
+of the window hold dynamic data that must be preserved in backing-stores
+and during save-unders.
+The backing-pixel specifies what value to use in planes not
+covered by backing-planes.
+The server is free to save only the specified bit planes in the backing-store
+or save-under and regenerate the remaining planes with the specified pixel
+value.
+Any bits beyond the specified depth of the window in these
+values are simply ignored.
+</para>
+<para id="requests:CreateWindow:event-mask">
+<indexterm zone="requests:CreateWindow:event-mask"><primary>Event</primary><secondary>mask</secondary></indexterm>
+<indexterm zone="requests:CreateWindow:event-mask"><primary>Event</primary><secondary>propagation</secondary></indexterm>
+The event-mask defines which events the client is interested in for
+this window (or for some event types, inferiors of the window).
+The do-not-propagate-mask defines which events should not be propagated to
+ancestor windows when no client has the event type selected in this
+window.
+</para>
+<para>
+The override-redirect specifies whether map and configure requests on this
+window should override a
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the parent, typically to inform a window manager not to tamper with
+the window.
+</para>
+<para>
+The colormap specifies the colormap that best reflects the true
+colors of the window.
+Servers capable of supporting multiple hardware colormaps may use this
+information, and window managers may use it for
+<link linkend="requests:InstallColormap"><emphasis role='bold'>InstallColormap</emphasis></link>
+requests.
+The colormap must have the same visual type and root as the window (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+If
+<emphasis role='bold'>CopyFromParent</emphasis>
+is specified,
+the parent's colormap is copied (subsequent changes to the parent's
+colormap attribute do not affect the child).
+However, the window must have the same visual type as the parent (or a
+<emphasis role='bold'>Match</emphasis>
+error results), and the parent must not have a colormap of
+<emphasis role='bold'>None</emphasis>
+(or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+For an explanation of
+<emphasis role='bold'>None</emphasis>,
+see <link linkend="requests:FreeColormap"><emphasis role='bold'>FreeColormap</emphasis></link>
+request.
+The colormap is copied by sharing the colormap object between the child
+and the parent,
+not by making a complete copy of the colormap contents.
+</para>
+<para>
+If a cursor is specified,
+it will be used whenever the pointer is in the window.
+If
+<emphasis role='bold'>None</emphasis>
+is specified,
+the parent's cursor will be used when the pointer is in the window,
+and any change in the parent's cursor will cause an immediate change
+in the displayed cursor.
+</para>
+<para>
+This request generates a
+<link linkend="events:CreateNotify"><emphasis role='bold'>CreateNotify</emphasis></link>
+event.
+</para>
+<para>
+The background and border pixmaps and the cursor may be freed
+immediately if no further explicit references to them are to be made.
+</para>
+<para>
+Subsequent drawing into the background or border pixmap has an
+undefined effect on the window state.
+The server might or might not make a copy of the pixmap.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeWindowAttributes">
+ <title>ChangeWindowAttributes</title>
+ <indexterm zone="requests:ChangeWindowAttributes" significance="preferred"><primary>ChangeWindowAttributes</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-list</emphasis>: LISTofVALUE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Pixmap</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The value-mask and value-list specify which attributes are to be changed.
+The values and restrictions are the same as for
+<link linkend="requests:CreateWindow"><emphasis role='bold'>CreateWindow</emphasis></link>.
+</para>
+<para>
+Setting a new background, whether by background-pixmap or
+background-pixel, overrides any previous background.
+Setting a new border, whether by border-pixel or border-pixmap,
+overrides any previous border.
+</para>
+<para>
+Changing the background does not cause the window contents to be changed.
+Setting the border or changing the background such that the
+border tile origin changes causes the border to be repainted.
+Changing the background of a root window to
+<emphasis role='bold'>None</emphasis>
+or
+<emphasis role='bold'>ParentRelative</emphasis>
+restores the default background pixmap.
+Changing the border of a root window to
+<emphasis role='bold'>CopyFromParent</emphasis>
+restores the default border pixmap.
+</para>
+<para>
+Changing the win-gravity does not affect the current position of the
+window.
+</para>
+<para>
+Changing the backing-store of an obscured window to
+<emphasis role='bold'>WhenMapped</emphasis>
+or
+<emphasis role='bold'>Always</emphasis>
+or changing the backing-planes, backing-pixel, or save-under of
+a mapped window may have no immediate effect.
+</para>
+<para>
+Multiple clients can select input on the same window;
+their event-masks are disjoint.
+When an event is generated,
+it will be reported to all interested clients.
+However, only one client at a time can select for
+<emphasis role='bold'>SubstructureRedirect</emphasis>,
+only one client at a time can select for
+<emphasis role='bold'>ResizeRedirect</emphasis>,
+and only one client at a time can select for
+<link linkend="events:ButtonPress"><emphasis role='bold'>ButtonPress</emphasis></link>.
+An attempt to violate these restrictions results in an
+<emphasis role='bold'>Access</emphasis>
+error.
+</para>
+<para>
+There is only one do-not-propagate-mask for a window, not one per
+client.
+</para>
+<para>
+Changing the colormap of a window (by defining a new map, not by
+changing the contents of the existing map) generates a
+<link linkend="events:ColormapNotify"><emphasis role='bold'>ColormapNotify</emphasis></link>
+event.
+Changing the colormap of a visible window might have no immediate effect
+on the screen (see
+<link linkend="requests:InstallColormap"><emphasis role='bold'>InstallColormap</emphasis></link>
+request).
+</para>
+<para>
+Changing the cursor of a root window to
+<emphasis role='bold'>None</emphasis>
+restores the default cursor.
+</para>
+<para>
+The order in which attributes are verified and altered is server-dependent.
+If an error is generated,
+a subset of the attributes may have been altered.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetWindowAttributes">
+ <title>GetWindowAttributes</title>
+ <indexterm zone="requests:GetWindowAttributes" significance="preferred"><primary>GetWindowAttributes</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+visual: VISUALID
+ </entry>
+ </row>
+ <row>
+ <entry>
+class:
+{ <emphasis role='bold'>InputOutput</emphasis>,
+<emphasis role='bold'>InputOnly</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+bit-gravity: BITGRAVITY
+ </entry>
+ </row>
+ <row>
+ <entry>
+win-gravity: WINGRAVITY
+ </entry>
+ </row>
+ <row>
+ <entry>
+backing-store:
+{ <emphasis role='bold'>NotUseful</emphasis>,
+<emphasis role='bold'>WhenMapped</emphasis>,
+<emphasis role='bold'>Always</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+backing-planes: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+backing-pixel: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+save-under: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+colormap: COLORMAP or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+map-is-installed: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+map-state:
+{ <emphasis role='bold'>Unmapped</emphasis>,
+<emphasis role='bold'>Unviewable</emphasis>,
+<emphasis role='bold'>Viewable</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+all-event-masks, your-event-mask: SETofEVENT
+ </entry>
+ </row>
+ <row>
+ <entry>
+do-not-propagate-mask: SETofDEVICEEVENT
+ </entry>
+ </row>
+ <row>
+ <entry>
+override-redirect: BOOL
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current attributes of the window.
+A window is
+<emphasis role='bold'>Unviewable</emphasis>
+if it is mapped but some ancestor is unmapped.
+All-event-masks is the inclusive-OR of all event masks selected on the window
+by clients.
+Your-event-mask is the event mask selected by the querying client.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:DestroyWindow">
+ <title>DestroyWindow</title>
+ <indexterm zone="requests:DestroyWindow" significance="preferred"><primary>DestroyWindow</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the argument window is mapped,
+an
+<link linkend="requests:UnmapWindow"><emphasis role='bold'>UnmapWindow</emphasis></link>
+request is performed automatically.
+The window and all inferiors are then destroyed, and a
+<link linkend="events:DestroyNotify"><emphasis role='bold'>DestroyNotify</emphasis></link>
+event is generated for each window.
+The ordering of the
+<emphasis role='bold'>DestroyNotify</emphasis>
+events is such that for any given window,
+<emphasis role='bold'>DestroyNotify</emphasis>
+is generated on all inferiors of the window before being generated on
+the window itself.
+The ordering among siblings and across subhierarchies is not otherwise
+constrained.
+</para>
+<para>
+Normal exposure processing on formerly obscured windows is performed.
+</para>
+<para>
+If the window is a root window,
+this request has no effect.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:DestroySubwindows">
+ <title>DestroySubwindows</title>
+ <indexterm zone="requests:DestroySubwindows" significance="preferred"><primary>DestroySubwindows</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request performs a
+<link linkend="requests:DestroyWindow"><emphasis role='bold'>DestroyWindow</emphasis></link>
+request on all children of the window, in bottom-to-top stacking order.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeSaveSet">
+ <title>ChangeSaveSet</title>
+ <indexterm zone="requests:ChangeSaveSet" significance="preferred"><primary>ChangeSaveSet</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Insert</emphasis>,
+<emphasis role='bold'>Delete</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+Errors:
+<!-- .in +.2i -->
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request adds or removes the specified window from the client's
+save-set.
+The window must have been created by some other client (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+For further information about the use of the save-set,
+see <link linkend='Connection_Close'>section 10</link>.
+</para>
+<para>
+When windows are destroyed,
+the server automatically removes them from the save-set.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ReparentWindow">
+ <title>ReparentWindow</title>
+ <indexterm zone="requests:ReparentWindow" significance="preferred"><primary>ReparentWindow</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>, <emphasis remap='I'>parent</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the window is mapped,
+an
+<link linkend="requests:UnmapWindow"><emphasis role='bold'>UnmapWindow</emphasis></link>
+request is performed automatically first.
+The window is then removed from its current position in the hierarchy
+and is inserted as a child of the specified parent.
+The x and y coordinates are relative to the parent's origin
+and specify the new position of the upper-left outer corner of the
+window.
+The window is placed on top in the stacking order with respect
+to siblings.
+A
+<link linkend="events:ReparentNotify"><emphasis role='bold'>ReparentNotify</emphasis></link>
+event is then generated.
+The override-redirect attribute of the window is passed on in this event;
+a value of
+<emphasis role='bold'>True</emphasis>
+indicates that a window manager should not tamper with this window.
+Finally, if the window was originally mapped, a
+<link linkend="requests:MapWindow"><emphasis role='bold'>MapWindow</emphasis></link>
+request is performed automatically.
+</para>
+<para>
+Normal exposure processing on formerly obscured windows is performed.
+The server might not generate exposure events for regions from the
+initial unmap that are immediately obscured by the final map.
+</para>
+<para>
+A
+<emphasis role='bold'>Match</emphasis>
+error is generated if:
+<!-- .IP bu 5 -->
+The new parent is not on the same screen as the old parent.
+<!-- .IP bu 5 -->
+The new parent is the window itself or an inferior of the window.
+<!-- .IP bu 5 -->
+The new parent is
+<emphasis role='bold'>InputOnly</emphasis>,
+and the window is not.
+<!-- .IP bu 5 -->
+The window has a
+<emphasis role='bold'>ParentRelative</emphasis>
+background, and the new parent is not the same depth as the window.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:MapWindow">
+ <title>MapWindow</title>
+ <indexterm zone="requests:MapWindow" significance="preferred"><primary>MapWindow</primary></indexterm>
+ <indexterm zone="requests:MapWindow"><primary>Mapped window</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the window is already mapped, this request has no effect.
+</para>
+<para>
+If the override-redirect attribute of the window is
+<emphasis role='bold'>False</emphasis>
+and some other client has selected
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the parent, then a
+<link linkend="events:MapRequest"><emphasis role='bold'>MapRequest</emphasis></link>
+event is generated, but the window remains unmapped.
+Otherwise, the window is mapped,
+and a
+<link linkend="events:MapNotify"><emphasis role='bold'>MapNotify</emphasis></link>
+event is generated.
+</para>
+<para>
+If the window is now viewable and its contents have been discarded,
+the window is tiled with its background (if no background is defined,
+the existing screen contents are not altered), and zero or more exposure
+events are generated.
+If a backing-store has been maintained while the window was unmapped,
+no exposure events are generated.
+If a backing-store will now be maintained,
+a full-window exposure is always generated.
+Otherwise, only visible regions may be reported.
+Similar tiling and exposure take place for any newly viewable inferiors.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:MapSubwindows">
+ <title>MapSubwindows</title>
+ <indexterm zone="requests:MapSubwindows" significance="preferred"><primary>MapSubwindows</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request performs a
+<link linkend="requests:MapWindow"><emphasis role='bold'>MapWindow</emphasis></link>
+request on all unmapped children of the window,
+in top-to-bottom stacking order.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UnmapWindow">
+ <title>UnmapWindow</title>
+ <indexterm zone="requests:UnmapWindow" significance="preferred"><primary>UnmapWindow</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the window is already unmapped, this request has no effect.
+Otherwise, the window is unmapped, and an
+<link linkend="events:UnmapNotify"><emphasis role='bold'>UnmapNotify</emphasis></link>
+event is generated.
+Normal exposure processing on formerly obscured windows is performed.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UnmapSubwindows">
+ <title>UnmapSubwindows</title>
+ <indexterm zone="requests:UnmapSubwindows" significance="preferred"><primary>UnmapSubwindows</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request performs an
+<link linkend="requests:UnmapWindow"><emphasis role='bold'>UnmapWindow</emphasis></link>
+request on all mapped children of the window,
+in bottom-to-top stacking order.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ConfigureWindow">
+ <title>ConfigureWindow</title>
+ <indexterm zone="requests:ConfigureWindow" significance="preferred"><primary>ConfigureWindow</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-list</emphasis>: LISTofVALUE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request changes the configuration of the window.
+The value-mask and value-list specify which values are to be given.
+The possible values are:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Attribute</entry>
+ <entry>Type</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>x</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>y</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>width</entry>
+ <entry>CARD16</entry>
+ </row>
+ <row>
+ <entry>height</entry>
+ <entry>CARD16</entry>
+ </row>
+ <row>
+ <entry>border-width</entry>
+ <entry>CARD16</entry>
+ </row>
+ <row>
+ <entry>sibling</entry>
+ <entry>WINDOW</entry>
+ </row>
+ <row>
+ <entry>stack-mode</entry>
+ <entry>
+{ <emphasis role='bold'>Above</emphasis>,
+<emphasis role='bold'>Below</emphasis>,
+<emphasis role='bold'>TopIf</emphasis>,
+<emphasis role='bold'>BottomIf</emphasis>,
+<emphasis role='bold'>Opposite</emphasis> }
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The x and y coordinates are relative to the parent's origin
+and specify the position of the upper-left outer corner of the window.
+The width and height specify the inside size, not including the border, and
+must be nonzero (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+Those values not specified are taken from the existing geometry of the window.
+Note that changing just the border-width leaves the outer-left corner
+of the window in a fixed position but moves the absolute position of the
+window's origin.
+It is a
+<emphasis role='bold'>Match</emphasis>
+error to attempt to make the border-width of an
+<emphasis role='bold'>InputOnly</emphasis>
+window nonzero.
+</para>
+<para>
+If the override-redirect attribute of the window is
+<emphasis role='bold'>False</emphasis>
+and some other client has selected
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the parent, a
+<link linkend="events:ConfigureRequest"><emphasis role='bold'>ConfigureRequest</emphasis></link>
+event is generated, and no further processing is performed.
+Otherwise, the following is performed:
+</para>
+<para>
+If some other client has selected
+<emphasis role='bold'>ResizeRedirect</emphasis>
+on the window and the inside width or height of the window is being changed,
+a
+<link linkend="events:ResizeRequest"><emphasis role='bold'>ResizeRequest</emphasis></link>
+event is generated,
+and the current inside width and height are used instead.
+Note that the override-redirect attribute of the window has no effect on
+<emphasis role='bold'>ResizeRedirect</emphasis>
+and that
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the parent has precedence over
+<emphasis role='bold'>ResizeRedirect</emphasis>
+on the window.
+</para>
+<para id="requests:ConfigureWindow:gravity">
+<indexterm zone="requests:ConfigureWindow:gravity"><primary>Gravity</primary></indexterm>
+<indexterm zone="requests:ConfigureWindow:gravity"><primary>Bit</primary><secondary>gravity</secondary></indexterm>
+<indexterm zone="requests:ConfigureWindow:gravity"><primary>Window</primary><secondary>gravity</secondary></indexterm>
+The geometry of the window is changed as specified,
+the window is restacked among siblings, and a
+<link linkend="events:ConfigureNotify"><emphasis role='bold'>ConfigureNotify</emphasis></link>
+event is generated if the state of the window actually changes.
+If the inside width or height of the window has actually changed,
+then children of the window are affected,
+according to their win-gravity.
+Exposure processing is performed on formerly obscured windows
+(including the window itself and its inferiors if regions of them were
+obscured but now are not).
+Exposure processing is also performed on any new regions of the window
+(as a result of increasing the width or height)
+and on any regions where window contents are lost.
+</para>
+<para>
+If the inside width or height of a window is not changed
+but the window is moved or its border is changed,
+then the contents of the window are not lost but move with the window.
+Changing the inside width or height of the window causes its contents to be
+moved or lost, depending on the bit-gravity of the window.
+It also causes children to be reconfigured, depending on their win-gravity.
+For a change of width and height of W and H,
+we define the [x, y] pairs as:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Direction</entry>
+ <entry>Deltas</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>NorthWest</emphasis>
+ </entry>
+ <entry>[0, 0]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>North</emphasis>
+ </entry>
+ <entry>[W/2, 0]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>NorthEast</emphasis>
+ </entry>
+ <entry>[W, 0]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>West</emphasis>
+ </entry>
+ <entry>[0, H/2]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Center</emphasis>
+ </entry>
+ <entry>[W/2, H/2]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>East</emphasis>
+ </entry>
+ <entry>[W, H/2]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>SouthWest</emphasis>
+ </entry>
+ <entry>[0, H]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>South</emphasis>
+ </entry>
+ <entry>[W/2, H]</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>SouthEast</emphasis>
+ </entry>
+ <entry>[W, H]</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+When a window with one of these bit-gravities is resized,
+the corresponding pair defines the change in position of each pixel in the
+window.
+When a window with one of these win-gravities has its parent window resized,
+the corresponding pair defines the change in position
+of the window within the parent.
+This repositioning generates a
+<link linkend="events:GravityNotify"><emphasis role='bold'>GravityNotify</emphasis></link>
+event.
+<emphasis role='bold'>GravityNotify</emphasis>
+events are generated after the
+<link linkend="events:ConfigureNotify"><emphasis role='bold'>ConfigureNotify</emphasis></link>
+event is generated.
+</para>
+<para>
+A gravity of
+<emphasis role='bold'>Static</emphasis>
+indicates that the contents or origin should not move relative to the origin
+of the root window.
+If the change in size of the window is coupled with a change
+in position of [X, Y],
+then for bit-gravity the change in position of each pixel is [-X, -Y] and for
+win-gravity the change in position of a child when its parent is so
+resized is [-X, -Y].
+Note that
+<emphasis role='bold'>Static</emphasis>
+gravity still only takes effect when the width or height of the
+window is changed, not when the window is simply moved.
+</para>
+<para>
+A bit-gravity of
+<emphasis role='bold'>Forget</emphasis>
+indicates that the window contents are always discarded after a size change,
+even if backing-store or save-under has been requested.
+The window is tiled with its background (except, if no background is defined,
+the existing screen contents are not altered)
+and zero or more exposure events are generated.
+</para>
+<para>
+The contents and borders of inferiors are not affected by their parent's
+bit-gravity.
+A server is permitted to ignore the specified bit-gravity and use
+<emphasis role='bold'>Forget</emphasis>
+instead.
+</para>
+<para>
+A win-gravity of
+<emphasis role='bold'>Unmap</emphasis>
+is like
+<emphasis role='bold'>NorthWest</emphasis>,
+but the child is also unmapped when the parent is resized,
+and an
+<link linkend="events:UnmapNotify"><emphasis role='bold'>UnmapNotify</emphasis></link>
+event is generated.
+<emphasis role='bold'>UnmapNotify</emphasis>
+events are generated after the
+<link linkend="events:ConfigureNotify"><emphasis role='bold'>ConfigureNotify</emphasis></link>
+event is generated.
+</para>
+<para>
+If a sibling and a stack-mode are specified,
+the window is restacked as follows:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='3.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>Above</emphasis>
+ </entry>
+ <entry>
+The window is placed just above the sibling.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Below</emphasis>
+ </entry>
+ <entry>
+The window is placed just below the sibling.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>TopIf</emphasis>
+ </entry>
+ <entry>
+If the sibling occludes the window,
+then the window is placed at the top of the stack.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>BottomIf</emphasis>
+ </entry>
+ <entry>
+If the window occludes the sibling,
+then the window is placed at the bottom of the stack.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Opposite</emphasis>
+ </entry>
+ <entry>
+If the sibling occludes the window,
+then the window is placed at the top of the stack.
+Otherwise, if the window occludes the sibling,
+then the window is placed at the bottom of the stack.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+If a stack-mode is specified but no sibling is specified,
+the window is restacked as follows:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='3.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>Above</emphasis>
+ </entry>
+ <entry>
+The window is placed at the top of the stack.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Below</emphasis>
+ </entry>
+ <entry>
+The window is placed at the bottom of the stack.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>TopIf</emphasis>
+ </entry>
+ <entry>
+If any sibling occludes the window,
+then the window is placed at the top of the stack.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>BottomIf</emphasis>
+ </entry>
+ <entry>
+If the window occludes any sibling,
+then the window is placed at the bottom of the stack.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Opposite</emphasis>
+ </entry>
+ <entry>
+If any sibling occludes the window,
+then the window is placed at the top of the stack.
+Otherwise, if the window occludes any sibling,
+then the window is placed at the bottom of the stack.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+It is a
+<emphasis role='bold'>Match</emphasis>
+error if a sibling is specified without a stack-mode
+or if the window is not actually a sibling.
+</para>
+<para>
+Note that the computations for
+<emphasis role='bold'>BottomIf</emphasis>,
+<emphasis role='bold'>TopIf</emphasis>,
+and
+<emphasis role='bold'>Opposite</emphasis>
+are performed with respect to the window's final geometry (as controlled by
+the other arguments to the request), not to its initial geometry.
+</para>
+<para>
+Attempts to configure a root window have no effect.
+</para>
+
+ </section>
+ <section id="requests:CirculateWindow">
+ <title>CirculateWindow</title>
+ <indexterm zone="requests:CirculateWindow" significance="preferred"><primary>CirculateWindow</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>direction</emphasis>:
+{ <emphasis role='bold'>RaiseLowest</emphasis>,
+<emphasis role='bold'>LowerHighest</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If some other client has selected
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the window, then a
+<link linkend="events:CirculateRequest"><emphasis role='bold'>CirculateRequest</emphasis></link>
+event is generated, and no further processing is performed.
+Otherwise, the following is performed, and then a
+<link linkend="events:CirculateNotify"><emphasis role='bold'>CirculateNotify</emphasis></link>
+event is generated if the window is actually restacked.
+</para>
+<para>
+For
+<emphasis role='bold'>RaiseLowest</emphasis>,
+<emphasis role='bold'>CirculateWindow</emphasis>
+raises the lowest mapped child (if any) that is
+occluded by another child to the top of the stack.
+For
+<emphasis role='bold'>LowerHighest</emphasis>,
+<emphasis role='bold'>CirculateWindow</emphasis>
+lowers the highest mapped child (if any) that occludes another child to
+the bottom of the stack.
+Exposure processing is performed on formerly obscured windows.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetGeometry">
+ <title>GetGeometry</title>
+ <indexterm zone="requests:GetGeometry" significance="preferred"><primary>GetGeometry</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+root: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+depth: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+x, y: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+width, height, border-width: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the root and current geometry of the drawable.
+The depth is the number of bits per pixel for the object.
+The x, y, and border-width will always be zero for pixmaps.
+For a window,
+the x and y coordinates specify the upper-left outer corner of the window
+relative to its parent's origin,
+and the width and height specify the inside size, not including the border.
+</para>
+<para>
+It is legal to pass an
+<emphasis role='bold'>InputOnly</emphasis>
+window as a drawable to this request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryTree">
+ <title>QueryTree</title>
+ <indexterm zone="requests:QueryTree" significance="preferred"><primary>QueryTree</primary></indexterm>
+ <indexterm zone="requests:QueryTree"><primary>Children</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+root: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+parent: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+children: LISTofWINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the root, the parent, and the children of the window.
+The children are listed in bottom-to-top stacking order.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:InternAtom">
+ <title>InternAtom</title>
+ <indexterm zone="requests:InternAtom" significance="preferred"><primary>InternAtom</primary></indexterm>
+ <indexterm zone="requests:InternAtom"><primary>Atom</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>name</emphasis>: STRING8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>only-if-exists</emphasis>: BOOL
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+atom: ATOM or
+<emphasis role='bold'>None</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the atom for the given name.
+If only-if-exists is
+<emphasis role='bold'>False</emphasis>,
+then the atom is created if it does not exist.
+The string should use the ISO Latin-1 encoding.
+Uppercase and lowercase matter.
+</para>
+<para>
+The lifetime of an atom is not tied to the interning client.
+Atoms remain defined until server reset (see <link linkend='Connection_Close'>section 10</link>).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetAtomName">
+ <title>GetAtomName</title>
+ <indexterm zone="requests:GetAtomName" significance="preferred"><primary>GetAtomName</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>atom</emphasis>: ATOM
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+name: STRING8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Atom</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the name for the given atom.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeProperty">
+ <title>ChangeProperty</title>
+ <indexterm zone="requests:ChangeProperty" significance="preferred"><primary>ChangeProperty</primary></indexterm>
+ <indexterm zone="requests:ChangeProperty"><primary>Property</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>property</emphasis>, <emphasis remap='I'>type</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>format</emphasis>: {8, 16, 32}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Replace</emphasis>,
+<emphasis role='bold'>Prepend</emphasis>,
+<emphasis role='bold'>Append</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>data</emphasis>: LISTofINT8 or LISTofINT16 or LISTofINT32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Atom</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request alters the property for the specified window.
+The type is uninterpreted by the server.
+The format specifies whether the data should be viewed as a list of 8-bit,
+16-bit, or 32-bit quantities so that the server can correctly byte-swap
+as necessary.
+</para>
+<para>
+If the mode is
+<emphasis role='bold'>Replace</emphasis>,
+the previous property value is discarded.
+If the mode is
+<emphasis role='bold'>Prepend</emphasis>
+or
+<emphasis role='bold'>Append</emphasis>,
+then the type and format must match the existing property value (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+If the property is undefined,
+it is treated as defined with the correct type
+and format with zero-length data.
+For
+<emphasis role='bold'>Prepend</emphasis>,
+the data is tacked on to the beginning of the existing data, and for
+<emphasis role='bold'>Append</emphasis>,
+it is tacked on to the end of the existing data.
+</para>
+<para>
+This request generates a
+<link linkend="events:PropertyNotify"><emphasis role='bold'>PropertyNotify</emphasis></link>
+event on the window.
+</para>
+<para>
+The lifetime of a property is not tied to the storing client.
+Properties remain until explicitly deleted, until the window is destroyed,
+or until server reset (see <link linkend='Connection_Close'>section 10</link>).
+</para>
+<para>
+The maximum size of a property is server-dependent and may vary dynamically.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:DeleteProperty">
+ <title>DeleteProperty</title>
+ <indexterm zone="requests:DeleteProperty" significance="preferred"><primary>DeleteProperty</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>property</emphasis>: ATOM
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Atom</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request deletes the property from the specified window
+if the property exists and generates a
+<link linkend="events:PropertyNotify"><emphasis role='bold'>PropertyNotify</emphasis></link>
+event on the window unless the property does not exist.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetProperty">
+ <title>GetProperty</title>
+ <indexterm zone="requests:GetProperty" significance="preferred"><primary>GetProperty</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>property</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>type</emphasis>: ATOM or
+<emphasis role='bold'>AnyPropertyType</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>long-offset</emphasis>, <emphasis remap='I'>long-length</emphasis>: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>delete</emphasis>: BOOL
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+type: ATOM or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+format: {0, 8, 16, 32}
+ </entry>
+ </row>
+ <row>
+ <entry>
+bytes-after: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+value: LISTofINT8 or LISTofINT16 or LISTofINT32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Atom</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the specified property does not exist for the specified window,
+then the return type is
+<emphasis role='bold'>None</emphasis>,
+the format and bytes-after are zero,
+and the value is empty.
+The delete argument is ignored in this case.
+If the specified property exists but its type does not match the specified type,
+then the return type is the actual type of the property,
+the format is the actual format of the property (never zero),
+the bytes-after is the length of the property in bytes
+(even if the format is 16 or 32),
+and the value is empty.
+The delete argument is ignored in this case.
+If the specified property exists and either
+<emphasis role='bold'>AnyPropertyType</emphasis>
+is specified or the specified type matches the actual type of the property,
+then the return type is the actual type of the property,
+the format is the actual format of the property (never zero),
+and the bytes-after and value are as follows, given:
+<literallayout class="monospaced">
+ N = actual length of the stored property in bytes
+ (even if the format is 16 or 32)
+ I = 4 * long-offset
+ T = N - I
+ L = MINIMUM(T, 4 * long-length)
+ A = N - (I + L)
+</literallayout>
+</para>
+<para>
+The returned value starts at byte index I in the property (indexing from 0),
+and its length in bytes is L.
+However, it is a
+<emphasis role='bold'>Value</emphasis>
+error if long-offset is given such that L is negative.
+The value of bytes-after is A,
+giving the number of trailing unread bytes in the stored
+property.
+If delete is
+<emphasis role='bold'>True</emphasis>
+and the bytes-after is zero,
+the property is also deleted from the window,
+and a
+<link linkend="events:PropertyNotify"><emphasis role='bold'>PropertyNotify</emphasis></link>
+event is generated on the window.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:RotateProperties">
+ <title>RotateProperties</title>
+ <indexterm zone="requests:RotateProperties" significance="preferred"><primary>RotateProperties</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>delta</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>properties</emphasis>: LISTofATOM
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Atom</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the property names in the list are viewed as being numbered starting
+from zero, and there are N property names in the list,
+then the value associated with property name I becomes the value
+associated with property name (I + delta) mod N, for all I from zero to N - 1.
+The effect is to rotate the states by delta places around the virtual ring
+of property names (right for positive delta, left for negative delta).
+</para>
+<para>
+If delta mod N is nonzero,
+a
+<link linkend="events:PropertyNotify"><emphasis role='bold'>PropertyNotify</emphasis></link>
+event is generated for each property in the order listed.
+</para>
+<para>
+If an atom occurs more than once in the list or no property with that
+name is defined for the window,
+a
+<emphasis role='bold'>Match</emphasis>
+error is generated.
+If an
+<emphasis role='bold'>Atom</emphasis>
+or
+<emphasis role='bold'>Match</emphasis>
+error is generated, no properties are changed.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ListProperties">
+ <title>ListProperties</title>
+ <indexterm zone="requests:ListProperties" significance="preferred"><primary>ListProperties</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+atoms: LISTofATOM
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the atoms of properties currently defined on the window.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetSelectionOwner">
+ <title>SetSelectionOwner</title>
+ <indexterm zone="requests:SetSelectionOwner" significance="preferred"><primary>SetSelectionOwner</primary></indexterm>
+ <indexterm zone="requests:SetSelectionOwner"><primary>Selection</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>selection</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>owner</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Atom</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request changes the owner, owner window,
+and last-change time of the specified selection.
+This request has no effect if the specified time is earlier
+than the current last-change time of the specified selection or is
+later than the current server time.
+Otherwise, the last-change time is set to the specified time
+with
+<emphasis role='bold'>CurrentTime</emphasis>
+replaced by the current server time.
+If the owner window is specified as
+<emphasis role='bold'>None</emphasis>,
+then the owner of the selection becomes
+<emphasis role='bold'>None</emphasis>
+(that is, no owner).
+Otherwise, the owner of the selection becomes the client executing the request.
+If the new owner (whether a client or
+<emphasis role='bold'>None</emphasis>)
+is not the same as the current owner
+and the current owner is not
+<emphasis role='bold'>None</emphasis>,
+then the current owner is sent a
+<link linkend="events:SelectionClear"><emphasis role='bold'>SelectionClear</emphasis></link>
+event.
+</para>
+<para>
+If the client that is the owner of a selection is later terminated
+(that is, its connection is closed) or if the owner window it has
+specified in the request is later destroyed,
+then the owner of the selection automatically reverts to
+<emphasis role='bold'>None</emphasis>,
+but the last-change time is not affected.
+</para>
+<para>
+The selection atom is uninterpreted by the server.
+The owner window is returned by the
+<link linkend="requests:GetSelectionOwner"><emphasis role='bold'>GetSelectionOwner</emphasis></link>
+request and is reported in
+<link linkend="events:SelectionRequest"><emphasis role='bold'>SelectionRequest</emphasis></link>
+and
+<link linkend="events:SelectionClear"><emphasis role='bold'>SelectionClear</emphasis></link>
+events.
+</para>
+<para>
+Selections are global to the server.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetSelectionOwner">
+ <title>GetSelectionOwner</title>
+ <indexterm zone="requests:GetSelectionOwner" significance="preferred"><primary>GetSelectionOwner</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>selection</emphasis>: ATOM
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+owner: WINDOW or
+<emphasis role='bold'>None</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Atom</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current owner window of the specified selection,
+if any.
+If
+<emphasis role='bold'>None</emphasis>
+is returned, then there is no owner for the selection.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ConvertSelection">
+ <title>ConvertSelection</title>
+ <indexterm zone="requests:ConvertSelection" significance="preferred"><primary>ConvertSelection</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>property</emphasis>: ATOM or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>requestor</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Atom</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the specified selection has an owner,
+the server sends a
+<link linkend="events:SelectionRequest"><emphasis role='bold'>SelectionRequest</emphasis></link>
+event to that owner.
+If no owner for the specified selection exists,
+the server generates a
+<link linkend="events:SelectionNotify"><emphasis role='bold'>SelectionNotify</emphasis></link>
+event to the requestor with property
+<emphasis role='bold'>None</emphasis>.
+The arguments are passed on unchanged in either of the events.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SendEvent">
+ <title>SendEvent</title>
+ <indexterm zone="requests:SendEvent" significance="preferred"><primary>SendEvent</primary></indexterm>
+ <indexterm zone="requests:SendEvent" significance="preferred"><primary>Event</primary><secondary>sending</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>destination</emphasis>: WINDOW or
+<emphasis role='bold'>PointerWindow</emphasis>
+or
+<emphasis role='bold'>InputFocus</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>propagate</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>event-mask</emphasis>: SETofEVENT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>event</emphasis>: &lt;normal-event-format&gt;
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If
+<emphasis role='bold'>PointerWindow</emphasis>
+is specified,
+destination is replaced with the window that the pointer is in.
+If
+<emphasis role='bold'>InputFocus</emphasis>
+is specified and the focus window contains the pointer,
+destination is replaced with the window that the pointer is in.
+Otherwise, destination is replaced with the focus window.
+</para>
+<para>
+If the event-mask is the empty set,
+then the event is sent to the client that created the destination window.
+If that client no longer exists, no event is sent.
+</para>
+<para>
+If propagate is
+<emphasis role='bold'>False</emphasis>,
+then the event is sent to every client selecting
+on destination any of the event types in event-mask.
+</para>
+<para>
+If propagate is
+<emphasis role='bold'>True</emphasis>
+and no clients have selected on destination any
+of the event types in event-mask,
+then destination is replaced with the
+closest ancestor of destination for which some client has selected a
+type in event-mask and no intervening window has that type in its
+do-not-propagate-mask.
+If no such window exists or if the window is an ancestor of the focus window
+and
+<emphasis role='bold'>InputFocus</emphasis>
+was originally specified as the destination,
+then the event is not sent to any clients.
+Otherwise, the event is reported to every client selecting on the final
+destination any of the types specified in event-mask.
+</para>
+<para>
+The event code must be one of the core events or one of the events
+defined by an extension (or a
+<emphasis role='bold'>Value</emphasis>
+error results) so that the server can correctly byte-swap the
+contents as necessary.
+The contents of the event are otherwise unaltered and unchecked
+by the server except to force on the most significant bit of the event code
+and to set the sequence number in the event correctly.
+</para>
+<para>
+Active grabs are ignored for this request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GrabPointer">
+ <title>GrabPointer</title>
+ <indexterm zone="requests:GrabPointer" significance="preferred"><primary>GrabPointer</primary></indexterm>
+ <indexterm zone="requests:GrabPointer"><primary>Active grab</primary><secondary>pointer</secondary></indexterm>
+ <indexterm zone="requests:GrabPointer"><primary>Pointer</primary><secondary>grabbing</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>grab-window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>owner-events</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>event-mask</emphasis>: SETofPOINTEREVENT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>pointer-mode</emphasis>, <emphasis remap='I'>keyboard-mode</emphasis>:
+{ <emphasis role='bold'>Synchronous</emphasis>,
+<emphasis role='bold'>Asynchronous</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>confine-to</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>cursor</emphasis>: CURSOR or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+status:
+{ <emphasis role='bold'>Success</emphasis>,
+<emphasis role='bold'>AlreadyGrabbed</emphasis>,
+<emphasis role='bold'>Frozen</emphasis>,
+<emphasis role='bold'>InvalidTime</emphasis>,
+<emphasis role='bold'>NotViewable</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request actively grabs control of the pointer.
+Further pointer events are only reported to the grabbing client.
+The request overrides any active pointer grab by this client.
+</para>
+<para>
+If owner-events is
+<emphasis role='bold'>False</emphasis>,
+all generated pointer events are reported with respect to grab-window
+and are only reported if selected by event-mask.
+If owner-events is
+<emphasis role='bold'>True</emphasis>
+and a generated pointer event would normally be reported to this client,
+it is reported normally.
+Otherwise, the event is reported with respect to the grab-window and is
+only reported if selected by event-mask.
+For either value of owner-events,
+unreported events are simply discarded.
+</para>
+<para>
+If pointer-mode is
+<emphasis role='bold'>Asynchronous</emphasis>,
+pointer event processing continues normally.
+If the pointer is currently frozen by this client,
+then processing of pointer events is resumed.
+If pointer-mode is
+<emphasis role='bold'>Synchronous</emphasis>,
+the state of the pointer (as seen by means of the protocol) appears to freeze,
+and no further pointer events are generated by the server until the
+grabbing client issues a releasing
+<link linkend="requests:AllowEvents"><emphasis role='bold'>AllowEvents</emphasis></link>
+request or until the pointer grab is released.
+Actual pointer changes are not lost while the pointer is frozen.
+They are simply queued for later processing.
+</para>
+<para>
+If keyboard-mode is
+<emphasis role='bold'>Asynchronous</emphasis>,
+keyboard event processing is unaffected by activation of the grab.
+If keyboard-mode is
+<emphasis role='bold'>Synchronous</emphasis>,
+the state of the keyboard (as seen by means of the protocol) appears to freeze,
+and no further keyboard events are generated by the server until the grabbing
+client issues a releasing
+<emphasis role='bold'>AllowEvents</emphasis>
+request or until the pointer grab is released.
+Actual keyboard changes are not lost while the keyboard is frozen.
+They are simply queued for later processing.
+</para>
+<para>
+If a cursor is specified,
+then it is displayed regardless of what window the pointer is in.
+If no cursor is specified,
+then when the pointer is in grab-window or one of its subwindows,
+the normal cursor for that window is displayed.
+Otherwise, the cursor for grab-window is displayed.
+</para>
+<para>
+If a confine-to window is specified,
+then the pointer will be restricted to stay contained in that window.
+The confine-to window need have no relationship to the grab-window.
+If the pointer is not initially in the confine-to window,
+then it is warped automatically to the closest edge
+(and enter/leave events are generated normally) just before the grab activates.
+If the confine-to window is subsequently reconfigured,
+the pointer will be warped automatically as necessary to
+keep it contained in the window.
+</para>
+<para>
+This request generates
+<link linkend="events:EnterNotify"><emphasis role='bold'>EnterNotify</emphasis></link>
+and
+<link linkend="events:LeaveNotify"><emphasis role='bold'>LeaveNotify</emphasis></link>
+events.
+</para>
+<para>
+The request fails with status
+<emphasis role='bold'>AlreadyGrabbed</emphasis>
+if the pointer is actively grabbed by some other client.
+The request fails with status
+<emphasis role='bold'>Frozen</emphasis>
+if the pointer is frozen by an active grab of another client.
+The request fails with status
+<emphasis role='bold'>NotViewable</emphasis>
+if grab-window or confine-to window is not viewable
+or if the confine-to window lies completely outside the boundaries
+of the root window.
+The request fails with status
+<emphasis role='bold'>InvalidTime</emphasis>
+if the specified time is earlier than the last-pointer-grab time or later than
+the current server time.
+Otherwise, the last-pointer-grab time is set to the specified time, with
+<emphasis role='bold'>CurrentTime</emphasis>
+replaced by the current server time.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UngrabPointer">
+ <title>UngrabPointer</title>
+ <indexterm zone="requests:UngrabPointer" significance="preferred"><primary>UngrabPointer</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request releases the pointer if this client has it actively grabbed (from
+either
+<link linkend="requests:GrabPointer"><emphasis role='bold'>GrabPointer</emphasis></link>
+or
+<link linkend="requests:GrabButton"><emphasis role='bold'>GrabButton</emphasis></link>
+or from a normal button press) and releases any queued events.
+The request has no effect if the specified time is earlier than
+the last-pointer-grab time or is later than the current server time.
+</para>
+<para>
+This request generates
+<link linkend="events:EnterNotify"><emphasis role='bold'>EnterNotify</emphasis></link>
+and
+<link linkend="events:LeaveNotify"><emphasis role='bold'>LeaveNotify</emphasis></link>
+events.
+</para>
+<para>
+An
+<link linkend="requests:UngrabPointer"><emphasis role='bold'>UngrabPointer</emphasis></link>
+request is performed automatically if the event window or
+confine-to window for an active pointer grab becomes not viewable
+or if window reconfiguration causes the confine-to window to lie
+completely outside the boundaries of the root window.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GrabButton">
+ <title>GrabButton</title>
+ <indexterm zone="requests:GrabButton" significance="preferred"><primary>GrabButton</primary></indexterm>
+ <indexterm zone="requests:GrabButton"><primary>Button</primary><secondary>grabbing</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>modifiers</emphasis>: SETofKEYMASK or
+<emphasis role='bold'>AnyModifier</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>button</emphasis>: BUTTON or
+<emphasis role='bold'>AnyButton</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>grab-window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>owner-events</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>event-mask</emphasis>: SETofPOINTEREVENT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>pointer-mode</emphasis>, <emphasis remap='I'>keyboard-mode</emphasis>:
+{ <emphasis role='bold'>Synchronous</emphasis>,
+<emphasis role='bold'>Asynchronous</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>confine-to</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>cursor</emphasis>: CURSOR or
+<emphasis role='bold'>None</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request establishes a passive grab.
+<indexterm zone="requests:GrabButton"><primary>Passive grab</primary><secondary>pointer</secondary></indexterm>
+In the future,
+the pointer is actively grabbed as described in
+<link linkend="requests:GrabPointer"><emphasis role='bold'>GrabPointer</emphasis></link>,
+the last-pointer-grab time is set to the time at which the button was
+pressed (as transmitted in the
+<link linkend="events:ButtonPress"><emphasis role='bold'>ButtonPress</emphasis></link>
+event), and the
+<emphasis role='bold'>ButtonPress</emphasis>
+event is reported if all of the following conditions are true:
+<!-- .IP bu 5 -->
+The pointer is not grabbed and the specified button is logically pressed
+when the specified modifier keys are logically down,
+and no other buttons or modifier keys are logically down.
+<!-- .IP bu 5 -->
+The grab-window contains the pointer.
+<!-- .IP bu 5 -->
+The confine-to window (if any) is viewable.
+<!-- .IP bu 5 -->
+A passive grab on the same button/key combination does not exist
+on any ancestor of grab-window.
+</para>
+<para>
+The interpretation of the remaining arguments is the same as for
+<link linkend="requests:GrabPointer"><emphasis role='bold'>GrabPointer</emphasis></link>.
+The active grab is terminated automatically when
+the logical state of the pointer has all buttons released,
+independent of the logical state of modifier keys.
+Note that the logical state of a device (as seen by means of the protocol)
+may lag the physical state if device event processing is frozen.
+</para>
+<para>
+This request overrides all previous passive grabs by the same client on
+the same button/key combinations on the same window.
+A modifier of
+<emphasis role='bold'>AnyModifier</emphasis>
+is equivalent to issuing the request for all possible modifier combinations
+(including the combination of no modifiers).
+It is not required that all specified modifiers have currently assigned
+keycodes.
+A button of
+<emphasis role='bold'>AnyButton</emphasis>
+is equivalent to issuing the request for all possible buttons.
+Otherwise, it is not required that the button specified currently be assigned
+to a physical button.
+</para>
+<para>
+An
+<emphasis role='bold'>Access</emphasis>
+error is generated if some other client has already issued a
+<emphasis role='bold'>GrabButton</emphasis>
+request with the same button/key combination on the same window.
+When using
+<emphasis role='bold'>AnyModifier</emphasis>
+or
+<emphasis role='bold'>AnyButton</emphasis>,
+the request fails completely (no grabs are established), and an
+<emphasis role='bold'>Access</emphasis>
+error is generated if there is a conflicting grab for any combination.
+The request has no effect on an active grab.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UngrabButton">
+ <title>UngrabButton</title>
+ <indexterm zone="requests:UngrabButton" significance="preferred"><primary>UngrabButton</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>modifiers</emphasis>: SETofKEYMASK or
+<emphasis role='bold'>AnyModifier</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>button</emphasis>: BUTTON or
+<emphasis role='bold'>AnyButton</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>grab-window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request releases the passive button/key combination
+on the specified window if it was grabbed by this client.
+A modifiers argument of
+<emphasis role='bold'>AnyModifier</emphasis>
+is equivalent to issuing the request for all possible modifier
+combinations (including the combination of no modifiers).
+A button of
+<emphasis role='bold'>AnyButton</emphasis>
+is equivalent to issuing the request for all possible buttons.
+The request has no effect on an active grab.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeActivePointerGrab">
+ <title>ChangeActivePointerGrab</title>
+ <indexterm zone="requests:ChangeActivePointerGrab" significance="preferred"><primary>ChangeActivePointerGrab</primary></indexterm>
+ <indexterm zone="requests:ChangeActivePointerGrab"><primary>Active grab</primary><secondary>pointer</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event-mask</emphasis>: SETofPOINTEREVENT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>cursor</emphasis>: CURSOR or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request changes the specified dynamic parameters if the pointer is
+actively grabbed by the client and the specified time is no earlier than the
+last-pointer-grab time and no later than the current server time.
+The interpretation of event-mask and cursor are the same as in
+<link linkend="requests:GrabPointer"><emphasis role='bold'>GrabPointer</emphasis></link>.
+This request has no effect on the parameters of any passive grabs established
+with
+<link linkend="requests:GrabButton"><emphasis role='bold'>GrabButton</emphasis></link>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GrabKeyboard">
+ <title>GrabKeyboard</title>
+ <indexterm zone="requests:GrabKeyboard" significance="preferred"><primary>GrabKeyboard</primary></indexterm>
+ <indexterm zone="requests:GrabKeyboard"><primary>Active grab</primary><secondary>keyboard</secondary></indexterm>
+ <indexterm zone="requests:GrabKeyboard"><primary>Keyboard</primary><secondary>grabbing</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>grab-window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>owner-events</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>pointer-mode</emphasis>, <emphasis remap='I'>keyboard-mode</emphasis>:
+{ <emphasis role='bold'>Synchronous</emphasis>,
+<emphasis role='bold'>Asynchronous</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+status:
+{ <emphasis role='bold'>Success</emphasis>,
+<emphasis role='bold'>AlreadyGrabbed</emphasis>,
+<emphasis role='bold'>Frozen</emphasis>,
+<emphasis role='bold'>InvalidTime</emphasis>,
+<emphasis role='bold'>NotViewable</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request actively grabs control of the keyboard.
+Further key events are reported only to the grabbing client.
+This request overrides any active keyboard grab by this client.
+</para>
+<para>
+If owner-events is
+<emphasis role='bold'>False</emphasis>,
+all generated key events are reported with respect to grab-window.
+If owner-events is
+<emphasis role='bold'>True</emphasis>
+and if a generated key event would normally be reported to this client,
+it is reported normally.
+Otherwise, the event is reported with respect to the grab-window.
+Both
+<link linkend="events:KeyPress"><emphasis role='bold'>KeyPress</emphasis></link>
+and
+<link linkend="events:KeyRelease"><emphasis role='bold'>KeyRelease</emphasis></link>
+events are always reported,
+independent of any event selection made by the client.
+</para>
+<para>
+If keyboard-mode is
+<emphasis role='bold'>Asynchronous</emphasis>,
+keyboard event processing continues normally.
+If the keyboard is currently frozen by this client,
+then processing of keyboard events is resumed.
+If keyboard-mode is
+<emphasis role='bold'>Synchronous</emphasis>,
+the state of the keyboard (as seen by means of the protocol) appears to freeze.
+No further keyboard events are generated by the server until the
+grabbing client issues a releasing
+<link linkend="requests:AllowEvents"><emphasis role='bold'>AllowEvents</emphasis></link>
+request or until the keyboard grab is released.
+Actual keyboard changes are not lost while the keyboard is frozen.
+They are simply queued for later processing.
+</para>
+<para>
+If pointer-mode is
+<emphasis role='bold'>Asynchronous</emphasis>,
+pointer event processing is unaffected by activation of the grab.
+If pointer-mode is
+<emphasis role='bold'>Synchronous</emphasis>,
+the state of the pointer (as seen by means of the protocol) appears to freeze.
+No further pointer events are generated by the server
+until the grabbing client issues a releasing
+<link linkend="requests:AllowEvents"><emphasis role='bold'>AllowEvents</emphasis></link>
+request or until the keyboard grab is released.
+Actual pointer changes are not lost while the pointer is frozen.
+They are simply queued for later processing.
+</para>
+<para>
+This request generates
+<link linkend="events:FocusIn"><emphasis role='bold'>FocusIn</emphasis></link>
+and
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>
+events.
+</para>
+<para>
+The request fails with status
+<emphasis role='bold'>AlreadyGrabbed</emphasis>
+if the keyboard is actively grabbed by some other client.
+The request fails with status
+<emphasis role='bold'>Frozen</emphasis>
+if the keyboard is frozen by an active grab of another client.
+The request fails with status
+<emphasis role='bold'>NotViewable</emphasis>
+if grab-window is not viewable.
+The request fails with status
+<emphasis role='bold'>InvalidTime</emphasis>
+if the specified time is earlier than the last-keyboard-grab time
+or later than the current server time.
+Otherwise, the last-keyboard-grab time is set to the specified time with
+<emphasis role='bold'>CurrentTime</emphasis>
+replaced by the current server time.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UngrabKeyboard">
+ <title>UngrabKeyboard</title>
+ <indexterm zone="requests:UngrabKeyboard" significance="preferred"><primary>UngrabKeyboard</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request releases the keyboard if this client has it actively grabbed
+(as a result of either
+<link linkend="requests:GrabKeyboard"><emphasis role='bold'>GrabKeyboard</emphasis></link>
+or
+<link linkend="requests:GrabKey"><emphasis role='bold'>GrabKey</emphasis></link>)
+and releases any queued events.
+The request has no effect if the specified time is earlier than the
+last-keyboard-grab time or is later than the current server time.
+</para>
+<para>
+This request generates
+<link linkend="events:FocusIn"><emphasis role='bold'>FocusIn</emphasis></link>
+and
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>
+events.
+</para>
+<para>
+An
+<link linkend="requests:UngrabKeyboard"><emphasis role='bold'>UngrabKeyboard</emphasis></link>
+is performed automatically if the event window for an active keyboard grab
+becomes not viewable.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GrabKey">
+ <title>GrabKey</title>
+ <indexterm zone="requests:GrabKey" significance="preferred"><primary>GrabKey</primary></indexterm>
+ <indexterm zone="requests:GrabKey"><primary>Key</primary><secondary>grabbing</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>key</emphasis>: KEYCODE or
+<emphasis role='bold'>AnyKey</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>modifiers</emphasis>: SETofKEYMASK or
+<emphasis role='bold'>AnyModifier</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>grab-window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>owner-events</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>pointer-mode</emphasis>, <emphasis remap='I'>keyboard-mode</emphasis>:
+{ <emphasis role='bold'>Synchronous</emphasis>,
+<emphasis role='bold'>Asynchronous</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request establishes a passive grab on the keyboard.
+<indexterm zone="requests:GrabKey"><primary>Passive grab</primary><secondary>keyboard</secondary></indexterm>
+In the future,
+the keyboard is actively grabbed as described in
+<link linkend="requests:GrabKeyboard"><emphasis role='bold'>GrabKeyboard</emphasis></link>,
+the last-keyboard-grab time is set to the time at which the key was pressed
+(as transmitted in the
+<link linkend="events:KeyPress"><emphasis role='bold'>KeyPress</emphasis></link>
+event), and the
+<emphasis role='bold'>KeyPress</emphasis>
+event is reported if all of the following conditions are true:
+<!-- .IP bu 5 -->
+The keyboard is not grabbed and the specified key
+(which can itself be a modifier key) is logically pressed
+when the specified modifier keys are logically down,
+and no other modifier keys are logically down.
+<!-- .IP bu 5 -->
+Either the grab-window is an ancestor of (or is) the focus window,
+or the grab-window is a descendent of the focus window and contains the pointer.
+<!-- .IP bu 5 -->
+A passive grab on the same key combination does not exist
+on any ancestor of grab-window.
+</para>
+<para>
+The interpretation of the remaining arguments is the same as for
+<link linkend="requests:GrabKeyboard"><emphasis role='bold'>GrabKeyboard</emphasis></link>.
+The active grab is terminated automatically when the logical state
+of the keyboard has the specified key released,
+independent of the logical state of modifier keys.
+Note that the logical state of a device (as seen by means of the protocol)
+may lag the physical state if device event processing is frozen.
+</para>
+<para>
+This request overrides all previous passive grabs by the same client
+on the same key combinations on the same window.
+A modifier of
+<emphasis role='bold'>AnyModifier</emphasis>
+is equivalent to issuing the request for all possible modifier combinations
+(including the combination of no modifiers).
+It is not required that all modifiers specified have
+currently assigned keycodes.
+A key of
+<emphasis role='bold'>AnyKey</emphasis>
+is equivalent to issuing the request for all possible keycodes.
+Otherwise, the key must be in the range specified by min-keycode
+and max-keycode in the connection setup (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+</para>
+<para>
+An
+<emphasis role='bold'>Access</emphasis>
+error is generated if some other client has issued a
+<emphasis role='bold'>GrabKey</emphasis>
+with the same key combination on the same window.
+When using
+<emphasis role='bold'>AnyModifier</emphasis>
+or
+<emphasis role='bold'>AnyKey</emphasis>,
+the request fails completely (no grabs are established),
+and an
+<emphasis role='bold'>Access</emphasis>
+error is generated if there is a conflicting grab for any combination.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UngrabKey">
+ <title>UngrabKey</title>
+ <indexterm zone="requests:UngrabKey" significance="preferred"><primary>UngrabKey</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>key</emphasis>: KEYCODE or
+<emphasis role='bold'>AnyKey</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>modifiers</emphasis>: SETofKEYMASK or
+<emphasis role='bold'>AnyModifier</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>grab-window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request releases the key combination on the specified window
+if it was grabbed by this client.
+A modifiers argument of
+<emphasis role='bold'>AnyModifier</emphasis>
+is equivalent to issuing the request for all possible modifier combinations
+(including the combination of no modifiers).
+A key of
+<emphasis role='bold'>AnyKey</emphasis>
+is equivalent to issuing the request for all possible keycodes.
+This request has no effect on an active grab.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:AllowEvents">
+ <title>AllowEvents</title>
+ <indexterm zone="requests:AllowEvents" significance="preferred"><primary>AllowEvents</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>AsyncPointer</emphasis>,
+<emphasis role='bold'>SyncPointer</emphasis>,
+<emphasis role='bold'>ReplayPointer</emphasis>,
+<emphasis role='bold'>AsyncKeyboard</emphasis>,
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>SyncKeyboard</emphasis>,
+<emphasis role='bold'>ReplayKeyboard</emphasis>,
+<emphasis role='bold'>AsyncBoth</emphasis>,
+<emphasis role='bold'>SyncBoth</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request releases some queued events if the client has caused a device to
+freeze.
+The request has no effect if the specified time is earlier
+than the last-grab time of the most recent active grab for the client
+or if the specified time is later than the current server time.
+</para>
+<para>
+For
+<emphasis role='bold'>AsyncPointer</emphasis>,
+if the pointer is frozen by the client,
+pointer event processing continues normally.
+If the pointer is frozen twice by the client on behalf of two separate grabs,
+<emphasis role='bold'>AsyncPointer</emphasis>
+thaws for both.
+<emphasis role='bold'>AsyncPointer</emphasis>
+has no effect if the pointer is not frozen by the client,
+but the pointer need not be grabbed by the client.
+</para>
+<para>
+For
+<emphasis role='bold'>SyncPointer</emphasis>,
+if the pointer is frozen and actively grabbed by the client,
+pointer event processing continues normally until the next
+<link linkend="events:ButtonPress"><emphasis role='bold'>ButtonPress</emphasis></link>
+or
+<link linkend="events:ButtonRelease"><emphasis role='bold'>ButtonRelease</emphasis></link>
+event is reported to the client,
+at which time the pointer again appears to freeze.
+However, if the reported event causes the pointer grab to be released,
+then the pointer does not freeze.
+<emphasis role='bold'>SyncPointer</emphasis>
+has no effect if the pointer is not frozen by the
+client or if the pointer is not grabbed by the client.
+</para>
+<para>
+For
+<emphasis role='bold'>ReplayPointer</emphasis>,
+if the pointer is actively grabbed by the client and
+is frozen as the result of an event having been sent to the client
+(either from the activation of a
+<link linkend="requests:GrabButton"><emphasis role='bold'>GrabButton</emphasis></link>
+or from a previous
+<emphasis role='bold'>AllowEvents</emphasis>
+with mode
+<emphasis role='bold'>SyncPointer</emphasis>
+but not from a
+<link linkend="requests:GrabPointer"><emphasis role='bold'>GrabPointer</emphasis></link>),
+then the pointer grab is released and that event is completely reprocessed,
+this time ignoring any passive grabs at or above (towards the root)
+the grab-window of the grab just released.
+The request has no effect if the pointer is not grabbed by the client
+or if the pointer is not frozen as the result of an event.
+</para>
+<para>
+For
+<emphasis role='bold'>AsyncKeyboard</emphasis>,
+if the keyboard is frozen by the client,
+keyboard event processing continues normally.
+If the keyboard is frozen twice by the client on behalf of two separate grabs,
+<emphasis role='bold'>AsyncKeyboard</emphasis>
+thaws for both.
+<emphasis role='bold'>AsyncKeyboard</emphasis>
+has no effect if the keyboard is not frozen by the client,
+but the keyboard need not be grabbed by the client.
+</para>
+<para>
+For
+<emphasis role='bold'>SyncKeyboard</emphasis>,
+if the keyboard is frozen and actively grabbed by the client,
+keyboard event processing continues normally until the next
+<link linkend="events:KeyPress"><emphasis role='bold'>KeyPress</emphasis></link>
+or
+<link linkend="events:KeyRelease"><emphasis role='bold'>KeyRelease</emphasis></link>
+event is reported to the client,
+at which time the keyboard again appears to freeze.
+However, if the reported event causes the keyboard grab to be released,
+then the keyboard does not freeze.
+<emphasis role='bold'>SyncKeyboard</emphasis>
+has no effect if the keyboard is not frozen by the client or
+if the keyboard is not grabbed by the client.
+</para>
+<para>
+For
+<emphasis role='bold'>ReplayKeyboard</emphasis>,
+if the keyboard is actively grabbed by the client
+and is frozen as the result of an event having been sent to the client
+(either from the activation of a
+<link linkend="requests:GrabKey"><emphasis role='bold'>GrabKey</emphasis></link>
+or from a previous
+<emphasis role='bold'>AllowEvents</emphasis>
+with mode
+<emphasis role='bold'>SyncKeyboard</emphasis>
+but not from a
+<link linkend="requests:GrabKeyboard"><emphasis role='bold'>GrabKeyboard</emphasis></link>),
+then the keyboard grab is released and that event is completely reprocessed,
+this time ignoring any passive grabs at or above (towards the root)
+the grab-window of the grab just released.
+The request has no effect if the keyboard is not grabbed by the client
+or if the keyboard is not frozen as the result of an event.
+</para>
+<para>
+For
+<emphasis role='bold'>SyncBoth</emphasis>,
+if both pointer and keyboard are frozen by the client,
+event processing (for both devices) continues normally until the next
+<link linkend="events:ButtonPress"><emphasis role='bold'>ButtonPress</emphasis></link>,
+<link linkend="events:ButtonRelease"><emphasis role='bold'>ButtonRelease</emphasis></link>,
+<link linkend="events:KeyPress"><emphasis role='bold'>KeyPress</emphasis></link>,
+or
+<link linkend="events:KeyRelease"><emphasis role='bold'>KeyRelease</emphasis></link>
+event is reported to the client for a grabbed device
+(button event for the pointer, key event for the keyboard),
+at which time the devices again appear to freeze.
+However, if the reported event causes the grab to be released,
+then the devices do not freeze (but if the other device is still
+grabbed, then a subsequent event for it will still cause both devices
+to freeze).
+<emphasis role='bold'>SyncBoth</emphasis>
+has no effect unless both pointer and keyboard are frozen by the client.
+If the pointer or keyboard is frozen twice by the client on behalf
+of two separate grabs,
+<emphasis role='bold'>SyncBoth</emphasis>
+thaws for both (but a subsequent freeze for
+<emphasis role='bold'>SyncBoth</emphasis>
+will only freeze each device once).
+</para>
+<para>
+For
+<emphasis role='bold'>AsyncBoth</emphasis>,
+if the pointer and the keyboard are frozen by the client,
+event processing for both devices continues normally.
+If a device is frozen twice by the client on behalf of two separate grabs,
+<emphasis role='bold'>AsyncBoth</emphasis>
+thaws for both.
+<emphasis role='bold'>AsyncBoth</emphasis>
+has no effect unless both pointer and keyboard are frozen by the client.
+</para>
+<para>
+<emphasis role='bold'>AsyncPointer</emphasis>,
+<emphasis role='bold'>SyncPointer</emphasis>,
+and
+<emphasis role='bold'>ReplayPointer</emphasis>
+have no effect on processing of keyboard events.
+<emphasis role='bold'>AsyncKeyboard</emphasis>,
+<emphasis role='bold'>SyncKeyboard</emphasis>,
+and
+<emphasis role='bold'>ReplayKeyboard</emphasis>
+have no effect on processing of pointer events.
+</para>
+<para>
+It is possible for both a pointer grab and a keyboard grab to be active
+simultaneously (by the same or different clients).
+When a device is frozen on behalf of either grab,
+no event processing is performed for the device.
+It is possible for a single device to be frozen because of both grabs.
+In this case, the freeze must be released on behalf of both grabs
+before events can again be processed.
+If a device is frozen twice by a single client, then a single
+<emphasis role='bold'>AllowEvents</emphasis>
+releases both.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GrabServer">
+ <title>GrabServer</title>
+ <indexterm zone="requests:GrabServer" significance="preferred"><primary>GrabServer</primary></indexterm>
+ <indexterm zone="requests:GrabServer"><primary>Server</primary><secondary>grabbing</secondary></indexterm>
+<para>
+This request disables processing of requests and close-downs on all
+connections other than the one this request arrived on.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UngrabServer">
+ <title>UngrabServer</title>
+ <indexterm zone="requests:UngrabServer" significance="preferred"><primary>UngrabServer</primary></indexterm>
+<para>
+This request restarts processing of requests and close-downs
+on other connections.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryPointer">
+ <title>QueryPointer</title>
+ <indexterm zone="requests:QueryPointer" significance="preferred"><primary>QueryPointer</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+root: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+child: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+same-screen: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+root-x, root-y, win-x, win-y: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+mask: SETofKEYBUTMASK
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The root window the pointer is logically on and the pointer coordinates
+relative to the root's origin are returned.
+If same-screen is
+<emphasis role='bold'>False</emphasis>,
+then the pointer is not on the same screen as the argument window,
+child is
+<emphasis role='bold'>None</emphasis>,
+and win-x and win-y are zero.
+If same-screen is
+<emphasis role='bold'>True</emphasis>,
+then win-x and win-y are the pointer coordinates relative to the
+argument window's origin, and child is the child containing the
+pointer, if any.
+The current logical state of the modifier keys and the buttons
+are also returned.
+Note that the logical state of a device (as seen by means of the protocol)
+may lag the physical state if device event processing is frozen.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetMotionEvents">
+ <title>GetMotionEvents</title>
+ <indexterm zone="requests:GetMotionEvents" significance="preferred"><primary>GetMotionEvents</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>start</emphasis>,
+<emphasis remap='I'>stop</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+events: LISTofTIMECOORD
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+where:
+ </entry>
+ </row>
+ <row>
+ <entry>
+TIMECOORD: [x, y: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+ time: TIMESTAMP]
+<!-- .TE -->
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns all events in the motion history buffer that fall
+between the specified start and stop times (inclusive)
+and that have coordinates that lie within (including borders)
+the specified window at its present placement.
+The x and y coordinates are reported relative to the origin of the window.
+</para>
+<para>
+If the start time is later than the stop time or if the start time is
+in the future, no events are returned.
+If the stop time is in the future, it is equivalent to specifying
+<emphasis role='bold'>CurrentTime</emphasis>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:TranslateCoordinates">
+ <title>TranslateCoordinates</title>
+ <indexterm zone="requests:TranslateCoordinates" significance="preferred"><primary>TranslateCoordinates</primary></indexterm>
+ <indexterm zone="glossary:Coordinate_system"><primary>Coordinate system</primary><secondary>translating</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>src-window</emphasis>, <emphasis remap='I'>dst-window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>src-x</emphasis>, <emphasis remap='I'>src-y</emphasis>: INT16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+same-screen: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+child: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+dst-x, dst-y: INT16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The src-x and src-y coordinates are taken relative to src-window's
+origin and are returned as dst-x and dst-y coordinates relative to
+dst-window's origin.
+If same-screen is
+<emphasis role='bold'>False</emphasis>,
+then src-window and dst-window are on different screens,
+and dst-x and dst-y are zero.
+If the coordinates are contained in a mapped child of dst-window,
+then that child is returned.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:WarpPointer">
+ <title>WarpPointer</title>
+ <indexterm zone="requests:WarpPointer" significance="preferred"><primary>WarpPointer</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>src-window</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>dst-window</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>src-x</emphasis>, <emphasis remap='I'>src-y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>src-width</emphasis>, <emphasis remap='I'>src-height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>dst-x</emphasis>, <emphasis remap='I'>dst-y</emphasis>: INT16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If dst-window is
+<emphasis role='bold'>None</emphasis>,
+this request moves the pointer by offsets [dst-x, dst-y]
+relative to the current position of the pointer.
+If dst-window is a window,
+this request moves the pointer to [dst-x, dst-y] relative to dst-window's
+origin.
+However, if src-window is not
+<emphasis role='bold'>None</emphasis>,
+the move only takes place if src-window contains the pointer
+and the pointer is contained in the specified rectangle of src-window.
+</para>
+<para>
+The src-x and src-y coordinates are relative to src-window's origin.
+If src-height is zero,
+it is replaced with the current height of src-window minus src-y.
+If src-width is zero,
+it is replaced with the current width of src-window minus src-x.
+</para>
+<para>
+This request cannot be used to move the pointer outside the confine-to
+window of an active pointer grab.
+An attempt will only move the pointer as far as the closest edge
+of the confine-to window.
+</para>
+<para>
+This request will generate events just as if the user had instantaneously
+moved the pointer.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetInputFocus">
+ <title>SetInputFocus</title>
+ <indexterm zone="requests:SetInputFocus" significance="preferred"><primary>SetInputFocus</primary></indexterm>
+ <indexterm zone="requests:SetInputFocus"><primary>Input focus</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>focus</emphasis>: WINDOW or
+<emphasis role='bold'>PointerRoot</emphasis>
+or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>revert-to</emphasis>:
+{ <emphasis role='bold'>Parent</emphasis>,
+<emphasis role='bold'>PointerRoot</emphasis>,
+<emphasis role='bold'>None</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request changes the input focus and the last-focus-change time.
+The request has no effect if the specified time is earlier than the current
+last-focus-change time or is later than the current server time.
+Otherwise, the last-focus-change time is set to the specified time
+with
+<emphasis role='bold'>CurrentTime</emphasis>
+replaced by the current server time.
+</para>
+<para>
+If
+<emphasis role='bold'>None</emphasis>
+is specified as the focus,
+all keyboard events are discarded until a new focus window is set.
+In this case, the revert-to argument is ignored.
+</para>
+<para>
+If a window is specified as the focus,
+it becomes the keyboard's focus window.
+If a generated keyboard event would normally be reported to
+this window or one of its inferiors, the event is reported normally.
+Otherwise, the event is reported with respect to the focus window.
+</para>
+<para>
+If
+<emphasis role='bold'>PointerRoot</emphasis>
+is specified as the focus,
+the focus window is dynamically taken to be the root window of whatever screen
+the pointer is on at each keyboard event.
+In this case,
+the revert-to argument is ignored.
+</para>
+<para>
+This request generates
+<link linkend="events:FocusIn"><emphasis role='bold'>FocusIn</emphasis></link>
+and
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>
+events.
+</para>
+<para>
+The specified focus window must be viewable at the time of the request (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+If the focus window later becomes not viewable,
+the new focus window depends on the revert-to argument.
+If revert-to is
+<emphasis role='bold'>Parent</emphasis>,
+the focus reverts to the parent (or the closest viewable ancestor)
+and the new revert-to value is taken to be
+<emphasis role='bold'>None</emphasis>.
+If revert-to is
+<emphasis role='bold'>PointerRoot</emphasis>
+or
+<emphasis role='bold'>None</emphasis>,
+the focus reverts to that value.
+When the focus reverts,
+<link linkend="events:FocusIn"><emphasis role='bold'>FocusIn</emphasis></link>
+and
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>
+events are generated,
+but the last-focus-change time is not affected.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetInputFocus">
+ <title>GetInputFocus</title>
+ <indexterm zone="requests:GetInputFocus" significance="preferred"><primary>GetInputFocus</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+focus: WINDOW or
+<emphasis role='bold'>PointerRoot</emphasis>
+or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+revert-to:
+{ <emphasis role='bold'>Parent</emphasis>,
+<emphasis role='bold'>PointerRoot</emphasis>,
+<emphasis role='bold'>None</emphasis>}
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current focus state.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryKeymap">
+ <title>QueryKeymap</title>
+ <indexterm zone="requests:QueryKeymap" significance="preferred"><primary>QueryKeymap</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+keys: LISTofCARD8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns a bit vector for the logical state of the keyboard.
+Each bit set to 1 indicates that the corresponding key is currently pressed.
+The vector is represented as 32 bytes.
+Byte N (from 0) contains the bits for keys 8N to 8N + 7
+with the least significant bit in the byte representing key 8N.
+Note that the logical state of a device (as seen by means of the protocol)
+may lag the physical state if device event processing is frozen.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:OpenFont">
+ <title>OpenFont</title>
+ <indexterm zone="requests:OpenFont" significance="preferred"><primary>OpenFont</primary></indexterm>
+ <indexterm zone="requests:OpenFont"><primary>Font</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>fid</emphasis>: FONT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>name</emphasis>: STRING8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Name</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request loads the specified font, if necessary,
+and associates identifier fid with it.
+The font name should use the ISO Latin-1 encoding,
+and uppercase and lowercase do not matter.
+When the characters <quote>?</quote> and <quote>*</quote> are used in a font name, a
+pattern match is performed and any matching font is used.
+In the pattern,
+the <quote>?</quote> character (octal value 77) will match any single character,
+and the <quote>*</quote> character (octal value 52) will match any number
+of characters.
+A structured format for font names is specified in the
+X.Org standard <citetitle>X Logical Font Description Conventions</citetitle>.
+</para>
+<para>
+Fonts are not associated with a particular screen
+and can be stored as a component of any graphics context.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CloseFont">
+ <title>CloseFont</title>
+ <indexterm zone="requests:CloseFont" significance="preferred"><primary>CloseFont</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>font</emphasis>: FONT
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Font</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request deletes the association between the resource ID and the font.
+The font itself will be freed when no other resource references it.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryFont">
+ <title>QueryFont</title>
+ <indexterm zone="requests:QueryFont" significance="preferred"><primary>QueryFont</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <spanspec spanname='all' namest='c1' nameend='c3'/>
+ <tbody>
+ <row>
+ <entry spanname='all'>
+<!-- .in +.2i -->
+<emphasis remap='I'>font</emphasis>: FONTABLE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<!-- .in +.2i -->
+font-info: FONTINFO
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+char-infos: LISTofCHARINFO
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='18'>
+<!-- .in +.2i -->
+where:
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='9'>
+FONTINFO:
+ </entry>
+ <entry>
+[draw-direction:
+{ <emphasis role='bold'>LeftToRight</emphasis>,
+<emphasis role='bold'>RightToLeft</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>
+min-char-or-byte2, max-char-or-byte2: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+min-byte1, max-byte1: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+all-chars-exist: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+default-char: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+min-bounds: CHARINFO
+ </entry>
+ </row>
+ <row>
+ <entry>
+max-bounds: CHARINFO
+ </entry>
+ </row>
+ <row>
+ <entry>
+font-ascent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+font-descent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+properties: LISTofFONTPROP]
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='1'>
+FONTPROP:
+ </entry>
+ <entry>
+[name: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+value: &lt;32-bit-value&gt;]
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='5'>
+CHARINFO:
+ </entry>
+ <entry>
+[left-side-bearing: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+right-side-bearing: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+character-width: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+ascent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+descent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+attributes: CARD16]
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Font</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns logical information about a font.
+If a gcontext is given for font,
+the currently contained font is used.
+</para>
+<para>
+The draw-direction is just a hint
+and indicates whether most char-infos have a positive,
+<emphasis role='bold'>LeftToRight</emphasis>,
+or a negative,
+<emphasis role='bold'>RightToLeft</emphasis>,
+character-width metric.
+The core protocol defines no support for vertical text.
+</para>
+<para>
+If min-byte1 and max-byte1 are both zero,
+then min-char-or-byte2 specifies the linear character index corresponding
+to the first element of char-infos,
+and max-char-or-byte2 specifies the linear character index of the last element.
+If either min-byte1 or max-byte1 are nonzero,
+then both min-char-or-byte2 and max-char-or-byte2 will be less than 256,
+and the 2-byte character index values corresponding to char-infos element N
+(counting from 0) are:
+<literallayout class="monospaced">
+ byte1 = N/D + min-byte1
+ byte2 = N\\D + min-char-or-byte2
+</literallayout>
+</para>
+<para>
+where:
+<literallayout class="monospaced">
+ D = max-char-or-byte2 - min-char-or-byte2 + 1
+ / = integer division
+ \\ = integer modulus
+</literallayout>
+</para>
+<para>
+If char-infos has length zero,
+then min-bounds and max-bounds will be identical,
+and the effective char-infos is one filled with this char-info, of length:
+<literallayout class="monospaced">
+ L = D * (max-byte1 - min-byte1 + 1)
+</literallayout>
+</para>
+<para>
+That is,
+all glyphs in the specified linear or matrix range have the same information,
+as given by min-bounds (and max-bounds).
+If all-chars-exist is
+<emphasis role='bold'>True</emphasis>,
+then all characters in char-infos have nonzero bounding boxes.
+</para>
+<para>
+The default-char specifies the character that will be used when an
+undefined or nonexistent character is used.
+Note that default-char is a CARD16, not CHAR2B.
+For a font using 2-byte matrix format,
+the default-char has byte1 in the most significant byte
+and byte2 in the least significant byte.
+If the default-char itself specifies an undefined or nonexistent character,
+then no printing is performed for an undefined or nonexistent character.
+</para>
+<para>
+The min-bounds and max-bounds contain the minimum and maximum values of
+each individual CHARINFO component over all char-infos (ignoring
+nonexistent characters).
+The bounding box of the font (that is, the
+smallest rectangle enclosing the shape obtained by superimposing all
+characters at the same origin [x,y]) has its upper-left coordinate at:
+<literallayout class="monospaced">
+ [x + min-bounds.left-side-bearing, y - max-bounds.ascent]
+</literallayout>
+with a width of:
+<literallayout class="monospaced">
+ max-bounds.right-side-bearing - min-bounds.left-side-bearing
+</literallayout>
+</para>
+<para>
+and a height of:
+<literallayout class="monospaced">
+ max-bounds.ascent + max-bounds.descent
+</literallayout>
+</para>
+<para>
+The font-ascent is the logical extent of the font above the baseline
+and is used for determining line spacing.
+Specific characters may extend beyond this.
+The font-descent is the logical extent of the font at or below the baseline
+and is used for determining line spacing.
+Specific characters may extend beyond this.
+If the baseline is at Y-coordinate y,
+then the logical extent of the font is inclusive
+between the Y-coordinate values (y - font-ascent) and (y + font-descent - 1).
+</para>
+<para>
+A font is not guaranteed to have any properties.
+The interpretation of the property value (for example, INT32, CARD32)
+must be derived from <emphasis remap='I'>a priori</emphasis> knowledge of the property.
+A basic set of font properties is specified in the X.Org
+standard <citetitle>X Logical Font Description Conventions</citetitle>.
+</para>
+<para>
+For a character origin at [x,y],
+the bounding box of a character (that is,
+the smallest rectangle enclosing the character's shape), described in
+terms of CHARINFO components, is a rectangle with its upper-left corner at:
+<literallayout class="monospaced">
+ [x + left-side-bearing, y - ascent]
+</literallayout>
+</para>
+<para>
+with a width of:
+<literallayout class="monospaced">
+ right-side-bearing - left-side-bearing
+</literallayout>
+</para>
+<para>
+and a height of:
+<literallayout class="monospaced">
+ ascent + descent
+</literallayout>
+</para>
+<para>
+and the origin for the next character is defined to be:
+<literallayout class="monospaced">
+ [x + character-width, y]
+</literallayout>
+</para>
+<para>
+Note that the baseline is logically viewed as being just below
+nondescending characters (when descent is zero, only pixels with
+Y-coordinates less than y are drawn) and that the origin is logically
+viewed as being coincident with the left edge of a nonkerned character
+(when left-side-bearing is zero, no pixels with X-coordinate less than
+x are drawn).
+</para>
+<para>
+Note that CHARINFO metric values can be negative.
+</para>
+<para>
+A nonexistent character is represented with all CHARINFO components
+zero.
+</para>
+<para>
+The interpretation of the per-character attributes field is
+server-dependent.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryTextExtents">
+ <title>QueryTextExtents</title>
+ <indexterm zone="requests:QueryTextExtents" significance="preferred"><primary>QueryTextExtents</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>font</emphasis>: FONTABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>string</emphasis>: STRING16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+draw-direction:
+{ <emphasis role='bold'>LeftToRight</emphasis>,
+<emphasis role='bold'>RightToLeft</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+font-ascent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+font-descent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+overall-ascent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+overall-descent: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+overall-width: INT32
+ </entry>
+ </row>
+ <row>
+ <entry>
+overall-left: INT32
+ </entry>
+ </row>
+ <row>
+ <entry>
+overall-right: INT32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Font</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the logical extents of the specified string of characters
+in the specified font.
+If a gcontext is given for font,
+the currently contained font is used.
+The draw-direction, font-ascent, and font-descent are the same as
+described in
+<link linkend="requests:QueryFont"><emphasis role='bold'>QueryFont</emphasis></link>.
+The overall-ascent is the maximum of the ascent metrics of all characters
+in the string, and the overall-descent is the maximum of the descent metrics.
+The overall-width is the sum of the character-width metrics of all characters
+in the string.
+For each character in the string,
+let W be the sum of the character-width metrics of all characters preceding it
+in the string,
+let L be the left-side-bearing metric of the character plus W,
+and let R be the right-side-bearing metric of the character plus W.
+The overall-left is the minimum L of all characters in the string,
+and the overall-right is the maximum R.
+</para>
+<para>
+For fonts defined with linear indexing rather than 2-byte matrix indexing,
+the server will interpret each CHAR2B as a 16-bit number that
+has been transmitted most significant byte first (that is, byte1 of the
+CHAR2B is taken as the most significant byte).
+</para>
+<para>
+Characters with all zero metrics are ignored.
+If the font has no defined default-char,
+then undefined characters in the string are also ignored.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ListFonts">
+ <title>ListFonts</title>
+ <indexterm zone="requests:ListFonts" significance="preferred"><primary>ListFonts</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>pattern</emphasis>: STRING8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>max-names</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+names: LISTofSTRING8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns a list
+of available font names (as controlled by the font search path; see
+<link linkend="requests:SetFontPath"><emphasis role='bold'>SetFontPath</emphasis></link>
+request)
+that match the pattern.
+At most, max-names names will be returned.
+The pattern should use the ISO Latin-1 encoding,
+and uppercase and lowercase do not matter.
+In the pattern,
+the <quote>?</quote> character (octal value 77) will match any single character,
+and the <quote>*</quote> character (octal value 52) will match any number
+of characters.
+The returned names are in lowercase.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ListFontsWithInfo">
+ <title>ListFontsWithInfo</title>
+ <indexterm zone="requests:ListFontsWithInfo" significance="preferred"><primary>ListFontsWithInfo</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>pattern</emphasis>: STRING8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>max-names</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+name: STRING8
+ </entry>
+ </row>
+ <row>
+ <entry>
+info FONTINFO
+ </entry>
+ </row>
+ <row>
+ <entry>
+replies-hint: CARD32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+where:
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+FONTINFO: &lt;same type definition as in
+<link linkend="requests:QueryFont"><emphasis role='bold'>QueryFont</emphasis></link>&gt;
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request is similar to
+<link linkend="requests:ListFonts"><emphasis role='bold'>ListFonts</emphasis></link>,
+but it also returns information about each font.
+The information returned for each font is identical to what
+<link linkend="requests:QueryFont"><emphasis role='bold'>QueryFont</emphasis></link>
+would return except that the per-character metrics are not returned.
+Note that this request can generate multiple replies.
+With each reply,
+replies-hint may provide an indication of how many more fonts will be returned.
+This number is a hint only and may be larger or smaller than
+the number of fonts actually returned.
+A zero value does not guarantee that no more fonts will be returned.
+After the font replies,
+a reply with a zero-length name is sent to indicate the end of the reply
+sequence.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetFontPath">
+ <title>SetFontPath</title>
+ <indexterm zone="requests:SetFontPath" significance="preferred"><primary>SetFontPath</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>path</emphasis>: LISTofSTRING8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request defines the search path for font lookup.
+There is only one search path per server, not one per client.
+The interpretation of the strings is operating-system-dependent,
+but the strings are intended to specify directories to be searched in the
+order listed.
+</para>
+<para>
+Setting the path to the empty list restores the default path defined
+for the server.
+</para>
+<para>
+As a side effect of executing this request,
+the server is guaranteed to flush all cached information about fonts
+for which there currently are no explicit resource IDs allocated.
+</para>
+<para>
+The meaning of an error from this request is system specific.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetFontPath">
+ <title>GetFontPath</title>
+ <indexterm zone="requests:GetFontPath" significance="preferred"><primary>GetFontPath</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+path: LISTofSTRING8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current search path for fonts.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CreatePixmap">
+ <title>CreatePixmap</title>
+ <indexterm zone="requests:CreatePixmap" significance="preferred"><primary>CreatePixmap</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>pid</emphasis>: PIXMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>depth</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request creates a pixmap and assigns the identifier pid to it.
+The width and height must be nonzero (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The depth must be one of the depths supported by the root of the specified
+drawable (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The initial contents of the pixmap are undefined.
+</para>
+<para>
+It is legal to pass an
+<emphasis role='bold'>InputOnly</emphasis>
+window as a drawable to this request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:FreePixmap">
+ <title>FreePixmap</title>
+ <indexterm zone="requests:FreePixmap" significance="preferred"><primary>FreePixmap</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>pixmap</emphasis>: PIXMAP
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Pixmap</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request deletes the association between the resource ID and the pixmap.
+The pixmap storage will be freed when no other resource references it.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CreateGC">
+ <title>CreateGC</title>
+ <indexterm zone="requests:CreateGC" significance="preferred"><primary>CreateGC</primary></indexterm>
+ <indexterm zone="requests:CreateGC"><primary>Graphics context</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cid</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-list</emphasis>: LISTofVALUE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>Font</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Pixmap</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request creates a graphics context
+and assigns the identifier cid to it.
+The gcontext can be used with any destination drawable having the same root
+and depth as the specified drawable;
+use with other drawables results in a
+<emphasis role='bold'>Match</emphasis>
+error.
+</para>
+<para>
+The value-mask and value-list specify which components are to be
+explicitly initialized.
+The context components are:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Component</entry>
+ <entry>Type</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>function</entry>
+ <entry>
+{ <emphasis role='bold'>Clear</emphasis>,
+<emphasis role='bold'>And</emphasis>,
+<emphasis role='bold'>AndReverse</emphasis>,
+<emphasis role='bold'>Copy</emphasis>,
+<emphasis role='bold'>AndInverted</emphasis>,
+<emphasis role='bold'>NoOp</emphasis>,
+<emphasis role='bold'>Xor</emphasis>,
+<emphasis role='bold'>Or</emphasis>,
+<emphasis role='bold'>Nor</emphasis>,
+<emphasis role='bold'>Equiv</emphasis>,
+<emphasis role='bold'>Invert</emphasis>,
+<emphasis role='bold'>OrReverse</emphasis>,
+<emphasis role='bold'>CopyInverted</emphasis>,
+<emphasis role='bold'>OrInverted</emphasis>,
+<emphasis role='bold'>Nand</emphasis>,
+<emphasis role='bold'>Set</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>plane-mask</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry>foreground</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry>background</entry>
+ <entry>CARD32</entry>
+ </row>
+ <row>
+ <entry>line-width</entry>
+ <entry>CARD16</entry>
+ </row>
+ <row>
+ <entry>line-style</entry>
+ <entry>
+{ <emphasis role='bold'>Solid</emphasis>,
+<emphasis role='bold'>OnOffDash</emphasis>,
+<emphasis role='bold'>DoubleDash</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>cap-style</entry>
+ <entry>
+{ <emphasis role='bold'>NotLast</emphasis>,
+<emphasis role='bold'>Butt</emphasis>,
+<emphasis role='bold'>Round</emphasis>,
+<emphasis role='bold'>Projecting</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>join-style</entry>
+ <entry>
+{ <emphasis role='bold'>Miter</emphasis>,
+<emphasis role='bold'>Round</emphasis>,
+<emphasis role='bold'>Bevel</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>fill-style</entry>
+ <entry>
+{ <emphasis role='bold'>Solid</emphasis>,
+<emphasis role='bold'>Tiled</emphasis>,
+<emphasis role='bold'>OpaqueStippled</emphasis>,
+<emphasis role='bold'>Stippled</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>fill-rule</entry>
+ <entry>
+{ <emphasis role='bold'>EvenOdd</emphasis>,
+<emphasis role='bold'>Winding</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>arc-mode</entry>
+ <entry>
+{ <emphasis role='bold'>Chord</emphasis>,
+<emphasis role='bold'>PieSlice</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>tile</entry>
+ <entry>PIXMAP</entry>
+ </row>
+ <row>
+ <entry>stipple</entry>
+ <entry>PIXMAP</entry>
+ </row>
+ <row>
+ <entry>tile-stipple-x-origin</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>tile-stipple-y-origin</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>font</entry>
+ <entry>FONT</entry>
+ </row>
+ <row>
+ <entry>subwindow-mode</entry>
+ <entry>
+{ <emphasis role='bold'>ClipByChildren</emphasis>,
+<emphasis role='bold'>IncludeInferiors</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>graphics-exposures</entry>
+ <entry>BOOL</entry>
+ </row>
+ <row>
+ <entry>clip-x-origin</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>clip-y-origin</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>clip-mask</entry>
+ <entry>
+PIXMAP or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>dash-offset</entry>
+ <entry>CARD16</entry>
+ </row>
+ <row>
+ <entry>dashes</entry>
+ <entry>CARD8</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para id="requests:CreateGC:plane-mask">
+<indexterm zone="requests:CreateGC:plane-mask"><primary>Plane</primary><secondary>mask</secondary></indexterm>
+In graphics operations,
+given a source and destination pixel,
+the result is computed bitwise on corresponding bits of the pixels;
+that is, a Boolean operation is performed in each bit plane.
+The plane-mask restricts the operation to a subset of planes,
+so the result is:
+</para>
+
+<literallayout class="monospaced">
+ ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask))
+</literallayout>
+
+<para>
+Range checking is not performed on the values for foreground, background,
+or plane-mask.
+They are simply truncated to the appropriate number of bits.
+</para>
+
+<para id="requests:CreateGC:function">
+The meanings of the functions are:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Function</entry>
+ <entry>Operation</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>Clear</emphasis>
+ </entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>And</emphasis>
+ </entry>
+ <entry>src AND dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>AndReverse</emphasis>
+ </entry>
+ <entry>src AND (NOT dst)</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Copy</emphasis>
+ </entry>
+ <entry>src</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>AndInverted</emphasis>
+ </entry>
+ <entry>(NOT src) AND dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>NoOp</emphasis>
+ </entry>
+ <entry>dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Xor</emphasis>
+ </entry>
+ <entry>src XOR dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Or</emphasis>
+ </entry>
+ <entry>src OR dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Nor</emphasis>
+ </entry>
+ <entry>(NOT src) AND (NOT dst)</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Equiv</emphasis>
+ </entry>
+ <entry>(NOT src) XOR dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Invert</emphasis>
+ </entry>
+ <entry>NOT dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>OrReverse</emphasis>
+ </entry>
+ <entry>src OR (NOT dst)</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>CopyInverted</emphasis>
+ </entry>
+ <entry>NOT src</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>OrInverted</emphasis>
+ </entry>
+ <entry>(NOT src) OR dst</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Nand</emphasis>
+ </entry>
+ <entry>(NOT src) OR (NOT dst)</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Set</emphasis>
+ </entry>
+ <entry>1</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para id="requests:CreateGC:line-width">
+<indexterm zone="requests:CreateGC:line-width"><primary>Line</primary><secondary>drawing</secondary></indexterm>
+The line-width is measured in pixels and can be greater than or equal to
+one, a wide line, or the special value zero, a thin line.
+</para>
+
+<para>
+Wide lines are drawn centered on the path described by the graphics request.
+Unless otherwise specified by the join or cap style,
+the bounding box of a wide line with endpoints [x1, y1], [x2, y2] and
+width w is a rectangle with vertices at the following real coordinates:
+</para>
+
+<literallayout class="monospaced">
+ [x1-(w*sn/2), y1+(w*cs/2)], [x1+(w*sn/2), y1-(w*cs/2)],
+ [x2-(w*sn/2), y2+(w*cs/2)], [x2+(w*sn/2), y2-(w*cs/2)]
+</literallayout>
+
+<para>
+The sn is the sine of the angle of the line and cs is the cosine of
+the angle of the line.
+A pixel is part of the line (and hence drawn) if the center of the pixel
+is fully inside the bounding box, which is viewed as having infinitely thin
+edges.
+If the center of the pixel is exactly on the bounding box,
+it is part of the line if and only if the interior is immediately to its right
+(x increasing direction).
+Pixels with centers on a horizontal edge are a special case and are part of
+the line if and only if the interior or the boundary is immediately below
+(y increasing direction) and if the interior or the boundary is immediately
+to the right (x increasing direction).
+Note that this description is a mathematical model describing the pixels
+that are drawn for a wide line and does not imply that trigonometry is required
+to implement such a model.
+Real or fixed point arithmetic is recommended for computing the corners of the
+line endpoints for lines greater than one pixel in width.
+</para>
+<para>
+Thin lines (zero line-width) are nominally one pixel wide lines drawn using an
+unspecified, device-dependent algorithm.
+There are only two constraints on this algorithm.
+First, if a line is drawn unclipped from [x1,y1] to [x2,y2]
+and another line is drawn unclipped from [x1+dx,y1+dy] to [x2+dx,y2+dy],
+then a point [x,y] is touched by drawing the first line if
+and only if the point [x+dx,y+dy] is touched by drawing the second line.
+Second, the effective set of points comprising a line cannot be affected
+by clipping.
+Thus, a point is touched in a clipped line if and only if the point lies
+inside the clipping region and the point would be touched by the line
+when drawn unclipped.
+</para>
+<para>
+Note that a wide line drawn from [x1,y1] to [x2,y2] always draws the
+same pixels as a wide line drawn from [x2,y2] to [x1,y1], not counting
+cap-style and join-style.
+Implementors are encouraged to make this property true for thin lines,
+but it is not required.
+A line-width of zero may differ from a line-width of one in which pixels
+are drawn.
+In general,
+drawing a thin line will be faster than drawing a wide line of width one,
+but thin lines may not mix well aesthetically with wide lines
+because of the different drawing algorithms.
+If it is desirable to obtain precise and uniform results across all displays,
+a client should always use a line-width of one, rather than a line-width of
+zero.
+</para>
+<para id="requests:CreateGC:line-style">
+The line-style defines which sections of a line are drawn:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>Solid</emphasis>
+ </entry>
+ <entry>
+The full path of the line is drawn.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>DoubleDash</emphasis>
+ </entry>
+ <entry>
+The full path of the line is drawn,
+but the even dashes are filled differently than the odd dashes
+(see fill-style), with
+<emphasis role='bold'>Butt</emphasis>
+cap-style used where even and odd dashes meet.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>OnOffDash</emphasis>
+ </entry>
+ <entry>
+Only the even dashes are drawn,
+and cap-style applies to all internal ends of the individual dashes
+(except
+<emphasis role='bold'>NotLast</emphasis>
+is treated as
+<emphasis role='bold'>Butt</emphasis>).
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para id="requests:CreateGC:cap-style">
+The cap-style defines how the endpoints of a path are drawn:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>NotLast</emphasis>
+ </entry>
+ <entry>
+The result is equivalent to
+<emphasis role='bold'>Butt</emphasis>,
+except that for a line-width of zero the final endpoint is not drawn.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Butt</emphasis>
+ </entry>
+ <entry>
+The result is square at the endpoint (perpendicular to the slope of the
+line) with no projection beyond.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Round</emphasis>
+ </entry>
+ <entry>
+The result is a circular arc with its diameter equal to the line-width,
+centered on the endpoint; it is equivalent to
+<emphasis role='bold'>Butt</emphasis>
+for line-width zero.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Projecting</emphasis>
+ </entry>
+ <entry>
+The result is square at the end, but the path continues beyond the
+endpoint for a distance equal to half the line-width;
+it is equivalent to
+<emphasis role='bold'>Butt</emphasis>
+for line-width zero.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+
+
+<para id="requests:CreateGC:join-style">
+The join-style defines how corners are drawn for wide lines:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>Miter</emphasis>
+ </entry>
+ <entry>
+The outer edges of the two lines extend to meet at an angle.
+However, if the angle is less than 11 degrees, a
+<emphasis role='bold'>Bevel</emphasis>
+join-style is used instead.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Round</emphasis>
+ </entry>
+ <entry>
+The result is a circular arc with a diameter equal to the line-width,
+centered on the joinpoint.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Bevel</emphasis>
+ </entry>
+ <entry>
+The result is
+<emphasis role='bold'>Butt</emphasis>
+endpoint styles, and then the triangular notch is filled.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+
+<para>
+For a line with coincident endpoints (x1=x2, y1=y2), when the cap-style
+is applied to both endpoints, the semantics depends on the line-width
+and the cap-style:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='4.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>NotLast</emphasis>
+ </entry>
+ <entry>thin</entry>
+ <entry>
+This is device-dependent, but the desired effect is that nothing is drawn.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Butt</emphasis>
+ </entry>
+ <entry>thin</entry>
+ <entry>
+This is device-dependent, but the desired effect is that
+a single pixel is drawn.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Round</emphasis>
+ </entry>
+ <entry>thin</entry>
+ <entry>
+This is the same as
+<emphasis role='bold'>Butt</emphasis>/thin.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Projecting</emphasis>
+ </entry>
+ <entry>thin</entry>
+ <entry>
+This is the same as
+<emphasis role='bold'>Butt</emphasis>/thin.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Butt</emphasis>
+ </entry>
+ <entry>wide</entry>
+ <entry>
+Nothing is drawn.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Round</emphasis>
+ </entry>
+ <entry>wide</entry>
+ <entry>
+The closed path is a circle, centered at the endpoint and
+with a diameter equal to the line-width.
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Projecting</emphasis>
+ </entry>
+ <entry>wide</entry>
+ <entry>
+The closed path is a square, aligned with the coordinate axes,
+centered at the endpoint and with sides equal to the line-width.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+For a line with coincident endpoints (x1=x2, y1=y2),
+when the join-style is applied at one or both endpoints,
+the effect is as if the line was removed from the overall path.
+However, if the total path consists of (or is reduced to) a single point
+joined with itself,
+the effect is the same as when the cap-style is applied at both endpoints.
+</para>
+<para>
+The tile/stipple represents an infinite two-dimensional plane
+with the tile/stipple
+replicated in all dimensions. When that plane is superimposed on
+the drawable for use in a graphics operation, the upper-left corner
+of some instance of the tile/stipple is at the coordinates within
+the drawable specified by the tile/stipple origin.
+The tile/stipple and clip origins are interpreted relative to the
+origin of whatever destination drawable is specified in a graphics
+request.
+</para>
+<para>
+The tile pixmap must have the same root and depth as the gcontext (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+The stipple pixmap must have depth one and must have the same root
+as the gcontext (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+For fill-style
+<emphasis role='bold'>Stippled</emphasis>
+(but not fill-style
+<emphasis role='bold'>OpaqueStippled</emphasis>),
+the stipple pattern is tiled in a single plane
+and acts as an additional clip mask to be ANDed with the clip-mask.
+Any size pixmap can be used for tiling or stippling,
+although some sizes may be faster to use than others.
+</para>
+<para>
+The fill-style defines the contents of the source for line, text, and
+fill requests.
+For all text and fill requests (for example,
+<link linkend="requests:PolyText8"><emphasis role='bold'>PolyText8</emphasis></link>,
+<link linkend="requests:PolyText16"><emphasis role='bold'>PolyText16</emphasis></link>,
+<link linkend="requests:PolyFillRectangle"><emphasis role='bold'>PolyFillRectangle</emphasis></link>,
+<link linkend="requests:FillPoly"><emphasis role='bold'>FillPoly</emphasis></link>,
+and
+<link linkend="requests:PolyFillArc"><emphasis role='bold'>PolyFillArc</emphasis></link>)
+as well as for line requests with line-style
+<emphasis role='bold'>Solid</emphasis>,
+(for example,
+<link linkend="requests:PolyLine"><emphasis role='bold'>PolyLine</emphasis></link>,
+<link linkend="requests:PolySegment"><emphasis role='bold'>PolySegment</emphasis></link>,
+<link linkend="requests:PolyRectangle"><emphasis role='bold'>PolyRectangle</emphasis></link>,
+<link linkend="requests:PolyArc"><emphasis role='bold'>PolyArc</emphasis></link> )
+and for the even dashes for line requests with line-style
+<emphasis role='bold'>OnOffDash</emphasis>
+or
+<emphasis role='bold'>DoubleDash</emphasis>:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>Solid</emphasis>
+ </entry>
+ <entry>Foreground</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Tiled</emphasis>
+ </entry>
+ <entry>Tile</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>OpaqueStippled</emphasis>
+ </entry>
+ <entry>
+A tile with the same width and height as stipple
+but with background everywhere stipple has a zero
+and with foreground everywhere stipple has a one
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Stippled</emphasis>
+ </entry>
+ <entry>
+Foreground masked by stipple
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+For the odd dashes for line requests with line-style
+<emphasis role='bold'>DoubleDash</emphasis>:
+</para>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>Solid</emphasis>
+ </entry>
+ <entry>Background</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Tiled</emphasis>
+ </entry>
+ <entry>Same as for even dashes</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>OpaqueStippled</emphasis>
+ </entry>
+ <entry>Same as for even dashes</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>Stippled</emphasis>
+ </entry>
+ <entry>Background masked by stipple</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+
+<para>
+The dashes value allowed here is actually a simplified form of the more
+general patterns that can be set with
+<link linkend="requests:SetDashes"><emphasis role='bold'>SetDashes</emphasis></link>.
+Specifying a value of N here is equivalent to specifying
+the two element list [N, N] in
+<link linkend="requests:SetDashes"><emphasis role='bold'>SetDashes</emphasis></link>.
+The value must be nonzero (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The meaning of dash-offset and dashes are explained in the
+<link linkend="requests:SetDashes"><emphasis role='bold'>SetDashes</emphasis></link>
+request.
+</para>
+<para id="requests:CreateGC:clip-mask">
+<indexterm zone="requests:CreateGC:clip-mask"><primary>Clipping region</primary></indexterm>
+The clip-mask restricts writes to the destination drawable.
+Only pixels where the clip-mask has bits set to 1 are drawn.
+Pixels are not drawn outside the area covered by the clip-mask
+or where the clip-mask has bits set to 0.
+The clip-mask affects all graphics requests,
+but it does not clip sources.
+The clip-mask origin is interpreted relative to the origin of whatever
+destination drawable is specified in a graphics request.
+If a pixmap is specified as the clip-mask,
+it must have depth 1 and have the same root as the gcontext (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+If clip-mask is
+<emphasis role='bold'>None</emphasis>,
+then pixels are always drawn, regardless of the clip origin.
+The clip-mask can also be set with the
+<link linkend="requests:SetClipRectangles"><emphasis role='bold'>SetClipRectangles</emphasis></link>
+request.
+</para>
+<para>
+For
+<emphasis role='bold'>ClipByChildren</emphasis>,
+both source and destination windows are additionally clipped by all viewable
+<emphasis role='bold'>InputOutput</emphasis>
+children.
+For
+<emphasis role='bold'>IncludeInferiors</emphasis>,
+neither source nor destination window is clipped by inferiors.
+This will result in including subwindow contents in the
+source and drawing through subwindow boundaries of the destination.
+The use of
+<emphasis role='bold'>IncludeInferiors</emphasis>
+with a source or destination window of one depth with mapped inferiors
+of differing depth is not illegal,
+but the semantics is undefined by the core protocol.
+</para>
+<para id="requests:CreateGC:fill-rule">
+<indexterm zone="requests:CreateGC:fill-rule" significance="preferred"><primary>Winding rule</primary></indexterm>
+<indexterm zone="requests:CreateGC:fill-rule" significance="preferred"><primary>Fill rule</primary></indexterm>
+The fill-rule defines what pixels are inside (that is, are drawn) for
+paths given in
+<link linkend="requests:FillPoly"><emphasis role='bold'>FillPoly</emphasis></link>
+requests.
+<emphasis role='bold'>EvenOdd</emphasis>
+means a point is inside if an infinite ray with the point as origin crosses
+the path an odd number of times.
+For
+<emphasis role='bold'>Winding</emphasis>,
+a point is inside if an infinite ray with the point as origin crosses an
+unequal number of clockwise and counterclockwise directed path segments.
+A clockwise directed path segment is one that crosses the ray from left
+to right as observed from the point.
+A counter-clockwise segment is one that crosses the ray from right to left
+as observed from the point.
+The case where a directed line segment is coincident with the ray is
+uninteresting because one can simply choose a different ray that is not
+coincident with a segment.
+</para>
+<para>
+For both fill rules,
+a point is infinitely small and the path is an infinitely thin line.
+A pixel is inside if the center point of the pixel is inside
+and the center point is not on the boundary.
+If the center point is on the boundary,
+the pixel is inside if and only if the polygon interior is immediately
+to its right (x increasing direction).
+Pixels with centers along a horizontal edge are a special case
+and are inside if and only if the polygon interior is immediately below
+(y increasing direction).
+</para>
+<para>
+The arc-mode controls filling in the
+<link linkend="requests:PolyFillArc"><emphasis role='bold'>PolyFillArc</emphasis></link>
+request.
+</para>
+<para>
+The graphics-exposures flag controls
+<link linkend="events:GraphicsExposure"><emphasis role='bold'>GraphicsExposure</emphasis></link>
+event generation for
+<link linkend="requests:CopyArea"><emphasis role='bold'>CopyArea</emphasis></link>
+and
+<link linkend="requests:CopyPlane"><emphasis role='bold'>CopyPlane</emphasis></link>
+requests (and any similar requests defined by extensions).
+</para>
+<para>
+The default component values are:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Component</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>function</entry>
+ <entry>
+<emphasis role='bold'>Copy</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>plane-mask</entry>
+ <entry>all ones</entry>
+ </row>
+ <row>
+ <entry>foreground</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>background</entry>
+ <entry>1</entry>
+ </row>
+ <row>
+ <entry>line-width</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>line-style</entry>
+ <entry><emphasis role='bold'>Solid</emphasis></entry>
+ </row>
+ <row>
+ <entry>cap-style</entry>
+ <entry><emphasis role='bold'>Butt</emphasis></entry>
+ </row>
+ <row>
+ <entry>join-style</entry>
+ <entry><emphasis role='bold'>Miter</emphasis></entry>
+ </row>
+ <row>
+ <entry>fill-style</entry>
+ <entry><emphasis role='bold'>Solid</emphasis></entry>
+ </row>
+ <row>
+ <entry>fill-rule</entry>
+ <entry><emphasis role='bold'>EvenOdd</emphasis></entry>
+ </row>
+ <row>
+ <entry>arc-mode</entry>
+ <entry><emphasis role='bold'>PieSlice</emphasis></entry>
+ </row>
+ <row>
+ <entry>tile</entry>
+ <entry>
+<para>
+Pixmap of unspecified size filled with foreground pixel
+</para>
+<para>
+(that is, client specified pixel if any, else 0)
+</para>
+<para>
+(subsequent changes to foreground do not affect this pixmap)
+</para>
+ </entry>
+ </row>
+ <row>
+ <entry>stipple</entry>
+ <entry>
+Pixmap of unspecified size filled with ones
+ </entry>
+ </row>
+ <row>
+ <entry>tile-stipple-x-origin</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>tile-stipple-y-origin</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>font</entry>
+ <entry>&lt;server-dependent-font&gt;</entry>
+ </row>
+ <row>
+ <entry>subwindow-mode</entry>
+ <entry>
+<emphasis role='bold'>ClipByChildren</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>graphics-exposures</entry>
+ <entry>
+<emphasis role='bold'>True</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>clip-x-origin</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>clip-y-origin</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>clip-mask</entry>
+ <entry>
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>dash-offset</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>dashes</entry>
+ <entry>4 (that is, the list [4, 4])</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Storing a pixmap in a gcontext might or might not result in a copy
+being made.
+If the pixmap is later used as the destination for a graphics request,
+the change might or might not be reflected in the gcontext.
+If the pixmap is used simultaneously in a graphics request
+as both a destination and as a tile or stipple,
+the results are not defined.
+</para>
+<para>
+It is quite likely that some amount of gcontext information will be
+cached in display hardware and that such hardware can only cache a
+small number of gcontexts.
+Given the number and complexity of components,
+clients should view switching between gcontexts with nearly
+identical state as significantly more expensive than making minor
+changes to a single gcontext.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeGC">
+ <title>ChangeGC</title>
+ <indexterm zone="requests:ChangeGC" significance="preferred"><primary>ChangeGC</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-list</emphasis>: LISTofVALUE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Font</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Pixmap</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request changes components in gc.
+The value-mask and value-list specify which components are to be changed.
+The values and restrictions are the same
+as for
+<link linkend="requests:CreateGC"><emphasis role='bold'>CreateGC</emphasis></link>.
+</para>
+<para>
+Changing the clip-mask also overrides any previous
+<link linkend="requests:SetClipRectangles"><emphasis role='bold'>SetClipRectangles</emphasis></link>
+request on the context.
+Changing dash-offset or dashes overrides any previous
+<link linkend="requests:SetDashes"><emphasis role='bold'>SetDashes</emphasis></link>
+request on the context.
+</para>
+<para>
+The order in which components are verified and altered is server-dependent.
+If an error is generated,
+a subset of the components may have been altered.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CopyGC">
+ <title>CopyGC</title>
+ <indexterm zone="requests:CopyGC" significance="preferred"><primary>CopyGC</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>src-gc</emphasis>, <emphasis remap='I'>dst-gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request copies components from src-gc to dst-gc.
+The value-mask specifies which components to copy, as for
+<link linkend="requests:CreateGC"><emphasis role='bold'>CreateGC</emphasis></link>.
+The two gcontexts must have the same root and the same depth (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetDashes">
+ <title>SetDashes</title>
+ <indexterm zone="requests:SetDashes" significance="preferred"><primary>SetDashes</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>dash-offset</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>dashes</emphasis>: LISTofCARD8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request sets dash-offset and dashes in gc for dashed line styles.
+Dashes cannot be empty (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+Specifying an odd-length list is equivalent to specifying the same list
+concatenated with itself to produce an even-length list.
+The initial and alternating elements of dashes are the even dashes;
+the others are the odd dashes.
+Each element specifies a dash length in pixels.
+All of the elements must be nonzero (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The dash-offset defines the phase of the pattern,
+specifying how many pixels into dashes the pattern should actually begin in
+any single graphics request.
+Dashing is continuous through path elements combined with a join-style
+but is reset to the dash-offset between each sequence of joined lines.
+</para>
+<para>
+The unit of measure for dashes is the same as in the ordinary
+coordinate system.
+Ideally, a dash length is measured along the slope of the line,
+but implementations are only required to match this ideal
+for horizontal and vertical lines.
+Failing the ideal semantics,
+it is suggested that the length be measured along the major axis of the line.
+The major axis is defined as the x axis for lines drawn at an angle of
+between -45 and +45 degrees or between 135 and 225 degrees from the x axis.
+For all other lines, the major axis is the y axis.
+</para>
+<para>
+For any graphics primitive, the computation of the endpoint of an individual
+dash only depends on the geometry of the primitive, the start position
+of the dash, the direction of the dash, and the dash length.
+</para>
+<para>
+For any graphics primitive, the total set of pixels used to render the
+primitive (both even and odd numbered dash elements) with
+<emphasis role='bold'>DoubleDash</emphasis>
+line-style is the same as the set of pixels used to render the
+primitive with
+<emphasis role='bold'>Solid</emphasis>
+line-style.
+</para>
+<para>
+For any graphics primitive, if the primitive is drawn with
+<emphasis role='bold'>OnOffDash</emphasis>
+or
+<emphasis role='bold'>DoubleDash</emphasis>
+line-style unclipped at position [x,y] and again at position
+[x+dx,y+dy], then a point [x1,y1] is included in a dash in the first
+instance if and only if the point [x1+dx,y1+dy] is included in the dash in
+the second instance. In addition, the effective set of points comprising a
+dash cannot be affected by clipping. A point is included in a clipped dash
+if and only if the point lies inside the clipping region and the point
+would be included in the dash when drawn unclipped.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetClipRectangles">
+ <title>SetClipRectangles</title>
+ <indexterm zone="requests:SetClipRectangles" significance="preferred"><primary>SetClipRectangles</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>clip-x-origin</emphasis>, <emphasis remap='I'>clip-y-origin</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>rectangles</emphasis>: LISTofRECTANGLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>ordering</emphasis>:
+{ <emphasis role='bold'>UnSorted</emphasis>,
+<emphasis role='bold'>YSorted</emphasis>,
+<emphasis role='bold'>YXSorted</emphasis>,
+<emphasis role='bold'>YXBanded</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request changes clip-mask in gc to the specified list of rectangles
+and sets the clip origin.
+Output will be clipped to remain contained within the rectangles.
+The clip origin is interpreted relative to the origin of
+whatever destination drawable is specified in a graphics request.
+The rectangle coordinates are interpreted relative to the clip origin.
+The rectangles should be nonintersecting, or graphics results will be
+undefined.
+Note that the list of rectangles can be empty,
+which effectively disables output.
+This is the opposite of passing
+<emphasis role='bold'>None</emphasis>
+as the clip-mask in
+<link linkend="requests:CreateGC"><emphasis role='bold'>CreateGC</emphasis></link>
+and
+<link linkend="requests:ChangeGC"><emphasis role='bold'>ChangeGC</emphasis></link>.
+</para>
+<para>
+If known by the client,
+ordering relations on the rectangles can be specified with the ordering
+argument.
+This may provide faster operation by the server.
+If an incorrect ordering is specified,
+the server may generate a
+<emphasis role='bold'>Match</emphasis>
+error, but it is not required to do so.
+If no error is generated,
+the graphics results are undefined.
+<emphasis role='bold'>UnSorted</emphasis>
+means that the rectangles are in arbitrary order.
+<emphasis role='bold'>YSorted</emphasis>
+means that the rectangles are nondecreasing in their Y origin.
+<emphasis role='bold'>YXSorted</emphasis>
+additionally constrains
+<emphasis role='bold'>YSorted</emphasis>
+order in that all rectangles with an equal Y origin are
+nondecreasing in their X origin.
+<emphasis role='bold'>YXBanded</emphasis>
+additionally constrains
+<emphasis role='bold'>YXSorted</emphasis>
+by requiring that, for every possible Y scanline,
+all rectangles that include that scanline have identical Y origins and Y
+extents.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:FreeGC">
+ <title>FreeGC</title>
+ <indexterm zone="requests:FreeGC" significance="preferred"><primary>FreeGC</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>GContext</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request deletes the association between the resource ID and the gcontext
+and destroys the gcontext.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ClearArea">
+ <title>ClearArea</title>
+ <indexterm zone="requests:ClearArea" significance="preferred"><primary>ClearArea</primary></indexterm>
+ <indexterm zone="requests:ClearArea"><primary>Background</primary></indexterm><informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>exposures</emphasis>: BOOL
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The x and y coordinates are relative to the window's origin
+and specify the upper-left corner of the rectangle.
+If width is zero,
+it is replaced with the current width of the window minus x.
+If height is zero,
+it is replaced with the current height of the window minus y.
+If the window has a defined background tile,
+the rectangle is tiled with a plane-mask of all ones and function of
+<emphasis role='bold'>Copy</emphasis>
+and a subwindow-mode of
+<emphasis role='bold'>ClipByChildren</emphasis>.
+If the window has background
+<emphasis role='bold'>None</emphasis>,
+the contents of the window are not changed.
+In either case,
+if exposures is
+<emphasis role='bold'>True</emphasis>,
+then one or more exposure events are generated for regions of the rectangle
+that are either visible or are being retained in a backing store.
+</para>
+<para>
+It is a
+<emphasis role='bold'>Match</emphasis>
+error to use an
+<emphasis role='bold'>InputOnly</emphasis>
+window in this request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CopyArea">
+ <title>CopyArea</title>
+ <indexterm zone="requests:CopyArea" significance="preferred"><primary>CopyArea</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>src-drawable</emphasis>, <emphasis remap='I'>dst-drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>src-x</emphasis>, <emphasis remap='I'>src-y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>dst-x</emphasis>, <emphasis remap='I'>dst-y</emphasis>: INT16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request combines the specified rectangle of src-drawable with the
+specified rectangle of dst-drawable.
+The src-x and src-y coordinates are relative to src-drawable's origin.
+The dst-x and dst-y are relative to dst-drawable's origin,
+each pair specifying the upper-left corner of the rectangle.
+The src-drawable must have the same root and the same depth
+as dst-drawable (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+</para>
+<para>
+If regions of the source rectangle are obscured and have not been retained
+in backing store
+or if regions outside the boundaries of the source drawable are specified,
+then those regions are not copied,
+but the following occurs on all corresponding destination regions that are
+either visible or are retained in backing-store.
+If the dst-drawable is a window with a background other than
+<emphasis role='bold'>None</emphasis>,
+these corresponding destination regions are tiled
+(with plane-mask of all ones and function
+<emphasis role='bold'>Copy</emphasis>)
+with that background.
+Regardless of tiling and whether the destination is a window or a pixmap,
+if graphics-exposures in gc is
+<emphasis role='bold'>True</emphasis>,
+then
+<link linkend="events:GraphicsExposure"><emphasis role='bold'>GraphicsExposure</emphasis></link>
+events for all corresponding destination regions are generated.
+</para>
+<para>
+If graphics-exposures is
+<emphasis role='bold'>True</emphasis>
+but no
+<emphasis role='bold'>GraphicsExposure</emphasis>
+events are generated,
+then a
+<link linkend="events:NoExposure"><emphasis role='bold'>NoExposure</emphasis></link>
+event is generated.
+</para>
+<para>
+GC components: function, plane-mask, subwindow-mode,
+graphics-exposures, clip-x-origin, clip-y-origin, clip-mask
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CopyPlane">
+ <title>CopyPlane</title>
+ <indexterm zone="requests:CopyPlane" significance="preferred"><primary>CopyPlane</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>src-drawable</emphasis>, <emphasis remap='I'>dst-drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>src-x</emphasis>, <emphasis remap='I'>src-y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>dst-x</emphasis>, <emphasis remap='I'>dst-y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>bit-plane</emphasis>: CARD32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The src-drawable must have the same root as dst-drawable (or a
+<emphasis role='bold'>Match</emphasis>
+error results), but it need not have the same depth.
+The bit-plane must have exactly one bit set to 1 and the value of bit-plane
+must be less than %2 sup n% where <emphasis remap='I'>n</emphasis> is the depth of src-drawable (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+Effectively, a pixmap of the same depth as dst-drawable and with size specified
+by the source region is formed using the foreground/background pixels in gc
+(foreground everywhere the bit-plane in src-drawable contains a bit set to 1,
+background everywhere the bit-plane contains a bit set to 0),
+and the equivalent of a
+<link linkend="requests:CopyArea"><emphasis role='bold'>CopyArea</emphasis></link>
+is performed, with all the same exposure semantics.
+This can also be thought of as using the specified region of the source
+bit-plane as a stipple with a fill-style of
+<emphasis role='bold'>OpaqueStippled</emphasis>
+for filling a rectangular area of the destination.
+</para>
+<para>
+GC components: function, plane-mask, foreground, background,
+subwindow-mode, graphics-exposures, clip-x-origin, clip-y-origin,
+clip-mask
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyPoint">
+ <title>PolyPoint</title>
+ <indexterm zone="requests:PolyPoint" significance="preferred"><primary>PolyPoint</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>coordinate-mode</emphasis>:
+{ <emphasis role='bold'>Origin</emphasis>,
+<emphasis role='bold'>Previous</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>points</emphasis>: LISTofPOINT
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request combines the foreground pixel in gc with the pixel
+at each point in the drawable.
+The points are drawn in the order listed.
+</para>
+<para>
+The first point is always relative to the drawable's origin.
+The rest are relative either to that origin or the previous point,
+depending on the coordinate-mode.
+</para>
+<para>
+GC components: function, plane-mask, foreground, subwindow-mode,
+clip-x-origin, clip-y-origin, clip-mask
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyLine">
+ <title>PolyLine</title>
+ <indexterm zone="requests:PolyLine" significance="preferred"><primary>PolyLine</primary></indexterm>
+ <indexterm zone="requests:PolyLine"><primary>Line</primary><secondary>drawing</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>coordinate-mode</emphasis>:
+{ <emphasis role='bold'>Origin</emphasis>,
+<emphasis role='bold'>Previous</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>points</emphasis>: LISTofPOINT
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request draws lines between each pair of points (point[i], point[i+1]).
+The lines are drawn in the order listed.
+The lines join correctly at all intermediate points,
+and if the first and last points coincide,
+the first and last lines also join correctly.
+</para>
+<para>
+For any given line,
+no pixel is drawn more than once.
+If thin (zero line-width) lines intersect,
+the intersecting pixels are drawn multiple times.
+If wide lines intersect,
+the intersecting pixels are drawn only once, as though the entire
+<emphasis role='bold'>PolyLine</emphasis>
+were a single filled shape.
+</para>
+<para>
+The first point is always relative to the drawable's origin.
+The rest are relative either to that origin or the previous point,
+depending on the coordinate-mode.
+</para>
+<para>
+When either of the two lines involved in a
+<emphasis role='bold'>Bevel</emphasis>
+join is neither vertical
+nor horizontal, then the slope and position of the line segment defining
+the bevel join edge is implementation dependent. However, the computation
+of the slope and distance (relative to the join point) only depends on
+the line width and the slopes of the two lines.
+</para>
+<para>
+GC components: function, plane-mask, line-width, line-style,
+cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
+clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolySegment">
+ <title>PolySegment</title>
+ <indexterm zone="requests:PolySegment" significance="preferred"><primary>PolySegment</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>segments</emphasis>: LISTofSEGMENT
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+where:
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+SEGMENT: [x1, y1, x2, y2: INT16]
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+For each segment,
+this request draws a line between [x1, y1] and [x2, y2].
+The lines are drawn in the order listed.
+No joining is performed at coincident endpoints.
+For any given line,
+no pixel is drawn more than once.
+If lines intersect,
+the intersecting pixels are drawn multiple times.
+</para>
+<para>
+GC components: function, plane-mask, line-width, line-style,
+cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin,
+clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyRectangle">
+ <title>PolyRectangle</title>
+ <indexterm zone="requests:PolyRectangle" significance="preferred"><primary>PolyRectangle</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>rectangles</emphasis>: LISTofRECTANGLE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request draws the outlines of the specified rectangles, as if a five-point
+<link linkend="requests:PolyLine"><emphasis role='bold'>PolyLine</emphasis></link>
+were specified for each rectangle:
+</para>
+<para>
+<literallayout class="monospaced">
+ [x,y] [x+width,y] [x+width,y+height] [x,y+height] [x,y]
+</literallayout>
+</para>
+<para>
+The x and y coordinates of each rectangle are relative to the drawable's origin
+and define the upper-left corner of the rectangle.
+</para>
+<para>
+The rectangles are drawn in the order listed.
+For any given rectangle,
+no pixel is drawn more than once.
+If rectangles intersect,
+the intersecting pixels are drawn multiple times.
+</para>
+<para>
+GC components: function, plane-mask, line-width, line-style,
+cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
+clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyArc">
+ <title>PolyArc</title>
+ <indexterm zone="requests:PolyArc" significance="preferred"><primary>PolyArc</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>arcs</emphasis>: LISTofARC
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request draws circular or elliptical arcs.
+Each arc is specified by a rectangle and two angles.
+The angles are signed integers in degrees scaled by 64,
+with positive indicating counterclockwise motion and
+negative indicating clockwise motion.
+The start of the arc is specified by angle1 relative to the three-o'clock
+position from the center of the rectangle,
+and the path and extent of the arc is specified by angle2 relative to the
+start of the arc.
+If the magnitude of angle2 is greater than 360 degrees,
+it is truncated to 360 degrees.
+The x and y coordinates of the rectangle are relative to the origin of
+the drawable.
+For an arc specified as [x,y,w,h,a1,a2],
+the origin of the major and minor axes is at [x+(w/2),y+(h/2)],
+and the infinitely thin path describing the entire circle/ellipse intersects
+the horizontal axis at [x,y+(h/2)] and [x+w,y+(h/2)] and intersects the
+vertical axis at [x+(w/2),y] and [x+(w/2),y+h].
+These coordinates are not necessarily integral; that is,
+they are not truncated to discrete coordinates.
+</para>
+<para>
+For a wide line with line-width lw, the ideal bounding outlines for filling
+are given by the two infinitely thin paths consisting of all points whose
+perpendicular distance from a tangent to the path of the circle/ellipse is
+equal to lw/2 (which may be a fractional value). When the width and height
+of the arc are not equal and both are nonzero, then the actual bounding
+outlines are implementation dependent. However, the computation of the
+shape and position of the bounding outlines (relative to the center of the
+arc) only depends on the width and height of the arc and the
+line-width.
+</para>
+<para>
+The cap-style is applied the same as for a line corresponding to the
+tangent of the circle/ellipse at the endpoint. When the angle of an arc
+face is not an integral multiple of 90 degrees, and the width and height of
+the arc are both are nonzero, then the shape and position of the cap at
+that face is implementation dependent. However, for a
+<emphasis role='bold'>Butt</emphasis>
+cap, the face
+is defined by a straight line, and the computation of the position
+(relative to the center of the arc) and the slope of the line only
+depends on the width and height of the arc and the angle of the arc face.
+For other cap styles, the computation of the position (relative to the
+center of the arc) and the shape of the cap only depends on the width
+and height of the arc, the line-width, the angle of the arc face, and the
+direction (clockwise or counter clockwise) of the arc from the endpoint.
+</para>
+<para>
+The join-style is applied the same as for two lines corresponding to the
+tangents of the circles/ellipses at the join point. When the width and
+height of both arcs are nonzero, and the angle of either arc face is not an
+integral multiple of 90 degrees, then the shape of the join is
+implementation dependent. However, the computation of the shape only
+depends on the width and height of each arc, the line-width, the angles of
+the two arc faces, the direction (clockwise or counter clockwise) of the
+arcs from the join point, and the relative orientation of the two arc
+center points.
+</para>
+<para>
+For an arc specified as [x,y,w,h,a1,a2],
+the angles must be specified in the effectively skewed coordinate system of
+the ellipse (for a circle, the angles and coordinate systems are identical).
+The relationship between these angles and angles expressed in the normal
+coordinate system of the screen (as measured with a protractor) is as
+follows:
+<literallayout class="monospaced">
+ skewed-angle = atan(tan(normal-angle) * w/h) + adjust
+</literallayout>
+</para>
+<para>
+The skewed-angle and normal-angle are expressed in radians (rather
+than in degrees scaled by 64) in the range [0,2*PI).
+The atan returns a value in the range [-PI/2,PI/2].
+The adjust is:
+<informaltable frame="none">
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>0</entry>
+ <entry>for normal-angle in the range [0,PI/2)</entry>
+ </row>
+ <row>
+ <entry>PI</entry>
+ <entry>for normal-angle in the range [PI/2,(3*PI)/2)</entry>
+ </row>
+ <row>
+ <entry>2*PI</entry>
+ <entry>for normal-angle in the range [(3*PI)/2,2*PI)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+</para>
+<para>
+The arcs are drawn in the order listed.
+If the last point in one arc coincides with the first point in the following
+arc,
+the two arcs will join correctly.
+If the first point in the first arc coincides with the last point
+in the last arc,
+the two arcs will join correctly.
+For any given arc,
+no pixel is drawn more than once.
+If two arcs join correctly and the line-width is greater than zero
+and the arcs intersect,
+no pixel is drawn more than once.
+Otherwise, the intersecting pixels of intersecting arcs are drawn multiple
+times.
+Specifying an arc with one endpoint and a clockwise extent draws the
+same pixels as specifying the other endpoint and an equivalent
+counterclockwise extent, except as it affects joins.
+</para>
+<para>
+By specifying one axis to be zero,
+a horizontal or vertical line can be drawn.
+</para>
+<para>
+Angles are computed based solely on the coordinate system,
+ignoring the aspect ratio.
+</para>
+<para>
+GC components: function, plane-mask, line-width, line-style,
+cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
+clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dashes
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:FillPoly">
+ <title>FillPoly</title>
+ <indexterm zone="requests:FillPoly" significance="preferred"><primary>FillPoly</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2in -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>shape</emphasis>:
+{ <emphasis role='bold'>Complex</emphasis>,
+<emphasis role='bold'>Nonconvex</emphasis>,
+<emphasis role='bold'>Convex</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>coordinate-mode</emphasis>:
+{ <emphasis role='bold'>Origin</emphasis>,
+<emphasis role='bold'>Previous</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>points</emphasis>: LISTofPOINT
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request fills the region closed by the specified path.
+The path is closed automatically if the last point in the list does not
+coincide with the first point.
+No pixel of the region is drawn more than once.
+</para>
+<para>
+The first point is always relative to the drawable's origin.
+The rest are relative either to that origin or the previous point,
+depending on the coordinate-mode.
+</para>
+<para>
+The shape parameter may be used by the server to improve performance.
+<emphasis role='bold'>Complex</emphasis>
+means the path may self-intersect.
+Contiguous coincident points in the path are not treated
+as self-intersection.
+</para>
+<para>
+<emphasis role='bold'>Nonconvex</emphasis>
+means the path does not self-intersect,
+but the shape is not wholly convex.
+If known by the client,
+specifying
+<emphasis role='bold'>Nonconvex</emphasis>
+over
+<emphasis role='bold'>Complex</emphasis>
+may improve performance.
+If
+<emphasis role='bold'>Nonconvex</emphasis>
+is specified for a self-intersecting path,
+the graphics results are undefined.
+</para>
+<para>
+<emphasis role='bold'>Convex</emphasis>
+means that for every pair of points inside the polygon,
+the line segment connecting them does not intersect the path.
+If known by the client,
+specifying
+<emphasis role='bold'>Convex</emphasis>
+can improve performance.
+If
+<emphasis role='bold'>Convex</emphasis>
+is specified for a path that is not convex,
+the graphics results are undefined.
+</para>
+<para>
+GC components: function, plane-mask, fill-style, fill-rule,
+subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyFillRectangle">
+ <title>PolyFillRectangle</title>
+ <indexterm zone="requests:PolyFillRectangle" significance="preferred"><primary>PolyFillRectangle</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>rectangles</emphasis>: LISTofRECTANGLE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request fills the specified rectangles, as if a four-point
+<link linkend="requests:FillPoly"><emphasis role='bold'>FillPoly</emphasis></link>
+were specified for each rectangle:
+<literallayout class="monospaced">
+ [x,y] [x+width,y] [x+width,y+height] [x,y+height]
+</literallayout>
+</para>
+<para>
+The x and y coordinates of each rectangle are relative to the drawable's origin
+and define the upper-left corner of the rectangle.
+</para>
+<para>
+The rectangles are drawn in the order listed.
+For any given rectangle,
+no pixel is drawn more than once.
+If rectangles intersect,
+the intersecting pixels are drawn multiple times.
+</para>
+<para>
+GC components: function, plane-mask, fill-style, subwindow-mode,
+clip-x-origin, clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyFillArc">
+ <title>PolyFillArc</title>
+ <indexterm zone="requests:PolyFillArc" significance="preferred"><primary>PolyFillArc</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>arcs</emphasis>: LISTofARC
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+For each arc,
+this request fills the region closed by the infinitely thin path
+described by the specified arc and one or two line segments,
+depending on the arc-mode.
+For
+<emphasis role='bold'>Chord</emphasis>,
+the single line segment joining the endpoints of the arc is used.
+For
+<emphasis role='bold'>PieSlice</emphasis>,
+the two line segments joining the endpoints of the arc with the center point
+are used.
+</para>
+<para>
+For an arc specified as [x,y,w,h,a1,a2], the origin of the major and minor
+axes is at [x+(w/2),y+(h/2)], and the infinitely thin path describing the
+entire circle/ellipse intersects the horizontal axis at [x,y+(h/2)] and
+[x+w,y+(h/2)] and intersects the vertical axis at [x+(w/2),y] and
+[x+(w/2),y+h]. These coordinates are not necessarily integral; that is,
+they are not truncated to discrete coordinates.
+</para>
+<para>
+The arc angles are interpreted as specified in the
+<link linkend="requests:PolyArc"><emphasis role='bold'>PolyArc</emphasis></link>
+request. When
+the angle of an arc face is not an integral multiple of 90 degrees, then
+the precise endpoint on the arc is implementation dependent. However, for
+<emphasis role='bold'>Chord</emphasis>
+arc-mode, the computation of the pair of endpoints (relative to the
+center of the arc) only depends on the width and height of the arc and
+the angles of the two arc faces. For
+<emphasis role='bold'>PieSlice</emphasis>
+arc-mode, the computation of
+an endpoint only depends on the angle of the arc face for that
+endpoint and the ratio of the arc width to arc height.
+</para>
+<para>
+The arcs are filled in the order listed.
+For any given arc,
+no pixel is drawn more than once.
+If regions intersect,
+the intersecting pixels are drawn multiple times.
+</para>
+<para>
+GC components: function, plane-mask, fill-style, arc-mode,
+subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PutImage">
+ <title>PutImage</title>
+ <indexterm zone="requests:PutImage" significance="preferred"><primary>PutImage</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>depth</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>dst-x</emphasis>, <emphasis remap='I'>dst-y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>left-pad</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>format</emphasis>:
+{ <emphasis role='bold'>Bitmap</emphasis>,
+<emphasis role='bold'>XYPixmap</emphasis>,
+<emphasis role='bold'>ZPixmap</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>data</emphasis>: LISTofBYTE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request combines an image with a rectangle of the drawable.
+The dst-x and dst-y coordinates are relative to the drawable's origin.
+</para>
+<para>
+If
+<emphasis role='bold'>Bitmap</emphasis>
+format is used,
+then depth must be one (or a
+<emphasis role='bold'>Match</emphasis>
+error results), and the image must be in XY format.
+The foreground pixel in gc defines the source for bits set to 1 in the image,
+and the background pixel defines the source for the bits set to 0.
+</para>
+<para>
+For
+<emphasis role='bold'>XYPixmap</emphasis>
+and
+<emphasis role='bold'>ZPixmap</emphasis>,
+the depth must match the depth of the drawable (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+For
+<emphasis role='bold'>XYPixmap</emphasis>,
+the image must be sent in XY format.
+For
+<emphasis role='bold'>ZPixmap</emphasis>,
+the image must be sent in the Z format defined for the given depth.
+</para>
+<para>
+The left-pad must be zero for
+<emphasis role='bold'>ZPixmap</emphasis>
+format (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+For
+<emphasis role='bold'>Bitmap</emphasis>
+and
+<emphasis role='bold'>XYPixmap</emphasis>
+format,
+left-pad must be less than bitmap-scanline-pad as given in the server
+connection setup information (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+The first left-pad bits in every scanline are to be ignored by the server.
+The actual image begins that many bits into the data.
+The width argument defines the width of the actual image
+and does not include left-pad.
+</para>
+<para>
+GC components: function, plane-mask, subwindow-mode, clip-x-origin,
+clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetImage">
+ <title>GetImage</title>
+ <indexterm zone="requests:GetImage" significance="preferred"><primary>GetImage</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>plane-mask</emphasis>: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>format</emphasis>:
+{ <emphasis role='bold'>XYPixmap</emphasis>,
+<emphasis role='bold'>ZPixmap</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+depth: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+visual: VISUALID or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+data: LISTofBYTE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the contents of the given rectangle of the drawable in the
+given format.
+The x and y coordinates are relative to the drawable's origin
+and define the upper-left corner of the rectangle.
+If
+<emphasis role='bold'>XYPixmap</emphasis>
+is specified,
+only the bit planes specified in plane-mask are transmitted,
+with the planes appearing from most significant to least significant
+in bit order.
+If
+<emphasis role='bold'>ZPixmap</emphasis>
+is specified, then bits in all planes not specified in plane-mask are
+transmitted as zero.
+Range checking is not performed on plane-mask;
+extraneous bits are simply ignored.
+The returned depth is as specified when the drawable was created
+and is the same as a depth component in a FORMAT structure (in the connection
+setup), not a bits-per-pixel component.
+If the drawable is a window,
+its visual type is returned.
+If the drawable is a pixmap,
+the visual is
+<emphasis role='bold'>None</emphasis>.
+</para>
+<para>
+If the drawable is a pixmap,
+then the given rectangle must be wholly contained within the pixmap (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+If the drawable is a window,
+the window must be viewable,
+and it must be the case that,
+if there were no inferiors or overlapping windows,
+the specified rectangle of the window would be fully visible on the screen
+and wholly contained within the outside edges of the window (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+Note that the borders of the window can be included and read with this request.
+If the window has a backing store,
+then the backing-store contents are returned for regions of the window
+that are obscured by noninferior windows;
+otherwise, the returned contents of such obscured regions are undefined.
+Also undefined are the returned contents of visible
+regions of inferiors of different depth than the specified window.
+The pointer cursor image is not included in the contents returned.
+</para>
+<para>
+This request is not general-purpose in the same sense as other
+graphics-related requests.
+It is intended specifically for rudimentary hardcopy support.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyText8">
+ <title>PolyText8</title>
+ <indexterm zone="requests:PolyText8" significance="preferred"><primary>PolyText8</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <spanspec spanname='all' namest='c1' nameend='c3'/>
+ <tbody>
+ <row>
+ <entry spanname='all'>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<emphasis remap='I'>items</emphasis>: LISTofTEXTITEM8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='3'>
+<!-- .in +.2i -->
+where:
+ </entry>
+ </row>
+ <row>
+ <entry>
+TEXTITEM8:
+ </entry>
+ <entry>
+TEXTELT8 or FONT
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='1'>
+TEXTELT8:
+ </entry>
+ <entry>
+[delta: INT8
+ </entry>
+ </row>
+ <row>
+ <entry>
+string: STRING8]
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>Font</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The x and y coordinates are relative to the drawable's origin
+and specify the baseline starting position (the initial character origin).
+Each text item is processed in turn.
+A font item causes the font to be stored in gc
+and to be used for subsequent text.
+Switching among fonts does not affect the next character origin.
+A text element delta specifies an additional change in the position
+along the x axis before the string is drawn;
+the delta is always added to the character origin.
+Each character image, as defined by the font in gc,
+is treated as an additional mask for a fill operation on the drawable.
+</para>
+<para>
+All contained FONTs are always transmitted most significant byte first.
+</para>
+<para>
+If a
+<emphasis role='bold'>Font</emphasis>
+error is generated for an item,
+the previous items may have been drawn.
+</para>
+<para>
+For fonts defined with 2-byte matrix indexing,
+each STRING8 byte is interpreted as a byte2 value of a CHAR2B with a byte1
+value of zero.
+</para>
+<para>
+GC components: function, plane-mask, fill-style, font,
+subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
+</para>
+<para>
+GC mode-dependent components: foreground, background, tile, stipple,
+tile-stipple-x-origin, tile-stipple-y-origin
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:PolyText16">
+ <title>PolyText16</title>
+ <indexterm zone="requests:PolyText16" significance="preferred"><primary>PolyText16</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.0*'/>
+ <colspec colname='c3' colwidth='1.0*'/>
+ <spanspec spanname='all' namest='c1' nameend='c3'/>
+ <tbody>
+ <row>
+ <entry spanname='all'>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<emphasis remap='I'>items</emphasis>: LISTofTEXTITEM16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='3'>
+<!-- .in +.2i -->
+where:
+ </entry>
+ </row>
+ <row>
+ <entry>
+TEXTITEM16:
+ </entry>
+ <entry>
+TEXTELT16 or FONT
+ </entry>
+ </row>
+ <row>
+ <entry valign='top' morerows='1'>
+TEXTELT16:
+ </entry>
+ <entry>
+[delta: INT8
+ </entry>
+ </row>
+ <row>
+ <entry>
+string: STRING16]
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry spanname='all'>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>Font</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request is similar to
+<link linkend="requests:PolyText8"><emphasis role='bold'>PolyText8</emphasis></link>,
+except 2-byte (or 16-bit) characters are used.
+For fonts defined with linear indexing rather than 2-byte matrix indexing,
+the server will interpret each CHAR2B as a 16-bit number that
+has been transmitted most significant byte first (that is, byte1 of the
+CHAR2B is taken as the most significant byte).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ImageText8">
+ <title>ImageText8</title>
+ <indexterm zone="requests:ImageText8" significance="preferred"><primary>ImageText8</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>string</emphasis>: STRING8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The x and y coordinates are relative to the drawable's origin
+and specify the baseline starting position (the initial character origin).
+The effect is first to fill a destination rectangle with the background
+pixel defined in gc and then to paint the text with the foreground pixel.
+The upper-left corner of the filled rectangle is at:
+<literallayout class="monospaced">
+ [x, y - font-ascent]
+</literallayout>
+</para>
+<para>
+the width is:
+<literallayout class="monospaced">
+ overall-width
+</literallayout>
+</para>
+<para>
+and the height is:
+<literallayout class="monospaced">
+ font-ascent + font-descent
+</literallayout>
+</para>
+<para>
+The overall-width, font-ascent, and font-descent are as
+they would be returned by a
+<link linkend="requests:QueryTextExtents"><emphasis role='bold'>QueryTextExtents</emphasis></link>
+call using gc and string.
+</para>
+<para>
+The function and fill-style defined in gc are ignored for this request.
+The effective function is
+<emphasis role='bold'>Copy</emphasis>,
+and the effective fill-style
+<emphasis role='bold'>Solid</emphasis>.
+</para>
+<para>
+For fonts defined with 2-byte matrix indexing,
+each STRING8 byte is interpreted as a byte2 value of a CHAR2B with a byte1
+value of zero.
+</para>
+<para>
+GC components: plane-mask, foreground, background, font,
+subwindow-mode, clip-x-origin, clip-y-origin, clip-mask
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ImageText16">
+ <title>ImageText16</title>
+ <indexterm zone="requests:ImageText16" significance="preferred"><primary>ImageText16</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>gc</emphasis>: GCONTEXT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>string</emphasis>: STRING16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>GContext</emphasis>,
+<emphasis role='bold'>Match</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request is similar to
+<link linkend="requests:ImageText8"><emphasis role='bold'>ImageText8</emphasis></link>,
+except 2-byte (or 16-bit) characters are used.
+For fonts defined with linear indexing rather than 2-byte matrix indexing,
+the server will interpret each CHAR2B as a 16-bit number that
+has been transmitted most significant byte first (that is, byte1 of the
+CHAR2B is taken as the most significant byte).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CreateColormap">
+ <title>CreateColormap</title>
+ <indexterm zone="requests:CreateColormap" significance="preferred"><primary>CreateColormap</primary></indexterm>
+ <indexterm zone="requests:CreateColormap"><primary>Colormap</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>mid</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>visual</emphasis>: VISUALID
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>alloc</emphasis>:
+{ <emphasis role='bold'>None</emphasis>,
+<emphasis role='bold'>All</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>,
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request creates a colormap of the specified visual type for the screen
+on which the window resides and associates the identifier mid with it.
+The visual type must be one supported by the screen (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+The initial values of the colormap entries are undefined for classes
+<emphasis role='bold'>GrayScale</emphasis>,
+<emphasis role='bold'>PseudoColor</emphasis>,
+and
+<emphasis role='bold'>DirectColor</emphasis>.
+For
+<emphasis role='bold'>StaticGray</emphasis>,
+<emphasis role='bold'>StaticColor</emphasis>,
+and
+<emphasis role='bold'>TrueColor</emphasis>,
+the entries will have defined values,
+but those values are specific to the visual and are not defined
+by the core protocol.
+For
+<emphasis role='bold'>StaticGray</emphasis>,
+<emphasis role='bold'>StaticColor</emphasis>,
+and
+<emphasis role='bold'>TrueColor</emphasis>,
+alloc must be specified as
+<emphasis role='bold'>None</emphasis>
+(or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+For the other classes, if alloc is
+<emphasis role='bold'>None</emphasis>,
+the colormap initially has no allocated entries,
+and clients can allocate entries.
+</para>
+<para>
+If alloc is
+<emphasis role='bold'>All</emphasis>,
+then the entire colormap is allocated writable.
+The initial values of all allocated entries are undefined.
+For
+<emphasis role='bold'>GrayScale</emphasis>
+and
+<emphasis role='bold'>PseudoColor</emphasis>,
+the effect is as if an
+<link linkend="requests:AllocColorCells"><emphasis role='bold'>AllocColorCells</emphasis></link>
+request returned all pixel values from zero to N - 1,
+where N is the colormap-entries value in the specified visual.
+For
+<emphasis role='bold'>DirectColor</emphasis>,
+the effect is as if an
+<link linkend="requests:AllocColorPlanes"><emphasis role='bold'>AllocColorPlanes</emphasis></link>
+request returned a pixel value of zero and red-mask,
+green-mask, and blue-mask values containing the same bits as the
+corresponding masks in the specified visual.
+However,
+in all cases, none of these entries can be freed with
+<link linkend="requests:FreeColors"><emphasis role='bold'>FreeColors</emphasis></link>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:FreeColormap">
+ <title>FreeColormap</title>
+ <indexterm zone="requests:FreeColormap" significance="preferred"><primary>FreeColormap</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Colormap</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request deletes the association between the resource ID and the colormap
+and frees the colormap storage.
+If the colormap is an installed map for a screen,
+it is uninstalled (see
+<link linkend="requests:UninstallColormap"><emphasis role='bold'>UninstallColormap</emphasis></link>
+request).
+If the colormap is defined as the colormap for a window (by means of
+<link linkend="requests:CreateWindow"><emphasis role='bold'>CreateWindow</emphasis></link>
+or
+<link linkend="requests:ChangeWindowAttributes"><emphasis role='bold'>ChangeWindowAttributes</emphasis></link>),
+the colormap for the window is changed to
+<emphasis role='bold'>None</emphasis>,
+and a
+<link linkend="events:ColormapNotify"><emphasis role='bold'>ColormapNotify</emphasis></link>
+event is generated.
+The protocol does not define the colors displayed for a window with a colormap of
+<emphasis role='bold'>None</emphasis>.
+</para>
+<para>
+This request has no effect on a default colormap for a screen.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CopyColormapAndFree">
+ <title>CopyColormapAndFree</title>
+ <indexterm zone="requests:CopyColormapAndFree" significance="preferred"><primary>CopyColormapAndFree</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>mid</emphasis>, <emphasis remap='I'>src-cmap</emphasis>: COLORMAP
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request creates a colormap of the same visual type
+and for the same screen as src-cmap,
+and it associates identifier mid with it.
+It also moves all of the client's existing allocations from src-cmap
+to the new colormap with their color values intact
+and their read-only or writable characteristics intact,
+and it frees those entries in src-cmap.
+Color values in other entries in the new colormap are undefined.
+If src-cmap was created by the client with alloc
+<emphasis role='bold'>All</emphasis>
+(see
+<link linkend="requests:CreateColormap"><emphasis role='bold'>CreateColormap</emphasis></link>
+request),
+then the new colormap is also created with alloc
+<emphasis role='bold'>All</emphasis>,
+all color values for all entries are copied from src-cmap,
+and then all entries in src-cmap are freed.
+If src-cmap was not created by the client with alloc
+<emphasis role='bold'>All</emphasis>,
+then the allocations to be moved are all those pixels and planes that have
+been allocated by the client using either
+<link linkend="requests:AllocColor"><emphasis role='bold'>AllocColor</emphasis></link>,
+<link linkend="requests:AllocNamedColor"><emphasis role='bold'>AllocNamedColor</emphasis></link>,
+<link linkend="requests:AllocColorCells"><emphasis role='bold'>AllocColorCells</emphasis></link>,
+or
+<link linkend="requests:AllocColorPlanes"><emphasis role='bold'>AllocColorPlanes</emphasis></link>
+and that have not been freed since they were allocated.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:InstallColormap">
+ <title>InstallColormap</title>
+ <indexterm zone="requests:InstallColormap" significance="preferred"><primary>InstallColormap</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Colormap</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request makes this colormap an installed map for its screen.
+All windows associated with this colormap immediately display with true colors.
+As a side effect,
+additional colormaps might be implicitly installed
+or uninstalled by the server.
+Which other colormaps get installed or uninstalled is server-dependent
+except that the required list must remain installed.
+</para>
+<para>
+If cmap is not already an installed map, a
+<link linkend="events:ColormapNotify"><emphasis role='bold'>ColormapNotify</emphasis></link>
+event is generated on every window having cmap as an attribute.
+In addition,
+for every other colormap that is installed or uninstalled as a result
+of the request, a
+<emphasis role='bold'>ColormapNotify</emphasis>
+event is generated on every window having that colormap as an attribute.
+</para>
+<para>
+At any time, there is a subset of the installed maps that are viewed as an
+ordered list and are called the required list.
+The length of the required list is at most M,
+where M is the min-installed-maps specified for the screen in the
+connection setup.
+The required list is maintained as follows.
+When a colormap is an explicit argument to
+<emphasis role='bold'>InstallColormap</emphasis>,
+it is added to the head of the list; the list is truncated at the
+tail, if necessary, to keep the length of the list to at most M.
+When a colormap is an explicit argument to
+<link linkend="requests:UninstallColormap"><emphasis role='bold'>UninstallColormap</emphasis></link>
+and it is in the required list, it is removed from the list.
+A colormap is not added to the required list when it is installed implicitly
+by the server, and the server cannot implicitly uninstall a colormap that is
+in the required list.
+</para>
+<para>
+Initially the default colormap for a screen is installed (but is not in
+the required list).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:UninstallColormap">
+ <title>UninstallColormap</title>
+ <indexterm zone="requests:UninstallColormap" significance="preferred"><primary>UninstallColormap</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Colormap</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If cmap is on the required list for its screen (see
+<link linkend="requests:InstallColormap"><emphasis role='bold'>InstallColormap</emphasis></link>
+request),
+it is removed from the list.
+As a side effect,
+cmap might be uninstalled,
+and additional colormaps might be implicitly installed or uninstalled.
+Which colormaps get installed or uninstalled is server-dependent
+except that the required list must remain installed.
+</para>
+<para>
+If cmap becomes uninstalled, a
+<link linkend="events:ColormapNotify"><emphasis role='bold'>ColormapNotify</emphasis></link>
+event is generated on every window having cmap as an attribute.
+In addition,
+for every other colormap that is installed or uninstalled as a result of
+the request, a
+<emphasis role='bold'>ColormapNotify</emphasis>
+event is generated on every window having that colormap as an attribute.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ListInstalledColormaps">
+ <title>ListInstalledColormaps</title>
+ <indexterm zone="requests:ListInstalledColormaps" significance="preferred"><primary>ListInstalledColormaps</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+cmaps: LISTofCOLORMAP
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Window</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns a list of the currently installed colormaps for the
+screen of the specified window.
+The order of colormaps is not significant,
+and there is no explicit indication of the required list (see
+<link linkend="requests:InstallColormap"><emphasis role='bold'>InstallColormap</emphasis></link>
+request).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:AllocColor">
+ <title>AllocColor</title>
+ <indexterm zone="requests:AllocColor" significance="preferred"><primary>AllocColor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>red</emphasis>, <emphasis remap='I'>green</emphasis>, <emphasis remap='I'>blue</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+pixel: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+red, green, blue: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request allocates a read-only colormap entry corresponding to the closest
+RGB values provided by the hardware.
+It also returns the pixel and the RGB values actually used.
+Multiple clients requesting the same effective RGB values can be assigned
+the same read-only entry, allowing entries to be shared.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:AllocNamedColor">
+ <title>AllocNamedColor</title>
+ <indexterm zone="requests:AllocNamedColor" significance="preferred"><primary>AllocNamedColor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>name</emphasis>: STRING8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+pixel: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+exact-red, exact-green, exact-blue: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+visual-red, visual-green, visual-blue: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Name</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request looks up the named color with respect to the screen associated
+with the colormap.
+Then, it does an
+<link linkend="requests:AllocColor"><emphasis role='bold'>AllocColor</emphasis></link>
+on cmap.
+The name should use the ISO Latin-1 encoding,
+and uppercase and lowercase do not matter.
+The exact RGB values specify the true values for the color,
+and the visual values specify the values actually used in the colormap.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:AllocColorCells">
+ <title>AllocColorCells</title>
+ <indexterm zone="requests:AllocColorCells" significance="preferred"><primary>AllocColorCells</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>colors</emphasis>, <emphasis remap='I'>planes</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>contiguous</emphasis>: BOOL
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+pixels, masks: LISTofCARD32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The number of colors must be positive,
+and the number of planes must be nonnegative (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+If C colors and P planes are requested,
+then C pixels and P masks are returned.
+No mask will have any bits in common with any other mask
+or with any of the pixels.
+By ORing together masks and pixels,
+C*%2 sup P% distinct pixels can be produced;
+all of these are allocated writable by the request.
+For
+<emphasis role='bold'>GrayScale</emphasis>
+or
+<emphasis role='bold'>PseudoColor</emphasis>,
+each mask will have exactly one bit set to 1; for
+<emphasis role='bold'>DirectColor</emphasis>,
+each will have exactly three bits set to 1.
+If contiguous is
+<emphasis role='bold'>True</emphasis>
+and if all masks are ORed together,
+a single contiguous set of bits will be formed for
+<emphasis role='bold'>GrayScale</emphasis>
+or
+<emphasis role='bold'>PseudoColor</emphasis>,
+and three contiguous sets of bits (one within each pixel subfield) for
+<emphasis role='bold'>DirectColor</emphasis>.
+The RGB values of the allocated entries are undefined.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:AllocColorPlanes">
+ <title>AllocColorPlanes</title>
+ <indexterm zone="requests:AllocColorPlanes" significance="preferred"><primary>AllocColorPlanes</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>colors</emphasis>, <emphasis remap='I'>reds</emphasis>, <emphasis remap='I'>greens</emphasis>, <emphasis remap='I'>blues</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>contiguous</emphasis>: BOOL
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+pixels: LISTofCARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+red-mask, green-mask, blue-mask: CARD32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The number of colors must be positive,
+and the reds, greens, and blues must be nonnegative (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+If C colors, R reds, G greens, and B blues are requested,
+then C pixels are returned, and the masks have R, G, and B bits set,
+respectively.
+If contiguous is
+<emphasis role='bold'>True</emphasis>,
+then each mask will have a contiguous set of bits.
+No mask will have any bits in common with any other mask
+or with any of the pixels.
+For
+<emphasis role='bold'>DirectColor</emphasis>,
+each mask will lie within the corresponding pixel subfield.
+By ORing together subsets of masks with pixels,
+C*%2 sup R+G+B% distinct pixels can be produced;
+all of these are allocated writable by the request.
+The initial RGB values of the allocated entries are undefined.
+In the colormap,
+there are only C*%2 sup R% independent red entries,
+C*%2 sup G% independent green entries,
+and C*%2 sup B% independent blue entries.
+This is true even for
+<emphasis role='bold'>PseudoColor</emphasis>.
+When the colormap entry for a pixel value is changed using
+<link linkend="requests:StoreColors"><emphasis role='bold'>StoreColors</emphasis></link>
+or
+<link linkend="requests:StoreNamedColor"><emphasis role='bold'>StoreNamedColor</emphasis></link>,
+the pixel is decomposed according to the masks and the
+corresponding independent entries are updated.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:FreeColors">
+ <title>FreeColors</title>
+ <indexterm zone="requests:FreeColors" significance="preferred"><primary>FreeColors</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>pixels</emphasis>: LISTofCARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>plane-mask</emphasis>: CARD32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The plane-mask should not have any bits in common with any of the
+pixels.
+The set of all pixels is produced by ORing together subsets of
+plane-mask with the pixels.
+The request frees all of these pixels that
+were allocated by the client (using
+<link linkend="requests:AllocColor"><emphasis role='bold'>AllocColor</emphasis></link>,
+<link linkend="requests:AllocNamedColor"><emphasis role='bold'>AllocNamedColor</emphasis></link>,
+<link linkend="requests:AllocColorCells"><emphasis role='bold'>AllocColorCells</emphasis></link>,
+and
+<link linkend="requests:AllocColorPlanes"><emphasis role='bold'>AllocColorPlanes</emphasis></link>).
+Note that freeing an
+individual pixel obtained from
+<link linkend="requests:AllocColorPlanes"><emphasis role='bold'>AllocColorPlanes</emphasis></link>
+may not actually allow it to be reused until all of its related pixels
+are also freed.
+Similarly, a read-only entry is not actually freed until it has been
+freed by all clients, and if a client allocates the same read-only entry
+multiple times, it must free the entry that many times before the
+entry is actually freed.
+</para>
+<para>
+All specified pixels that are allocated by the client in cmap are freed,
+even if one or more pixels produce an error.
+A
+<emphasis role='bold'>Value</emphasis>
+error is generated if a specified pixel is not a valid index into cmap.
+An
+<emphasis role='bold'>Access</emphasis>
+error is generated if a specified pixel is not allocated by the
+client (that is, is unallocated or is only allocated by another client)
+or if the colormap was created with all entries writable (using an alloc
+value of
+<emphasis role='bold'>All</emphasis>
+in
+<link linkend="requests:CreateColormap"><emphasis role='bold'>CreateColormap</emphasis></link>).
+If more than one pixel is in error,
+it is arbitrary as to which pixel is reported.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:StoreColors">
+ <title>StoreColors</title>
+ <indexterm zone="requests:StoreColors" significance="preferred"><primary>StoreColors</primary></indexterm>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>items</emphasis>: LISTofCOLORITEM
+ </entry>
+ </row>
+ <row>
+ <entry>
+where:
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <tbody>
+ <row>
+ <entry>COLORITEM:</entry>
+ <entry>[pixel: CARD32</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>
+do-red, do-green, do-blue: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>
+red, green, blue: CARD16]
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request changes the colormap entries of the specified pixels.
+The do-red, do-green, and do-blue fields indicate which components
+should actually be changed.
+If the colormap is an installed map for its screen,
+the changes are visible immediately.
+</para>
+<para>
+All specified pixels that are allocated writable in cmap (by any client)
+are changed, even if one or more pixels produce an error.
+A
+<emphasis role='bold'>Value</emphasis>
+error is generated if a specified pixel is not a valid index into cmap, and an
+<emphasis role='bold'>Access</emphasis>
+error is generated if a specified pixel is unallocated or is allocated
+read-only.
+If more than one pixel is in error,
+it is arbitrary as to which pixel is reported.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:StoreNamedColor">
+ <title>StoreNamedColor</title>
+ <indexterm zone="requests:StoreNamedColor" significance="preferred"><primary>StoreNamedColor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>pixel</emphasis>: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>name</emphasis>: STRING8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>do-red</emphasis>, <emphasis remap='I'>do-green</emphasis>, <emphasis remap='I'>do-blue</emphasis>: BOOL
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Name</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request looks up the named color with respect to the screen associated
+with cmap and then does a
+<link linkend="requests:StoreColors"><emphasis role='bold'>StoreColors</emphasis></link>
+in cmap.
+The name should use the ISO Latin-1 encoding,
+and uppercase and lowercase do not matter.
+The
+<emphasis role='bold'>Access</emphasis>
+and
+<emphasis role='bold'>Value</emphasis>
+errors are the same as in
+<emphasis role='bold'>StoreColors</emphasis>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryColors">
+ <title>QueryColors</title>
+ <indexterm zone="requests:QueryColors" significance="preferred"><primary>QueryColors</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>pixels</emphasis>: LISTofCARD32
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+colors: LISTofRGB
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+where:
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+RGB: [red, green, blue: CARD16]
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the hardware-specific color values stored in cmap for
+the specified pixels.
+The values returned for an unallocated entry are undefined.
+A
+<emphasis role='bold'>Value</emphasis>
+error is generated if a pixel is not a valid index into cmap.
+If more than one pixel is in error,
+it is arbitrary as to which pixel is reported.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:LookupColor">
+ <title>LookupColor</title>
+ <indexterm zone="requests:LookupColor" significance="preferred"><primary>LookupColor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cmap</emphasis>: COLORMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>name</emphasis>: STRING8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+exact-red, exact-green, exact-blue: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+visual-red, visual-green, visual-blue: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Colormap</emphasis>,
+<emphasis role='bold'>Name</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request looks up the string name of a color with respect to the screen
+associated with cmap and returns both the exact color values and
+the closest values provided by the hardware with respect to the visual
+type of cmap.
+The name should use the ISO Latin-1 encoding,
+and uppercase and lowercase do not matter.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CreateCursor">
+ <title>CreateCursor</title>
+ <indexterm zone="requests:CreateCursor" significance="preferred"><primary>CreateCursor</primary></indexterm>
+ <indexterm zone="requests:CreateCursor"><primary>Cursor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cid</emphasis>: CURSOR
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>source</emphasis>: PIXMAP
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>mask</emphasis>: PIXMAP or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>fore-red</emphasis>, <emphasis remap='I'>fore-green</emphasis>, <emphasis remap='I'>fore-blue</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>back-red</emphasis>, <emphasis remap='I'>back-green</emphasis>, <emphasis remap='I'>back-blue</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Pixmap</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request creates a cursor and associates identifier cid with it.
+The foreground and background RGB values must be specified,
+even if the server only has a
+<emphasis role='bold'>StaticGray</emphasis>
+or
+<emphasis role='bold'>GrayScale</emphasis>
+screen.
+The foreground is used for the bits set to 1 in the source,
+and the background is used for the bits set to 0.
+Both source and mask (if specified) must have depth one (or a
+<emphasis role='bold'>Match</emphasis>
+error results), but they can have any root.
+The mask pixmap defines the shape of the cursor.
+That is,
+the bits set to 1 in the mask define which source pixels will be displayed,
+and where the mask has bits set to 0,
+the corresponding bits of the source pixmap are ignored.
+If no mask is given,
+all pixels of the source are displayed.
+The mask, if present, must be the same size as the source (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+The x and y coordinates define the hotspot relative to the source's origin
+and must be a point within the source (or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+</para>
+<para>
+The components of the cursor may be transformed arbitrarily to meet
+display limitations.
+</para>
+<para>
+The pixmaps can be freed immediately if no further explicit references
+to them are to be made.
+</para>
+<para>
+Subsequent drawing in the source or mask pixmap has an undefined effect
+on the cursor.
+The server might or might not make a copy of the pixmap.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:CreateGlyphCursor">
+ <title>CreateGlyphCursor</title>
+ <indexterm zone="requests:CreateGlyphCursor" significance="preferred"><primary>CreateGlyphCursor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cid</emphasis>: CURSOR
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>source-font</emphasis>: FONT
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>mask-font</emphasis>: FONT or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>source-char</emphasis>, <emphasis remap='I'>mask-char</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>fore-red</emphasis>, <emphasis remap='I'>fore-green</emphasis>, <emphasis remap='I'>fore-blue</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>back-red</emphasis>, <emphasis remap='I'>back-green</emphasis>, <emphasis remap='I'>back-blue</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Font</emphasis>,
+<emphasis role='bold'>IDChoice</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request is similar to
+<link linkend="requests:CreateCursor"><emphasis role='bold'>CreateCursor</emphasis></link>,
+except the source and mask bitmaps are obtained from the specified font glyphs.
+The source-char must be a defined glyph in source-font,
+and if mask-font is given, mask-char must be a defined glyph in mask-font
+(or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The mask font and character are optional.
+The origins of the source and mask (if it is defined) glyphs
+are positioned coincidently and define the hotspot.
+The source and mask need not have the same bounding box metrics,
+and there is no restriction on the placement of the hotspot relative
+to the bounding boxes.
+If no mask is given,
+all pixels of the source are displayed.
+Note that source-char and mask-char are CARD16, not CHAR2B.
+For 2-byte matrix fonts,
+the 16-bit value should be formed with byte1 in the most significant byte
+and byte2 in the least significant byte.
+</para>
+<para>
+The components of the cursor may be transformed arbitrarily to meet
+display limitations.
+</para>
+<para>
+The fonts can be freed immediately if no further explicit references to
+them are to be made.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:FreeCursor">
+ <title>FreeCursor</title>
+ <indexterm zone="requests:FreeCursor" significance="preferred"><primary>FreeCursor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cursor</emphasis>: CURSOR
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Cursor</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request deletes the association between the resource ID and the cursor.
+The cursor storage will be freed when no other resource references it.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:RecolorCursor">
+ <title>RecolorCursor</title>
+ <indexterm zone="requests:RecolorCursor" significance="preferred"><primary>RecolorCursor</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>cursor</emphasis>: CURSOR
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>fore-red</emphasis>, <emphasis remap='I'>fore-green</emphasis>, <emphasis remap='I'>fore-blue</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>back-red</emphasis>, <emphasis remap='I'>back-green</emphasis>, <emphasis remap='I'>back-blue</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Cursor</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request changes the color of a cursor.
+If the cursor is being displayed on a screen,
+the change is visible immediately.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryBestSize">
+ <title>QueryBestSize</title>
+ <indexterm zone="requests:QueryBestSize" significance="preferred"><primary>QueryBestSize</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>class</emphasis>:
+{ <emphasis role='bold'>Cursor</emphasis>,
+<emphasis role='bold'>Tile</emphasis>,
+<emphasis role='bold'>Stipple</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+width, height: CARD16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Drawable</emphasis>,
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the best size that is closest to the argument size.
+For
+<emphasis role='bold'>Cursor</emphasis>,
+this is the largest size that can be fully displayed.
+For
+<emphasis role='bold'>Tile</emphasis>,
+this is the size that can be tiled fastest.
+For
+<emphasis role='bold'>Stipple</emphasis>,
+this is the size that can be stippled fastest.
+</para>
+<para>
+For
+<emphasis role='bold'>Cursor</emphasis>,
+the drawable indicates the desired screen.
+For
+<emphasis role='bold'>Tile</emphasis>
+and
+<emphasis role='bold'>Stipple</emphasis>,
+the drawable indicates the screen and also possibly the window class and depth.
+An
+<emphasis role='bold'>InputOnly</emphasis>
+window cannot be used as the drawable for
+<emphasis role='bold'>Tile</emphasis>
+or
+<emphasis role='bold'>Stipple</emphasis>
+(or a
+<emphasis role='bold'>Match</emphasis>
+error results).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:QueryExtension">
+ <title>QueryExtension</title>
+ <indexterm zone="requests:QueryExtension" significance="preferred"><primary>QueryExtension</primary></indexterm>
+ <indexterm zone="requests:QueryExtension"><primary>Extension</primary><secondary>querying</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>name</emphasis>: STRING8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+present: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+major-opcode: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+first-event: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+first-error: CARD8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request determines if the named extension is present.
+If so,
+the major opcode for the extension is returned, if it has one.
+Otherwise, zero is returned.
+Any minor opcode and the request formats are specific to the extension.
+If the extension involves additional event types,
+the base event type code is returned.
+Otherwise, zero is returned.
+The format of the events is specific to the extension.
+If the extension involves additional error codes,
+the base error code is returned.
+Otherwise, zero is returned.
+The format of additional data in the errors is specific to the extension.
+</para>
+<para>
+The extension name should use the ISO Latin-1 encoding,
+and uppercase and lowercase matter.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ListExtensions">
+ <title>ListExtensions</title>
+ <indexterm zone="requests:ListExtensions" significance="preferred"><primary>ListExtensions</primary></indexterm>
+ <indexterm zone="requests:ListExtensions"><primary>Extension</primary><secondary>listing</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+names: LISTofSTRING8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns a list of all extensions supported by the server.
+</para>
+ </section>
+ <section id="requests:SetModifierMapping">
+ <title>SetModifierMapping</title>
+ <indexterm zone="requests:SetModifierMapping" significance="preferred"><primary>SetModifierMapping</primary></indexterm>
+ <indexterm zone="requests:SetModifierMapping"><primary>Modifier keys</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>keycodes-per-modifier</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>keycodes</emphasis>: LISTofKEYCODE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+status:
+{ <emphasis role='bold'>Success</emphasis>,
+<emphasis role='bold'>Busy</emphasis>,
+<emphasis role='bold'>Failed</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request specifies the keycodes (if any) of the keys to be used as
+modifiers.
+The number of keycodes in the list must be 8*keycodes-per-modifier (or a
+<emphasis role='bold'>Length</emphasis>
+error results).
+The keycodes are divided into eight sets,
+with each set containing keycodes-per-modifier elements.
+The sets are assigned to the modifiers
+<emphasis role='bold'>Shift</emphasis>,
+<emphasis role='bold'>Lock</emphasis>,
+<emphasis role='bold'>Control</emphasis>,
+<emphasis role='bold'>Mod1</emphasis>,
+<emphasis role='bold'>Mod2</emphasis>,
+<emphasis role='bold'>Mod3</emphasis>,
+<emphasis role='bold'>Mod4</emphasis>,
+and
+<emphasis role='bold'>Mod5</emphasis>,
+in order.
+Only nonzero keycode values are used within each set;
+zero values are ignored.
+All of the nonzero keycodes must be in the range specified by min-keycode
+and max-keycode in the connection setup (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The order of keycodes within a set does not matter.
+If no nonzero values are specified in a set,
+the use of the corresponding modifier is disabled,
+and the modifier bit will always be zero.
+Otherwise, the modifier bit will be one whenever
+at least one of the keys in the corresponding set is in the down
+position.
+</para>
+<para>
+A server can impose restrictions on how modifiers can be changed (for example,
+if certain keys do not generate up transitions in hardware,
+if auto-repeat cannot be disabled on certain keys,
+or if multiple keys per modifier are not supported).
+The status reply is
+<emphasis role='bold'>Failed</emphasis>
+if some such restriction is violated,
+and none of the modifiers is changed.
+</para>
+<para>
+If the new nonzero keycodes specified for a modifier differ from those
+currently defined and any (current or new) keys for that modifier are
+logically in the down state, then the status reply is
+<emphasis role='bold'>Busy</emphasis>,
+and none of the modifiers is changed.
+</para>
+<para>
+This request generates a
+<link linkend="events:MappingNotify"><emphasis role='bold'>MappingNotify</emphasis></link>
+event on a
+<emphasis role='bold'>Success</emphasis>
+status.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetModifierMapping">
+ <title>GetModifierMapping</title>
+ <indexterm zone="requests:GetModifierMapping" significance="preferred"><primary>GetModifierMapping</primary></indexterm>
+ <indexterm zone="requests:GetModifierMapping"><primary>Modifier keys</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+keycodes-per-modifier: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+keycodes: LISTofKEYCODE
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the keycodes of the keys being used as modifiers.
+The number of keycodes in the list is 8*keycodes-per-modifier.
+The keycodes are divided into eight sets,
+with each set containing keycodes-per-modifier elements.
+The sets are assigned to the modifiers
+<emphasis role='bold'>Shift</emphasis>,
+<emphasis role='bold'>Lock</emphasis>,
+<emphasis role='bold'>Control</emphasis>,
+<emphasis role='bold'>Mod1</emphasis>,
+<emphasis role='bold'>Mod2</emphasis>,
+<emphasis role='bold'>Mod3</emphasis>,
+<emphasis role='bold'>Mod4</emphasis>,
+and
+<emphasis role='bold'>Mod5</emphasis>,
+in order.
+The keycodes-per-modifier value is chosen arbitrarily by the server;
+zeroes are used to fill in unused elements within each set.
+If only zero values are given in a set,
+the use of the corresponding modifier has been disabled.
+The order of keycodes within each set is chosen arbitrarily by the server.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeKeyboardMapping">
+ <title>ChangeKeyboardMapping</title>
+ <indexterm zone="requests:ChangeKeyboardMapping" significance="preferred"><primary>ChangeKeyboardMapping</primary></indexterm>
+ <indexterm zone="requests:ChangeKeyboardMapping"><primary>Keysym</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>first-keycode</emphasis>: KEYCODE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>keysyms-per-keycode</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>keysyms</emphasis>: LISTofKEYSYM
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Alloc</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request defines the symbols for the specified number of keycodes,
+starting with the specified keycode.
+The symbols for keycodes outside this range remained unchanged.
+The number of elements in the keysyms list must be a multiple of
+keysyms-per-keycode (or a
+<emphasis role='bold'>Length</emphasis>
+error results).
+The first-keycode must be greater than or equal to min-keycode as returned
+in the connection setup (or a
+<emphasis role='bold'>Value</emphasis>
+error results) and:
+<literallayout class="monospaced">
+ first-keycode + (keysyms-length / keysyms-per-keycode) - 1
+</literallayout>
+</para>
+<para>
+must be less than or equal to max-keycode as returned in the connection
+setup (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+KEYSYM number N (counting from zero) for keycode K has an index
+(counting from zero) of:
+<literallayout class="monospaced">
+ (K - first-keycode) * keysyms-per-keycode + N
+</literallayout>
+</para>
+<para>
+in keysyms.
+The keysyms-per-keycode can be chosen arbitrarily by the client
+to be large enough to hold all desired symbols.
+A special KEYSYM value of
+<keysym>NoSymbol</keysym>
+should be used to fill in unused elements for individual keycodes.
+It is legal for
+<keysym>NoSymbol</keysym>
+to appear in nontrailing positions of the effective list for a keycode.
+</para>
+<para>
+This request generates a
+<link linkend="events:MappingNotify"><emphasis role='bold'>MappingNotify</emphasis></link>
+event.
+</para>
+<para>
+There is no requirement that the server interpret this mapping;
+it is merely stored for reading and writing by clients
+(see <link linkend='Keyboards'>section 5</link>).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetKeyboardMapping">
+ <title>GetKeyboardMapping</title>
+ <indexterm zone="requests:GetKeyboardMapping" significance="preferred"><primary>GetKeyboardMapping</primary></indexterm>
+ <indexterm zone="requests:GetKeyboardMapping"><primary>Keysym</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>first-keycode</emphasis>: KEYCODE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>count</emphasis>: CARD8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+keysyms-per-keycode: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+keysyms: LISTofKEYSYM
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the symbols for the specified number of keycodes,
+starting with the specified keycode.
+The first-keycode must be greater than or equal to
+min-keycode as returned in the connection setup (or a
+<emphasis role='bold'>Value</emphasis>
+error results), and:
+<literallayout class="monospaced">
+ first-keycode + count - 1
+</literallayout>
+</para>
+<para>
+must be less than or equal to max-keycode as returned in the connection setup
+(or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The number of elements in the keysyms list is:
+<literallayout class="monospaced">
+ count * keysyms-per-keycode
+</literallayout>
+</para>
+<para>
+and KEYSYM number N (counting from zero) for keycode K has an index
+(counting from zero) of:
+<literallayout class="monospaced">
+ (K - first-keycode) * keysyms-per-keycode + N
+</literallayout>
+</para>
+<para>
+in keysyms.
+The keysyms-per-keycode value is chosen arbitrarily by the server
+to be large enough to report all requested symbols.
+A special KEYSYM value of
+<keysym>NoSymbol</keysym>
+is used to fill in unused elements for individual keycodes.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeKeyboardControl">
+ <title>ChangeKeyboardControl</title>
+ <indexterm zone="requests:ChangeKeyboardControl" significance="preferred"><primary>ChangeKeyboardControl</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-list</emphasis>: LISTofVALUE
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+Errors:
+<emphasis role='bold'>Match</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request controls various aspects of the keyboard.
+The value-mask and value-list specify which controls are to be changed.
+The possible values are:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Control</entry>
+ <entry>Type</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>key-click-percent</entry>
+ <entry>INT8</entry>
+ </row>
+ <row>
+ <entry>bell-percent</entry>
+ <entry>INT8</entry>
+ </row>
+ <row>
+ <entry>bell-pitch</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>bell-duration</entry>
+ <entry>INT16</entry>
+ </row>
+ <row>
+ <entry>led</entry>
+ <entry>CARD8</entry>
+ </row>
+ <row>
+ <entry>led-mode</entry>
+ <entry>
+{ <emphasis role='bold'>On</emphasis>,
+<emphasis role='bold'>Off</emphasis> }
+ </entry>
+ </row>
+ <row>
+ <entry>key </entry>
+ <entry>KEYCODE</entry>
+ </row>
+ <row>
+ <entry>auto-repeat-mode</entry>
+ <entry>
+{ <emphasis role='bold'>On</emphasis>,
+<emphasis role='bold'>Off</emphasis>,
+<emphasis role='bold'>Default</emphasis> }
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The key-click-percent sets the volume for key clicks between 0 (off) and
+100 (loud) inclusive, if possible.
+Setting to -1 restores the default.
+Other negative values generate a
+<emphasis role='bold'>Value</emphasis>
+error.
+</para>
+<para>
+The bell-percent sets the base volume for the bell between 0 (off) and 100
+(loud) inclusive, if possible.
+Setting to -1 restores the default.
+Other negative values generate a
+<emphasis role='bold'>Value</emphasis>
+error.
+</para>
+<para>
+The bell-pitch sets the pitch (specified in Hz) of the bell, if possible.
+Setting to -1 restores the default.
+Other negative values generate a
+<emphasis role='bold'>Value</emphasis>
+error.
+</para>
+<para>
+The bell-duration sets the duration of the bell (specified in milliseconds),
+if possible.
+Setting to -1 restores the default.
+Other negative values generate a
+<emphasis role='bold'>Value</emphasis>
+error.
+</para>
+<para>
+If both led-mode and led are specified,
+then the state of that LED is changed, if possible.
+If only led-mode is specified,
+then the state of all LEDs are changed, if possible.
+At most 32 LEDs, numbered from one, are supported.
+No standard interpretation of LEDs is defined.
+It is a
+<emphasis role='bold'>Match</emphasis>
+error if an led is specified without an led-mode.
+</para>
+<para>
+If both auto-repeat-mode and key are specified,
+then the auto-repeat mode of that key is changed, if possible.
+If only auto-repeat-mode is specified,
+then the global auto-repeat mode for the entire keyboard is changed,
+if possible, without affecting the per-key settings.
+It is a
+<emphasis role='bold'>Match</emphasis>
+error if a key is specified without an auto-repeat-mode.
+Each key has an individual mode of whether or not it should auto-repeat
+and a default setting for that mode.
+In addition, there is a global mode of whether auto-repeat should be
+enabled or not and a default setting for that mode.
+When the global mode is
+<emphasis role='bold'>On</emphasis>,
+keys should obey their individual auto-repeat modes.
+When the global mode is
+<emphasis role='bold'>Off</emphasis>,
+no keys should auto-repeat.
+An auto-repeating key generates alternating
+<link linkend="events:KeyPress"><emphasis role='bold'>KeyPress</emphasis></link>
+and
+<link linkend="events:KeyRelease"><emphasis role='bold'>KeyRelease</emphasis></link>
+events.
+When a key is used as a modifier,
+it is desirable for the key not to auto-repeat,
+regardless of the auto-repeat setting for that key.
+</para>
+<para>
+A bell generator connected with the console but not directly on the
+keyboard is treated as if it were part of the keyboard.
+</para>
+<para>
+The order in which controls are verified and altered is server-dependent.
+If an error is generated,
+a subset of the controls may have been altered.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetKeyboardControl">
+ <title>GetKeyboardControl</title>
+ <indexterm zone="requests:GetKeyboardControl" significance="preferred"><primary>GetKeyboardControl</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+key-click-percent: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+bell-percent: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+bell-pitch: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+bell-duration: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+led-mask: CARD32
+ </entry>
+ </row>
+ <row>
+ <entry>
+global-auto-repeat:
+{ <emphasis role='bold'>On</emphasis>,
+<emphasis role='bold'>Off</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+auto-repeats: LISTofCARD8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current control values for the keyboard.
+For the LEDs,
+the least significant bit of led-mask corresponds to LED one,
+and each one bit in led-mask indicates an LED that is lit.
+The auto-repeats is a bit vector;
+each one bit indicates that auto-repeat is enabled for the corresponding key.
+The vector is represented as 32 bytes.
+Byte N (from 0) contains the bits for keys 8N to 8N + 7,
+with the least significant bit in the byte representing key 8N.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:Bell">
+ <title>Bell</title>
+ <indexterm zone="requests:Bell" significance="preferred"><primary>Bell</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>percent</emphasis>: INT8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request rings the bell on the keyboard at a volume relative to the
+base volume for the keyboard, if possible.
+Percent can range from -100 to 100 inclusive (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The volume at which the bell is rung when percent is nonnegative is:
+<literallayout class="monospaced">
+ base - [(base * percent) / 100] + percent
+</literallayout>
+</para>
+<para>
+When percent is negative, it is:
+<literallayout class="monospaced">
+ base + [(base * percent) / 100]
+</literallayout>
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetPointerMapping">
+ <title>SetPointerMapping</title>
+ <indexterm zone="requests:SetPointerMapping" significance="preferred"><primary>SetPointerMapping</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>map</emphasis>: LISTofCARD8
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+status:
+{ <emphasis role='bold'>Success</emphasis>,
+<emphasis role='bold'>Busy</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request sets the mapping of the pointer.
+Elements of the list are indexed starting from one.
+The length of the list must be the same as
+<link linkend="requests:GetPointerMapping"><emphasis role='bold'>GetPointerMapping</emphasis></link>
+would return (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+The index is a core button number,
+and the element of the list defines the effective number.
+</para>
+<para>
+A zero element disables a button.
+Elements are not restricted in value by the number of physical buttons,
+but no two elements can have the same nonzero value (or a
+<emphasis role='bold'>Value</emphasis>
+error results).
+</para>
+<para>
+If any of the buttons to be altered are logically in the down state,
+the status reply is
+<emphasis role='bold'>Busy</emphasis>,
+and the mapping is not changed.
+</para>
+<para>
+This request generates a
+<link linkend="events:MappingNotify"><emphasis role='bold'>MappingNotify</emphasis></link>
+event on a
+<emphasis role='bold'>Success</emphasis>
+status.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetPointerMapping">
+ <title>GetPointerMapping</title>
+ <indexterm zone="requests:GetPointerMapping" significance="preferred"><primary>GetPointerMapping</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+map: LISTofCARD8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current mapping of the pointer.
+Elements of the list are indexed starting from one.
+The length of the list indicates the number of physical buttons.
+</para>
+<para>
+The nominal mapping for a pointer is the identity mapping: map[i]=i.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangePointerControl">
+ <title>ChangePointerControl</title>
+ <indexterm zone="requests:ChangePointerControl" significance="preferred"><primary>ChangePointerControl</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>do-acceleration</emphasis>, <emphasis remap='I'>do-threshold</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>acceleration-numerator</emphasis>, <emphasis remap='I'>acceleration-denominator</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>threshold</emphasis>: INT16
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request defines how the pointer moves.
+The acceleration is a multiplier for movement expressed as a fraction.
+For example,
+specifying 3/1 means the pointer moves three times as fast as normal.
+The fraction can be rounded arbitrarily by the server.
+Acceleration only takes effect if the pointer moves more than threshold
+number of pixels at once and only applies to the amount beyond the threshold.
+Setting a value to -1 restores the default.
+Other negative values generate a
+<emphasis role='bold'>Value</emphasis>
+error, as does a zero value for acceleration-denominator.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetPointerControl">
+ <title>GetPointerControl</title>
+ <indexterm zone="requests:GetPointerControl" significance="preferred"><primary>GetPointerControl</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+acceleration-numerator, acceleration-denominator: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+threshold: CARD16
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current acceleration and threshold for the pointer.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetScreenSaver">
+ <title>SetScreenSaver</title>
+ <indexterm zone="requests:SetScreenSaver" significance="preferred"><primary>SetScreenSaver</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>timeout</emphasis>, <emphasis remap='I'>interval</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>prefer-blanking</emphasis>:
+{ <emphasis role='bold'>Yes</emphasis>,
+<emphasis role='bold'>No</emphasis>,
+<emphasis role='bold'>Default</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>allow-exposures</emphasis>:
+{ <emphasis role='bold'>Yes</emphasis>,
+<emphasis role='bold'>No</emphasis>,
+<emphasis role='bold'>Default</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+The timeout and interval are specified in seconds;
+setting a value to -1 restores the default.
+Other negative values generate a
+<emphasis role='bold'>Value</emphasis>
+error.
+If the timeout value is zero,
+screen-saver is disabled (but an activated screen-saver is not deactivated).
+If the timeout value is nonzero,
+screen-saver is enabled.
+Once screen-saver is enabled,
+if no input from the keyboard or pointer is generated for timeout seconds,
+screen-saver is activated.
+For each screen,
+if blanking is preferred and the hardware supports video blanking,
+the screen will simply go blank.
+Otherwise,
+if either exposures are allowed or the screen can be regenerated without
+sending exposure events to clients,
+the screen is changed in a server-dependent fashion to avoid phosphor burn.
+Otherwise,
+the state of the screens does not change, and screen-saver is not activated.
+At the next keyboard or pointer input or at the next
+<link linkend="requests:ForceScreenSaver"><emphasis role='bold'>ForceScreenSaver</emphasis></link>
+with mode
+<emphasis role='bold'>Reset</emphasis>,
+screen-saver is deactivated, and all screen states are restored.
+</para>
+<para>
+If the server-dependent screen-saver method is amenable to periodic change,
+interval serves as a hint about how long the change period should be,
+with zero hinting that no periodic change should be made.
+Examples of ways to change the screen include scrambling the color map
+periodically, moving an icon image about the screen periodically, or
+tiling the screen with the root window background tile,
+randomly reorigined periodically.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:GetScreenSaver">
+ <title>GetScreenSaver</title>
+ <indexterm zone="requests:GetScreenSaver" significance="preferred"><primary>GetScreenSaver</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+timeout, interval: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+prefer-blanking:
+{ <emphasis role='bold'>Yes</emphasis>,
+<emphasis role='bold'>No</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+allow-exposures:
+{ <emphasis role='bold'>Yes</emphasis>,
+<emphasis role='bold'>No</emphasis>}
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the current screen-saver control values.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ForceScreenSaver">
+ <title>ForceScreenSaver</title>
+ <indexterm zone="requests:ForceScreenSaver" significance="preferred"><primary>ForceScreenSaver</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Activate</emphasis>,
+<emphasis role='bold'>Reset</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If the mode is
+<emphasis role='bold'>Activate</emphasis>
+and screen-saver is currently deactivated,
+then screen-saver is activated (even if screen-saver has been disabled with
+a timeout value of zero).
+If the mode is
+<emphasis role='bold'>Reset</emphasis>
+and screen-saver is currently enabled,
+then screen-saver is deactivated (if it was activated),
+and the activation timer is reset to its initial state
+as if device input had just been received.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ChangeHosts">
+ <title>ChangeHosts</title>
+ <indexterm zone="requests:ChangeHosts" significance="preferred"><primary>ChangeHosts</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Insert</emphasis>,
+<emphasis role='bold'>Delete</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>host</emphasis>: HOST
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request adds or removes the specified host from the access control list.
+<indexterm zone="requests:ChangeHosts"><primary>Access control list</primary></indexterm>
+When the access control mechanism is enabled and a client attempts to
+establish a connection to the server,
+the host on which the client resides must be in the access control list,
+or the client must have been granted permission by a server-dependent
+method, or the server will refuse the connection.
+</para>
+<para>
+The client must reside on the same host as the server and/or have been granted
+permission by a server-dependent method to execute this request (or an
+<emphasis role='bold'>Access</emphasis>
+error results).
+</para>
+<para>
+An initial access control list can usually be specified,
+typically by naming a file that the server reads at startup and reset.
+</para>
+<para id="address_families">
+The following address families are defined.
+<indexterm zone="address_families"><primary>Types</primary><secondary>HOST</secondary></indexterm>
+A server is not required to support these families
+and may support families not listed here.
+Use of an unsupported family, an improper address format,
+or an improper address length within a supported family results in a
+<emphasis role='bold'>Value</emphasis>
+error.
+</para>
+<para>
+For the Internet family,
+the address must be four bytes long.
+The address bytes are in standard IP order;
+the server performs no automatic swapping on the address bytes.
+The Internet family supports IP version 4 addresses only.
+</para>
+<para>
+For the InternetV6 family, the address must be sixteen bytes
+long. The address bytes are in standard IP order; the
+server performs no automatic swapping on the address bytes.
+The InternetV6 family supports IP version 6 addresses only.
+</para>
+<para>
+For the DECnet family,
+the server performs no automatic swapping on the address bytes.
+A Phase IV address is two bytes long:
+the first byte contains the least significant eight bits of the node number,
+and the second byte contains the most significant two bits of the node number in
+the least significant two bits of the byte and the area in the most
+significant six bits of the byte.
+</para>
+<para>
+For the Chaos family,
+the address must be two bytes long.
+The host number is always the first byte in the address,
+and the subnet number is always the second byte.
+The server performs no automatic swapping on the address bytes.
+</para>
+<para>
+For the ServerInterpreted family, the address may be of any
+length up to 65535 bytes. The address consists of two strings
+of ASCII characters, separated by a byte with a value of 0.
+The first string represents the type of address, and the second
+string contains the address value. Address types and the syntax
+for their associated values will be registered via the X.Org Registry.
+Implementors who wish to add implementation specific types may register
+a unique prefix with the X.Org registry to prevent namespace
+collisions.
+</para>
+<para>
+Use of a host address in the ChangeHosts request is deprecated. It is
+only useful when a host has a unique, constant address, a requirement
+that is increasingly unmet as sites adopt dynamically assigned
+addresses, network address translation gateways, IPv6 link local
+addresses, and various other technologies. It also assumes all users of
+a host share equivalent access rights, and as such has never been
+suitable for many multi-user machine environments. Instead, more
+secure forms of authentication, such as those based on shared secrets
+or public key encryption, are recommended.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:ListHosts">
+ <title>ListHosts</title>
+ <indexterm zone="requests:ListHosts" significance="preferred"><primary>ListHosts</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ ▶
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+mode:
+{ <emphasis role='bold'>Enabled</emphasis>,
+<emphasis role='bold'>Disabled</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+hosts: LISTofHOST
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request returns the hosts on the access control list
+and whether use of the list at connection setup is currently
+enabled or disabled.
+</para>
+<para>
+Each HOST is padded to a multiple of four bytes.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetAccessControl">
+ <title>SetAccessControl</title>
+ <indexterm zone="requests:SetAccessControl" significance="preferred"><primary>SetAccessControl</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Enable</emphasis>,
+<emphasis role='bold'>Disable</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Access</emphasis>,
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request enables or disables the use of the access control list
+at connection setups.
+</para>
+<para>
+The client must reside on the same host as the server
+and/or have been granted permission by a server-dependent method
+to execute this request (or an
+<emphasis role='bold'>Access</emphasis>
+error results).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:SetCloseDownMode">
+ <title>SetCloseDownMode</title>
+ <indexterm zone="requests:SetCloseDownMode" significance="preferred"><primary>SetCloseDownMode</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Destroy</emphasis>,
+<emphasis role='bold'>RetainPermanent</emphasis>,
+<emphasis role='bold'>RetainTemporary</emphasis>}
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This request defines what will happen to the client's resources
+at connection close.
+A connection starts in
+<emphasis role='bold'>Destroy</emphasis>
+mode.
+The meaning of the close-down mode is described
+in <link linkend='Connection_Close'>section 10</link>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:KillClient">
+ <title>KillClient</title>
+ <indexterm zone="requests:KillClient" significance="preferred"><primary>KillClient</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>resource</emphasis>: CARD32 or
+<emphasis role='bold'>AllTemporary</emphasis>
+<!-- .in -.2i -->
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+Errors:
+<emphasis role='bold'>Value</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If a valid resource is specified,
+<link linkend="requests:KillClient"><emphasis role='bold'>KillClient</emphasis></link>
+forces a close-down of the client that created the resource.
+If the client has already terminated in either
+<emphasis role='bold'>RetainPermanent</emphasis>
+or
+<emphasis role='bold'>RetainTemporary</emphasis>
+mode, all of the client's resources are destroyed
+(see <link linkend='Connection_Close'>section 10</link>).
+If
+<emphasis role='bold'>AllTemporary</emphasis>
+is specified,
+then the resources of all clients that have terminated in
+<emphasis role='bold'>RetainTemporary</emphasis>
+are destroyed.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="requests:NoOperation">
+ <title>NoOperation</title>
+ <indexterm zone="requests:NoOperation" significance="preferred"><primary>NoOperation</primary></indexterm>
+<para>
+This request has no arguments and no results,
+but the request length field
+allows the request to be any multiple of four bytes in length.
+The bytes contained in the request are uninterpreted by the server.
+</para>
+<para>
+This request can be used in its minimum four byte form as padding where
+necessary by client libraries that find it convenient to force requests
+to begin on 64-bit boundaries.
+</para>
+ </section>
+</chapter>
+
+<chapter id='Connection_Close'>
+<title>Connection Close</title>
+ <indexterm zone="Connection_Close"><primary>Connection</primary><secondary>closing</secondary></indexterm>
+<!-- .XS -->
+<!-- \*(SN Connection Close -->
+<!-- .XE -->
+<para>
+At connection close,
+all event selections made by the client are discarded.
+If the client has the pointer actively grabbed, an
+<link linkend="requests:UngrabPointer"><emphasis role='bold'>UngrabPointer</emphasis></link>
+is performed.
+If the client has the keyboard actively grabbed, an
+<link linkend="requests:UngrabKeyboard"><emphasis role='bold'>UngrabKeyboard</emphasis></link>
+is performed.
+All passive grabs by the client are released.
+If the client has the server grabbed, an
+<link linkend="requests:UngrabServer"><emphasis role='bold'>UngrabServer</emphasis></link>
+is performed.
+All selections (see
+<link linkend="requests:SetSelectionOwner"><emphasis role='bold'>SetSelectionOwner</emphasis></link>
+request)
+owned by the client are disowned.
+If close-down mode (see
+<link linkend="requests:SetCloseDownMode"><emphasis role='bold'>SetCloseDownMode</emphasis></link>
+request) is
+<emphasis role='bold'>RetainPermanent</emphasis>
+or
+<emphasis role='bold'>RetainTemporary</emphasis>,
+then all resources (including colormap entries)
+allocated by the client are marked as permanent or temporary,
+respectively (but this does not prevent other clients from explicitly
+destroying them).
+If the mode is
+<emphasis role='bold'>Destroy</emphasis>,
+all of the client's resources are destroyed.
+</para>
+<para>
+When a client's resources are destroyed,
+for each window in the client's save-set,
+if the window is an inferior of a window created by the client,
+the save-set window is reparented to the closest ancestor such that
+the save-set window is not an inferior of a window created by the client.
+If the save-set window is unmapped, a
+<link linkend="requests:MapWindow"><emphasis role='bold'>MapWindow</emphasis></link>
+request is performed on it (even if it was not an inferior
+of a window created by the client).
+The reparenting leaves unchanged the absolute coordinates
+(with respect to the root window) of the upper-left outer corner of the
+save-set window.
+After save-set processing,
+all windows created by the client are destroyed.
+For each nonwindow resource created by the client,
+the appropriate
+<emphasis role='bold'>Free</emphasis>
+request is performed.
+All colors and colormap entries allocated by the client are freed.
+</para>
+<para>
+A server goes through a cycle of having no connections and having some
+connections.
+At every transition to the state of having no connections
+as a result of a connection closing with a
+<emphasis role='bold'>Destroy</emphasis>
+close-down mode,
+the server resets its state as if it had just been started.
+This starts by destroying all lingering resources from clients
+that have terminated in
+<emphasis role='bold'>RetainPermanent</emphasis>
+or
+<emphasis role='bold'>RetainTemporary</emphasis>
+mode.
+It additionally includes deleting all but the predefined atom identifiers,
+deleting all properties on all root windows, resetting all device maps and
+attributes (key click, bell volume, acceleration), resetting the access
+control list, restoring the standard root tiles and cursors, restoring
+the default font path, and restoring the input focus to state
+<emphasis role='bold'>PointerRoot</emphasis>.
+</para>
+<para>
+Note that closing a connection with a close-down mode of
+<emphasis role='bold'>RetainPermanent</emphasis>
+or
+<emphasis role='bold'>RetainTemporary</emphasis>
+will not cause the server to reset.
+</para>
+</chapter>
+<!-- .NH 1 -->
+<chapter id='Events'>
+<title>Events</title>
+<!-- .XS -->
+<!-- \*(SN Events -->
+<!-- .XE -->
+<para>
+<indexterm zone="Events"><primary>Event</primary></indexterm>
+When a button press is processed with the pointer in some window W
+and no active pointer grab is in progress,
+the ancestors of W are searched from the root down,
+looking for a passive grab to activate.
+If no matching passive grab on the button exists,
+then an active grab is started automatically for the client receiving the event,
+and the last-pointer-grab time is set to the current server time.
+The effect is essentially equivalent to a
+<link linkend="requests:GrabButton"><emphasis role='bold'>GrabButton</emphasis></link>
+with arguments:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Argument</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>event-window</entry>
+ <entry>Event window</entry>
+ </row>
+ <row>
+ <entry>event-mask</entry>
+ <entry>
+Client's selected pointer events on the event window
+ </entry>
+ </row>
+ <row>
+ <entry>pointer-mode and keyboard-mode</entry>
+ <entry>
+<emphasis role='bold'>Asynchronous</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>owner-events</entry>
+ <entry>
+<emphasis role='bold'>True</emphasis>
+if the client has
+<emphasis role='bold'>OwnerGrabButton</emphasis>
+selected on the event window, otherwise
+<emphasis role='bold'>False</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>confine-to</entry>
+ <entry>
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>cursor</entry>
+ <entry>
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+
+
+<para>
+The grab is terminated automatically when the logical state of the pointer
+has all buttons released.
+<link linkend="requests:UngrabPointer"><emphasis role='bold'>UngrabPointer</emphasis></link>
+and
+<link linkend="requests:ChangeActivePointerGrab"><emphasis role='bold'>ChangeActivePointerGrab</emphasis></link>
+can both be used to modify the active grab.
+<!-- .sp -->
+</para>
+
+ <section id="events:input">
+ <title>Input Device events</title>
+ <indexterm zone="events:input" significance="preferred"><primary>Input device</primary><secondary>events</secondary></indexterm>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry id="events:KeyPress">
+<indexterm zone="events:KeyPress" significance="preferred"><primary>KeyPress</primary></indexterm>
+<emphasis role='bold'>KeyPress</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry id="events:KeyRelease">
+<indexterm zone="events:KeyRelease" significance="preferred"><primary>KeyRelease</primary></indexterm>
+<emphasis role='bold'>KeyRelease</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry id="events:ButtonPress">
+<indexterm zone="events:ButtonPress" significance="preferred"><primary>ButtonPress</primary></indexterm>
+<emphasis role='bold'>ButtonPress</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry id="events:ButtonRelease">
+<indexterm zone="events:ButtonRelease" significance="preferred"><primary>ButtonRelease</primary></indexterm>
+<emphasis role='bold'>ButtonRelease</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry id="events:MotionNotify">
+<indexterm zone="events:MotionNotify" significance="preferred"><primary>MotionNotify</primary></indexterm>
+<emphasis role='bold'>MotionNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>root</emphasis>, <emphasis remap='I'>event</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>child</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>same-screen</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>root-x</emphasis>, <emphasis remap='I'>root-y</emphasis>, <emphasis remap='I'>event-x</emphasis>, <emphasis remap='I'>event-y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>detail</emphasis>: &lt;see below&gt;
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>state</emphasis>: SETofKEYBUTMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+These events are generated either when a key or button logically changes state
+or when the pointer logically moves.
+The generation of these logical changes may lag the physical changes
+if device event processing is frozen.
+Note that
+<emphasis role='bold'>KeyPress</emphasis>
+and
+<emphasis role='bold'>KeyRelease</emphasis>
+are generated for all keys, even those mapped to modifier bits.
+<phrase id="events:input:source">
+The source of the event is the window the pointer is in.
+</phrase>
+<indexterm zone="events:input:source"><primary>Event</primary><secondary>source</secondary></indexterm>
+The window the event is reported with respect to is called the event window.
+The event window is found by starting with the source window and
+looking up the hierarchy for the first window on which any client has selected
+interest in the event (provided no intervening window prohibits event
+generation by including the event type in its do-not-propagate-mask).
+The actual window used for reporting can be modified by active grabs and,
+in the case of keyboard events, can be modified by the focus window.
+</para>
+<para>
+The root is the root window of the source window,
+and root-x and root-y are the pointer coordinates relative to root's origin
+at the time of the event.
+Event is the event window.
+If the event window is on the same screen as root,
+then event-x and event-y are the pointer coordinates relative to the
+event window's origin.
+Otherwise, event-x and event-y are zero.
+If the source window is an inferior of the event window,
+then child is set to the child of the event window that is an
+ancestor of (or is) the source window.
+Otherwise, it is set to
+<emphasis role='bold'>None</emphasis>.
+The state component gives the logical state of the buttons and modifier keys
+just before the event.
+The detail component type varies with the event type:
+</para>
+
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <thead>
+ <row rowsep='1'>
+ <entry>Event</entry>
+ <entry>Component</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+<emphasis role='bold'>KeyPress</emphasis>,
+<emphasis role='bold'>KeyRelease</emphasis>
+ </entry>
+ <entry>KEYCODE</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>ButtonPress</emphasis>,
+<emphasis role='bold'>ButtonRelease</emphasis>
+ </entry>
+ <entry>BUTTON</entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>MotionNotify</emphasis>
+ </entry>
+ <entry>
+{ <emphasis role='bold'>Normal</emphasis>
+<emphasis role='bold'>Hint</emphasis> }
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+<emphasis role='bold'>MotionNotify</emphasis>
+events are only generated when the motion begins and ends in the window.
+The granularity of motion events is not guaranteed,
+but a client selecting for motion events is guaranteed to get at least one
+event when the pointer moves and comes to rest.
+Selecting
+<emphasis role='bold'>PointerMotion</emphasis>
+receives events independent of the state of the pointer buttons.
+By selecting some subset of
+<emphasis role='bold'>Button[1-5]Motion</emphasis>
+instead,
+<emphasis role='bold'>MotionNotify</emphasis>
+events will only be received when one or more of the
+specified buttons are pressed.
+By selecting
+<emphasis role='bold'>ButtonMotion</emphasis>,
+<emphasis role='bold'>MotionNotify</emphasis>
+events will be received only when at least one button is pressed.
+The events are always of type
+<emphasis role='bold'>MotionNotify</emphasis>,
+independent of the selection.
+If
+<emphasis role='bold'>PointerMotionHint</emphasis>
+is selected,
+the server is free to send only one
+<emphasis role='bold'>MotionNotify</emphasis>
+event (with detail
+<emphasis role='bold'>Hint</emphasis>)
+to the client for the event window until
+either the key or button state changes,
+the pointer leaves the event window,
+or the client issues a
+<link linkend="requests:QueryPointer"><emphasis role='bold'>QueryPointer</emphasis></link>
+or
+<link linkend="requests:GetMotionEvents"><emphasis role='bold'>GetMotionEvents</emphasis></link>
+request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:pointer_window">
+ <title>Pointer Window events</title>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry id="events:EnterNotify">
+<indexterm zone="events:EnterNotify" significance="preferred"><primary>EnterNotify</primary></indexterm>
+<emphasis role='bold'>EnterNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry id="events:LeaveNotify">
+<indexterm zone="events:LeaveNotify" significance="preferred"><primary>LeaveNotify</primary></indexterm>
+<emphasis role='bold'>LeaveNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>root</emphasis>, <emphasis remap='I'>event</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>child</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>same-screen</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>root-x</emphasis>, <emphasis remap='I'>root-y</emphasis>, <emphasis remap='I'>event-x</emphasis>, <emphasis remap='I'>event-y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Normal</emphasis>,
+<emphasis role='bold'>Grab</emphasis>,
+<emphasis role='bold'>Ungrab</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>detail</emphasis>:
+{ <emphasis role='bold'>Ancestor</emphasis>,
+<emphasis role='bold'>Virtual</emphasis>,
+<emphasis role='bold'>Inferior</emphasis>,
+<emphasis role='bold'>Nonlinear</emphasis>,
+<emphasis role='bold'>NonlinearVirtual</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>focus</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>state</emphasis>: SETofKEYBUTMASK
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+If pointer motion or window hierarchy change causes the pointer to be
+in a different window than before,
+<emphasis role='bold'>EnterNotify</emphasis>
+and
+<emphasis role='bold'>LeaveNotify</emphasis>
+events are generated instead of a
+<link linkend="events:MotionNotify"><emphasis role='bold'>MotionNotify</emphasis></link>
+event.
+Only clients selecting
+<emphasis role='bold'>EnterWindow</emphasis>
+on a window receive
+<emphasis role='bold'>EnterNotify</emphasis>
+events, and only clients selecting
+<emphasis role='bold'>LeaveWindow</emphasis>
+receive
+<emphasis role='bold'>LeaveNotify</emphasis>
+events.
+The pointer position reported in the event is always the final position,
+not the initial position of the pointer.
+The root is the root window for this position,
+and root-x and root-y are the pointer coordinates relative to root's
+origin at the time of the event.
+Event is the event window.
+If the event window is on the same screen as root,
+then event-x and event-y are the pointer coordinates relative
+to the event window's origin.
+Otherwise, event-x and event-y are zero.
+In a
+<emphasis role='bold'>LeaveNotify</emphasis>
+event, if a child of the event window contains the initial position of the
+pointer, then the child component is set to that child.
+Otherwise, it is
+<emphasis role='bold'>None</emphasis>.
+For an
+<emphasis role='bold'>EnterNotify</emphasis>
+event, if a child of the event window contains the final pointer position,
+then the child component is set to that child.
+Otherwise, it is
+<emphasis role='bold'>None</emphasis>.
+If the event window is the focus window or an inferior of the focus window,
+then focus is
+<emphasis role='bold'>True</emphasis>.
+Otherwise, focus is
+<emphasis role='bold'>False</emphasis>.
+</para>
+<para>
+Normal pointer motion events have mode
+<emphasis role='bold'>Normal</emphasis>.
+Pseudo-motion events when a grab activates have mode
+<emphasis role='bold'>Grab</emphasis>,
+and pseudo-motion events when a grab deactivates have mode
+<emphasis role='bold'>Ungrab</emphasis>.
+</para>
+<para>
+All
+<emphasis role='bold'>EnterNotify</emphasis>
+and
+<emphasis role='bold'>LeaveNotify</emphasis>
+events caused by a hierarchy change are generated after any hierarchy event
+caused by that change (that is,
+<link linkend="events:UnmapNotify"><emphasis role='bold'>UnmapNotify</emphasis></link>,
+<link linkend="events:MapNotify"><emphasis role='bold'>MapNotify</emphasis></link>,
+<link linkend="events:ConfigureNotify"><emphasis role='bold'>ConfigureNotify</emphasis></link>,
+<link linkend="events:GravityNotify"><emphasis role='bold'>GravityNotify</emphasis></link>,
+<link linkend="events:CirculateNotify"><emphasis role='bold'>CirculateNotify</emphasis></link>),
+but the ordering of
+<emphasis role='bold'>EnterNotify</emphasis>
+and
+<emphasis role='bold'>LeaveNotify</emphasis>
+events with respect to
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>,
+<link linkend="events:VisibilityNotify"><emphasis role='bold'>VisibilityNotify</emphasis></link>,
+and
+<link linkend="events:Expose"><emphasis role='bold'>Expose</emphasis></link>
+events is not constrained.
+</para>
+<para>
+Normal events are generated as follows:
+</para>
+
+<para>
+When the pointer moves from window A to window B and A is an inferior
+of B:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>LeaveNotify</emphasis>
+with detail
+<emphasis role='bold'>Ancestor</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>LeaveNotify</emphasis>
+with detail
+<emphasis role='bold'>Virtual</emphasis>
+is generated on each window between A and B exclusive (in that order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+with detail
+<emphasis role='bold'>Inferior</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the pointer moves from window A to window B and B is an inferior
+of A:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<!-- .IP bu 5 -->
+<emphasis role='bold'>LeaveNotify</emphasis>
+with detail
+<emphasis role='bold'>Inferior</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+with detail
+<emphasis role='bold'>Virtual</emphasis>
+is generated on each window between A and B exclusive (in that order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+with detail
+<emphasis role='bold'>Ancestor</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the pointer moves from window A to window B and window C is
+their least common ancestor:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>LeaveNotify</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>LeaveNotify</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window between A and C exclusive (in that order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window between C and B exclusive (in that order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the pointer moves from window A to window B on different screens:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>LeaveNotify</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If A is not a root window,
+<emphasis role='bold'>LeaveNotify</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window above A up to and including its root (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If B is not a root window,
+<emphasis role='bold'>EnterNotify</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window from B's root down to but not including B
+(in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When a pointer grab activates (but after any initial warp into a confine-to
+window and before generating any actual
+<link linkend="events:ButtonPress"><emphasis role='bold'>ButtonPress</emphasis></link>
+event that activates the grab),
+G is the grab-window for the grab, and P is the window the pointer is in:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+and
+<emphasis role='bold'>LeaveNotify</emphasis>
+events with mode
+<emphasis role='bold'>Grab</emphasis>
+are generated (as for
+<emphasis role='bold'>Normal</emphasis>
+above) as if the pointer were to suddenly warp from its current
+position in P to some position in G.
+However, the pointer does not warp,
+and the pointer position is used as both the initial
+and final positions for the events.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When a pointer grab deactivates (but after generating any actual
+<link linkend="events:ButtonRelease"><emphasis role='bold'>ButtonRelease</emphasis></link>
+event that deactivates the grab), G is the grab-window for
+the grab, and P is the window the pointer is in:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>EnterNotify</emphasis>
+and
+<emphasis role='bold'>LeaveNotify</emphasis>
+events with mode
+<emphasis role='bold'>Ungrab</emphasis>
+are generated (as for
+<emphasis role='bold'>Normal</emphasis>
+above) as if the pointer were to suddenly warp from
+some position in G to its current position in P.
+However, the pointer does not warp,
+and the current pointer position is used as both the initial
+and final positions for the events.
+ </para>
+ </listitem>
+</itemizedlist>
+
+ </section>
+ <section id="events:input_focus">
+ <title>Input Focus events</title>
+ <indexterm zone="events:input_focus" significance="preferred"><primary>Input focus</primary><secondary>events</secondary></indexterm>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry id="events:FocusIn">
+<indexterm zone="events:FocusIn" significance="preferred"><primary>FocusIn</primary></indexterm>
+<emphasis role='bold'>FocusIn</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry id="events:FocusOut">
+<indexterm zone="events:FocusOut" significance="preferred"><primary>FocusOut</primary></indexterm>
+<emphasis role='bold'>FocusOut</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>mode</emphasis>:
+{ <emphasis role='bold'>Normal</emphasis>,
+<emphasis role='bold'>WhileGrabbed</emphasis>,
+<emphasis role='bold'>Grab</emphasis>,
+<emphasis role='bold'>Ungrab</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>detail</emphasis>:
+{ <emphasis role='bold'>Ancestor</emphasis>,
+<emphasis role='bold'>Virtual</emphasis>,
+<emphasis role='bold'>Inferior</emphasis>,
+<emphasis role='bold'>Nonlinear</emphasis>,
+<emphasis role='bold'>NonlinearVirtual</emphasis>,
+<emphasis role='bold'>Pointer</emphasis>,
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis role='bold'>PointerRoot</emphasis>,
+<emphasis role='bold'>None</emphasis> }
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+These events are generated when the input focus changes
+and are reported to clients selecting
+<emphasis role='bold'>FocusChange</emphasis>
+on the window.
+Events generated by
+<link linkend="requests:SetInputFocus"><emphasis role='bold'>SetInputFocus</emphasis></link>
+when the keyboard is not grabbed have mode
+<emphasis role='bold'>Normal</emphasis>.
+Events generated by
+<emphasis role='bold'>SetInputFocus</emphasis>
+when the keyboard is grabbed have mode
+<emphasis role='bold'>WhileGrabbed</emphasis>.
+Events generated when a keyboard grab activates have mode
+<emphasis role='bold'>Grab</emphasis>,
+and events generated when a keyboard grab deactivates have mode
+<emphasis role='bold'>Ungrab</emphasis>.
+</para>
+<para>
+All
+<emphasis role='bold'>FocusOut</emphasis>
+events caused by a window unmap are generated after any
+<link linkend="events:UnmapNotify"><emphasis role='bold'>UnmapNotify</emphasis></link>
+event, but the ordering of
+<emphasis role='bold'>FocusOut</emphasis>
+with respect to generated
+<link linkend="events:EnterNotify"><emphasis role='bold'>EnterNotify</emphasis></link>,
+<link linkend="events:LeaveNotify"><emphasis role='bold'>LeaveNotify</emphasis></link>,
+<link linkend="events:VisibilityNotify"><emphasis role='bold'>VisibilityNotify</emphasis></link>,
+and
+<link linkend="events:Expose"><emphasis role='bold'>Expose</emphasis></link>
+events is not constrained.
+</para>
+<para>
+<emphasis role='bold'>Normal</emphasis>
+and
+<emphasis role='bold'>WhileGrabbed</emphasis>
+events are generated as follows:
+</para>
+<para>
+When the focus moves from window A to window B, A is an inferior of B,
+and the pointer is in window P:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Ancestor</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Virtual</emphasis>
+is generated on each window between A and B exclusive (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Inferior</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If P is an inferior of B
+but P is not A or an inferior of A or an ancestor of A,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window below B down to and including P (in order).
+ </para>
+ </listitem>
+</itemizedlist>
+
+
+<para>
+When the focus moves from window A to window B, B is an inferior of A,
+and the pointer is in window P:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+If P is an inferior of A
+but P is not an inferior of B or an ancestor of B,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P up to but not including A (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Inferior</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Virtual</emphasis>
+is generated on each window between A and B exclusive (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Ancestor</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the focus moves from window A to window B, window C is their
+least common ancestor, and the pointer is in window P:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+If P is an inferior of A,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P up to but not including A (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window between A and C exclusive (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window between C and B exclusive (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If P is an inferior of B,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window below B down to and including P (in order).
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the focus moves from window A to window B on different screens
+and the pointer is in window P:
+</para>
+
+
+<itemizedlist>
+ <listitem>
+ <para>
+If P is an inferior of A,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P up to but not including A (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If A is not a root window,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window above A up to and including its root (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If B is not a root window,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window from B's root down to but not including B
+(in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on B.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If P is an inferior of B,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window below B down to and including P (in order).
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the focus moves from window A to
+<emphasis role='bold'>PointerRoot</emphasis>
+(or
+<emphasis role='bold'>None</emphasis>)
+and the pointer is in window P:
+</para>
+
+
+<itemizedlist>
+ <listitem>
+ <para>
+If P is an inferior of A,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P up to but not including A (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If A is not a root window,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window above A up to and including its root (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>PointerRoot</emphasis>
+(or
+<emphasis role='bold'>None</emphasis>)
+is generated on all root windows.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If the new focus is
+<emphasis role='bold'>PointerRoot</emphasis>,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P's root down to and including P (in order).
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the focus moves from
+<emphasis role='bold'>PointerRoot</emphasis>
+(or
+<emphasis role='bold'>None</emphasis>)
+to window A and the pointer is in window P:
+</para>
+
+
+<itemizedlist>
+ <listitem>
+ <para>
+If the old focus is
+<emphasis role='bold'>PointerRoot</emphasis>,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P up to and including P's root (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>PointerRoot</emphasis>
+(or
+<emphasis role='bold'>None</emphasis>)
+is generated on all root windows.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If A is not a root window,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>NonlinearVirtual</emphasis>
+is generated on each window from A's root down to but not including A
+(in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Nonlinear</emphasis>
+is generated on A.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If P is an inferior of A,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window below A down to and including P (in order).
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When the focus moves from
+<emphasis role='bold'>PointerRoot</emphasis>
+to
+<emphasis role='bold'>None</emphasis>
+(or vice versa) and the pointer is in window P:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+If the old focus is
+<emphasis role='bold'>PointerRoot</emphasis>,
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P up to and including P's root (in order).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusOut</emphasis>
+with detail
+<emphasis role='bold'>PointerRoot</emphasis>
+(or
+<emphasis role='bold'>None</emphasis>)
+is generated on all root windows.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>None</emphasis>
+(or
+<emphasis role='bold'>PointerRoot</emphasis>)
+is generated on all root windows.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+If the new focus is
+<emphasis role='bold'>PointerRoot</emphasis>,
+<emphasis role='bold'>FocusIn</emphasis>
+with detail
+<emphasis role='bold'>Pointer</emphasis>
+is generated on each window from P's root down to and including P (in order).
+ </para>
+ </listitem>
+</itemizedlist>
+
+
+<para>
+When a keyboard grab activates (but before generating any actual
+<emphasis role='bold'>KeyPress</emphasis>
+event that activates the grab), G is the grab-window for the grab,
+and F is the current focus:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+and
+<emphasis role='bold'>FocusOut</emphasis>
+events with mode
+<emphasis role='bold'>Grab</emphasis>
+are generated (as for
+<emphasis role='bold'>Normal</emphasis>
+above) as if the focus were to change from F to G.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+When a keyboard grab deactivates (but after generating any actual
+<emphasis role='bold'>KeyRelease</emphasis>
+event that deactivates the grab), G is the grab-window for the grab,
+and F is the current focus:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+<emphasis role='bold'>FocusIn</emphasis>
+and
+<emphasis role='bold'>FocusOut</emphasis>
+events with mode
+<emphasis role='bold'>Ungrab</emphasis>
+are generated (as for
+<emphasis role='bold'>Normal</emphasis>
+above) as if the focus were to change from G to F.
+ </para>
+ </listitem>
+</itemizedlist>
+
+ </section>
+ <section id="events:KeymapNotify">
+ <title>KeymapNotify</title>
+ <indexterm zone="events:KeymapNotify" significance="preferred"><primary>KeymapNotify</primary></indexterm>
+
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>KeymapNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>keys</emphasis>: LISTofCARD8
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The value is a bit vector as described in
+<link linkend="requests:QueryKeymap"><emphasis role='bold'>QueryKeymap</emphasis></link>.
+This event is reported to clients selecting
+<emphasis role='bold'>KeymapState</emphasis>
+on a window and is generated immediately after every
+<link linkend="events:EnterNotify"><emphasis role='bold'>EnterNotify</emphasis></link>
+and
+<link linkend="events:FocusIn"><emphasis role='bold'>FocusIn</emphasis></link>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:Expose">
+ <title>Expose</title>
+ <indexterm zone="events:Expose" significance="preferred"><primary>Expose</primary></indexterm>
+ <indexterm zone="events:Expose"><primary>Event</primary><secondary>Exposure</secondary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>Expose</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>,
+<emphasis remap='I'>y</emphasis>,
+<emphasis remap='I'>width</emphasis>,
+<emphasis remap='I'>height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>count</emphasis>: CARD16
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>Exposure</emphasis>
+on the window.
+It is generated when no valid contents are available for regions of a window,
+and either the regions are visible, the regions are viewable
+and the server is (perhaps newly) maintaining backing store on the window,
+or the window is not viewable but the server is (perhaps newly) honoring
+window's backing-store attribute of
+<emphasis role='bold'>Always</emphasis>
+or
+<emphasis role='bold'>WhenMapped</emphasis>.
+The regions are decomposed into an arbitrary set of rectangles,
+and an
+<emphasis role='bold'>Expose</emphasis>
+event is generated for each rectangle.
+</para>
+<para>
+For a given action causing exposure events,
+the set of events for a given window are guaranteed to be reported contiguously.
+If count is zero,
+then no more
+<emphasis role='bold'>Expose</emphasis>
+events for this window follow.
+If count is nonzero,
+then at least that many more
+<emphasis role='bold'>Expose</emphasis>
+events for this window follow (and possibly more).
+</para>
+<para>
+The x and y coordinates are relative to window's origin
+and specify the upper-left corner of a rectangle.
+The width and height specify the extent of the rectangle.
+</para>
+<para>
+<emphasis role='bold'>Expose</emphasis>
+events are never generated on
+<emphasis role='bold'>InputOnly</emphasis>
+windows.
+</para>
+<para>
+All
+<emphasis role='bold'>Expose</emphasis>
+events caused by a hierarchy change are generated after any
+hierarchy event caused by that change (for example,
+<link linkend="events:UnmapNotify"><emphasis role='bold'>UnmapNotify</emphasis></link>,
+<link linkend="events:MapNotify"><emphasis role='bold'>MapNotify</emphasis></link>,
+<link linkend="events:ConfigureNotify"><emphasis role='bold'>ConfigureNotify</emphasis></link>,
+<link linkend="events:GravityNotify"><emphasis role='bold'>GravityNotify</emphasis></link>,
+<link linkend="events:CirculateNotify"><emphasis role='bold'>CirculateNotify</emphasis></link>).
+All
+<emphasis role='bold'>Expose</emphasis>
+events on a given window are generated after any
+<link linkend="events:VisibilityNotify"><emphasis role='bold'>VisibilityNotify</emphasis></link>
+event on that window,
+but it is not required that all
+<emphasis role='bold'>Expose</emphasis>
+events on all windows be generated after all
+<emphasis role='bold'>Visibilitity</emphasis>
+events on all windows.
+The ordering of
+<emphasis role='bold'>Expose</emphasis>
+events with respect to
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>,
+<link linkend="events:EnterNotify"><emphasis role='bold'>EnterNotify</emphasis></link>,
+and
+<link linkend="events:LeaveNotify"><emphasis role='bold'>LeaveNotify</emphasis></link>
+events is not constrained.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:GraphicsExposure">
+ <title>GraphicsExposure</title>
+ <indexterm zone="events:GraphicsExposure" significance="preferred"><primary>GraphicsExposure</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>GraphicsExposure</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>, <emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>count</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>major-opcode</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>minor-opcode</emphasis>: CARD16
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to a client using a graphics context
+with graphics-exposures selected
+and is generated when a destination region could not be computed due
+to an obscured or out-of-bounds source region.
+All of the regions exposed by a given graphics request
+are guaranteed to be reported contiguously.
+If count is zero then no more
+<emphasis role='bold'>GraphicsExposure</emphasis>
+events for this window follow.
+If count is nonzero,
+then at least that many more
+<emphasis role='bold'>GraphicsExposure</emphasis>
+events for this window follow (and possibly more).
+</para>
+<para>
+The x and y coordinates are relative to drawable's origin
+and specify the upper-left corner of a rectangle.
+The width and height specify the extent of the rectangle.
+</para>
+<para>
+The major and minor opcodes identify the graphics request used.
+For the core protocol,
+major-opcode is always
+<link linkend="requests:CopyArea"><emphasis role='bold'>CopyArea</emphasis></link>
+or
+<link linkend="requests:CopyPlane"><emphasis role='bold'>CopyPlane</emphasis></link>,
+and minor-opcode is always zero.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:NoExposure">
+ <title>NoExposure</title>
+ <indexterm zone="events:NoExposure" significance="preferred"><primary>NoExposure</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>NoExposure</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>drawable</emphasis>: DRAWABLE
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>major-opcode</emphasis>: CARD8
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>minor-opcode:</emphasis> CARD16
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to a client using a graphics context
+with graphics-exposures selected
+and is generated when a graphics request
+that might produce
+<link linkend="events:GraphicsExposure"><emphasis role='bold'>GraphicsExposure</emphasis></link>
+events does not produce any.
+The drawable specifies the destination used for the graphics request.
+</para>
+<para>
+The major and minor opcodes identify the graphics request used.
+For the core protocol,
+major-opcode is always
+<link linkend="requests:CopyArea"><emphasis role='bold'>CopyArea</emphasis></link>
+or
+<link linkend="requests:CopyPlane"><emphasis role='bold'>CopyPlane</emphasis></link>,
+and the minor-opcode is always zero.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:VisibilityNotify">
+ <title>VisibilityNotify</title>
+ <indexterm zone="events:VisibilityNotify" significance="preferred"><primary>VisibilityNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>VisibilityNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>state</emphasis>:
+{ <emphasis role='bold'>Unobscured</emphasis>,
+<emphasis role='bold'>PartiallyObscured</emphasis>,
+<emphasis role='bold'>FullyObscured</emphasis>}
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>VisibilityChange</emphasis>
+on the window.
+In the following,
+the state of the window is calculated ignoring all of the window's subwindows.
+When a window changes state from partially or fully obscured or
+not viewable to viewable and completely unobscured,
+an event with
+<emphasis role='bold'>Unobscured</emphasis>
+is generated.
+When a window changes state from viewable and completely unobscured,
+from viewable and completely obscured,
+or from not viewable, to viewable and partially obscured,
+an event with
+<emphasis role='bold'>PartiallyObscured</emphasis>
+is generated.
+When a window changes state from viewable and completely unobscured,
+from viewable and partially obscured,
+or from not viewable to viewable and fully obscured,
+an event with
+<emphasis role='bold'>FullyObscured</emphasis>
+is generated.
+</para>
+<para>
+<emphasis role='bold'>VisibilityNotify</emphasis>
+events are never generated on
+<emphasis role='bold'>InputOnly</emphasis>
+windows.
+</para>
+<para>
+All
+<emphasis role='bold'>VisibilityNotify</emphasis>
+events caused by a hierarchy change are generated after any hierarchy event
+caused by that change (for example,
+<link linkend="events:UnmapNotify"><emphasis role='bold'>UnmapNotify</emphasis></link>,
+<link linkend="events:MapNotify"><emphasis role='bold'>MapNotify</emphasis></link>,
+<link linkend="events:ConfigureNotify"><emphasis role='bold'>ConfigureNotify</emphasis></link>,
+<link linkend="events:GravityNotify"><emphasis role='bold'>GravityNotify</emphasis></link>,
+<link linkend="events:CirculateNotify"><emphasis role='bold'>CirculateNotify</emphasis></link>).
+Any
+<emphasis role='bold'>VisibilityNotify</emphasis>
+event on a given window is generated before any
+<link linkend="events:Expose"><emphasis role='bold'>Expose</emphasis></link>
+events on that window,
+but it is not required that all
+<emphasis role='bold'>VisibilityNotify</emphasis>
+events on all windows be generated before all
+<emphasis role='bold'>Expose</emphasis>
+events on all windows.
+The ordering of
+<emphasis role='bold'>VisibilityNotify</emphasis>
+events with respect to
+<link linkend="events:FocusOut"><emphasis role='bold'>FocusOut</emphasis></link>,
+<link linkend="events:EnterNotify"><emphasis role='bold'>EnterNotify</emphasis></link>,
+and
+<link linkend="events:LeaveNotify"><emphasis role='bold'>LeaveNotify</emphasis></link>
+events is not constrained.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:CreateNotify">
+ <title>CreateNotify</title>
+ <indexterm zone="events:CreateNotify" significance="preferred"><primary>CreateNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>CreateNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>parent</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>, <emphasis remap='I'>border-width</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>override-redirect</emphasis>: BOOL
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on the parent
+and is generated when the window is created.
+The arguments are as in the
+<link linkend="requests:CreateWindow"><emphasis role='bold'>CreateWindow</emphasis></link>
+request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:DestroyNotify">
+ <title>DestroyNotify</title>
+ <indexterm zone="events:DestroyNotify" significance="preferred"><primary>DestroyNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>DestroyNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>StructureNotify</emphasis>
+on the window and to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on the parent.
+It is generated when the window is destroyed.
+The event is the window on which the event was generated,
+and the window is the window that is destroyed.
+</para>
+<para>
+The ordering of the
+<emphasis role='bold'>DestroyNotify</emphasis>
+events is such that for any given window,
+<emphasis role='bold'>DestroyNotify</emphasis>
+is generated on all inferiors of the window
+before being generated on the window itself.
+The ordering among siblings and across subhierarchies is not
+otherwise constrained.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:UnmapNotify">
+ <title>UnmapNotify</title>
+ <indexterm zone="events:UnmapNotify" significance="preferred"><primary>UnmapNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>UnmapNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>from-configure</emphasis>: BOOL
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>StructureNotify</emphasis>
+on the window and to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on the parent.
+It is generated when the window changes state from mapped to unmapped.
+The event is the window on which the event was generated,
+and the window is the window that is unmapped.
+The from-configure flag is
+<emphasis role='bold'>True</emphasis>
+if the event was generated as a result of the window's parent being resized
+when the window itself had a win-gravity of
+<emphasis role='bold'>Unmap</emphasis>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:MapNotify">
+ <title>MapNotify</title>
+ <indexterm zone="events:MapNotify" significance="preferred"><primary>MapNotify</primary></indexterm>
+ <indexterm zone="events:MapNotify"><primary>Mapped window</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>MapNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>override-redirect</emphasis>: BOOL
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>StructureNotify</emphasis>
+on the window and to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on the parent.
+It is generated when the window changes state from unmapped to mapped.
+The event is the window on which the event was generated,
+and the window is the window that is mapped.
+The override-redirect flag is from the window's attribute.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:MapRequest">
+ <title>MapRequest</title>
+ <indexterm zone="events:MapRequest" significance="preferred"><primary>MapRequest</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>MapRequest</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>parent</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to the client selecting
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the parent and is generated when a
+<link linkend="requests:MapWindow"><emphasis role='bold'>MapWindow</emphasis></link>
+request is issued on an unmapped window with an override-redirect attribute of
+<emphasis role='bold'>False</emphasis>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:ReparentNotify">
+ <title>ReparentNotify</title>
+ <indexterm zone="events:ReparentNotify" significance="preferred"><primary>ReparentNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>ReparentNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>, <emphasis remap='I'>window</emphasis>, <emphasis remap='I'>parent</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>override-redirect</emphasis>: BOOL
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on either the old or the new parent and to clients selecting
+<emphasis role='bold'>StructureNotify</emphasis>
+on the window.
+It is generated when the window is reparented.
+The event is the window on which the event was generated.
+The window is the window that has been rerooted.
+The parent specifies the new parent.
+The x and y coordinates are relative to the new parent's origin
+and specify the position of the upper-left outer corner of the window.
+The override-redirect flag is from the window's attribute.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:ConfigureNotify">
+ <title>ConfigureNotify</title>
+ <indexterm zone="events:ConfigureNotify" significance="preferred"><primary>ConfigureNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>ConfigureNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>, <emphasis remap='I'>border-width</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>above-sibling</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>override-redirect</emphasis>: BOOL
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>StructureNotify</emphasis>
+on the window and to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on the parent.
+It is generated when a
+<link linkend="requests:ConfigureWindow"><emphasis role='bold'>ConfigureWindow</emphasis></link>
+request actually changes the state of the window.
+The event is the window on which the event was generated,
+and the window is the window that is changed.
+The x and y coordinates are relative to the new parent's origin
+and specify the position of the upper-left outer corner of the window.
+The width and height specify the inside size, not including the border.
+If above-sibling is
+<emphasis role='bold'>None</emphasis>,
+then the window is on the bottom of the stack with respect to siblings.
+Otherwise, the window is immediately on top of the specified sibling.
+The override-redirect flag is from the window's attribute.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:GravityNotify">
+ <title>GravityNotify</title>
+ <indexterm zone="events:GravityNotify" significance="preferred"><primary>GravityNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>GravityNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on the parent and to clients selecting
+<emphasis role='bold'>StructureNotify</emphasis>
+on the window.
+It is generated when a window is moved because of a change in size
+of the parent.
+The event is the window on which the event was generated,
+and the window is the window that is moved.
+The x and y coordinates are relative to the new parent's origin
+and specify the position of the upper-left outer corner of the window.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:ResizeRequest">
+ <title>ResizeRequest</title>
+ <indexterm zone="events:ResizeRequest" significance="preferred"><primary>ResizeRequest</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>ResizeRequest</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>: CARD16
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to the client selecting
+<emphasis role='bold'>ResizeRedirect</emphasis>
+on the window and is generated when a
+<link linkend="requests:ConfigureWindow"><emphasis role='bold'>ConfigureWindow</emphasis></link>
+request by some other client on the window attempts to change the size
+of the window.
+The width and height are the requested inside size, not including the border.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:ConfigureRequest">
+ <title>ConfigureRequest</title>
+ <indexterm zone="events:ConfigureRequest" significance="preferred"><primary>ConfigureRequest</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>ConfigureRequest</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>parent</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>: INT16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>, <emphasis remap='I'>border-width</emphasis>: CARD16
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>sibling</emphasis>: WINDOW or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>stack-mode</emphasis>:
+{ <emphasis role='bold'>Above</emphasis>,
+<emphasis role='bold'>Below</emphasis>,
+<emphasis role='bold'>TopIf</emphasis>,
+<emphasis role='bold'>BottomIf</emphasis>,
+<emphasis role='bold'>Opposite</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>value-mask</emphasis>: BITMASK
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to the client selecting
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the parent and is generated when a
+<link linkend="requests:ConfigureWindow"><emphasis role='bold'>ConfigureWindow</emphasis></link>
+request is issued on the window by some other client.
+The value-mask indicates which components were specified in the request.
+The value-mask and the corresponding values are reported as given
+in the request.
+The remaining values are filled in from the current geometry of the window,
+except in the case of sibling and stack-mode,
+which are reported as
+<emphasis role='bold'>None</emphasis>
+and
+<emphasis role='bold'>Above</emphasis>
+(respectively) if not given in the request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:CirculateNotify">
+ <title>CirculateNotify</title>
+ <indexterm zone="events:CirculateNotify" significance="preferred"><primary>CirculateNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>CirculateNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>event</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>place</emphasis>:
+{ <emphasis role='bold'>Top</emphasis>,
+<emphasis role='bold'>Bottom</emphasis>}
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>StructureNotify</emphasis>
+on the window and to clients selecting
+<emphasis role='bold'>SubstructureNotify</emphasis>
+on the parent.
+It is generated when the window is actually restacked from a
+<link linkend="requests:CirculateWindow"><emphasis role='bold'>CirculateWindow</emphasis></link>
+request.
+The event is the window on which the event was generated,
+and the window is the window that is restacked.
+If place is
+<emphasis role='bold'>Top</emphasis>,
+the window is now on top of all siblings.
+Otherwise, it is below all siblings.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:CirculateRequest">
+ <title>CirculateRequest</title>
+ <indexterm zone="events:CirculateRequest" significance="preferred"><primary>CirculateRequest</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>CirculateRequest</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>parent</emphasis>, <emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>place</emphasis>:
+{ <emphasis role='bold'>Top</emphasis>,
+<emphasis role='bold'>Bottom</emphasis>}
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to the client selecting
+<emphasis role='bold'>SubstructureRedirect</emphasis>
+on the parent and is generated when a
+<link linkend="requests:CirculateWindow"><emphasis role='bold'>CirculateWindow</emphasis></link>
+request is issued on the parent and a window actually needs to be restacked.
+The window specifies the window to be restacked,
+and the place specifies what the new position in the stacking order should be.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:PropertyNotify">
+ <title>PropertyNotify</title>
+ <indexterm zone="events:PropertyNotify" significance="preferred"><primary>PropertyNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>PropertyNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>atom</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>state</emphasis>:
+{ <emphasis role='bold'>NewValue</emphasis>,
+<emphasis role='bold'>Deleted</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>PropertyChange</emphasis>
+on the window and is generated with state
+<emphasis role='bold'>NewValue</emphasis>
+when a property of the window is changed using
+<link linkend="requests:ChangeProperty"><emphasis role='bold'>ChangeProperty</emphasis></link>
+or
+<link linkend="requests:RotateProperties"><emphasis role='bold'>RotateProperties</emphasis></link>,
+even when adding zero-length data using
+<emphasis role='bold'>ChangeProperty</emphasis>
+and when replacing all or part of a property with identical data using
+<emphasis role='bold'>ChangeProperty</emphasis>
+or
+<emphasis role='bold'>RotateProperties</emphasis>.
+It is generated with state
+<emphasis role='bold'>Deleted</emphasis>
+when a property of the
+window is deleted using request
+<link linkend="requests:DeleteProperty"><emphasis role='bold'>DeleteProperty</emphasis></link>
+or
+<link linkend="requests:GetProperty"><emphasis role='bold'>GetProperty</emphasis></link>.
+The timestamp indicates the server time when the property was changed.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:SelectionClear">
+ <title>SelectionClear</title>
+ <indexterm zone="events:SelectionClear" significance="preferred"><primary>SelectionClear</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>SelectionClear</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>owner</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>selection</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to the current owner of a selection
+and is generated when a new owner is being defined by means of
+<link linkend="requests:SetSelectionOwner"><emphasis role='bold'>SetSelectionOwner</emphasis></link>.
+The timestamp is the last-change time recorded for the selection.
+The owner argument is the window that was specified by the current owner in its
+<emphasis role='bold'>SetSelectionOwner</emphasis>
+request.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:SelectionRequest">
+ <title>SelectionRequest</title>
+ <indexterm zone="events:SelectionRequest" significance="preferred"><primary>SelectionRequest</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>SelectionRequest</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>owner</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>selection</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>target</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>property</emphasis>: ATOM or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>requestor</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to the owner of a selection
+and is generated when a client issues a
+<link linkend="requests:ConvertSelection"><emphasis role='bold'>ConvertSelection</emphasis></link>
+request.
+The owner argument is the window that was specified in the
+<link linkend="requests:SetSelectionOwner"><emphasis role='bold'>SetSelectionOwner</emphasis></link>
+request.
+The remaining arguments are as in the
+<emphasis role='bold'>ConvertSelection</emphasis>
+request.
+</para>
+<para>
+The owner should convert the selection based on the specified target type
+and send a
+<emphasis role='bold'>SelectionNotify</emphasis>
+back to the requestor.
+A complete specification for using selections is given in the X.Org
+standard <citetitle>Inter-Client Communication Conventions Manual</citetitle>.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:SelectionNotify">
+ <title>SelectionNotify</title>
+ <indexterm zone="events:SelectionNotify" significance="preferred"><primary>SelectionNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>SelectionNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>requestor</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>property</emphasis>: ATOM or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>time</emphasis>: TIMESTAMP or
+<emphasis role='bold'>CurrentTime</emphasis>
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is generated by the server in response to a
+<link linkend="requests:ConvertSelection"><emphasis role='bold'>ConvertSelection</emphasis></link>
+request when there is no owner for the selection.
+When there is an owner,
+it should be generated by the owner using
+<link linkend="requests:SendEvent"><emphasis role='bold'>SendEvent</emphasis></link>.
+The owner of a selection should send this event to a requestor either
+when a selection has been converted and stored as a property
+or when a selection conversion could not be performed (indicated with property
+<emphasis role='bold'>None</emphasis>).
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:ColormapNotify">
+ <title>ColormapNotify</title>
+ <indexterm zone="events:ColormapNotify" significance="preferred"><primary>ColormapNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>ColormapNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>colormap</emphasis>: COLORMAP or
+<emphasis role='bold'>None</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>new</emphasis>: BOOL
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>state</emphasis>:
+{ <emphasis role='bold'>Installed</emphasis>,
+<emphasis role='bold'>Uninstalled</emphasis>}
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is reported to clients selecting
+<emphasis role='bold'>ColormapChange</emphasis>
+on the window.
+It is generated with value
+<emphasis role='bold'>True</emphasis>
+for new when the colormap attribute of the window is changed
+and is generated with value
+<emphasis role='bold'>False</emphasis>
+for new when the colormap of a window is installed or uninstalled.
+In either case,
+the state indicates whether the colormap is currently installed.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:MappingNotify">
+ <title>MappingNotify</title>
+ <indexterm zone="events:MappingNotify" significance="preferred"><primary>MappingNotify</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>MappingNotify</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>request</emphasis>:
+{ <emphasis role='bold'>Modifier</emphasis>,
+<emphasis role='bold'>Keyboard</emphasis>,
+<emphasis role='bold'>Pointer</emphasis>}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>first-keycode</emphasis>, <emphasis remap='I'>count</emphasis>: CARD8
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is sent to all clients.
+There is no mechanism to express disinterest in this event.
+The detail indicates the kind of change that occurred:
+<emphasis role='bold'>Modifiers</emphasis>
+for a successful
+<link linkend="requests:SetModifierMapping"><emphasis role='bold'>SetModifierMapping</emphasis></link>,
+<emphasis role='bold'>Keyboard</emphasis>
+for a successful
+<link linkend="requests:ChangeKeyboardMapping"><emphasis role='bold'>ChangeKeyboardMapping</emphasis></link>,
+and
+<emphasis role='bold'>Pointer</emphasis>
+for a successful
+<link linkend="requests:SetPointerMapping"><emphasis role='bold'>SetPointerMapping</emphasis></link>.
+If the detail is
+<emphasis role='bold'>Keyboard</emphasis>,
+then first-keycode and count indicate the range of altered keycodes.
+<!-- .sp -->
+</para>
+ </section>
+ <section id="events:ClientMessage">
+ <title>ClientMessage</title>
+ <indexterm zone="events:ClientMessage" significance="preferred"><primary>ClientMessage</primary></indexterm>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='1' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <tbody>
+ <row>
+ <entry>
+ <emphasis role='bold'>ClientMessage</emphasis>
+ </entry>
+ </row>
+ <row>
+ <entry>
+<!-- .in +.2i -->
+<emphasis remap='I'>window</emphasis>: WINDOW
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>type</emphasis>: ATOM
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>format</emphasis>: {8, 16, 32}
+ </entry>
+ </row>
+ <row>
+ <entry>
+<emphasis remap='I'>data</emphasis>: LISTofINT8 or LISTofINT16 or LISTofINT32
+<!-- .in -.2i -->
+<!-- .eM -->
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!-- .eM -->
+<para>
+This event is only generated by clients using
+<link linkend="requests:SendEvent"><emphasis role='bold'>SendEvent</emphasis></link>.
+The type specifies how the data is to be interpreted by the receiving client;
+the server places no interpretation on the type or the data.
+The format specifies whether the data should be viewed as a list of 8-bit,
+16-bit, or 32-bit quantities, so that the server can correctly
+byte-swap, as necessary.
+The data always consists of either 20 8-bit values or 10 16-bit values
+or 5 32-bit values, although particular message types might not make use
+of all of these values.
+</para>
+ </section>
+</chapter>
+<chapter id='Flow_Control_and_Concurrency'>
+<title>Flow Control and Concurrency</title>
+<!-- .XS -->
+<!-- \*(SN Flow Control and Concurrency -->
+<!-- .XE -->
+<para>
+Whenever the server is writing to a given connection,
+it is permissible for the server to stop reading from that connection
+(but if the writing would block, it must continue to service other connections).
+The server is not required to buffer more than a single request per connection
+at one time.
+For a given connection to the server,
+a client can block while reading from the connection
+but should undertake to read (events and errors) when writing would block.
+Failure on the part of a client to obey this rule could result
+in a deadlocked connection,
+although deadlock is probably unlikely unless either
+the transport layer has very little buffering or the client attempts to
+send large numbers of requests without ever reading replies or checking for
+errors and events.
+</para>
+<para>
+Whether or not a server is implemented with internal concurrency,
+the overall effect must be as if individual requests are executed to completion
+in some serial order,
+and requests from a given connection must be executed in delivery order
+(that is, the total execution order is a shuffle of the individual streams).
+The execution of a request includes validating all arguments,
+collecting all data for any reply,
+and generating and queueing all required events.
+However,
+it does not include the actual transmission of the reply and the events.
+In addition, the effect of any other cause that can generate multiple events
+(for example, activation of a grab or pointer motion) must effectively generate
+and queue all required events indivisibly with respect to all other causes
+and requests.
+For a request from a given client,
+any events destined for that client that are caused by executing the request
+must be sent to the client before any reply or error is sent.
+</para>
+</chapter>
+</part>
diff --git a/specs/x11protocol.xml b/specs/x11protocol.xml
new file mode 100644
index 0000000..87ac555
--- /dev/null
+++ b/specs/x11protocol.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
+
+
+<book id="x11protocol">
+
+<bookinfo>
+ <title>X Window System Protocol</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <author>
+ <firstname>Robert</firstname>
+ <othername>W.</othername>
+ <surname>Scheifler</surname>
+ <affiliation><orgname>X Consortium, Inc.</orgname></affiliation>
+ </author>
+ <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
+ <releaseinfo>Version 1.0</releaseinfo>
+ <copyright><year>1986</year><year>1987</year><year>1988</year><year>1994</year><year>2004</year>
+ <holder>The Open Group</holder>
+ </copyright>
+
+<legalnotice>
+
+<para>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+</para>
+<para>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+</para>
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+</para>
+<para>
+Except as contained in this notice, the name of the Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the Open Group.
+</para>
+<para>X Window System is a trademark of The Open Group.</para>
+</legalnotice>
+</bookinfo>
+
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sect1-9.xml"
+ xpointer="xpointer(/part/*)"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="keysyms.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="encoding.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glossary.xml"/>
+<index id="index" />
+</book>
+
diff --git a/specs/xkbproto.xml b/specs/xkbproto.xml
new file mode 100644
index 0000000..20f98d5
--- /dev/null
+++ b/specs/xkbproto.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book
+ PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
+
+<book id="xkbproto">
+
+<bookinfo>
+ <title>The X Keyboard Extension: Protocol Specification</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <author>
+ <firstname>Erik</firstname>
+ <surname>Fortune</surname>
+ <affiliation><orgname>Silicon Graphics, Inc</orgname></affiliation>
+ </author>
+ <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
+ <releaseinfo>Version 1.0</releaseinfo>
+ <copyright><year>1995</year><year>1996</year>
+ <holder>X Consortium Inc.</holder>
+ <holder>Silicon Graphics Inc.</holder>
+ <holder>Hewlett-Packard Company</holder>
+ <holder>Digital Equipment Corporation</holder>
+ </copyright>
+<legalnotice>
+<para>
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+</para>
+<para>
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+</para>
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+</para>
+<para>
+Except as contained in this notice, the names of the X Consortium, Silicon Graphics Inc., Hewlett-Packard Company, and Digital Equipment Corporation shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
+</para>
+</legalnotice>
+
+</bookinfo>
+
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acknowledgements.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch01.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch02.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch03.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch04.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch05.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch06.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch07.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch08.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch09.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch10.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch11.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch12.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch13.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch14.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch15.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ch16.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appA.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appB.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appC.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appD.xml"/>
+
+<!--
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="credits.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glossary.xml"/>
+-->
+</book>
diff --git a/x11proto/.gitignore b/x11proto/.gitignore
new file mode 100644
index 0000000..70368c0
--- /dev/null
+++ b/x11proto/.gitignore
@@ -0,0 +1,82 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for x11proto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
+Xfuncproto.h
+Xpoll.h
+do-not-use-config.h
+do-not-use-config.h.in
diff --git a/x11proto/AUTHORS b/x11proto/AUTHORS
new file mode 100644
index 0000000..1bfcc43
--- /dev/null
+++ b/x11proto/AUTHORS
@@ -0,0 +1,23 @@
+The architect of the X11 core protocol was Bob Scheifler of MIT LCS, with
+significant contributions from Jim Gettys, Phil Karlton and Scott
+McGregor of Digital, Dave Rosenthal of Sun, and many others of
+the xpert mailing list.
+
+The original sample server implementation of the X11 protocol was
+implemented by Phil Karlton and Susan Angebrandt doing the device
+independent part of the server, with Raymond Drewry and Todd Newman of
+Digital Equipment Corporation, doing the mi and original ddx
+implementation; their feedback was vital to a good design, along with
+that of the more than 100 alpha and beta testers who bravely tested
+the X11 core design.
+
+The X11 protocol library (Xlib) was built principally by Jim Gettys of
+Digital and MIT Project Athena, with assistance from Ron Newman of MIT
+Project Athena.
+
+Our thanks to those at MIT, Digital Equipment Corporation, Hewlett-Packard,
+IBM, and many others who had faith in us reimplementing X from first
+principles.
+
+If there are mistakes here, they are mine; entirely possible after
+over 15 years. - Jim Gettys
diff --git a/x11proto/COPYING b/x11proto/COPYING
new file mode 100644
index 0000000..32cb88f
--- /dev/null
+++ b/x11proto/COPYING
@@ -0,0 +1,108 @@
+Copyright (c) 1991, Oracle and/or its affiliates. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+
+Copyright 1985, 1987, 1988, 1990, 1991, 1993-1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+The X Window System is a Trademark of The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+
+Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts.
+Copyright 1989 by Hewlett-Packard Company.
+
+ All Rights Reserved
+
+Permission to use, duplicate, change, and distribute this software and
+its documentation for any purpose and without fee is granted, provided
+that the above copyright notice appear in such copy and that this
+copyright notice appear in all supporting documentation, and that the
+names of Apollo Computer Inc., the Hewlett-Packard Company, or the X
+Consortium not be used in advertising or publicity pertaining to
+distribution of the software without written prior permission.
+
+HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD
+TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. Hewlett-Packard shall not be liable for errors
+contained herein or direct, indirect, special, incidental or
+consequential damages in connection with the furnishing,
+performance, or use of this material.
+
+
+Copyright (c) 1999 The XFree86 Project Inc.
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The XFree86 Project
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from The XFree86 Project Inc.
diff --git a/x11proto/Makefile.am b/x11proto/Makefile.am
new file mode 100644
index 0000000..e9b30cf
--- /dev/null
+++ b/x11proto/Makefile.am
@@ -0,0 +1,49 @@
+SUBDIRS=specs
+
+xprotodir = $(includedir)/X11
+xproto_HEADERS = \
+ ap_keysym.h \
+ DECkeysym.h \
+ HPkeysym.h \
+ keysymdef.h \
+ keysym.h \
+ Sunkeysym.h \
+ Xalloca.h \
+ Xarch.h \
+ Xatom.h \
+ Xdefs.h \
+ XF86keysym.h \
+ Xfuncs.h \
+ X.h \
+ Xmd.h \
+ Xosdefs.h \
+ Xos.h \
+ Xos_r.h \
+ Xproto.h \
+ Xprotostr.h \
+ Xthreads.h \
+ Xw32defs.h \
+ XWDFile.h \
+ Xwindows.h \
+ Xwinsock.h
+
+nodist_xproto_HEADERS = \
+ Xfuncproto.h \
+ Xpoll.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xproto.pc
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
diff --git a/x11proto/README b/x11proto/README
new file mode 100644
index 0000000..436f07b
--- /dev/null
+++ b/x11proto/README
@@ -0,0 +1,32 @@
+ X Window System Core Protocol
+
+This package provides the headers and specification documents defining
+the X Window System Core Protocol, Version 11.
+
+It also includes a number of headers that aren't purely protocol related,
+but are depended upon by many other X Window System packages to provide
+common definitions and porting layer.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/x11proto
+
+ http://cgit.freedesktop.org/xorg/proto/x11proto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/x11proto/autogen.sh b/x11proto/autogen.sh
new file mode 100755
index 0000000..e622af6
--- /dev/null
+++ b/x11proto/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+srcdir=`dirname "$0"`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd "$srcdir"
+
+autoreconf -v --install || exit 1
+cd "$ORIGDIR" || exit $?
+
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+ git config --local format.subjectPrefix "PATCH x11proto"
+
+if test -z "$NOCONFIGURE"; then
+ exec "$srcdir"/configure "$@"
+fi
diff --git a/x11proto/configure.ac b/x11proto/configure.ac
new file mode 100644
index 0000000..2b91a9d
--- /dev/null
+++ b/x11proto/configure.ac
@@ -0,0 +1,217 @@
+AC_PREREQ([2.60])
+AC_INIT([Xproto], [7.0.31],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+
+# Require xorg-macros minimum of 1.12 for DocBook external references
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.12)
+XORG_DEFAULT_OPTIONS
+XORG_ENABLE_SPECS
+XORG_WITH_XMLTO(0.0.22)
+XORG_WITH_FOP
+XORG_WITH_XSLTPROC
+XORG_CHECK_SGML_DOCTOOLS(1.8)
+
+AC_CONFIG_HEADERS([do-not-use-config.h])
+AC_CONFIG_HEADERS([Xfuncproto.h])
+
+AC_CANONICAL_HOST
+
+m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
+
+# Check for enable/disable options
+AC_ARG_ENABLE(function-prototypes,
+ AS_HELP_STRING([--enable-function-prototypes],
+ [force function prototypes (default: auto)]),
+ [FUNCPROTO=$enableval], [FUNCPROTO=auto])
+AC_ARG_ENABLE(varargs-prototypes,
+ AS_HELP_STRING([--enable-varargs-prototypes],
+ [varargs prototypes are supported (default: auto)]),
+ [VAPROTO=$enableval], [VAPROTO=auto])
+AC_ARG_ENABLE(const-prototypes,
+ AS_HELP_STRING([--enable-const-prototypes],
+ [const is supported (default: auto)]),
+ [CONSTPROTO=$enableval], [CONSTPROTO=auto])
+AC_ARG_ENABLE(nested-prototypes,
+ AS_HELP_STRING([--enable-nested-prototypes],
+ [nested prototypes are supported (default: auto)]),
+ [NESTEDPROTO=$enableval], [NESTEDPROTO=auto])
+AC_ARG_ENABLE(wide-prototypes,
+ AS_HELP_STRING([--enable-wide-prototypes],
+ [widen function prototypes (default: auto)]),
+ [WIDEPROTO=$enableval], [WIDEPROTO=auto])
+
+
+AC_CHECK_HEADERS([sys/select.h sys/param.h sys/types.h sys/time.h])
+
+# Handle Xpoll.h.in
+# Avoid determining fds_bits on WIN32 hosts (not including cygwin)
+case $host_os in
+ mingw*) fds_bits_found=true;;
+ *) fds_bits_found=false;;
+esac
+
+if test "x$fds_bits_found" = xfalse ; then
+ AC_CHECK_MEMBER(fd_set.fds_bits,
+ [
+ fds_bits_found=plain
+ USE_FDS_BITS="fds_bits"
+ ],,
+ [
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+ ])
+fi
+
+if test "x$fds_bits_found" = xfalse ; then
+ AC_CHECK_MEMBER(fd_set.__fds_bits,
+ [
+ fds_bits_found=underscores
+ USE_FDS_BITS="__fds_bits"
+ ],,
+ [
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+ ])
+fi
+
+if test "x$fds_bits_found" = xfalse ; then
+ AC_MSG_ERROR([Could not determine how to access the fds_bits or equivalent
+ structure in fd_set on your platform.])
+fi
+
+AC_SUBST([USE_FDS_BITS])
+
+
+# Handle Xfuncproto.h
+AC_MSG_CHECKING([whether const prototypes are supported])
+if test "x$CONSTPROTO" = xauto; then
+ case $host_os in
+ linux*) CONSTPROTO=yes ;;
+ freebsd*) CONSTPROTO=yes ;;
+ netbsd*) CONSTPROTO=yes ;;
+ openbsd*) CONSTPROTO=yes ;;
+ solaris*) CONSTPROTO=yes ;;
+ *) CONSTPROTO=no ;;
+ esac
+fi
+AC_MSG_RESULT([$CONSTPROTO])
+
+AC_MSG_CHECKING([whether varargs prototypes are supported])
+if test "x$VAPROTO" = xauto; then
+ case $host_os in
+ linux*) VAPROTO=yes ;;
+ freebsd*) VAPROTO=yes ;;
+ netbsd*) VAPROTO=yes ;;
+ openbsd*) VAPROTO=yes ;;
+ solaris*) VAPROTO=yes ;;
+ *) VAPROTO=no ;;
+ esac
+fi
+AC_MSG_RESULT([$VAPROTO])
+
+AC_MSG_CHECKING([whether nested prototypes are supported])
+if test "x$NESTEDPROTO" = xauto; then
+ case $host_os in
+ linux*) NESTEDPROTO=yes ;;
+ freebsd*) NESTEDPROTO=yes ;;
+ netbsd*) NESTEDPROTO=yes ;;
+ openbsd*) NESTEDPROTO=yes ;;
+ solaris*) NESTEDPROTO=yes ;;
+ *) NESTEDPROTO=no ;;
+ esac
+fi
+AC_MSG_RESULT([$NESTEDPROTO])
+
+AC_MSG_CHECKING([whether to force function prototypes])
+if test "x$FUNCPROTO" = xauto; then
+ case $host_os in
+ linux*) FUNCPROTO=yes ;;
+ freebsd*) FUNCPROTO=yes ;;
+ netbsd*) FUNCPROTO=yes ;;
+ openbsd*) FUNCPROTO=yes ;;
+ *)
+ if test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+ FUNCPROTO=yes
+ else
+ FUNCPROTO=no
+ fi
+ ;;
+ esac
+fi
+AC_MSG_RESULT([$FUNCPROTO])
+
+# Logic for this was taken from Imake.tmpl
+if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [15], [FUNCPROTO])
+else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [11], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [9], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [7], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$CONSTPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [5], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [3], [FUNCPROTO])
+ else
+ if test "x$FUNCPROTO" = xyes; then
+ AC_DEFINE(FUNCPROTO, [], [FUNCPROTO])
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+AC_MSG_CHECKING([whether to widen function prototypes])
+if test "x$WIDEPROTO" = xauto; then
+ case $host_os in
+ linux*) WIDEPROTO=no ;;
+ freebsd*) WIDEPROTO=no ;;
+ netbsd*) WIDEPROTO=no ;;
+ openbsd*) WIDEPROTO=no ;;
+ *) WIDEPROTO=yes ;;
+ esac
+fi
+AC_MSG_RESULT([$WIDEPROTO])
+
+if test "x$WIDEPROTO" = xno; then
+ AC_DEFINE(NARROWPROTO, [], [Narrow prototypes])
+fi
+
+
+AC_CONFIG_FILES([Makefile
+ specs/Makefile
+ specs/SIAddresses/Makefile
+ Xpoll.h
+ xproto.pc])
+AC_OUTPUT
diff --git a/x11proto/docbook.am b/x11proto/docbook.am
new file mode 100644
index 0000000..bba4d54
--- /dev/null
+++ b/x11proto/docbook.am
@@ -0,0 +1,105 @@
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# Variables set by the calling Makefile:
+# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
+# docbook: the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Users Documentation and Functional Specifications.
+# Do not use for Developer Documentation which is not installed and does not require olink.
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# DocBook/XML generated output formats to be installed
+shelf_DATA =
+
+# DocBook/XML file with chapters, appendix and images it includes
+dist_shelf_DATA = $(docbook) $(chapters)
+
+if HAVE_XMLTO
+if HAVE_STYLESHEETS
+
+XMLTO_SEARCHPATH_FLAGS = \
+ --searchpath "$(XORG_SGML_PATH)/X11" \
+ --searchpath "$(abs_top_builddir)"
+XMLTO_HTML_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XMLTO_HTML_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_HTML_STYLESHEET_FLAGS) \
+ $(XMLTO_HTML_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.html)
+%.html: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
+
+if HAVE_XMLTO_TEXT
+
+shelf_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+if HAVE_FOP
+XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
+XMLTO_PDF_OLINK_FLAGS = \
+ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
+ --stringparam current.docid="$(<:.xml=)"
+XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+XMLTO_FO_FLAGS = \
+ $(XMLTO_SEARCHPATH_FLAGS) \
+ $(XMLTO_FO_STYLESHEET_FLAGS) \
+ $(XMLTO_FO_IMAGEPATH_FLAGS) \
+ $(XMLTO_PDF_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.pdf)
+%.pdf: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+
+shelf_DATA += $(docbook:.xml=.ps)
+%.ps: %.xml $(chapters)
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+
+# Generate documents cross-reference target databases
+if HAVE_XSLTPROC
+
+XSLT_SEARCHPATH_FLAGS = \
+ --path "$(XORG_SGML_PATH)/X11" \
+ --path "$(abs_top_builddir)"
+XSLT_OLINK_FLAGS = \
+ --stringparam targets.filename "$@" \
+ --stringparam collect.xref.targets "only" \
+ --stringparam olink.base.uri "$(@:.db=)"
+
+XSLT_HTML_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XSLT_PDF_FLAGS = \
+ $(XSLT_SEARCHPATH_FLAGS) \
+ $(XSLT_OLINK_FLAGS) \
+ --nonet --xinclude \
+ $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+shelf_DATA += $(docbook:.xml=.html.db)
+%.html.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
+
+shelf_DATA += $(docbook:.xml=.pdf.db)
+%.pdf.db: %.xml $(chapters)
+ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
+
+endif HAVE_XSLTPROC
+endif HAVE_STYLESHEETS
+endif HAVE_XMLTO
+
+CLEANFILES = $(shelf_DATA)
diff --git a/x11proto/specs/.gitignore b/x11proto/specs/.gitignore
new file mode 100644
index 0000000..0d40e0d
--- /dev/null
+++ b/x11proto/specs/.gitignore
@@ -0,0 +1,5 @@
+*.html
+*.pdf
+*.ps
+*.txt
+*.db
diff --git a/x11proto/specs/Makefile.am b/x11proto/specs/Makefile.am
new file mode 100644
index 0000000..c7c4fe5
--- /dev/null
+++ b/x11proto/specs/Makefile.am
@@ -0,0 +1,21 @@
+SUBDIRS = SIAddresses
+
+if ENABLE_SPECS
+
+# Main DocBook/XML files (DOCTYPE book)
+docbook = x11protocol.xml
+
+# Included chapters, appendix, images
+chapters = \
+ encoding.xml \
+ glossary.xml \
+ keysyms.xml \
+ sect1-9.xml
+
+# The location where the DocBook/XML files and their generated formats are installed
+shelfdir = $(docdir)
+
+# Generate DocBook/XML output formats with or without stylesheets
+include $(top_srcdir)/docbook.am
+
+endif ENABLE_SPECS
diff --git a/xcalibrateproto.h b/xcalibrateproto.h
new file mode 100644
index 0000000..feded32
--- /dev/null
+++ b/xcalibrateproto.h
@@ -0,0 +1,120 @@
+/*
+ * $Id: xcalibrateproto.h,v 1.1.1.1 2004/06/02 19:18:47 pb Exp $
+ *
+ * Copyright © 2003 Philip Blundell
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Philip Blundell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Philip Blundell makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef XCALIBRATEPROTO_H
+#define XCALIBRATEPROTO_H
+
+/*
+ * requests and replies
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 xCalibrateReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xXCalibrateQueryVersionReq;
+
+#define sz_xXCalibrateQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXCalibrateQueryVersionReply;
+
+#define sz_xXCalibrateQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xCalibrateReqType;
+ CARD16 length B16;
+ CARD16 on B16;
+ CARD16 pad B16;
+} xXCalibrateRawModeReq;
+
+#define sz_xXCalibrateRawModeReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 status;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xXCalibrateRawModeReply;
+
+#define sz_xXCalibrateRawModeReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xCalibrateReqType;
+ CARD16 length B16;
+ CARD32 x B32;
+ CARD32 y B32;
+} xXCalibrateScreenToCoordReq;
+
+#define sz_xXCalibrateScreenToCoordReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 x;
+ CARD32 y;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXCalibrateScreenToCoordReply;
+
+#define sz_xXCalibrateScreenToCoordReply 32
+
+/* Events */
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD16 x;
+ CARD16 y;
+ CARD16 pressure;
+ CARD16 pad2;
+} xXCalibrateRawTouchscreenEvent;
+
+#define sz_xXCalibrateRawTouchscreenEvent 12
+
+#endif
diff --git a/xcalibrateproto.pc.in b/xcalibrateproto.pc.in
new file mode 100644
index 0000000..f17f8d7
--- /dev/null
+++ b/xcalibrateproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XCalibrate
+Description: XCalibrate extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/xcalibratewire.h b/xcalibratewire.h
new file mode 100644
index 0000000..0a1c904
--- /dev/null
+++ b/xcalibratewire.h
@@ -0,0 +1,44 @@
+/*
+ * $Id: xcalibratewire.h,v 1.1.1.1 2004/06/02 19:18:47 pb Exp $
+ *
+ * Copyright © 2003 Philip Blundell
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Philip Blundell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Philip Blundell makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef XCALIBRATEWIRE_H
+#define XCALIBRATEWIRE_H
+
+#define XCALIBRATE_MAJOR_VERSION 0
+#define XCALIBRATE_MINOR_VERSION 1
+#define XCALIBRATE_NAME "XCALIBRATE"
+
+#define X_XCalibrateQueryVersion 0
+#define X_XCalibrateRawMode 1
+#define X_XCalibrateScreenToCoord 2
+
+#define XCalibrateNumberRequests (X_XCalibrateScreenToCoord + 1)
+
+#define X_XCalibrateRawTouchscreen 0
+
+#define XCalibrateNumberEvents (X_XCalibrateRawTouchscreen + 1)
+
+#define XCalibrateNumberErrors 0
+
+#endif
diff --git a/xfixesproto.h b/xfixesproto.h
new file mode 100644
index 0000000..fcf409a
--- /dev/null
+++ b/xfixesproto.h
@@ -0,0 +1,551 @@
+/*
+ * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/*
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _XFIXESPROTO_H_
+#define _XFIXESPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/xfixeswire.h>
+#include <X11/extensions/shapeconst.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+#define Picture CARD32
+
+/*************** Version 1 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesReq;
+
+/*
+ * requests and replies
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xXFixesQueryVersionReq;
+
+#define sz_xXFixesQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXFixesQueryVersionReply;
+
+#define sz_xXFixesQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ BYTE mode; /* SetModeInsert/SetModeDelete*/
+ BYTE target; /* SaveSetNearest/SaveSetRoot*/
+ BYTE map; /* SaveSetMap/SaveSetUnmap */
+ BYTE pad1;
+ Window window;
+} xXFixesChangeSaveSetReq;
+
+#define sz_xXFixesChangeSaveSetReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+ Atom selection B32;
+ CARD32 eventMask B32;
+} xXFixesSelectSelectionInputReq;
+
+#define sz_xXFixesSelectSelectionInputReq 16
+
+typedef struct {
+ CARD8 type;
+ CARD8 subtype;
+ CARD16 sequenceNumber B16;
+ Window window B32;
+ Window owner B32;
+ Atom selection B32;
+ Time timestamp B32;
+ Time selectionTimestamp B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xXFixesSelectionNotifyEvent;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+ CARD32 eventMask B32;
+} xXFixesSelectCursorInputReq;
+
+#define sz_xXFixesSelectCursorInputReq 12
+
+typedef struct {
+ CARD8 type;
+ CARD8 subtype;
+ CARD16 sequenceNumber B16;
+ Window window B32;
+ CARD32 cursorSerial B32;
+ Time timestamp;
+ Atom name B32; /* Version 2 */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xXFixesCursorNotifyEvent;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesGetCursorImageReq;
+
+#define sz_xXFixesGetCursorImageReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 xhot B16;
+ CARD16 yhot B16;
+ CARD32 cursorSerial B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xXFixesGetCursorImageReply;
+
+#define sz_xXFixesGetCursorImageReply 32
+
+/*************** Version 2 ******************/
+
+#define Region CARD32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ /* LISTofRECTANGLE */
+} xXFixesCreateRegionReq;
+
+#define sz_xXFixesCreateRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Pixmap bitmap B32;
+} xXFixesCreateRegionFromBitmapReq;
+
+#define sz_xXFixesCreateRegionFromBitmapReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Window window B32;
+ CARD8 kind;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xXFixesCreateRegionFromWindowReq;
+
+#define sz_xXFixesCreateRegionFromWindowReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ GContext gc B32;
+} xXFixesCreateRegionFromGCReq;
+
+#define sz_xXFixesCreateRegionFromGCReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Picture picture B32;
+} xXFixesCreateRegionFromPictureReq;
+
+#define sz_xXFixesCreateRegionFromPictureReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+} xXFixesDestroyRegionReq;
+
+#define sz_xXFixesDestroyRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ /* LISTofRECTANGLE */
+} xXFixesSetRegionReq;
+
+#define sz_xXFixesSetRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ Region destination B32;
+} xXFixesCopyRegionReq;
+
+#define sz_xXFixesCopyRegionReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source1 B32;
+ Region source2 B32;
+ Region destination B32;
+} xXFixesCombineRegionReq,
+ xXFixesUnionRegionReq,
+ xXFixesIntersectRegionReq,
+ xXFixesSubtractRegionReq;
+
+#define sz_xXFixesCombineRegionReq 16
+#define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq
+#define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq
+#define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ Region destination B32;
+} xXFixesInvertRegionReq;
+
+#define sz_xXFixesInvertRegionReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ INT16 dx B16, dy B16;
+} xXFixesTranslateRegionReq;
+
+#define sz_xXFixesTranslateRegionReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ Region destination B32;
+} xXFixesRegionExtentsReq;
+
+#define sz_xXFixesRegionExtentsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+} xXFixesFetchRegionReq;
+
+#define sz_xXFixesFetchRegionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXFixesFetchRegionReply;
+
+#define sz_xXFixesFetchRegionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ GContext gc B32;
+ Region region B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xXFixesSetGCClipRegionReq;
+
+#define sz_xXFixesSetGCClipRegionReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window dest;
+ BYTE destKind;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ INT16 xOff B16, yOff B16;
+ Region region;
+} xXFixesSetWindowShapeRegionReq;
+
+#define sz_xXFixesSetWindowShapeRegionReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Picture picture B32;
+ Region region B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xXFixesSetPictureClipRegionReq;
+
+#define sz_xXFixesSetPictureClipRegionReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor cursor B32;
+ CARD16 nbytes B16;
+ CARD16 pad B16;
+} xXFixesSetCursorNameReq;
+
+#define sz_xXFixesSetCursorNameReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor cursor B32;
+} xXFixesGetCursorNameReq;
+
+#define sz_xXFixesGetCursorNameReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom atom B32;
+ CARD16 nbytes B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXFixesGetCursorNameReply;
+
+#define sz_xXFixesGetCursorNameReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesGetCursorImageAndNameReq;
+
+#define sz_xXFixesGetCursorImageAndNameReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 xhot B16;
+ CARD16 yhot B16;
+ CARD32 cursorSerial B32;
+ Atom cursorName B32;
+ CARD16 nbytes B16;
+ CARD16 pad B16;
+} xXFixesGetCursorImageAndNameReply;
+
+#define sz_xXFixesGetCursorImageAndNameReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor source B32;
+ Cursor destination B32;
+} xXFixesChangeCursorReq;
+
+#define sz_xXFixesChangeCursorReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor source B32;
+ CARD16 nbytes;
+ CARD16 pad;
+} xXFixesChangeCursorByNameReq;
+
+#define sz_xXFixesChangeCursorByNameReq 12
+
+/*************** Version 3 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ Region destination B32;
+ CARD16 left B16;
+ CARD16 right B16;
+ CARD16 top B16;
+ CARD16 bottom B16;
+} xXFixesExpandRegionReq;
+
+#define sz_xXFixesExpandRegionReq 20
+
+/*************** Version 4.0 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+} xXFixesHideCursorReq;
+
+#define sz_xXFixesHideCursorReq sizeof(xXFixesHideCursorReq)
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window window B32;
+} xXFixesShowCursorReq;
+
+#define sz_xXFixesShowCursorReq sizeof(xXFixesShowCursorReq)
+
+/*************** Version 5.0 ******************/
+
+#define Barrier CARD32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Barrier barrier B32;
+ Window window B32;
+ INT16 x1 B16;
+ INT16 y1 B16;
+ INT16 x2 B16;
+ INT16 y2 B16;
+ CARD32 directions;
+ CARD16 pad B16;
+ CARD16 num_devices B16;
+ /* array of CARD16 devices */
+} xXFixesCreatePointerBarrierReq;
+
+#define sz_xXFixesCreatePointerBarrierReq 28
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Barrier barrier B32;
+} xXFixesDestroyPointerBarrierReq;
+
+#define sz_xXFixesDestroyPointerBarrierReq 8
+
+#undef Barrier
+#undef Region
+#undef Picture
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _XFIXESPROTO_H_ */
diff --git a/xfixeswire.h b/xfixeswire.h
new file mode 100644
index 0000000..432349a
--- /dev/null
+++ b/xfixeswire.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/*
+ * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifndef _XFIXESWIRE_H_
+#define _XFIXESWIRE_H_
+
+#define XFIXES_NAME "XFIXES"
+#define XFIXES_MAJOR 5
+#define XFIXES_MINOR 0
+
+/*************** Version 1 ******************/
+#define X_XFixesQueryVersion 0
+#define X_XFixesChangeSaveSet 1
+#define X_XFixesSelectSelectionInput 2
+#define X_XFixesSelectCursorInput 3
+#define X_XFixesGetCursorImage 4
+/*************** Version 2 ******************/
+#define X_XFixesCreateRegion 5
+#define X_XFixesCreateRegionFromBitmap 6
+#define X_XFixesCreateRegionFromWindow 7
+#define X_XFixesCreateRegionFromGC 8
+#define X_XFixesCreateRegionFromPicture 9
+#define X_XFixesDestroyRegion 10
+#define X_XFixesSetRegion 11
+#define X_XFixesCopyRegion 12
+#define X_XFixesUnionRegion 13
+#define X_XFixesIntersectRegion 14
+#define X_XFixesSubtractRegion 15
+#define X_XFixesInvertRegion 16
+#define X_XFixesTranslateRegion 17
+#define X_XFixesRegionExtents 18
+#define X_XFixesFetchRegion 19
+#define X_XFixesSetGCClipRegion 20
+#define X_XFixesSetWindowShapeRegion 21
+#define X_XFixesSetPictureClipRegion 22
+#define X_XFixesSetCursorName 23
+#define X_XFixesGetCursorName 24
+#define X_XFixesGetCursorImageAndName 25
+#define X_XFixesChangeCursor 26
+#define X_XFixesChangeCursorByName 27
+/*************** Version 3 ******************/
+#define X_XFixesExpandRegion 28
+/*************** Version 4 ******************/
+#define X_XFixesHideCursor 29
+#define X_XFixesShowCursor 30
+/*************** Version 5 ******************/
+#define X_XFixesCreatePointerBarrier 31
+#define X_XFixesDestroyPointerBarrier 32
+
+#define XFixesNumberRequests (X_XFixesDestroyPointerBarrier+1)
+
+/* Selection events share one event number */
+#define XFixesSelectionNotify 0
+
+/* Within the selection, the 'subtype' field distinguishes */
+#define XFixesSetSelectionOwnerNotify 0
+#define XFixesSelectionWindowDestroyNotify 1
+#define XFixesSelectionClientCloseNotify 2
+
+#define XFixesSetSelectionOwnerNotifyMask (1L << 0)
+#define XFixesSelectionWindowDestroyNotifyMask (1L << 1)
+#define XFixesSelectionClientCloseNotifyMask (1L << 2)
+
+/* There's only one cursor event so far */
+#define XFixesCursorNotify 1
+
+#define XFixesDisplayCursorNotify 0
+
+#define XFixesDisplayCursorNotifyMask (1L << 0)
+
+#define XFixesNumberEvents (2)
+
+/* errors */
+#define BadRegion 0
+#define BadBarrier 1
+#define XFixesNumberErrors (BadBarrier+1)
+
+#define SaveSetNearest 0
+#define SaveSetRoot 1
+
+#define SaveSetMap 0
+#define SaveSetUnmap 1
+
+/*************** Version 2 ******************/
+
+#define WindowRegionBounding 0
+#define WindowRegionClip 1
+
+/*************** Version 5 ******************/
+
+#define BarrierPositiveX (1L << 0)
+#define BarrierPositiveY (1L << 1)
+#define BarrierNegativeX (1L << 2)
+#define BarrierNegativeY (1L << 3)
+
+#endif /* _XFIXESWIRE_H_ */
diff --git a/xproto.pc.in b/xproto.pc.in
new file mode 100644
index 0000000..63ae864
--- /dev/null
+++ b/xproto.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+includex11dir=@includedir@/X11
+
+Name: Xproto
+Description: Xproto headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}