aboutsummaryrefslogtreecommitdiff
path: root/X11/extensions
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 18:18:08 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 18:18:08 +0000
commite445df175688f07d599649591c990d432375c67e (patch)
treefc2295b9683852cab5394a4f187ca0001c987e4a /X11/extensions
parentcbeb9ffa0c58e5e9b012ea3eb17dbf192659627f (diff)
parentcd50a4bbac9375d3cd460bbdf88395f802609daf (diff)
downloadvcxsrv-e445df175688f07d599649591c990d432375c67e.tar.gz
vcxsrv-e445df175688f07d599649591c990d432375c67e.tar.bz2
vcxsrv-e445df175688f07d599649591c990d432375c67e.zip
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Diffstat (limited to 'X11/extensions')
-rw-r--r--X11/extensions/EVI.h36
-rw-r--r--X11/extensions/EVIproto.h96
-rw-r--r--X11/extensions/XI.h24
-rw-r--r--X11/extensions/XI2.h181
-rw-r--r--X11/extensions/XI2proto.h1037
-rw-r--r--X11/extensions/XI2proto.txt1605
-rw-r--r--X11/extensions/XIproto.h1173
-rw-r--r--X11/extensions/ag.h52
-rw-r--r--X11/extensions/agproto.h178
-rw-r--r--X11/extensions/cup.h38
-rw-r--r--X11/extensions/cupproto.h105
-rw-r--r--X11/extensions/dbe.h57
-rw-r--r--X11/extensions/dbeproto.h224
-rw-r--r--X11/extensions/dpmsconst.h43
-rw-r--r--X11/extensions/dpmsproto.h175
-rw-r--r--X11/extensions/fixesproto.pc.in5
-rw-r--r--X11/extensions/geproto.txt83
-rw-r--r--X11/extensions/lbx.h73
-rw-r--r--X11/extensions/lbxproto.h982
-rw-r--r--X11/extensions/mitmiscconst.h38
-rw-r--r--X11/extensions/mitmiscproto.h68
-rw-r--r--X11/extensions/multibufconst.h83
-rw-r--r--X11/extensions/multibufproto.h295
-rw-r--r--X11/extensions/randr.h27
-rw-r--r--X11/extensions/randrproto.h152
-rw-r--r--X11/extensions/randrproto.txt656
-rw-r--r--X11/extensions/render.h23
-rw-r--r--X11/extensions/renderproto.txt170
-rw-r--r--X11/extensions/secur.h61
-rw-r--r--X11/extensions/securproto.h110
-rw-r--r--X11/extensions/shapeconst.h55
-rw-r--r--X11/extensions/shapeproto.h237
-rw-r--r--X11/extensions/shm.h44
-rw-r--r--X11/extensions/shmproto.h187
-rw-r--r--X11/extensions/syncconst.h179
-rw-r--r--X11/extensions/syncproto.h378
-rw-r--r--X11/extensions/xfixesproto.h8
-rw-r--r--X11/extensions/xfixeswire.h4
-rw-r--r--X11/extensions/xtestconst.h41
-rw-r--r--X11/extensions/xtestext1const.h160
-rw-r--r--X11/extensions/xtestext1proto.h221
-rw-r--r--X11/extensions/xtestproto.h124
42 files changed, 8818 insertions, 670 deletions
diff --git a/X11/extensions/EVI.h b/X11/extensions/EVI.h
new file mode 100644
index 000000000..7f3f733e6
--- /dev/null
+++ b/X11/extensions/EVI.h
@@ -0,0 +1,36 @@
+/************************************************************
+Copyright (c) 1997 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 _EVI_H_
+#define _EVI_H_
+
+#define XEVI_TRANSPARENCY_NONE 0
+#define XEVI_TRANSPARENCY_PIXEL 1
+#define XEVI_TRANSPARENCY_MASK 2
+
+#define EVINAME "Extended-Visual-Information"
+
+#define XEVI_MAJOR_VERSION 1 /* current version numbers */
+#define XEVI_MINOR_VERSION 0
+
+#endif
diff --git a/X11/extensions/EVIproto.h b/X11/extensions/EVIproto.h
new file mode 100644
index 000000000..afa282a53
--- /dev/null
+++ b/X11/extensions/EVIproto.h
@@ -0,0 +1,96 @@
+/************************************************************
+Copyright (c) 1997 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 _EVIPROTO_H_
+#define _EVIPROTO_H_
+
+#include <X11/extensions/EVI.h>
+
+#define X_EVIQueryVersion 0
+#define X_EVIGetVisualInfo 1
+
+#define VisualID CARD32
+
+typedef CARD32 VisualID32;
+#define sz_VisualID32 4
+
+typedef struct _xExtendedVisualInfo {
+ VisualID core_visual_id B32;
+ INT8 screen;
+ INT8 level;
+ CARD8 transparency_type;
+ CARD8 pad0;
+ CARD32 transparency_value B32;
+ CARD8 min_hw_colormaps;
+ CARD8 max_hw_colormaps;
+ CARD16 num_colormap_conflicts B16;
+} xExtendedVisualInfo;
+#define sz_xExtendedVisualInfo 16
+
+typedef struct _XEVIQueryVersion {
+ CARD8 reqType; /* always XEVIReqCode */
+ CARD8 xeviReqType; /* always X_EVIQueryVersion */
+ CARD16 length B16;
+} xEVIQueryVersionReq;
+#define sz_xEVIQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of EVI protocol */
+ CARD16 minorVersion B16; /* minor version of EVI protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xEVIQueryVersionReply;
+#define sz_xEVIQueryVersionReply 32
+
+typedef struct _XEVIGetVisualInfoReq {
+ CARD8 reqType; /* always XEVIReqCode */
+ CARD8 xeviReqType; /* always X_EVIGetVisualInfo */
+ CARD16 length B16;
+ CARD32 n_visual B32;
+} xEVIGetVisualInfoReq;
+#define sz_xEVIGetVisualInfoReq 8
+
+typedef struct _XEVIGetVisualInfoReply {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 n_info B32;
+ CARD32 n_conflicts B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xEVIGetVisualInfoReply;
+#define sz_xEVIGetVisualInfoReply 32
+
+#undef VisualID
+
+#endif /* _EVIPROTO_H_ */
diff --git a/X11/extensions/XI.h b/X11/extensions/XI.h
index 51a417514..7b443997c 100644
--- a/X11/extensions/XI.h
+++ b/X11/extensions/XI.h
@@ -106,8 +106,14 @@ SOFTWARE.
#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 INAME "XInputExtension"
#define XI_KEYBOARD "KEYBOARD"
#define XI_MOUSE "MOUSE"
@@ -127,13 +133,18 @@ SOFTWARE.
#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
@@ -153,6 +164,9 @@ SOFTWARE.
#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
@@ -225,6 +239,7 @@ SOFTWARE.
#define ProximityClass 4
#define FocusClass 5
#define OtherClass 6
+#define AttachClass 7
#define KbdFeedbackClass 0
#define PtrFeedbackClass 1
@@ -246,6 +261,10 @@ SOFTWARE.
#define _devicePresence 0
+#define _deviceEnter 0
+#define _deviceLeave 1
+
+/* Device presence notify states */
#define DeviceAdded 0
#define DeviceRemoved 1
#define DeviceEnabled 2
@@ -253,6 +272,7 @@ SOFTWARE.
#define DeviceUnrecoverable 4
#define DeviceControlChanged 5
+/* XI Errors */
#define XI_BadDevice 0
#define XI_BadEvent 1
#define XI_BadMode 2
@@ -268,7 +288,7 @@ SOFTWARE.
* without polluting the namespace.
*/
#ifdef _XSERVER64
-typedef unsigned int XEventClass;
+typedef unsigned int XEventClass;
#else
typedef unsigned long XEventClass;
#endif
diff --git a/X11/extensions/XI2.h b/X11/extensions/XI2.h
new file mode 100644
index 000000000..6ba1377aa
--- /dev/null
+++ b/X11/extensions/XI2.h
@@ -0,0 +1,181 @@
+/*
+ * 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_
+
+/* Indices into the versions[] array (XExtInt.c). Used as a index to
+ * retrieve the minimum version of XI from _XiCheckExtInit.
+ * For indices 0 to 6 see XI.h */
+#ifndef Dont_Check /* defined in XI.h */
+#define Dont_Check 0
+#endif
+#define XInput_2_0 7
+
+
+#define XI_2_Major 2
+#define XI_2_Minor 0
+
+/* Property event flags */
+#define XIPropertyDeleted 0
+#define XIPropertyCreated 1
+#define XIPropertyModified 2
+
+/* 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
+
+/* Passive grab types */
+#define XIGrabtypeButton 0
+#define XIGrabtypeKeycode 1
+#define XIGrabtypeEnter 2
+#define XIGrabtypeFocusIn 3
+
+/* 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
+
+/* 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 */
+#define XIKeyClass 0
+#define XIButtonClass 1
+#define XIValuatorClass 2
+
+/* Device event flags (common) */
+/* Device event flags (key events only) */
+#define XIKeyRepeat (1 << 16)
+/* Device event flags (pointer events only) */
+
+/* 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 + 7) >> 3))
+
+/* 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_LASTEVENT XI_RawMotion
+/* 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)
+
+#endif /* _XI2_H_ */
diff --git a/X11/extensions/XI2proto.h b/X11/extensions/XI2proto.h
new file mode 100644
index 000000000..e6ec190cb
--- /dev/null
+++ b/X11/extensions/XI2proto.h
@@ -0,0 +1,1037 @@
+/*
+ * 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.
+ */
+
+/**
+ * @mainpage
+ * @include XI2proto.txt
+ */
+
+/**
+ * @file XI2proto.h
+ * 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>
+
+/* 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
+
+/**
+ * XI2 Request opcodes
+ * @addtogroup XI2Requests
+ * @{
+ */
+#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
+/*@}*/
+
+/** Number of XI requests */
+#define XI2REQUESTS (X_XIGetSelectedEvents - 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 xXIDeviceInfo
+ * 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.
+ *
+ * @see xXIQueryDeviceReq
+ */
+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;
+
+/**
+ * \struct xXIAnyInfo
+ * Default template for a device class.
+ * A device class is equivalent to a device's capabilities. Multiple classes
+ * are supported per device.
+ *
+ * @see xXIQueryDeviceReq
+ * @see xXIDeviceChangedEvent
+ */
+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).
+ *
+ * @see xXIQueryDeviceReq
+ * @see xXIDeviceChangedEvent
+ */
+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 provide */
+} xXIButtonInfo;
+
+/**
+ * Denotes key capability on a device.
+ * Struct is followed by num_keys * CARD32 that lists the keycodes available
+ * on the device.
+ *
+ * @see xXIQueryDeviceReq
+ * @see xXIDeviceChangedEvent
+ */
+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.
+ *
+ * @see xXIQueryDevice
+ * @see xXIDeviceChangedEvent
+ */
+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;
+
+
+/**
+ * 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)).
+ *
+ * @see XISelectEvents
+ */
+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 *
+ * *
+ *************************************************************************************/
+
+/**
+ * @struct xXIQueryVersionReq
+ * 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
+
+/**
+ * @struct xXIQueryDeviceReq
+ * 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
+
+/**
+ * @struct xXISelectEventsReq
+ * 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
+
+/**
+ * @struct xXIGetSelectedEventsReq
+ * 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
+
+/**
+ * @struct xXIQueryPointerReq
+ * 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
+
+/**
+ * @struct xXIWarpPointerReq
+ * 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;
+ INT16 src_x;
+ INT16 src_y;
+ uint16_t src_width;
+ uint16_t src_height;
+ INT16 dst_x;
+ INT16 dst_y;
+ uint16_t deviceid;
+ uint16_t pad1;
+} xXIWarpPointerReq;
+#define sz_xXIWarpPointerReq 28
+
+/**
+ * @struct xXIChangeCursorReq
+ * 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
+
+/**
+ * @struct xXIChangeHierarchyReq
+ * 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;
+
+
+/**
+ * @struct xXISetClientPointerReq
+ * 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
+
+/**
+ * @struct xXIGetClientPointerReq
+ * 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
+
+/**
+ * @struct xXISetFocusReq
+ * 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
+
+/**
+ * @struct xXIGetDeviceFocusReq
+ * 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
+
+
+/**
+ * @struct xXIGrabDeviceReq
+ * 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
+
+/**
+ * @struct xXIUngrabDeviceReq
+ * 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
+
+
+/**
+ * @struct xXIAllowEventsReq
+ * 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
+
+
+/**
+ * @struct xXIPassiveGrabDeviceReq
+ * 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
+
+/**
+ * @struct xXIPassiveUngrabDeviceReq
+ * 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
+
+/**
+ * @struct xXIListPropertiesReq
+ * 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
+
+/**
+ * @struct xXIChangePropertyReq
+ * 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
+
+/**
+ * @struct xXIDeletePropertyReq
+ * 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
+
+/**
+ * @struct xXIGetPropertyReq
+ * 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
+
+/*************************************************************************************
+ * *
+ * EVENTS *
+ * *
+ *************************************************************************************/
+
+/**
+ * @struct xXIGenericDeviceEvent
+ * 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;
+
+/**
+ * @struct xXIHierarchyEvent
+ * The device hierarchy has been modified. This event includes the device
+ * hierarchy after the modification has been applied.
+ */
+
+/**
+ * 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;
+
+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;
+
+/**
+ * @struct xXIDeviceChangedEvent
+ * 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;
+
+/**
+ * @struct xXIDeviceEvent
+ * Default input event for pointer or keyboard 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;
+
+
+/**
+ * @struct xXIRawEvent
+ * 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 eventtype; /**< ::XI_Motion, ::XI_ButtonPress,
+ ::XI_ButtonRelease, ::XI_KeyPress,
+ ::XI_KeyRelease */
+ uint16_t valuators_len; /**< Length of trailing valuator
+ mask in 4 byte units */
+ uint32_t flags; /**< ::XIKeyRepeat */
+ uint32_t pad2;
+} xXIRawEvent;
+
+/**
+ * @struct xXIEnterEvent
+ * 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;
+
+/**
+ * @struct xXIPropertyEvent
+ * 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 uints */
+ 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;
+
+
+#undef Window
+#undef Time
+#undef Atom
+#undef Cursor
+
+#endif /* _XI2PROTO_H_ */
diff --git a/X11/extensions/XI2proto.txt b/X11/extensions/XI2proto.txt
new file mode 100644
index 000000000..7c41debc8
--- /dev/null
+++ b/X11/extensions/XI2proto.txt
@@ -0,0 +1,1605 @@
+
+ The X Input Extension
+ Version 2.0
+
+ Peter Hutterer
+ peter.hutterer@redhat.com
+ Red Hat, Inc.
+
+
+
+1. 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 4.
+- use of multiple independent master devices (Multi-Poiner 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).
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+2. 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 }
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+3. Interoperability between version 1.x and 2.0
+
+FIXME
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+4. The Master/Slave device hierarchy
+
+XI2 introduces a device hierarchy split up into so-called Master Devices (MD)
+and Slave Devices (SD).
+
+4.1 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).
+
+4.2 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 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.
+
+4.3 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.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+5. 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 4 for more information.
+
+EVENTMASK
+ An EVENTMASK is a binary mask defined as (1 << event type).
+ A SETofEVENTMASK is a binary OR of zero or more EVENTMASK.
+
+FP1616
+ Fixed point decimal in 16.16 format as one INT16 and one CARD16.
+ The INT16 contains the integral part, the CARD32 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.
+
+VALUATORMASK
+ A binary mask defined as (1 << valuator number).
+ A SETofVALUATORMASK is a binary OR of zero or more VALUATORMASK.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+6. Errors
+
+Errors are sent using core X error reports.
+
+Device
+ A value for a DEVICE argument does not specify a valid DEVICE.
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+7. 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.
+
+7.1 Requests introduced in version 2.0
+
+ ┌───
+ 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 clients 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.
+
+ ┌───
+ 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, AXISCLASS }
+
+ BUTTONCLASS { type: ButtonClass
+ length: CARD16
+ sourceid: CARD16
+ buttons_len: CARD16
+ state: SETofBUTTONMASK
+ labels: LISTofATOM }
+
+ KEYCLASS { type: KeyClass
+ length: CARD16
+ sourceid: CARD16
+ num_keys: CARD16
+ keys: LISTofCARD32 }
+
+ AXISCLASS { type: AxisClass
+ length: CARD16
+ sourceid: CARD16
+ axisnumber: CARD16
+ label: ATOM
+ min: FP3232
+ max: FP3232
+ value: FP3232
+ resolution: CARD32 }
+
+ XIQueryDevices 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.
+ 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 and potential button mappings are ignored.
+ state
+ The current button mask for this device. Each bit representing a
+ button is 1 if this button is logically down, or 0 otherwise. State 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.
+
+ AxisClass:
+ type
+ Always AxisClass.
+ length
+ Length in 4 byte units.
+ sourceid
+ The device this class originates from.
+ axisnumber
+ Axis number of this axis. The axis 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.
+
+ ┌───
+ XISelectEvents
+ window: Window
+ num_masks: CARD16
+ masks: LISTofEVENTMASK
+
+ └───
+
+ EVENTMASK { deviceid: DEVICE,
+ mask_len: CARD16,
+ mask: SETofEVENTMASK
+
+ window
+ The window to select the events on.
+ num_masks
+ Number of items in mask.
+ 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.
+
+ ┌───
+ XIGetSelectedEvents
+ window: Window
+ ▶
+ num_masks: CARD16
+ masks: LISTofEVENTMASK
+ └───
+
+
+ window
+ The window to select the events on.
+ num_masks
+ Number of items in mask.
+ masks
+ Selected event masks by this client.
+
+ Masks are returned on a per-device basis, with masks for 'AllDevices' and
+ 'AllMasterDevices' returned separately.
+
+ If 'num_masks' is 0, no events have been selected by this client on the
+ given window.
+
+ ┌───
+ 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.
+
+ ┌───
+ 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.
+
+ ┌───
+ 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.
+
+ ┌───
+ 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 MD/SD device
+ hierarchy (see Section 4).
+
+ num_changes
+ The number of changes to apply to the current hierarchy.
+ changes
+ The list of changes.
+
+ The server processes the changes one by one and applies changes
+ 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.
+
+ 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.
+
+ 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.
+
+ ┌───
+ 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.
+
+ 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 returned.
+
+ If window does not specify a valid window or client ID and is not None, a
+ BadWindow error is returned.
+
+ ┌───
+ 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 an explicitly set ClientPointer.
+ deviceid
+ The master pointer that acts as a ClientPointer if 'set' is TRUE.
+
+ ┌───
+ 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.
+
+ ┌───
+ XIGetFocus
+ deviceid: DEVICEID
+ ▶
+ focus: Window
+ └───
+
+ Return the current focus window for the given device.
+
+ ┌───
+ 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: SETofEVENTMASK
+ ▶
+ 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.
+
+ 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.
+
+ ┌───
+ XIUngrabDevice
+ deviceid: DEVICEID
+ time: TIMESTAMP or CurrentTime
+ └───
+
+ This request releases the device if this client has it actively grabbed
+ (from either XIGrabDevice, XIGrabDeviceKey or XIGrabDeviceButton) 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.
+
+ ┌───
+ XIAllowEvents:
+ deviceid: DEVICEID
+ time: TIMESTAMP or CurrentTime
+ event_mode: { AsyncDevice, SyncDevice,
+ AsyncPairedDevice, SyncPairedDevice,
+ ReplayDevice, AsyncPair, SyncPair }
+ └───
+
+ The XIAllowEvents request releases some queued events if the client
+ has caused a device to freeze.
+
+ 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.
+
+ 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:
+ 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.
+
+ ┌───
+ XIPassiveGrabDevice
+ deviceid: DEVICEID
+ detail: CARD32
+ grab_type: GRABTYPE
+ grab_window: Window
+ cursor: Cursor
+ owner_events: Bool
+ grab_mode: { Synchronous, Asynchronous }
+ paired_device_mode: { Synchronous, Asynchronous }
+ num_modifiers: INT16
+ mask_len: CARD16
+ masks: SETofEVENTMASK
+ modifiers: CARD32 or GrabAnyModifier
+ ▶
+ num_modifiers_return: INT16
+ modifiers_return: GRABMODIFIERINFO
+ └───
+
+ GRABTYPE { GrabtypeButton, GrabtypeKeycode, GrabtypeEnter,
+ GrabTypeFocusIn}
+
+ GRABMODIFIERINFO { status: Access
+ modifiers: CARD32 }
+
+ 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.
+ detail
+ The button number, or key symbol to grab for.
+ Must be 0 for GrabtypeEnter and GrabtypeFocusIn.
+ 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.
+ 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.
+
+ 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,
+ - a passive grab of the same grab_type + modifier combination does not
+ does not exist on an ancestor of grab_window.
+
+ 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.
+ 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 or XIGrabtypeFocusIn 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.
+
+ ┌───
+ XIPassiveUngrabDevice
+ deviceid: DEVICEID
+ detail: CARD32
+ grab_type: GRABTYPE
+ grab_window: Window
+ num_modifiers: INT16
+ modifiers: MODIFIERINFO
+ └───
+
+ 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 and GrabtypeFocusIn.
+ 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.
+
+ ┌───
+ 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_atoms
+ Number of atoms in the reply
+ atoms
+ All properties on the device.
+
+ ┌───
+ 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 XIDeleteDeviceProperty.
+
+ This request generates an XIPropertyEvent.
+
+ ┌───
+ 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.
+
+ ┌───
+ 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.
+
+
+8. 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
+ RawEvent
+ Enter
+ Leave
+
+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.
+
+
+ ┌───
+ 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.
+
+ ┌───
+ 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
+ undefined.
+ source
+ The source of the new classes. Only defined in 'reason' is
+ SlaveSwitch.
+ 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 XQueryInputDevice
+ request.
+
+ ┌───
+ 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): none
+
+ 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.
+
+ detail
+ The button number or key code, 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.
+ 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.
+
+ 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.
+
+ ┌───
+ RawEvent
+ EVENTHEADER
+ detail: CARD32
+ flags: DEVICEEVENTFLAGS
+ valuators_len: CARD16
+ valuators: SETofVALUATORMASK
+ axisvalues: LISTofFP3232
+ axisvalues_raw: LISTofFP3232
+ └───
+
+ A RawDevice event provides the information provided by the driver to the
+ client. RawDevice provide 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 or to the client
+ that grabbed the device only.
+
+ eventtype
+ The type of event that occured on the device.
+ detail
+ The button number or keycode.
+ flags
+ Flags as described in DeviceEvent::flags.
+ 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.
+ axisvalues_raw
+ Untransformed valuator data in device-native resolution.
+
+ ┌───
+ 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.
+
+ ┌───
+ 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.
+
+
+ ❧❧❧❧❧❧❧❧❧❧❧
diff --git a/X11/extensions/XIproto.h b/X11/extensions/XIproto.h
index 6d4bf64b2..e00ab61dc 100644
--- a/X11/extensions/XIproto.h
+++ b/X11/extensions/XIproto.h
@@ -1,5 +1,3 @@
-/* $Xorg: XIproto.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
-
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -45,7 +43,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/include/extensions/XIproto.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */
#ifndef _XIPROTO_H
#define _XIPROTO_H
@@ -57,6 +54,9 @@ SOFTWARE.
#define Window CARD32
#define Time CARD32
#define KeyCode CARD8
+#define Mask CARD32
+#define Atom CARD32
+#define Cursor CARD32
/*********************************************************
*
@@ -72,15 +72,16 @@ SOFTWARE.
#define numInputClasses 7
-#define IEVENTS 16
-#define IERRORS 5
+#define IEVENTS 17 /* does NOT include generic events */
+#define IERRORS 5
+#define IREQUESTS 39
-#define CLIENT_REQ 1
+#define CLIENT_REQ 1
typedef struct _XExtEventInfo
{
Mask mask;
- BYTE type;
+ BYTE type;
BYTE word;
} XExtEventInfo;
@@ -114,6 +115,7 @@ struct tmask
#define XI_DeviceKeystateNotify 13
#define XI_DeviceButtonstateNotify 14
#define XI_DevicePresenceNotify 15
+#define XI_DevicePropertyNotify 16
/*********************************************************
*
@@ -126,15 +128,15 @@ struct tmask
#define X_OpenDevice 3
#define X_CloseDevice 4
#define X_SetDeviceMode 5
-#define X_SelectExtensionEvent 6
+#define X_SelectExtensionEvent 6
#define X_GetSelectedExtensionEvents 7
#define X_ChangeDeviceDontPropagateList 8
-#define X_GetDeviceDontPropagateList 9
-#define X_GetDeviceMotionEvents 10
+#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_GrabDevice 13
+#define X_UngrabDevice 14
#define X_GrabDeviceKey 15
#define X_UngrabDeviceKey 16
#define X_GrabDeviceButton 17
@@ -150,12 +152,17 @@ struct tmask
#define X_SetDeviceModifierMapping 27
#define X_GetDeviceButtonMapping 28
#define X_SetDeviceButtonMapping 29
-#define X_QueryDeviceState 30
-#define X_SendExtensionEvent 31
+#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
/*********************************************************
*
@@ -166,26 +173,26 @@ struct tmask
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GetExtensionVersion */
- CARD16 length B16;
- CARD16 nbytes B16;
- CARD8 pad1, pad2;
+ 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;
+ 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;
/*********************************************************
@@ -195,23 +202,23 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_ListInputDevices */
- CARD16 length B16;
+ 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;
+ 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;
@@ -220,68 +227,68 @@ typedef struct _xAnyClassinfo *xAnyClassPtr;
typedef struct _xAnyClassinfo {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 length;
+ CARD8 length;
} xAnyClassInfo;
typedef struct _xDeviceInfo {
CARD32 type B32;
CARD8 id;
- CARD8 num_classes;
- CARD8 use;
- CARD8 pad1;
+ 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;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 length;
- KeyCode min_keycode;
- KeyCode max_keycode;
- CARD16 num_keys B16;
- CARD8 pad1,pad2;
+ 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;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 length;
- CARD16 num_buttons B16;
+ CARD8 length;
+ CARD16 num_buttons B16;
} xButtonInfo;
typedef struct _xValuatorInfo *xValuatorInfoPtr;
typedef struct _xValuatorInfo {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 length;
- CARD8 num_axes;
- CARD8 mode;
- CARD32 motion_buffer_size B32;
+ 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;
+ CARD32 resolution B32;
+ CARD32 min_value B32;
+ CARD32 max_value B32;
} xAxisInfo;
/*********************************************************
@@ -292,33 +299,33 @@ typedef struct _xAxisInfo {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_OpenDevice */
- CARD16 length B16;
+ 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;
+ 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;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 event_type_base;
+ CARD8 event_type_base;
} xInputClassInfo;
/*********************************************************
@@ -329,8 +336,8 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_CloseDevice */
- CARD16 length B16;
+ CARD8 ReqType; /* always X_CloseDevice */
+ CARD16 length B16;
CARD8 deviceid;
BYTE pad1, pad2, pad3;
} xCloseDeviceReq;
@@ -342,26 +349,26 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_SetDeviceMode */
- CARD16 length B16;
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceMode */
+ CARD16 length B16;
CARD8 deviceid;
CARD8 mode;
- BYTE pad1, pad2;
+ BYTE pad1, pad2;
} xSetDeviceModeReq;
typedef struct {
- CARD8 repType; /* X_Reply */
- CARD8 RepType; /* always X_SetDeviceMode */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD8 status;
+ 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;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
} xSetDeviceModeReply;
/*********************************************************
@@ -372,9 +379,9 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_SelectExtensionEvent */
- CARD16 length B16;
- Window window B32;
+ CARD8 ReqType; /* always X_SelectExtensionEvent */
+ CARD16 length B16;
+ Window window B32;
CARD16 count B16;
CARD16 pad00 B16;
} xSelectExtensionEventReq;
@@ -387,23 +394,23 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_GetSelectedExtensionEvents */
- CARD16 length B16;
+ 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;
+ 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;
/*********************************************************
@@ -414,11 +421,11 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */
- CARD16 length B16;
+ CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */
+ CARD16 length B16;
Window window B32;
- CARD16 count B16;
- CARD8 mode;
+ CARD16 count B16;
+ CARD8 mode;
BYTE pad;
} xChangeDeviceDontPropagateListReq;
@@ -430,23 +437,23 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_GetDeviceDontPropagateList */
- CARD16 length B16;
+ 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;
+ 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;
/*********************************************************
@@ -456,28 +463,28 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GetDeviceMotionEvents*/
- CARD16 length B16;
- Time start B32;
+ 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;
+ 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;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
} xGetDeviceMotionEventsReply;
/*********************************************************
@@ -488,24 +495,24 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_ChangeKeyboardDevice */
- CARD16 length B16;
- CARD8 deviceid;
+ 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;
+ 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;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
} xChangeKeyboardDeviceReply;
/*********************************************************
@@ -516,26 +523,26 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_ChangePointerDevice */
- CARD16 length B16;
- CARD8 xaxis;
- CARD8 yaxis;
- CARD8 deviceid;
+ 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;
+ 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;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
} xChangePointerDeviceReply;
/*********************************************************
@@ -546,30 +553,30 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GrabDevice */
- CARD16 length B16;
- Window grabWindow B32;
- Time time B32;
+ 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;
+ 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;
+ 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;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
} xGrabDeviceReply;
/*********************************************************
@@ -580,10 +587,10 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_UnGrabDevice */
- CARD16 length B16;
- Time time B32;
- CARD8 deviceid;
+ CARD8 ReqType; /* always X_UnGrabDevice */
+ CARD16 length B16;
+ Time time B32;
+ CARD8 deviceid;
BYTE pad1, pad2, pad3;
} xUngrabDeviceReq;
@@ -595,17 +602,17 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GrabDeviceKey */
- CARD16 length B16;
- Window grabWindow B32;
+ CARD8 ReqType; /* always X_GrabDeviceKey */
+ CARD16 length B16;
+ Window grabWindow B32;
CARD16 event_count B16;
- CARD16 modifiers B16;
+ CARD16 modifiers B16;
CARD8 modifier_device;
CARD8 grabbed_device;
CARD8 key;
- BYTE this_device_mode;
- BYTE other_devices_mode;
- BOOL ownerEvents;
+ BYTE this_device_mode;
+ BYTE other_devices_mode;
+ BOOL ownerEvents;
BYTE pad1, pad2;
} xGrabDeviceKeyReq;
@@ -617,11 +624,11 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_UngrabDeviceKey */
- CARD16 length B16;
- Window grabWindow B32;
+ CARD8 ReqType; /* always X_UngrabDeviceKey */
+ CARD16 length B16;
+ Window grabWindow B32;
CARD16 modifiers B16;
- CARD8 modifier_device;
+ CARD8 modifier_device;
CARD8 key;
CARD8 grabbed_device;
BYTE pad1, pad2, pad3;
@@ -635,17 +642,17 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GrabDeviceButton */
- CARD16 length B16;
- Window grabWindow B32;
+ 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;
+ CARD16 event_count B16;
+ CARD16 modifiers B16;
+ BYTE this_device_mode;
+ BYTE other_devices_mode;
+ CARD8 button;
+ BOOL ownerEvents;
BYTE pad1, pad2;
} xGrabDeviceButtonReq;
@@ -657,13 +664,13 @@ typedef struct {
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;
+ 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;
@@ -675,11 +682,11 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_AllowDeviceEvents */
- CARD16 length B16;
- Time time B32;
+ CARD8 ReqType; /* always X_AllowDeviceEvents */
+ CARD16 length B16;
+ Time time B32;
CARD8 mode;
- CARD8 deviceid;
+ CARD8 deviceid;
BYTE pad1, pad2;
} xAllowDeviceEventsReq;
@@ -690,25 +697,25 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GetDeviceFocus */
- CARD16 length B16;
- CARD8 deviceid;
- BYTE pad1, pad2, pad3;
+ 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;
+ 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;
/*********************************************************
@@ -718,14 +725,14 @@ typedef struct {
*/
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;
+ 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;
/*********************************************************
@@ -736,17 +743,17 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_GetFeedbackControl */
- CARD16 length B16;
- CARD8 deviceid;
+ 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;
+ 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;
@@ -758,12 +765,12 @@ typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class */
+ CARD8 c_class; /* feedback class */
#else
- CARD8 class; /* feedback class */
+ CARD8 class; /* feedback class */
#endif
- CARD8 id; /* feedback id */
- CARD16 length B16; /* feedback length */
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
} xFeedbackState;
typedef struct {
@@ -801,12 +808,12 @@ typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id;
- CARD16 length B16; /* feedback length */
+ CARD8 id;
+ CARD16 length B16; /* feedback length */
CARD32 resolution B32;
INT32 min_value B32;
INT32 max_value B32;
@@ -814,24 +821,24 @@ typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id;
- CARD16 length B16; /* feedback length */
+ 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 */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
CARD8 id;
- CARD16 length B16; /* feedback length */
+ CARD16 length B16; /* feedback length */
CARD8 percent;
BYTE pad1, pad2, pad3;
CARD16 pitch B16;
@@ -840,12 +847,12 @@ typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
CARD8 id;
- CARD16 length B16; /* feedback length */
+ CARD16 length B16; /* feedback length */
CARD32 led_mask B32;
CARD32 led_values B32;
} xLedFeedbackState;
@@ -858,33 +865,33 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_ChangeFeedbackControl */
- CARD16 length B16;
+ CARD8 ReqType; /* X_ChangeFeedbackControl */
+ CARD16 length B16;
CARD32 mask B32;
- CARD8 deviceid;
- CARD8 feedbackid;
+ CARD8 deviceid;
+ CARD8 feedbackid;
BYTE pad1, pad2;
} xChangeFeedbackControlReq;
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id; /* feedback id */
- CARD16 length B16; /* feedback length */
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
} xFeedbackCtl;
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id; /* feedback length */
- CARD16 length B16; /* feedback length */
- KeyCode key;
+ CARD8 id; /* feedback length */
+ CARD16 length B16; /* feedback length */
+ KeyCode key;
CARD8 auto_repeat_mode;
INT8 click;
INT8 percent;
@@ -896,13 +903,13 @@ typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id; /* feedback id */
- CARD16 length B16; /* feedback length */
- CARD8 pad1,pad2;
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
+ CARD8 pad1,pad2;
INT16 num B16;
INT16 denom B16;
INT16 thresh B16;
@@ -910,35 +917,35 @@ typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id; /* feedback id */
- CARD16 length B16; /* feedback length */
+ 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 */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id; /* feedback id */
- CARD16 length B16; /* feedback length */
- CARD8 pad1,pad2;
+ 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 */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id; /* feedback id */
- CARD16 length B16; /* feedback length */
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
INT8 percent;
BYTE pad1, pad2, pad3;
INT16 pitch B16;
@@ -947,12 +954,12 @@ typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class; /* feedback class id */
+ CARD8 c_class; /* feedback class id */
#else
- CARD8 class; /* feedback class id */
+ CARD8 class; /* feedback class id */
#endif
- CARD8 id; /* feedback id */
- CARD16 length B16; /* feedback length */
+ CARD8 id; /* feedback id */
+ CARD16 length B16; /* feedback length */
CARD32 led_mask B32;
CARD32 led_values B32;
} xLedFeedbackCtl;
@@ -964,28 +971,28 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GetDeviceKeyMapping */
- CARD16 length B16;
- CARD8 deviceid;
- KeyCode firstKeyCode;
- CARD8 count;
+ 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;
+ 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;
/*********************************************************
@@ -995,13 +1002,13 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */
- CARD16 length B16;
- CARD8 deviceid;
- KeyCode firstKeyCode;
- CARD8 keySymsPerKeyCode;
- CARD8 keyCodes;
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */
+ CARD16 length B16;
+ CARD8 deviceid;
+ KeyCode firstKeyCode;
+ CARD8 keySymsPerKeyCode;
+ CARD8 keyCodes;
} xChangeDeviceKeyMappingReq;
/*********************************************************
@@ -1011,26 +1018,26 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GetDeviceModifierMapping */
- CARD16 length B16;
- CARD8 deviceid;
+ 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;
+ 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;
/*********************************************************
@@ -1040,27 +1047,27 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_SetDeviceModifierMapping */
- CARD16 length B16;
- CARD8 deviceid;
- CARD8 numKeyPerModifier;
- CARD16 pad1 B16;
+ 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;
+ 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;
/*********************************************************
@@ -1071,24 +1078,24 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_GetDeviceButtonMapping */
- CARD16 length B16;
- CARD8 deviceid;
+ 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;
+ 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;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
} xGetDeviceButtonMappingReply;
/*********************************************************
@@ -1099,26 +1106,26 @@ typedef struct {
typedef struct {
CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* X_SetDeviceButtonMapping */
- CARD16 length B16;
- CARD8 deviceid;
- CARD8 map_length;
+ 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;
+ 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;
/*********************************************************
@@ -1129,59 +1136,59 @@ typedef struct {
typedef struct {
CARD8 reqType;
- CARD8 ReqType; /* always X_QueryDeviceState */
- CARD16 length B16;
- CARD8 deviceid;
+ 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;
+ 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;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 length;
+ CARD8 length;
CARD8 num_keys;
- BYTE pad1;
- CARD8 keys[32];
+ BYTE pad1;
+ CARD8 keys[32];
} xKeyState;
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 length;
+ CARD8 length;
CARD8 num_buttons;
- BYTE pad1;
- CARD8 buttons[32];
+ BYTE pad1;
+ CARD8 buttons[32];
} xButtonState;
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
- CARD8 c_class;
+ CARD8 c_class;
#else
- CARD8 class;
+ CARD8 class;
#endif
- CARD8 length;
- CARD8 num_valuators;
+ CARD8 length;
+ CARD8 num_valuators;
CARD8 mode;
} xValuatorState;
@@ -1195,11 +1202,11 @@ typedef struct {
typedef struct {
CARD8 reqType;
- CARD8 ReqType; /* always X_SendExtensionEvent */
- CARD16 length B16;
+ CARD8 ReqType; /* always X_SendExtensionEvent */
+ CARD16 length B16;
Window destination B32;
- CARD8 deviceid;
- BOOL propagate;
+ CARD8 deviceid;
+ BOOL propagate;
CARD16 count B16;
CARD8 num_events;
BYTE pad1,pad2,pad3;
@@ -1213,9 +1220,9 @@ typedef struct {
typedef struct {
CARD8 reqType;
- CARD8 ReqType; /* always X_DeviceBell */
- CARD16 length B16;
- CARD8 deviceid;
+ CARD8 ReqType; /* always X_DeviceBell */
+ CARD16 length B16;
+ CARD8 deviceid;
CARD8 feedbackid;
CARD8 feedbackclass;
INT8 percent;
@@ -1228,27 +1235,27 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_SetDeviceValuators */
- CARD16 length B16;
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_SetDeviceValuators */
+ CARD16 length B16;
CARD8 deviceid;
CARD8 first_valuator;
CARD8 num_valuators;
- BYTE pad1;
+ BYTE pad1;
} xSetDeviceValuatorsReq;
typedef struct {
- CARD8 repType; /* X_Reply */
- CARD8 RepType; /* always X_SetDeviceValuators */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD8 status;
+ 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;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
} xSetDeviceValuatorsReply;
/*********************************************************
@@ -1258,37 +1265,37 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_GetDeviceControl */
- CARD16 length B16;
+ CARD8 reqType; /* input extension major code */
+ CARD8 ReqType; /* always X_GetDeviceControl */
+ CARD16 length B16;
CARD16 control B16;
CARD8 deviceid;
- BYTE pad2;
+ BYTE pad2;
} xGetDeviceControlReq;
typedef struct {
- CARD8 repType; /* X_Reply */
- CARD8 RepType; /* always X_GetDeviceControl */
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- CARD8 status;
+ 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;
+ 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 */
+ 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 */
+ CARD16 control B16; /* control type */
+ CARD16 length B16; /* control length */
+ CARD32 num_valuators B32; /* number of valuators */
} xDeviceResolutionState;
typedef struct {
@@ -1338,39 +1345,39 @@ typedef struct {
*/
typedef struct {
- CARD8 reqType; /* input extension major code */
- CARD8 ReqType; /* always X_ChangeDeviceControl */
- CARD16 length B16;
+ 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;
+ 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;
+ 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 */
+ 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;
+ 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 {
@@ -1413,6 +1420,111 @@ typedef struct {
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.
@@ -1423,18 +1535,18 @@ typedef struct {
typedef struct
{
- BYTE type;
+ BYTE type;
CARD8 deviceid;
- CARD16 sequenceNumber B16;
+ 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;
+ INT32 valuator0 B32;
+ INT32 valuator1 B32;
+ INT32 valuator2 B32;
+ INT32 valuator3 B32;
+ INT32 valuator4 B32;
+ INT32 valuator5 B32;
} deviceValuator;
/**********************************************************
@@ -1445,14 +1557,14 @@ typedef struct
* DeviceButtonPress, DeviceButtonRelease,
* ProximityIn, ProximityOut
* DeviceMotionNotify,
- *
+ *
*/
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE detail;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
Time time B32;
Window root B32;
Window event B32;
@@ -1474,9 +1586,9 @@ typedef struct
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE detail;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
Time time B32;
Window window B32;
BYTE mode;
@@ -1500,9 +1612,9 @@ typedef struct
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE deviceid;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
Time time B32;
CARD8 num_keys;
CARD8 num_buttons;
@@ -1523,9 +1635,9 @@ typedef struct
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE deviceid;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
CARD8 keys[28];
} deviceKeyStateNotify;
@@ -1537,9 +1649,9 @@ typedef struct
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE deviceid;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
CARD8 buttons[28];
} deviceButtonStateNotify;
@@ -1552,9 +1664,9 @@ typedef struct
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE deviceid;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
CARD8 request;
KeyCode firstKeyCode;
CARD8 count;
@@ -1575,9 +1687,9 @@ typedef struct
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE deviceid;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
Time time B32;
CARD8 request;
BYTE pad1, pad2, pad3;
@@ -1596,9 +1708,9 @@ typedef struct
typedef struct
{
- BYTE type;
+ BYTE type;
BYTE pad00;
- CARD16 sequenceNumber B16;
+ CARD16 sequenceNumber B16;
Time time B32;
BYTE devchange; /* Device{Added|Removed|Enabled|Disabled|ControlChanged} */
BYTE deviceid;
@@ -1610,8 +1722,35 @@ typedef struct
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/X11/extensions/ag.h b/X11/extensions/ag.h
new file mode 100644
index 000000000..be5883a3e
--- /dev/null
+++ b/X11/extensions/ag.h
@@ -0,0 +1,52 @@
+/*
+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.
+*/
+
+#ifndef _AG_H_
+#define _AG_H_
+
+#define XAGNAME "XC-APPGROUP"
+
+#define XAG_MAJOR_VERSION 1 /* current version numbers */
+#define XAG_MINOR_VERSION 0
+
+#define XagWindowTypeX11 0
+#define XagWindowTypeMacintosh 1
+#define XagWindowTypeWin32 2
+#define XagWindowTypeWin16 3
+
+#define XagBadAppGroup 0
+#define XagNumberErrors (XagBadAppGroup + 1)
+
+#define XagNsingleScreen 7
+#define XagNdefaultRoot 1
+#define XagNrootVisual 2
+#define XagNdefaultColormap 3
+#define XagNblackPixel 4
+#define XagNwhitePixel 5
+#define XagNappGroupLeader 6
+
+#endif /* _AG_H_ */
+
diff --git a/X11/extensions/agproto.h b/X11/extensions/agproto.h
new file mode 100644
index 000000000..108666126
--- /dev/null
+++ b/X11/extensions/agproto.h
@@ -0,0 +1,178 @@
+/*
+Copyright 1996, 1998, 2001 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 _AGPROTO_H_ /* { */
+#define _AGPROTO_H_
+
+#include <X11/extensions/ag.h>
+
+#define X_XagQueryVersion 0
+#define X_XagCreate 1
+#define X_XagDestroy 2
+#define X_XagGetAttr 3
+#define X_XagQuery 4
+#define X_XagCreateAssoc 5
+#define X_XagDestroyAssoc 6
+
+#define XAppGroup CARD32
+
+/*
+* Redefine some basic types used by structures defined herein. This allows
+* both the library and server to view communicated data as 32-bit entities,
+* thus preventing problems on 64-bit architectures where libXext sees this
+* data as 64 bits and the server sees it as 32 bits.
+*/
+
+#define Colormap CARD32
+#define VisualID CARD32
+#define Window CARD32
+
+typedef struct _XagQueryVersion {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagQueryVersion */
+ CARD16 length B16;
+ CARD16 client_major_version B16;
+ CARD16 client_minor_version B16;
+} xXagQueryVersionReq;
+#define sz_xXagQueryVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ 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;
+} xXagQueryVersionReply;
+#define sz_xXagQueryVersionReply 32
+
+/* Set AppGroup Attributes masks */
+#define XagSingleScreenMask 1 << 0
+#define XagDefaultRootMask 1 << XagNdefaultRoot
+#define XagRootVisualMask 1 << XagNrootVisual
+#define XagDefaultColormapMask 1 << XagNdefaultColormap
+#define XagBlackPixelMask 1 << XagNblackPixel
+#define XagWhitePixelMask 1 << XagNwhitePixel
+#define XagAppGroupLeaderMask 1 << XagNappGroupLeader
+
+typedef struct _XagCreate {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagCreate */
+ CARD16 length B16;
+ XAppGroup app_group B32;
+ CARD32 attrib_mask B32; /* LISTofVALUE follows */
+} xXagCreateReq;
+#define sz_xXagCreateReq 12
+
+typedef struct _XagDestroy {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagDestroy */
+ CARD16 length B16;
+ XAppGroup app_group B32;
+} xXagDestroyReq;
+#define sz_xXagDestroyReq 8
+
+typedef struct _XagGetAttr {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagGetAttr */
+ CARD16 length B16;
+ XAppGroup app_group B32;
+} xXagGetAttrReq;
+#define sz_xXagGetAttrReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ Window default_root B32;
+ VisualID root_visual B32;
+ Colormap default_colormap B32;
+ CARD32 black_pixel B32;
+ CARD32 white_pixel B32;
+ BOOL single_screen;
+ BOOL app_group_leader;
+ CARD16 pad2 B16;
+} xXagGetAttrReply;
+#define sz_xXagGetAttrReply 32
+
+typedef struct _XagQuery {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagQuery */
+ CARD16 length B16;
+ CARD32 resource B32;
+} xXagQueryReq;
+#define sz_xXagQueryReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequence_number B16;
+ CARD32 length B32;
+ XAppGroup app_group B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXagQueryReply;
+#define sz_xXagQueryReply 32
+
+typedef struct _XagCreateAssoc {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagCreateAssoc */
+ CARD16 length B16;
+ Window window B32;
+ CARD16 window_type B16;
+ CARD16 system_window_len B16; /* LISTofCARD8 follows */
+} xXagCreateAssocReq;
+#define sz_xXagCreateAssocReq 12
+
+typedef struct _XagDestroyAssoc {
+ CARD8 reqType; /* always XagReqCode */
+ CARD8 xagReqType; /* always X_XagDestroyAssoc */
+ CARD16 length B16;
+ Window window B32;
+} xXagDestroyAssocReq;
+#define sz_xXagDestroyAssocReq 8
+
+#undef XAppGroup
+/*
+ * Cancel the previous redefinition of the basic types, thus restoring their
+ * X.h definitions.
+ */
+
+#undef Window
+#undef Colormap
+#undef VisualID
+
+#endif /* } _AGPROTO_H_ */
+
diff --git a/X11/extensions/cup.h b/X11/extensions/cup.h
new file mode 100644
index 000000000..cbbc34bf8
--- /dev/null
+++ b/X11/extensions/cup.h
@@ -0,0 +1,38 @@
+/*
+
+Copyright 1987, 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.
+
+*/
+
+#ifndef _CUP_H_
+#define _CUP_H_
+
+#define XCUPNAME "TOG-CUP"
+
+#define XCUP_MAJOR_VERSION 1 /* current version numbers */
+#define XCUP_MINOR_VERSION 0
+
+#define XcupNumberErrors 0
+
+#endif /* _CUP_H_ */
+
diff --git a/X11/extensions/cupproto.h b/X11/extensions/cupproto.h
new file mode 100644
index 000000000..f61c9f0a7
--- /dev/null
+++ b/X11/extensions/cupproto.h
@@ -0,0 +1,105 @@
+/*
+
+Copyright 1987, 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.
+
+*/
+
+#ifndef _XCUPPROTO_H_ /* { */
+#define _XCUPPROTO_H_
+
+#include <X11/extensions/cup.h>
+
+#define X_XcupQueryVersion 0
+#define X_XcupGetReservedColormapEntries 1
+#define X_XcupStoreColors 2
+
+typedef struct _XcupQueryVersion {
+ CARD8 reqType; /* always XcupReqCode */
+ CARD8 xcupReqType; /* always X_XcupQueryVersion */
+ CARD16 length B16;
+ CARD16 client_major_version B16;
+ CARD16 client_minor_version B16;
+} xXcupQueryVersionReq;
+#define sz_xXcupQueryVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ 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;
+} xXcupQueryVersionReply;
+#define sz_xXcupQueryVersionReply 32
+
+typedef struct _XcupGetReservedColormapEntries {
+ CARD8 reqType; /* always XcupReqCode */
+ CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */
+ CARD16 length B16;
+ CARD32 screen B32;
+} xXcupGetReservedColormapEntriesReq;
+#define sz_xXcupGetReservedColormapEntriesReq 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;
+} xXcupGetReservedColormapEntriesReply;
+#define sz_xXcupGetReservedColormapEntriesReply 32
+
+typedef struct _XcupStoreColors {
+ CARD8 reqType; /* always XcupReqCode */
+ CARD8 xcupReqType; /* always X_XcupStoreColors */
+ CARD16 length B16;
+ CARD32 cmap B32;
+} xXcupStoreColorsReq;
+#define sz_xXcupStoreColorsReq 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;
+} xXcupStoreColorsReply;
+#define sz_xXcupStoreColorsReply 32
+
+#endif /* } _XCUPPROTO_H_ */
+
diff --git a/X11/extensions/dbe.h b/X11/extensions/dbe.h
new file mode 100644
index 000000000..7968552d3
--- /dev/null
+++ b/X11/extensions/dbe.h
@@ -0,0 +1,57 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994, 1995 Hewlett-Packard Company
+ *
+ * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard
+ * Company 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 Hewlett-Packard Company.
+ *
+ * Header file for Xlib-related DBE
+ *
+ *****************************************************************************/
+
+#ifndef DBE_H
+#define DBE_H
+
+/* Values for swap_action field of XdbeSwapInfo structure */
+#define XdbeUndefined 0
+#define XdbeBackground 1
+#define XdbeUntouched 2
+#define XdbeCopied 3
+
+/* Errors */
+#define XdbeBadBuffer 0
+
+#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER"
+
+/* Current version numbers */
+#define DBE_MAJOR_VERSION 1
+#define DBE_MINOR_VERSION 0
+
+/* Used when adding extension; also used in Xdbe macros */
+#define DbeNumberEvents 0
+#define DbeBadBuffer 0
+#define DbeNumberErrors (DbeBadBuffer + 1)
+
+#endif /* DBE_H */
+
diff --git a/X11/extensions/dbeproto.h b/X11/extensions/dbeproto.h
new file mode 100644
index 000000000..784926e33
--- /dev/null
+++ b/X11/extensions/dbeproto.h
@@ -0,0 +1,224 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994, 1995 Hewlett-Packard Company
+ *
+ * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard
+ * Company 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 Hewlett-Packard Company.
+ *
+ * Header file for Xlib-related DBE
+ *
+ *****************************************************************************/
+
+#ifndef DBE_PROTO_H
+#define DBE_PROTO_H
+
+#include <X11/extensions/dbe.h>
+
+/* Request values used in (S)ProcDbeDispatch() */
+#define X_DbeGetVersion 0
+#define X_DbeAllocateBackBufferName 1
+#define X_DbeDeallocateBackBufferName 2
+#define X_DbeSwapBuffers 3
+#define X_DbeBeginIdiom 4
+#define X_DbeEndIdiom 5
+#define X_DbeGetVisualInfo 6
+#define X_DbeGetBackBufferAttributes 7
+
+typedef CARD8 xDbeSwapAction;
+typedef CARD32 xDbeBackBuffer;
+
+/* TYPEDEFS */
+
+/* Protocol data types */
+
+typedef struct
+{
+ CARD32 window B32; /* window */
+ xDbeSwapAction swapAction; /* swap action */
+ CARD8 pad1; /* unused */
+ CARD16 pad2 B16;
+
+} xDbeSwapInfo;
+
+typedef struct
+{
+ CARD32 visualID B32; /* associated visual */
+ CARD8 depth; /* depth of visual */
+ CARD8 perfLevel; /* performance level hint */
+ CARD16 pad1 B16;
+
+} xDbeVisInfo;
+#define sz_xDbeVisInfo 8
+
+typedef struct
+{
+ CARD32 n B32; /* number of visual info items in list */
+
+} xDbeScreenVisInfo; /* followed by n xDbeVisInfo items */
+
+typedef struct
+{
+ CARD32 window B32; /* window */
+
+} xDbeBufferAttributes;
+
+
+/* Requests and replies */
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeGetVersion (0) */
+ CARD16 length B16; /* request length: (2) */
+ CARD8 majorVersion; /* client-major-version */
+ CARD8 minorVersion; /* client-minor-version */
+ CARD16 unused B16; /* unused */
+
+} xDbeGetVersionReq;
+#define sz_xDbeGetVersionReq 8
+
+typedef struct
+{
+ BYTE type; /* Reply: X_Reply (1) */
+ CARD8 unused; /* unused */
+ CARD16 sequenceNumber B16; /* sequence number */
+ CARD32 length B32; /* reply length: (0) */
+ CARD8 majorVersion; /* server-major-version */
+ CARD8 minorVersion; /* server-minor-version */
+ CARD16 pad1 B16; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+
+} xDbeGetVersionReply;
+#define sz_xDbeGetVersionReply 32
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: codes->major_opcode */
+ CARD8 dbeReqType; /* X_DbeAllocateBackBufferName (1) */
+ CARD16 length B16; /* request length: (4) */
+ CARD32 window B32; /* window */
+ xDbeBackBuffer buffer B32; /* back buffer name */
+ xDbeSwapAction swapAction; /* swap action hint */
+ CARD8 pad1; /* unused */
+ CARD16 pad2 B16;
+
+} xDbeAllocateBackBufferNameReq;
+#define sz_xDbeAllocateBackBufferNameReq 16
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: codes->major_opcode */
+ CARD8 dbeReqType; /* X_DbeDeallocateBackBufferName (2) */
+ CARD16 length B16; /* request length: (2) */
+ xDbeBackBuffer buffer B32; /* back buffer name */
+
+} xDbeDeallocateBackBufferNameReq;
+#define sz_xDbeDeallocateBackBufferNameReq 8
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeSwapBuffers (3) */
+ CARD16 length B16; /* request length: (2+2n) */
+ CARD32 n B32; /* n, number of window/swap action pairs */
+
+} xDbeSwapBuffersReq; /* followed by n window/swap action pairs */
+#define sz_xDbeSwapBuffersReq 8
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeBeginIdom (4) */
+ CARD16 length B16; /* request length: (1) */
+
+} xDbeBeginIdiomReq;
+#define sz_xDbeBeginIdiomReq 4
+
+typedef struct
+{
+ CARD8 reqType; /* major-opcode: always codes->major_opcode */
+ CARD8 dbeReqType; /* minor-opcode: always X_DbeEndIdom (5) */
+ CARD16 length B16; /* request length: (1) */
+
+} xDbeEndIdiomReq;
+#define sz_xDbeEndIdiomReq 4
+
+typedef struct
+{
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 dbeReqType; /* always X_DbeGetVisualInfo (6) */
+ CARD16 length B16; /* request length: (2+n) */
+ CARD32 n B32; /* n, number of drawables in list */
+
+} xDbeGetVisualInfoReq; /* followed by n drawables */
+#define sz_xDbeGetVisualInfoReq 8
+
+typedef struct
+{
+ BYTE type; /* Reply: X_Reply (1) */
+ CARD8 unused; /* unused */
+ CARD16 sequenceNumber B16; /* sequence number */
+ CARD32 length B32; /* reply length */
+ CARD32 m; /* m, number of visual infos in list */
+ CARD32 pad1 B32; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+
+} xDbeGetVisualInfoReply; /* followed by m visual infos */
+#define sz_xDbeGetVisualInfoReply 32
+
+typedef struct
+{
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 dbeReqType; /* X_DbeGetBackBufferAttributes (7) */
+ CARD16 length B16; /* request length: (2) */
+ xDbeBackBuffer buffer B32; /* back buffer name */
+
+} xDbeGetBackBufferAttributesReq;
+#define sz_xDbeGetBackBufferAttributesReq 8
+
+typedef struct
+{
+ BYTE type; /* Reply: X_Reply (1) */
+ CARD8 unused; /* unused */
+ CARD16 sequenceNumber B16; /* sequence number */
+ CARD32 length B32; /* reply length: (0) */
+ CARD32 attributes; /* attributes */
+ CARD32 pad1 B32; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+
+} xDbeGetBackBufferAttributesReply;
+#define sz_xDbeGetBackBufferAttributesReply 32
+
+#endif /* DBE_PROTO_H */
+
diff --git a/X11/extensions/dpmsconst.h b/X11/extensions/dpmsconst.h
new file mode 100644
index 000000000..75f058677
--- /dev/null
+++ b/X11/extensions/dpmsconst.h
@@ -0,0 +1,43 @@
+/*****************************************************************
+
+Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
+
+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.
+
+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
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 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 from Digital
+Equipment Corporation.
+
+******************************************************************/
+
+#ifndef _DPMSCONST_H
+#define _DPMSCONST_H 1
+
+#define DPMSMajorVersion 1
+#define DPMSMinorVersion 1
+
+#define DPMSExtensionName "DPMS"
+
+#define DPMSModeOn 0
+#define DPMSModeStandby 1
+#define DPMSModeSuspend 2
+#define DPMSModeOff 3
+
+#endif /* !_DPMSCONST_H */
+
diff --git a/X11/extensions/dpmsproto.h b/X11/extensions/dpmsproto.h
new file mode 100644
index 000000000..63fd3fc0e
--- /dev/null
+++ b/X11/extensions/dpmsproto.h
@@ -0,0 +1,175 @@
+/*****************************************************************
+
+Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
+
+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.
+
+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
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 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 from Digital
+Equipment Corporation.
+
+******************************************************************/
+
+#ifndef _DPMSPROTO_H_
+#define _DPMSPROTO_H_
+
+#include <X11/extensions/dpmsconst.h>
+
+#define X_DPMSGetVersion 0
+#define X_DPMSCapable 1
+#define X_DPMSGetTimeouts 2
+#define X_DPMSSetTimeouts 3
+#define X_DPMSEnable 4
+#define X_DPMSDisable 5
+#define X_DPMSForceLevel 6
+#define X_DPMSInfo 7
+
+#define DPMSNumberEvents 0
+
+#define DPMSNumberErrors 0
+
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSGetVersion */
+ CARD16 length B16;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+} xDPMSGetVersionReq;
+#define sz_xDPMSGetVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDPMSGetVersionReply;
+#define sz_xDPMSGetVersionReply 32
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSCapable */
+ CARD16 length B16;
+} xDPMSCapableReq;
+#define sz_xDPMSCapableReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL capable;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xDPMSCapableReply;
+#define sz_xDPMSCapableReply 32
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSGetTimeouts */
+ CARD16 length B16;
+} xDPMSGetTimeoutsReq;
+#define sz_xDPMSGetTimeoutsReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 standby B16;
+ CARD16 suspend B16;
+ CARD16 off B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDPMSGetTimeoutsReply;
+#define sz_xDPMSGetTimeoutsReply 32
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSSetTimeouts */
+ CARD16 length B16;
+ CARD16 standby B16;
+ CARD16 suspend B16;
+ CARD16 off B16;
+ CARD16 pad0 B16;
+} xDPMSSetTimeoutsReq;
+#define sz_xDPMSSetTimeoutsReq 12
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSEnable */
+ CARD16 length B16;
+} xDPMSEnableReq;
+#define sz_xDPMSEnableReq 4
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSDisable */
+ CARD16 length B16;
+} xDPMSDisableReq;
+#define sz_xDPMSDisableReq 4
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSForceLevel */
+ CARD16 length B16;
+ CARD16 level B16; /* power level requested */
+ CARD16 pad0 B16;
+} xDPMSForceLevelReq;
+#define sz_xDPMSForceLevelReq 8
+
+typedef struct {
+ CARD8 reqType; /* always DPMSCode */
+ CARD8 dpmsReqType; /* always X_DPMSInfo */
+ CARD16 length B16;
+} xDPMSInfoReq;
+#define sz_xDPMSInfoReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 power_level B16;
+ BOOL state;
+ CARD8 pad1;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xDPMSInfoReply;
+#define sz_xDPMSInfoReply 32
+
+#endif /* _DPMSPROTO_H_ */
diff --git a/X11/extensions/fixesproto.pc.in b/X11/extensions/fixesproto.pc.in
index 055dcbc64..fabce8608 100644
--- a/X11/extensions/fixesproto.pc.in
+++ b/X11/extensions/fixesproto.pc.in
@@ -2,8 +2,9 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-
+
Name: FixesProto
-Description: Fixes extension headers
+Description: X Fixes extension headers
Version: @PACKAGE_VERSION@
Cflags: -I${includedir}
+Requires: xextproto >= 7.0.99.1
diff --git a/X11/extensions/geproto.txt b/X11/extensions/geproto.txt
new file mode 100644
index 000000000..654cd0f70
--- /dev/null
+++ b/X11/extensions/geproto.txt
@@ -0,0 +1,83 @@
+ X Generic Event Extension
+ Peter Hutterer
+ peter.hutterer@who-t.net
+
+
+1. Introduction
+2. Extension Initialization
+3. Extension Events
+4. Notes
+
+_____________________________________________________________________________
+1. Introduction
+
+X was designed to provide 64 event opcodes for all extensions. These events
+are limited to 32 bytes.
+
+The Generic Event Extension provides a template event for extensions to re-use
+a single event opcode. GE only provide headers and the most basic
+functionality, leaving the extensions to interpret the events in their
+specific context.
+
+GenericEvents may be longer than 32 bytes. If so, the number of 4 byte units
+following the initial 32 bytes must be specified in the length field of the
+event.
+_____________________________________________________________________________
+2. Extension Initialization
+
+The name of this extension is "Generic Event Extension"
+
+┌───
+ GEQueryVersion
+ client-major-version: CARD16
+ client-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 clients responsibility to ensure that the server
+ supports a version which is compatible with its expectations.
+
+
+ As of version 1.0, no other requests are provided by this extension.
+_____________________________________________________________________________
+3. Extension Events
+
+GE defines a single event, to be used by all extensions. The event's structure
+is similar to a reply.
+
+┌───
+ GenericEvent
+ type: BYTE; always GenericEvent
+ extension: CARD8; extension offset
+ sequenceNumber: CARD16 low 16 bits of request seq. number
+ length: CARD32 length
+ evtype: CARD16 event type
+└───
+
+ The field 'extension' is to be set to the major opcode of the
+ extension. The 'evtype' field is the actual opcode of the event.
+ The length field specifies the number of 4-byte blocks after the
+ initial 32 bytes. If length is 0, the event is 32 bytes long.
+_____________________________________________________________________________
+4. Notes
+
+Although the wire event is of arbitrary length, the actual size of an XEvent
+is restricted to sizeof(XEvent) [96 bytes, see Xlib.h]. If an extension
+converts a wire event to an XEvent > 96 bytes, it will overwrite the space
+allocated for the event. See struct _XSQEvent in Xlibint.h for details.
+
+Extensions need to malloc additional data and fill the XEvent structure with
+pointers to the malloc'd data. The client then needs to free the data, only
+the XEvent structure will be released by Xlib.
+
+The server must not send GenericEvents longer than 32 bytes until it has
+verified that the client is able to interpret these events. If a long event is
+sent to a client unable to process GenericEvents, future interpretation of
+replies and events by this client will fail.
diff --git a/X11/extensions/lbx.h b/X11/extensions/lbx.h
new file mode 100644
index 000000000..ecd24ff1f
--- /dev/null
+++ b/X11/extensions/lbx.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright 1992 Network Computing Devices
+ *
+ * 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 NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCD. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * 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 _LBX_H_
+#define _LBX_H_
+
+#define LBXNAME "LBX"
+
+#define LBX_MAJOR_VERSION 1
+#define LBX_MINOR_VERSION 0
+
+#define LbxNumberReqs 44
+#define LbxEvent 0
+#define LbxQuickMotionDeltaEvent 1
+#define LbxNumberEvents 2
+
+/* This is always the master client */
+#define LbxMasterClientIndex 0
+
+/* LbxEvent lbxType sub-fields */
+#define LbxSwitchEvent 0
+#define LbxCloseEvent 1
+#define LbxDeltaEvent 2
+#define LbxInvalidateTagEvent 3
+#define LbxSendTagDataEvent 4
+#define LbxListenToOne 5
+#define LbxListenToAll 6
+#define LbxMotionDeltaEvent 7
+#define LbxReleaseCmapEvent 8
+#define LbxFreeCellsEvent 9
+
+/*
+ * Lbx image compression methods
+ *
+ * No compression is always assigned the value of 0.
+ *
+ * The rest of the compression method opcodes are assigned dynamically
+ * at option negotiation time.
+ */
+
+#define LbxImageCompressNone 0
+
+
+#define BadLbxClient 0
+#define LbxNumberErrors (BadLbxClient + 1)
+
+/* tagged data types */
+#define LbxTagTypeModmap 1
+#define LbxTagTypeKeymap 2
+#define LbxTagTypeProperty 3
+#define LbxTagTypeFont 4
+#define LbxTagTypeConnInfo 5
+
+#endif
diff --git a/X11/extensions/lbxproto.h b/X11/extensions/lbxproto.h
new file mode 100644
index 000000000..d613d4232
--- /dev/null
+++ b/X11/extensions/lbxproto.h
@@ -0,0 +1,982 @@
+/*
+ * Copyright 1992 Network Computing Devices
+ *
+ * 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 NCD. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. NCD. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
+ * 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 _LBXPROTO_H_
+#define _LBXPROTO_H_
+
+#include <X11/extensions/lbx.h>
+/*
+ * NOTE: any changes or additions to the opcodes needs to be reflected
+ * in the lbxCacheable array in Xserver/lbx/lbxmain.c
+ */
+
+#define X_LbxQueryVersion 0
+#define X_LbxStartProxy 1
+#define X_LbxStopProxy 2
+#define X_LbxSwitch 3
+#define X_LbxNewClient 4
+#define X_LbxCloseClient 5
+#define X_LbxModifySequence 6
+#define X_LbxAllowMotion 7
+#define X_LbxIncrementPixel 8
+#define X_LbxDelta 9
+#define X_LbxGetModifierMapping 10
+#define X_LbxInvalidateTag 12
+#define X_LbxPolyPoint 13
+#define X_LbxPolyLine 14
+#define X_LbxPolySegment 15
+#define X_LbxPolyRectangle 16
+#define X_LbxPolyArc 17
+#define X_LbxFillPoly 18
+#define X_LbxPolyFillRectangle 19
+#define X_LbxPolyFillArc 20
+#define X_LbxGetKeyboardMapping 21
+#define X_LbxQueryFont 22
+#define X_LbxChangeProperty 23
+#define X_LbxGetProperty 24
+#define X_LbxTagData 25
+
+#define X_LbxCopyArea 26
+#define X_LbxCopyPlane 27
+#define X_LbxPolyText8 28
+#define X_LbxPolyText16 29
+#define X_LbxImageText8 30
+#define X_LbxImageText16 31
+
+#define X_LbxQueryExtension 32
+#define X_LbxPutImage 33
+#define X_LbxGetImage 34
+
+#define X_LbxBeginLargeRequest 35
+#define X_LbxLargeRequestData 36
+#define X_LbxEndLargeRequest 37
+
+#define X_LbxInternAtoms 38
+#define X_LbxGetWinAttrAndGeom 39
+
+#define X_LbxGrabCmap 40
+#define X_LbxReleaseCmap 41
+#define X_LbxAllocColor 42
+
+#define X_LbxSync 43
+
+/*
+ * Redefine some basic types used by structures defined herein. This removes
+ * any possibility on 64-bit architectures of one entity viewing communicated
+ * data as 32-bit quantities and another entity viewing the same data as 64-bit
+ * quantities.
+ */
+#define XID CARD32
+#define Atom CARD32
+#define Colormap CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define Window CARD32
+
+typedef struct {
+ BOOL success; /* TRUE */
+ BOOL changeType;
+ CARD16 majorVersion B16,
+ minorVersion B16;
+ CARD16 length B16; /* 1/4 additional bytes in setup info */
+ CARD32 tag B32;
+} xLbxConnSetupPrefix;
+
+typedef struct _LbxQueryVersion {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxQueryVersion */
+ CARD16 length B16;
+} xLbxQueryVersionReq;
+#define sz_xLbxQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of LBX protocol */
+ CARD16 minorVersion B16; /* minor version of LBX protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxQueryVersionReply;
+#define sz_xLbxQueryVersionReply 32
+
+typedef struct _LbxStartProxy {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxStartProxy */
+ CARD16 length B16;
+} xLbxStartProxyReq;
+#define sz_xLbxStartProxyReq 4
+
+typedef struct _LbxStopProxy {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxStopProxy */
+ CARD16 length B16;
+} xLbxStopProxyReq;
+#define sz_xLbxStopProxyReq 4
+
+typedef struct _LbxSwitch {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxSwitch */
+ CARD16 length B16;
+ CARD32 client B32; /* new client */
+} xLbxSwitchReq;
+#define sz_xLbxSwitchReq 8
+
+typedef struct _LbxNewClient {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxNewClient */
+ CARD16 length B16;
+ CARD32 client B32; /* new client */
+} xLbxNewClientReq;
+#define sz_xLbxNewClientReq 8
+
+typedef struct _LbxCloseClient {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxCloseClient */
+ CARD16 length B16;
+ CARD32 client B32; /* new client */
+} xLbxCloseClientReq;
+#define sz_xLbxCloseClientReq 8
+
+typedef struct _LbxModifySequence {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxModifySequence */
+ CARD16 length B16;
+ CARD32 adjust B32;
+} xLbxModifySequenceReq;
+#define sz_xLbxModifySequenceReq 8
+
+typedef struct _LbxAllowMotion {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxAllowMotion */
+ CARD16 length B16;
+ CARD32 num B32;
+} xLbxAllowMotionReq;
+#define sz_xLbxAllowMotionReq 8
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGrabCmap */
+ CARD16 length B16;
+ Colormap cmap B32;
+} xLbxGrabCmapReq;
+#define sz_xLbxGrabCmapReq 8
+
+#define LBX_SMART_GRAB 0x80
+#define LBX_AUTO_RELEASE 0x40
+#define LBX_3CHANNELS 0x20
+#define LBX_2BYTE_PIXELS 0x10
+#define LBX_RGB_BITS_MASK 0x0f
+
+#define LBX_LIST_END 0
+#define LBX_PIXEL_PRIVATE 1
+#define LBX_PIXEL_SHARED 2
+#define LBX_PIXEL_RANGE_PRIVATE 3
+#define LBX_PIXEL_RANGE_SHARED 4
+#define LBX_NEXT_CHANNEL 5
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 flags;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B16;
+} xLbxGrabCmapReply;
+#define sz_xLbxGrabCmapReply 32
+#define sz_xLbxGrabCmapReplyHdr 8
+
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxReleaseCmap */
+ CARD16 length B16;
+ Colormap cmap B32;
+} xLbxReleaseCmapReq;
+#define sz_xLbxReleaseCmapReq 8
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxAllocColor */
+ CARD16 length B16;
+ Colormap cmap B32;
+ CARD32 pixel B32;
+ CARD16 red B16, green B16, blue B16;
+ CARD16 pad B16;
+} xLbxAllocColorReq;
+#define sz_xLbxAllocColorReq 20
+
+typedef struct _LbxIncrementPixel {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxIncrementPixel */
+ CARD16 length B16;
+ CARD32 cmap B32;
+ CARD32 pixel B32;
+} xLbxIncrementPixelReq;
+#define sz_xLbxIncrementPixelReq 12
+
+typedef struct _LbxDelta {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxDelta */
+ CARD16 length B16;
+ CARD8 diffs; /* number of diffs */
+ CARD8 cindex; /* cache index */
+ /* list of diffs follows */
+} xLbxDeltaReq;
+#define sz_xLbxDeltaReq 6
+
+typedef struct _LbxGetModifierMapping {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetModifierMapping */
+ CARD16 length B16;
+} xLbxGetModifierMappingReq;
+#define sz_xLbxGetModifierMappingReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 keyspermod;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxGetModifierMappingReply;
+#define sz_xLbxGetModifierMappingReply 32
+
+typedef struct _LbxGetKeyboardMapping {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetKeyboardMapping */
+ CARD16 length B16;
+ KeyCode firstKeyCode;
+ CARD8 count;
+ CARD16 pad1 B16;
+} xLbxGetKeyboardMappingReq;
+#define sz_xLbxGetKeyboardMappingReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 keysperkeycode;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxGetKeyboardMappingReply;
+#define sz_xLbxGetKeyboardMappingReply 32
+
+typedef struct _LbxQueryFont {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxQueryFont */
+ CARD16 length B16;
+ CARD32 fid B32;
+} xLbxQueryFontReq;
+#define sz_xLbxQueryFontReq 8
+
+typedef struct _LbxInternAtoms {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxInternAtoms */
+ CARD16 length B16;
+ CARD16 num B16;
+} xLbxInternAtomsReq;
+#define sz_xLbxInternAtomsReq 6
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 atomsStart B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxInternAtomsReply;
+#define sz_xLbxInternAtomsReply 32
+#define sz_xLbxInternAtomsReplyHdr 8
+
+
+typedef struct _LbxGetWinAttrAndGeom {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetWinAttrAndGeom */
+ CARD16 length B16;
+ CARD32 id B32; /* window id */
+} xLbxGetWinAttrAndGeomReq;
+#define sz_xLbxGetWinAttrAndGeomReq 8
+
+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 pad1 B16;
+ Window root B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD16 borderWidth B16;
+ CARD8 depth;
+ CARD8 pad2;
+} xLbxGetWinAttrAndGeomReply;
+#define sz_xLbxGetWinAttrAndGeomReply 60
+
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxSync */
+ CARD16 length B16;
+} xLbxSyncReq;
+#define sz_xLbxSyncReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxSyncReply;
+#define sz_xLbxSyncReply 32
+
+
+/* an LBX squished charinfo packs the data in a CARD32 as follows */
+#define LBX_WIDTH_SHIFT 26
+#define LBX_LEFT_SHIFT 20
+#define LBX_RIGHT_SHIFT 13
+#define LBX_ASCENT_SHIFT 7
+#define LBX_DESCENT_SHIFT 0
+
+#define LBX_WIDTH_BITS 6
+#define LBX_LEFT_BITS 6
+#define LBX_RIGHT_BITS 7
+#define LBX_ASCENT_BITS 6
+#define LBX_DESCENT_BITS 7
+
+#define LBX_WIDTH_MASK 0xfc000000
+#define LBX_LEFT_MASK 0x03f00000
+#define LBX_RIGHT_MASK 0x000fe000
+#define LBX_ASCENT_MASK 0x00001f80
+#define LBX_DESCENT_MASK 0x0000007f
+
+#define LBX_MASK_BITS(val, n) ((unsigned int) ((val) & ((1 << (n)) - 1)))
+
+typedef struct {
+ CARD32 metrics B32;
+} xLbxCharInfo;
+
+/* note that this is identical to xQueryFontReply except for missing
+ * first 2 words
+ */
+typedef struct {
+ xCharInfo minBounds;
+/* XXX do we need to leave this gunk? */
+#ifndef WORD64
+ CARD32 walign1 B32;
+#endif
+ xCharInfo maxBounds;
+#ifndef WORD64
+ CARD32 walign2 B32;
+#endif
+ 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 xLbxCharInfo structures */
+} xLbxFontInfo;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 compression;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ /* X_QueryFont sticks much of the data in the base reply packet,
+ * but we hope that it won't be needed, (and it won't fit in 32 bytes
+ * with the tag anyways)
+ *
+ * if any additional data is needed, its sent in a xLbxFontInfo
+ */
+} xLbxQueryFontReply;
+#define sz_xLbxQueryFontReply 32
+
+typedef struct _LbxChangeProperty {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxChangeProperty */
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32;
+ Atom type B32;
+ CARD8 format;
+ CARD8 mode;
+ BYTE pad[2];
+ CARD32 nUnits B32;
+} xLbxChangePropertyReq;
+#define sz_xLbxChangePropertyReq 24
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 tag B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxChangePropertyReply;
+#define sz_xLbxChangePropertyReply 32
+
+typedef struct _LbxGetProperty {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetProperty */
+ CARD16 length B16;
+ Window window B32;
+ Atom property B32;
+ Atom type B32;
+ CARD8 delete;
+ BYTE pad[3];
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+} xLbxGetPropertyReq;
+#define sz_xLbxGetPropertyReq 28
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 format;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32;
+ CARD32 tag B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xLbxGetPropertyReply;
+#define sz_xLbxGetPropertyReply 32
+
+typedef struct _LbxTagData {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxTagData */
+ CARD16 length B16;
+ XID tag B32;
+ CARD32 real_length B32;
+ /* data */
+} xLbxTagDataReq;
+#define sz_xLbxTagDataReq 12
+
+typedef struct _LbxInvalidateTag {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxInvalidateTag */
+ CARD16 length B16;
+ CARD32 tag B32;
+} xLbxInvalidateTagReq;
+#define sz_xLbxInvalidateTagReq 8
+
+typedef struct _LbxPutImage {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxPutImage */
+ CARD16 length B16;
+ CARD8 compressionMethod;
+ CARD8 cacheEnts;
+ CARD8 bitPacked;
+ /* rest is variable */
+} xLbxPutImageReq;
+#define sz_xLbxPutImageReq 7
+
+typedef struct {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxGetImage */
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 planeMask B32;
+ CARD8 format;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xLbxGetImageReq;
+
+#define sz_xLbxGetImageReq 24
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 lbxLength B32;
+ CARD32 xLength B32;
+ VisualID visual B32;
+ CARD8 compressionMethod;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xLbxGetImageReply;
+
+#define sz_xLbxGetImageReply 32
+
+/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment,
+ LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */
+
+#define GFX_CACHE_SIZE 15
+
+#define GFXdCacheEnt(e) ((e) & 0xf)
+#define GFXgCacheEnt(e) (((e) >> 4) & 0xf)
+#define GFXCacheEnts(d,g) (((d) & 0xf) | (((g) & 0xf) << 4))
+
+#define GFXCacheNone 0xf
+
+typedef struct _LbxPolyPoint {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ CARD8 padBytes;
+} xLbxPolyPointReq;
+
+#define sz_xLbxPolyPointReq 6
+
+typedef xLbxPolyPointReq xLbxPolyLineReq;
+typedef xLbxPolyPointReq xLbxPolySegmentReq;
+typedef xLbxPolyPointReq xLbxPolyRectangleReq;
+typedef xLbxPolyPointReq xLbxPolyArcReq;
+typedef xLbxPolyPointReq xLbxPolyFillRectangleReq;
+typedef xLbxPolyPointReq xLbxPolyFillArcReq;
+
+#define sz_xLbxPolyLineReq sz_xLbxPolyPointReq
+#define sz_xLbxPolySegmentReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyRectangleReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyArcReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyFillRectangleReq sz_xLbxPolyPointReq
+#define sz_xLbxPolyFillArc sz_xLbxPolyPointReq
+
+typedef struct _LbxFillPoly {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ BYTE shape;
+ CARD8 padBytes;
+} xLbxFillPolyReq;
+#define sz_xLbxFillPolyReq 7
+
+typedef struct _LbxCopyArea {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 srcCache; /* source drawable */
+ CARD8 cacheEnts; /* dest drawable and gc */
+ /* followed by encoded src x, src y, dst x, dst y, width, height */
+} xLbxCopyAreaReq;
+
+#define sz_xLbxCopyAreaReq 6
+
+typedef struct _LbxCopyPlane {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD32 bitPlane B32;
+ CARD8 srcCache; /* source drawable */
+ CARD8 cacheEnts; /* dest drawable and gc */
+ /* followed by encoded src x, src y, dst x, dst y, width, height */
+} xLbxCopyPlaneReq;
+
+#define sz_xLbxCopyPlaneReq 10
+
+typedef struct _LbxPolyText {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ /* followed by encoded src x, src y coordinates and text elts */
+} xLbxPolyTextReq;
+
+#define sz_xLbxPolyTextReq 5
+
+typedef xLbxPolyTextReq xLbxPolyText8Req;
+typedef xLbxPolyTextReq xLbxPolyText16Req;
+
+#define sz_xLbxPolyTextReq 5
+#define sz_xLbxPolyText8Req 5
+#define sz_xLbxPolyText16Req 5
+
+typedef struct _LbxImageText {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType;
+ CARD16 length B16;
+ CARD8 cacheEnts;
+ CARD8 nChars;
+ /* followed by encoded src x, src y coordinates and string */
+} xLbxImageTextReq;
+
+typedef xLbxImageTextReq xLbxImageText8Req;
+typedef xLbxImageTextReq xLbxImageText16Req;
+
+#define sz_xLbxImageTextReq 6
+#define sz_xLbxImageText8Req 6
+#define sz_xLbxImageText16Req 6
+
+typedef struct {
+ CARD8 offset;
+ CARD8 diff;
+} xLbxDiffItem;
+#define sz_xLbxDiffItem 2
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 nOpts;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 optDataStart B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxStartReply;
+#define sz_xLbxStartReply 32
+#define sz_xLbxStartReplyHdr 8
+
+typedef struct _LbxQueryExtension {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxQueryExtension */
+ CARD16 length B16;
+ CARD32 nbytes B32;
+} xLbxQueryExtensionReq;
+#define sz_xLbxQueryExtensionReq 8
+
+typedef struct _LbxQueryExtensionReply {
+ BYTE type; /* X_Reply */
+ CARD8 numReqs;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL present;
+ CARD8 major_opcode;
+ CARD8 first_event;
+ CARD8 first_error;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+
+ /* reply & event generating requests */
+} xLbxQueryExtensionReply;
+#define sz_xLbxQueryExtensionReply 32
+
+
+typedef struct _LbxBeginLargeRequest {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxBeginLargeRequest */
+ CARD16 length B16;
+ CARD32 largeReqLength B32;
+} xLbxBeginLargeRequestReq;
+#define sz_BeginLargeRequestReq 8
+
+typedef struct _LbxLargeRequestData {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxLargeRequestData */
+ CARD16 length B16;
+ /* followed by LISTofCARD8 data */
+} xLbxLargeRequestDataReq;
+#define sz_LargeRequestDataReq 4
+
+typedef struct _LbxEndLargeRequest {
+ CARD8 reqType; /* always LbxReqCode */
+ CARD8 lbxReqType; /* always X_LbxEndLargeRequest */
+ CARD16 length B16;
+} xLbxEndLargeRequestReq;
+#define sz_EndLargeRequestReq 4
+
+
+
+typedef struct _LbxSwitchEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxSwitchEvent */
+ CARD16 pad B16;
+ CARD32 client B32;
+} xLbxSwitchEvent;
+#define sz_xLbxSwitchEvent 8
+
+typedef struct _LbxCloseEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxCloseEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 client B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxCloseEvent;
+#define sz_xLbxCloseEvent 32
+
+typedef struct _LbxInvalidateTagEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxInvalidateTagEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 tag B32;
+ CARD32 tagType B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xLbxInvalidateTagEvent;
+#define sz_xLbxInvalidateTagEvent 32
+
+typedef struct _LbxSendTagDataEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxSendTagDataEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 tag B32;
+ CARD32 tagType B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xLbxSendTagDataEvent;
+#define sz_xLbxSendTagDataEvent 32
+
+typedef struct _LbxListenToOneEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxListenToOneEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 client B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxListenToOneEvent;
+#define sz_xLbxListenToOneEvent 32
+
+typedef struct _LbxListenToAllEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxListenToAllEvent */
+ CARD16 sequenceNumber B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xLbxListenToAllEvent;
+#define sz_xLbxListenToOneEvent 32
+
+typedef struct _LbxReleaseCmapEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxReleaseCmapEvent */
+ CARD16 sequenceNumber B16;
+ Colormap colormap B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xLbxReleaseCmapEvent;
+#define sz_xLbxReleaseCmapEvent 32
+
+
+typedef struct _LbxFreeCellsEvent {
+ BYTE type; /* always eventBase + LbxEvent */
+ BYTE lbxType; /* LbxFreeCellsEvent */
+ CARD16 sequenceNumber B16;
+ Colormap colormap B32;
+ CARD32 pixelStart B32;
+ CARD32 pixelEnd B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xLbxFreeCellsEvent;
+#define sz_xLbxFreeCellsEvent 32
+
+
+/*
+ * squished X event sizes. If these change, be sure to update lbxquish.c
+ * and unsquish.c appropriately
+ *
+ * lbxsz_* is the padded squished length
+ * lbxupsz_* is the unpadded squished length
+ */
+
+#define lbxsz_KeyButtonEvent 32
+#define lbxupsz_KeyButtonEvent 31
+
+#define lbxsz_EnterLeaveEvent 32
+#define lbxupsz_EnterLeaveEvent 32
+
+#define lbxsz_FocusEvent 12
+#define lbxupsz_FocusEvent 9
+
+#define lbxsz_KeymapEvent 32
+#define lbxupsz_KeymapEvent 32
+
+#define lbxsz_ExposeEvent 20
+#define lbxupsz_ExposeEvent 18
+
+#define lbxsz_GfxExposeEvent 24
+#define lbxupsz_GfxExposeEvent 21
+
+#define lbxsz_NoExposeEvent 12
+#define lbxupsz_NoExposeEvent 11
+
+#define lbxsz_VisibilityEvent 12
+#define lbxupsz_VisibilityEvent 9
+
+#define lbxsz_CreateNotifyEvent 24
+#define lbxupsz_CreateNotifyEvent 23
+
+#define lbxsz_DestroyNotifyEvent 12
+#define lbxupsz_DestroyNotifyEvent 12
+
+#define lbxsz_UnmapNotifyEvent 16
+#define lbxupsz_UnmapNotifyEvent 13
+
+#define lbxsz_MapNotifyEvent 16
+#define lbxupsz_MapNotifyEvent 13
+
+#define lbxsz_MapRequestEvent 12
+#define lbxupsz_MapRequestEvent 12
+
+#define lbxsz_ReparentEvent 24
+#define lbxupsz_ReparentEvent 21
+
+#define lbxsz_ConfigureNotifyEvent 28
+#define lbxupsz_ConfigureNotifyEvent 27
+
+#define lbxsz_ConfigureRequestEvent 28
+#define lbxupsz_ConfigureRequestEvent 28
+
+#define lbxsz_GravityEvent 16
+#define lbxupsz_GravityEvent 16
+
+#define lbxsz_ResizeRequestEvent 12
+#define lbxupsz_ResizeRequestEvent 12
+
+#define lbxsz_CirculateEvent 20
+#define lbxupsz_CirculateEvent 17
+
+#define lbxsz_PropertyEvent 20
+#define lbxupsz_PropertyEvent 17
+
+#define lbxsz_SelectionClearEvent 16
+#define lbxupsz_SelectionClearEvent 16
+
+#define lbxsz_SelectionRequestEvent 28
+#define lbxupsz_SelectionRequestEvent 28
+
+#define lbxsz_SelectionNotifyEvent 24
+#define lbxupsz_SelectionNotifyEvent 24
+
+#define lbxsz_ColormapEvent 16
+#define lbxupsz_ColormapEvent 14
+
+#define lbxsz_MappingNotifyEvent 8
+#define lbxupsz_MappingNotifyEvent 7
+
+#define lbxsz_ClientMessageEvent 32
+#define lbxupsz_ClientMessageEvent 32
+
+#define lbxsz_UnknownEvent 32
+
+#ifdef DEBUG
+
+#define DBG_SWITCH 0x00000001
+#define DBG_CLOSE 0x00000002
+#define DBG_IO 0x00000004
+#define DBG_READ_REQ 0x00000008
+#define DBG_LEN 0x00000010
+#define DBG_BLOCK 0x00000020
+#define DBG_CLIENT 0x00000040
+#define DBG_DELTA 0x00000080
+
+extern int lbxDebug;
+
+#define DBG(n,m) if (lbxDebug & (n)) { fprintf m; } else
+#else
+#define DBG(n,m)
+#endif
+
+/*
+ * Cancel the previous redefinition of the basic types, thus restoring their
+ * X.h definitions.
+ */
+
+#undef XID
+#undef Atom
+#undef Colormap
+#undef Drawable
+#undef VisualID
+#undef Window
+
+#endif /* _LBXPROTO_H_ */
diff --git a/X11/extensions/mitmiscconst.h b/X11/extensions/mitmiscconst.h
new file mode 100644
index 000000000..adc5f9420
--- /dev/null
+++ b/X11/extensions/mitmiscconst.h
@@ -0,0 +1,38 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
+
+
+#ifndef _MITMISCCONST_H_
+#define _MITMISCCONST_H_
+
+#define MITMiscNumberEvents 0
+#define MITMiscNumberErrors 0
+
+#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD"
+
+#endif
diff --git a/X11/extensions/mitmiscproto.h b/X11/extensions/mitmiscproto.h
new file mode 100644
index 000000000..18c202a84
--- /dev/null
+++ b/X11/extensions/mitmiscproto.h
@@ -0,0 +1,68 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
+
+#ifndef _MITMISCPROTO_H_
+#define _MITMISCPROTO_H_
+
+#include <X11/extensions/mitmiscconst.h>
+
+#define X_MITSetBugMode 0
+#define X_MITGetBugMode 1
+
+typedef struct _SetBugMode {
+ CARD8 reqType; /* always MITReqCode */
+ CARD8 mitReqType; /* always X_MITSetBugMode */
+ CARD16 length B16;
+ BOOL onOff;
+ BYTE pad0;
+ CARD16 pad1;
+} xMITSetBugModeReq;
+#define sz_xMITSetBugModeReq 8
+
+typedef struct _GetBugMode {
+ CARD8 reqType; /* always MITReqCode */
+ CARD8 mitReqType; /* always X_MITGetBugMode */
+ CARD16 length B16;
+} xMITGetBugModeReq;
+#define sz_xMITGetBugModeReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL onOff;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xMITGetBugModeReply;
+#define sz_xMITGetBugModeReply 32
+
+#endif /* _MITMISCPROTO_H_ */
diff --git a/X11/extensions/multibufconst.h b/X11/extensions/multibufconst.h
new file mode 100644
index 000000000..2d1238c31
--- /dev/null
+++ b/X11/extensions/multibufconst.h
@@ -0,0 +1,83 @@
+/*
+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.
+ */
+
+#ifndef _MULTIBUFCONST_H_
+#define _MULTIBUFCONST_H_
+
+#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering"
+
+#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */
+#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */
+
+/*
+ * update_action field
+ */
+#define MultibufferUpdateActionUndefined 0
+#define MultibufferUpdateActionBackground 1
+#define MultibufferUpdateActionUntouched 2
+#define MultibufferUpdateActionCopied 3
+
+/*
+ * update_hint field
+ */
+#define MultibufferUpdateHintFrequent 0
+#define MultibufferUpdateHintIntermittent 1
+#define MultibufferUpdateHintStatic 2
+
+/*
+ * valuemask fields
+ */
+#define MultibufferWindowUpdateHint (1L << 0)
+#define MultibufferBufferEventMask (1L << 0)
+
+/*
+ * mono vs. stereo and left vs. right
+ */
+#define MultibufferModeMono 0
+#define MultibufferModeStereo 1
+#define MultibufferSideMono 0
+#define MultibufferSideLeft 1
+#define MultibufferSideRight 2
+
+/*
+ * clobber state
+ */
+#define MultibufferUnclobbered 0
+#define MultibufferPartiallyClobbered 1
+#define MultibufferFullyClobbered 2
+
+/*
+ * event stuff
+ */
+#define MultibufferClobberNotifyMask 0x02000000
+#define MultibufferUpdateNotifyMask 0x04000000
+
+#define MultibufferClobberNotify 0
+#define MultibufferUpdateNotify 1
+#define MultibufferNumberEvents (MultibufferUpdateNotify + 1)
+
+#define MultibufferBadBuffer 0
+#define MultibufferNumberErrors (MultibufferBadBuffer + 1)
+
+#endif /* _MULTIBUFCONST_H_ */
diff --git a/X11/extensions/multibufproto.h b/X11/extensions/multibufproto.h
new file mode 100644
index 000000000..e2184d3a8
--- /dev/null
+++ b/X11/extensions/multibufproto.h
@@ -0,0 +1,295 @@
+/*
+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.
+ */
+
+#ifndef _MULTIBUFPROTO_H_
+#define _MULTIBUFPROTO_H_
+
+#include <X11/extensions/multibufconst.h>
+
+/*
+ * Protocol requests constants and alignment values
+ */
+
+#define Window CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define Multibuffer CARD32
+
+#define X_MbufGetBufferVersion 0
+#define X_MbufCreateImageBuffers 1
+#define X_MbufDestroyImageBuffers 2
+#define X_MbufDisplayImageBuffers 3
+#define X_MbufSetMBufferAttributes 4
+#define X_MbufGetMBufferAttributes 5
+#define X_MbufSetBufferAttributes 6
+#define X_MbufGetBufferAttributes 7
+#define X_MbufGetBufferInfo 8
+#define X_MbufCreateStereoWindow 9
+#define X_MbufClearImageBufferArea 10
+
+
+typedef struct xMbufBufferInfo {
+ CARD32 visualID B32; /* associated visual */
+ CARD16 maxBuffers B16; /* maximum supported buffers */
+ CARD8 depth; /* depth of visual (redundant) */
+ CARD8 unused;
+} xMbufBufferInfo;
+#define sz_xMbufBufferInfo 8
+
+typedef struct {
+ BYTE type;
+ BYTE unused;
+ CARD16 sequenceNumber B16;
+ CARD32 buffer B32; /* affected buffer */
+ BYTE state; /* current status */
+ CARD8 unused1;
+ CARD16 unused2 B16;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+ CARD32 unused6 B32;
+ CARD32 unused7 B32;
+} xMbufClobberNotifyEvent;
+
+typedef struct {
+ BYTE type;
+ BYTE unused;
+ CARD16 sequenceNumber B16;
+ CARD32 buffer B32; /* affected buffer */
+ CARD32 timeStamp B32; /* update time */
+ CARD32 unused1 B32;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+ CARD32 unused6 B32;
+} xMbufUpdateNotifyEvent;
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetBufferVersion */
+ CARD16 length B16;
+} xMbufGetBufferVersionReq;
+#define sz_xMbufGetBufferVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 majorVersion; /* major version of Multi-Buffering protocol */
+ CARD8 minorVersion; /* minor version of Multi-Buffering protocol */
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xMbufGetBufferVersionReply;
+#define sz_xMbufGetBufferVersionReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+ CARD8 updateAction; /* action at update */
+ CARD8 updateHint; /* hint as to frequency of updates */
+ CARD16 unused;
+} xMbufCreateImageBuffersReq; /* followed by buffer ids */
+#define sz_xMbufCreateImageBuffersReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 numberBuffer B16; /* number successfully allocated */
+ CARD16 unused1 B16;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+ CARD32 unused6 B32;
+} xMbufCreateImageBuffersReply;
+#define sz_xMbufCreateImageBuffersReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+} xMbufDestroyImageBuffersReq;
+#define sz_xMbufDestroyImageBuffersReq 8
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */
+ CARD16 length B16;
+ CARD16 minDelay B16; /* minimum time between last update and now */
+ CARD16 maxDelay B16; /* maximum time between last update and now */
+} xMbufDisplayImageBuffersReq; /* followed by list of buffers */
+#define sz_xMbufDisplayImageBuffersReq 8
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+ CARD32 valueMask B32; /* modified entries */
+} xMbufSetMBufferAttributesReq; /* followed by values */
+#define sz_xMbufSetMBufferAttributesReq 12
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */
+ CARD16 length B16;
+ CARD32 window B32; /* associated window */
+} xMbufGetMBufferAttributesReq;
+#define sz_xMbufGetMBufferAttributesReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 displayedBuffer B16; /* currently visible buffer */
+ CARD8 updateAction;
+ CARD8 updateHint;
+ CARD8 windowMode;
+ CARD8 unused0;
+ CARD16 unused1 B16;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+} xMbufGetMBufferAttributesReply;
+#define sz_xMbufGetMBufferAttributesReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */
+ CARD16 length B16;
+ CARD32 buffer B32;
+ CARD32 valueMask B32;
+} xMbufSetBufferAttributesReq; /* followed by values */
+#define sz_xMbufSetBufferAttributesReq 12
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */
+ CARD16 length B16;
+ CARD32 buffer B32;
+} xMbufGetBufferAttributesReq;
+#define sz_xMbufGetBufferAttributesReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 window B32;
+ CARD32 eventMask B32;
+ CARD16 bufferIndex B16;
+ CARD8 side;
+ CARD8 unused0;
+ CARD32 unused1 B32;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+} xMbufGetBufferAttributesReply;
+#define sz_xMbufGetBufferAttributesReply 32
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufGetBufferInfo */
+ CARD16 length B16;
+ Drawable drawable B32;
+} xMbufGetBufferInfoReq;
+#define sz_xMbufGetBufferInfoReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 normalInfo B16;
+ CARD16 stereoInfo B16;
+ CARD32 unused1 B32;
+ CARD32 unused2 B32;
+ CARD32 unused3 B32;
+ CARD32 unused4 B32;
+ CARD32 unused5 B32;
+} xMbufGetBufferInfoReply; /* followed by buffer infos */
+#define sz_xMbufGetBufferInfoReply 32
+
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */
+ CARD16 length B16;
+ CARD8 unused0;
+ CARD8 unused1;
+ CARD8 unused2;
+ CARD8 depth;
+ Window wid B32;
+ Window parent B32;
+ Multibuffer left B32; /* associated buffers */
+ Multibuffer right B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 borderWidth B16;
+#if defined(__cplusplus) || defined(c_plusplus)
+ CARD16 c_class B16;
+#else
+ CARD16 class B16;
+#endif
+ VisualID visual B32;
+ CARD32 mask B32;
+} xMbufCreateStereoWindowReq; /* followed by value list */
+#define sz_xMbufCreateStereoWindowReq 44
+
+typedef struct {
+ CARD8 reqType; /* always codes->major_opcode */
+ CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */
+ CARD16 length B16;
+ Multibuffer buffer B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD8 unused0;
+ CARD8 unused1;
+ CARD8 unused2;
+ BOOL exposures;
+} xMbufClearImageBufferAreaReq;
+#define sz_xMbufClearImageBufferAreaReq 20
+
+#undef Window
+#undef Drawable
+#undef VisualID
+#undef Multibuffer
+
+#endif /* _MULTIBUFPROTO_H_ */
diff --git a/X11/extensions/randr.h b/X11/extensions/randr.h
index 17e6ef9f6..c624d96b2 100644
--- a/X11/extensions/randr.h
+++ b/X11/extensions/randr.h
@@ -2,6 +2,7 @@
* Copyright © 2000 Compaq Computer Corporation
* Copyright © 2002 Hewlett Packard Company
* Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -39,11 +40,11 @@ typedef unsigned long XRandrModeFlags;
#define RANDR_NAME "RANDR"
#define RANDR_MAJOR 1
-#define RANDR_MINOR 2
+#define RANDR_MINOR 3
#define RRNumberErrors 3
#define RRNumberEvents 2
-#define RRNumberRequests 25
+#define RRNumberRequests 32
#define X_RRQueryVersion 0
/* we skip 1 to make old clients fail pretty immediately */
@@ -77,6 +78,20 @@ typedef unsigned long XRandrModeFlags;
#define X_RRGetCrtcGamma 23
#define X_RRSetCrtcGamma 24
+/* V1.3 additions */
+#define X_RRGetScreenResourcesCurrent 25
+#define X_RRSetCrtcTransform 26
+#define X_RRGetCrtcTransform 27
+#define X_RRGetPanning 28
+#define X_RRSetPanning 29
+#define X_RRSetOutputPrimary 30
+#define X_RRGetOutputPrimary 31
+
+#define RRTransformUnit (1L << 0)
+#define RRTransformScaleUp (1L << 1)
+#define RRTransformScaleDown (1L << 2)
+#define RRTransformProjective (1L << 3)
+
/* Event selection bits */
#define RRScreenChangeNotifyMask (1L << 0)
/* V1.2 additions */
@@ -136,6 +151,12 @@ typedef unsigned long XRandrModeFlags;
/* Conventional RandR output properties */
-#define RR_PROPERTY_RANDR_EDID "RANDR_EDID"
+#define RR_PROPERTY_RANDR_EDID "EDID"
+#define RR_PROPERTY_SIGNAL_FORMAT "SignalFormat"
+#define RR_PROPERTY_SIGNAL_PROPERTIES "SignalProperties"
+#define RR_PROPERTY_CONNECTOR_TYPE "ConnectorType"
+#define RR_PROPERTY_CONNECTOR_NUMBER "ConnectorNumber"
+#define RR_PROPERTY_COMPATIBILITY_LIST "CompatibilityList"
+#define RR_PROPERTY_CLONE_LIST "CloneList"
#endif /* _RANDR_H_ */
diff --git a/X11/extensions/randrproto.h b/X11/extensions/randrproto.h
index 3fb2e45e4..3b98a9f1f 100644
--- a/X11/extensions/randrproto.h
+++ b/X11/extensions/randrproto.h
@@ -2,6 +2,7 @@
* Copyright © 2000 Compaq Computer Corporation
* Copyright © 2002 Hewlett-Packard Company
* Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -31,6 +32,7 @@
#define _XRANDRP_H_
#include <X11/extensions/randr.h>
+#include <X11/extensions/renderproto.h>
#define Window CARD32
#define Drawable CARD32
@@ -562,6 +564,88 @@ typedef struct {
#define sz_xRRSetCrtcGammaReq 12
/*
+ * Additions for V1.3
+ */
+
+typedef xRRGetScreenResourcesReq xRRGetScreenResourcesCurrentReq;
+
+#define sz_xRRGetScreenResourcesCurrentReq sz_xRRGetScreenResourcesReq
+
+typedef xRRGetScreenResourcesReply xRRGetScreenResourcesCurrentReply;
+#define sz_xRRGetScreenResourcesCurrentReply sz_xRRGetScreenResourcesReply
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+ xRenderTransform transform;
+ CARD16 nbytesFilter; /* number of bytes in filter name */
+ CARD16 pad B16;
+} xRRSetCrtcTransformReq;
+
+#define sz_xRRSetCrtcTransformReq 48
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+} xRRGetCrtcTransformReq;
+
+#define sz_xRRGetCrtcTransformReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ xRenderTransform pendingTransform;
+ BYTE hasTransforms;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ xRenderTransform currentTransform;
+ CARD32 pad2 B32;
+ CARD16 pendingNbytesFilter B16; /* number of bytes in filter name */
+ CARD16 pendingNparamsFilter B16; /* number of filter params */
+ CARD16 currentNbytesFilter B16; /* number of bytes in filter name */
+ CARD16 currentNparamsFilter B16; /* number of filter params */
+} xRRGetCrtcTransformReply;
+
+#define sz_xRRGetCrtcTransformReply 96
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+ RROutput output B32;
+} xRRSetOutputPrimaryReq;
+#define sz_xRRSetOutputPrimaryReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+} xRRGetOutputPrimaryReq;
+#define sz_xRRGetOutputPrimaryReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ RROutput output B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRRGetOutputPrimaryReply;
+#define sz_xRRGetOutputPrimaryReply 32
+
+/*
* event
*/
typedef struct {
@@ -602,8 +686,8 @@ typedef struct {
CARD8 type; /* always evBase + RRNotify */
CARD8 subCode; /* RRNotify_OutputChange */
CARD16 sequenceNumber B16;
- Time timestamp B32; /* time crtc was changed */
- Time configTimestamp B32; /* time crtc was changed */
+ Time timestamp B32; /* time output was changed */
+ Time configTimestamp B32; /* time config was changed */
Window window B32; /* window requesting notification */
RROutput output B32; /* affected output */
RRCrtc crtc B32; /* current crtc */
@@ -630,6 +714,70 @@ typedef struct {
} xRROutputPropertyNotifyEvent;
#define sz_xRROutputPropertyNotifyEvent 32
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+} xRRGetPanningReq;
+#define sz_xRRGetPanningReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time timestamp B32;
+ CARD16 left B16;
+ CARD16 top B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 track_left B16;
+ CARD16 track_top B16;
+ CARD16 track_width B16;
+ CARD16 track_height B16;
+ INT16 border_left B16;
+ INT16 border_top B16;
+ INT16 border_right B16;
+ INT16 border_bottom B16;
+} xRRGetPanningReply;
+#define sz_xRRGetPanningReply 36
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+ Time timestamp B32;
+ CARD16 left B16;
+ CARD16 top B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 track_left B16;
+ CARD16 track_top B16;
+ CARD16 track_width B16;
+ CARD16 track_height B16;
+ INT16 border_left B16;
+ INT16 border_top B16;
+ INT16 border_right B16;
+ INT16 border_bottom B16;
+} xRRSetPanningReq;
+#define sz_xRRSetPanningReq 36
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time newTimestamp B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRRSetPanningReply;
+#define sz_xRRSetPanningReply 32
+
#undef RRModeFlags
#undef RRCrtc
#undef RRMode
diff --git a/X11/extensions/randrproto.txt b/X11/extensions/randrproto.txt
index 6719cf800..1af20905a 100644
--- a/X11/extensions/randrproto.txt
+++ b/X11/extensions/randrproto.txt
@@ -1,6 +1,6 @@
The X Resize, Rotate and Reflect Extension
- Version 1.2
- 2006-4-13
+ Version 1.3
+ 2006-20-7
Jim Gettys
Jim.Gettys@hp.com
@@ -110,6 +110,20 @@ bandwidth for large resolution screens. This is exposed in RandR by
requiring that nothing be connected to the second CRTC when driving a high
resolution screen on the first.
+1.3 Introduction to version 1.3 of the extension
+
+Version 1.3 builds on the changes made with version 1.2 and adds some new
+capabilities without fundmentally changing the extension again. The
+following features are added in this version:
+
+ • Projective Transforms. The implementation work for general rotation
+ support made it trivial to add full projective transformations. These
+ can be used to scale the screen up/down as well as perform projector
+ keystone correct or other effects.
+
+ • Panning. It was removed with RandR 1.2 because the old semantics didn't
+ fit any longer. With RandR 1.3 panning can be specified per crtc.
+
1.1 Acknowledgements
Our thanks to the contributors to the design found on the xpert mailing
@@ -497,6 +511,12 @@ dynamic changes in the display environment.
extension and the core protocol. They must be non-zero, or Value
error results.
+ If panning is enabled, the width and height of the panning and the
+ tracking areas are adapted to the new size and clamped afterwards.
+ Disabled panning axes remain disabled.
+ Panning borders are disabled if their requirements are no longer met
+ (see RRSetPanning).
+
┌───
RRGetScreenResources
window: WINDOW
@@ -528,10 +548,10 @@ dynamic changes in the display environment.
This request explicitly asks the server to ensure that the
configuration data is up-to-date wrt the hardware. If that requires
- polling, this is when such polling would take place. Requests for
- further information should not poll, but rather return the data
- collected at this point.
-
+ polling, this is when such polling would take place. If the
+ current configuration is all that's required, use
+ RRGetScreenResourcesCurrent instead.
+
┌───
RRGetOutputInfo
output: OUTPUT
@@ -846,8 +866,10 @@ dynamic changes in the display environment.
'x' and 'y' indicate the position of this CRTC within the screen
region. They will be set to 0 when the CRTC is disabled.
- 'width' and 'height' indicate the size of the area presented by this
- CRTC.
+ 'width' and 'height' indicate the size of the area within the screen
+ presented by this CRTC. This may be different than the size of the
+ mode due to rotation. They will be set to 0 when the CRTC is
+ disabled.
'mode' indicates which mode is active, or None indicating that the
CRTC has been disabled and is not displaying the screen contents.
@@ -925,6 +947,12 @@ dynamic changes in the display environment.
then re-enabling the CRTC at the new configuration to avoid an
invalid intermediate configuration.
+ If panning is enabled, the width and height of the panning and the
+ tracking areas are clamped to the new mode size.
+ Disabled panning axes remain disabled.
+ Panning borders are disabled if their requirements are no longer met
+ (see RRSetPanning).
+
When this request succeeds, 'status' contains Success and the
requested changes to configuration will have been made.
@@ -968,6 +996,250 @@ dynamic changes in the display environment.
must be the size returned by RRGetCrtcGammaSize else a Value error
results.
+7.2. Extension Requests added in version 1.3 of the extension
+
+┌───
+ RRGetScreenResourcesCurrent
+ window: WINDOW
+ ▶
+ timestamp: TIMESTAMP
+ config-timestamp: TIMESTAMP
+ crtcs: LISTofCRTC
+ outputs: LISTofOUTPUT
+ modes: LISTofMODEINFO
+└───
+ Errors: Window
+
+ RRGetScreenResourcesCurrent returns the list of outputs and crtcs
+ connected to the screen associated with 'window'.
+
+ 'timestamp' indicates when the configuration was last set.
+
+ 'config-timestamp' indicates when the configuration information last
+ changed. Requests to configure the output will fail unless the
+ timestamp indicates that the information the client is using is up
+ to date, to ensure clients can be well behaved in the face of race
+ conditions.
+
+ 'crtcs' contains the list of CRTCs associated with the screen.
+
+ 'outputs' contains the list of outputs associated with the screen.
+
+ 'modes' contains the list of modes associated with the screen
+
+ Unlike RRGetScreenResources, this merely returns the current
+ configuration, and does not poll for hardware changes.
+
+┌───
+ RRSetCrtcTransform
+ crtc: CRTC
+ transform: TRANSFORM
+ filter: STRING8
+ values: LISTofFIXED
+└───
+ Errors: Crtc, Match
+
+ This request provides a mechanism that is more general than the
+ existing rotation and reflection values for describing the
+ transformation from frame buffer image to crtc presentation.
+ 'transform' is a full 2D projective transformation from screen
+ coordinate space to crtc coordinate space. This transformation is
+ applied before the rotation and reflection values to compute the
+ complete transform.
+
+ 'filter' and 'values' specify a Render filter that may be used by the
+ server when transforming data from frame buffer to crtc.
+
+ This request sets the transform to be used at the next
+ RRSetCrtcConfig request execution; it does not cause any change to
+ occur in the current configuration.
+
+ When a non-identity transformation is in use, the rectangle returned
+ by RRGetCrtcInfo defines the bounding rectangle of the screen that is
+ projected to the crtc. It is this projected rectangle which must be
+ within the area of the screen when the mode is set.
+
+┌───
+ RRGetCrtcTransform
+ crtc: CRTC
+ ▶
+ pending-transform: TRANSFORM
+ pending-filter: STRING8
+ pending-values: LISTofFIXED
+ current-transform: TRANSFORM
+ current-filter: STRING8
+ current-values: LISTofFIXED
+└───
+
+ This request returns the pending and current transforms for the
+ specified CRTC. The pending transform will be the same as the current
+ transform if no new pending transform has been set since the last call
+ to RRSetCrtcConfig.
+
+┌───
+ RRGetPanning
+ crtc: CRTC
+ ▶
+ status: RRCONFIGSTATUS
+ timestamp: TIMESTAMP
+ left, top, width, height: CARD16
+ track_left, track_top, track_width, track_height: CARD16
+ border_left, border_top, border_right, border_bottom: INT16
+└───
+
+ Errors: Crtc
+
+ Version 1.3 adds panning support again. If multiple crtcs are active
+ the panning behavior can be defined per crtc individually.
+ RRGetPanning returns information about the currently set panning
+ configuration for the specified crtc. If the CRTC does not support
+ panning, all fields (except timestamp) will be 0.
+
+ 'timestamp' indicates when the configuration was last set.
+
+ All other entries are explained for RRSetPanning.
+
+┌───
+ RRSetPanning
+ crtc: CRTC
+ timestamp: TIMESTAMP
+ left, top, width, height: CARD16
+ track_left, track_top, track_width, track_height: CARD16
+ border_left, border_top, border_right, border_bottom: INT16
+ ▶
+ status: RRCONFIGSTATUS
+ new-timestamp: TIMESTAMP
+└───
+ Errors: Crtc, Match
+
+ This request sets the panning parameters. As soon as panning is
+ enabled, the CRTC position can change with every pointer move.
+ RRCrtcChangeNotify events are sent to the clients requesting those.
+
+ If 'timestamp' is less than the time when the configuration was last
+ successfully set, the request is ignored and InvalidTime returned in
+ status.
+
+ ┌──┳━━━━━━━━━━━━━━┳─────┬ ─ ─ ─ ─ ─ ┐
+ │ ┃ CRTC ┃ │
+ │ ┃ ┃ │ │
+ │ ┃ X┃→ │
+ │ ┃ ┃ │ │ framebuffer
+ │ ┗━━━━━━━━━━━━━━┛ │
+ │ │ │
+ │panning area │
+ └───────────────────────┴ ─ ─ ─ ─ ─ ┘
+
+ 'left', 'top', 'width', and 'height' contain the total panning area
+ for this CRTC. 'width' has to be larger than or equal to the CRTC's
+ width or 0, and 'left'+'width' must be within the screen size, else a
+ Match error results. Equivalent restrictions for the height exist.
+ 'width' or 'height' set to 0 indicate that panning should be disabled
+ on the according axis. Setting 'width'/'height' to the CRTC's
+ width/height will disable panning on the X/Y axis as well, but
+ RRSetScreenSize will silently enable panning if the screen size is
+ increased. This does not happen if set to 0.
+
+ ┌────────┳━━━━━━━━━━━━━━┳ ─ ─ ─ ─ ─ ┐
+ │ ┃ CRTC ┃
+ │ ┃ ┃ │
+ │ ┃ ┃
+ │ ┃ ┃ │ tracking area
+ │ ┗━━━━━━━━━━━━━━┫ X
+ │ ↓ │ ↓ │
+ │panning area │
+ └───────────────────────┴ ─ ─ ─ ─ ─ ┘
+
+ 'track_left', 'track_top', 'track_width', and 'track_height' contain
+ the pointer area for which the panning region is updated. For normal
+ use cases it should enclose the panning area minus borders, and is
+ typically set to either the panning area minus borders, or to the
+ total screen size. If set to the total screen size, the CRTC will pan
+ in the remaining axis even if the pointer is outside the panning area
+ on a different CRTC, as shown in the figure above. If the pointer is
+ outside the tracking area, the CRTC will not pan. Zero can be used as
+ an alias for the total screen size.
+
+ ┌──┳━━━━━━━━━━━━━━┳────────────┐
+ │ ┃ CRTC ┃ │
+ │ ┃ ┃ │
+ │ ┃ ┃→ │
+ │ ┃ X←→┃ │
+ │ ┃ border_right │
+ │ ┗━━━━━━━━━━━━━━┛ │
+ │ │
+ │panning area │
+ └──────────────────────────────┘
+
+ 'border_left', 'border_top', 'border_right', and 'border_bottom'
+ define the distances from the CRTC borders that will activate panning
+ if the pointer hits them. If the borders are 0, the screen will pan
+ when the pointer hits the CRTC borders (behavior of pre-RandR Xserver
+ panning). If the borders are positive, the screen will pan when the
+ pointer gets close to the CRTC borders, if they are negative, the
+ screen will only pan when the pointer is already way past the CRTC
+ borders. Negative values might confuse users and disable panning to
+ the very edges of the screen. Thus they are discouraged.
+ border_left + border_right has to be lower or equal than the CRTC's
+ width, else a Match error results. An equivalent restriction for the
+ height exists.
+
+ Screen size changes update the panning and the tracking areas to the
+ new size. Both screen size changes and mode changes clamp these areas
+ to the current CRTC size. In these cases panning borders are disabled
+ if their requirements are no longer met.
+
+ When this request succeeds, 'status' contains Success and the
+ requested changes to configuration will have been made.
+
+ 'new-time-stamp' contains the time at which this request was
+ executed.
+
+┌───
+ RRSetOutputPrimary
+ window: WINDOW
+ output: OUTPUT
+└───
+ Errors: Match, Output, Window
+
+ RRSetOutputPrimary marks 'output' as the primary output for the
+ screen with the same root window as 'window'. This output's CRTC
+ will be sorted to the front of the list in Xinerama and RANDR
+ geometry requests for the benefit of older applications. The
+ default primary output is None, and None is a legal value to pass
+ to RRSetOutputPrimary. This request is expected to be used by
+ desktop environments to mark the screen that should hold the primary
+ menu bar or panel.
+
+ If the named output is not connected to any CRTC, or if the Window
+ and Output are not attached to the same screen, BadMatch is generated.
+ In the latter case, errorValue will be the Window, not the Output.
+
+ As this changes the logical layout of the screen, ConfigureNotify
+ and RRScreenChangeNotify will be generated on the appropriate root
+ window when the primary output is changed by this call. This request
+ also generates RROutputChangeNotify events on the outputs that gained
+ and lost primary status.
+
+ If an output is disconnected asynchronously (eg. due to recabling),
+ the primary status does not change, but RROutputChangeNotify events
+ will be generated if the hardware is capable of detecting this;
+ clients are expected to reconfigure if appropriate.
+
+ If an output is deleted (eg. due to device hotplug), the server will
+ act as though None was passed to RRSetOutputPrimary, including
+ generating the appropriate events.
+
+┌───
+ RRGetOutputPrimary
+ window: WINDOW
+ ▶
+ output: OUTPUT
+└───
+ Errors: Window
+
+ RRGetOutputPrimary returns the primary output for the system.
+
❧❧❧❧❧❧❧❧❧❧❧
8. Extension Events
@@ -990,12 +1262,12 @@ factors, such as re-cabling a monitor, etc.
configTimestamp: TIMESTAMP time config data was changed
root: WINDOW root window of screen
window: WINDOW window requesting notification
- size-id: SIZEID index of new size
+ size-id: SIZEID index of new SCREENSIZE
subpixelOrder: SUBPIXELORDER order of subpixels
- widthInPixels: CARD16
- heightInPixels: CARD16
- widthInMillimeters: CARD16
- heightInMillimeters: CARD16
+ widthInPixels: CARD16 width in pixels of the new SCREENSIZE
+ heightInPixels: CARD16 height in pixels of the new SCREENSIZE
+ widthInMillimeters: CARD16 width in mm of the new SCREENSIZE
+ heightInMillimeters: CARD16 height in mm of the new SCREENSIZE
└───
This event is generated whenever the screen configuration is changed
and sent to requesting clients. 'timestamp' indicates when the
@@ -1021,6 +1293,13 @@ factors, such as re-cabling a monitor, etc.
just at the time when a display manager or log in script might
be changing the screen size or configuration.
+ Note that the sizes in this event reflect the new SCREENSIZE and
+ thus will appear rotated by the 'rotation' parameter from the sizes
+ of the screen itself. In other words, when rotation is 90 or 270,
+ widthInPixels in this event will be the same as the height value
+ from a ConfigureNotify that reflects the same size change. This
+ will probably confuse developers.
+
8.1 Events added in version 1.2 of the RandR extension
┌───
@@ -1065,27 +1344,26 @@ factors, such as re-cabling a monitor, etc.
┌───
RRCrtcChangeNotify
timestamp: TIMESTAMP time monitor was changed
- config-timestamp: TIMESTAMP time config data was changed
- root: WINDOW root window of screen
window: WINDOW window requesting notification
crtc: CRTC CRTC which changed
mode: MODE new mode
rotation: ROTATION; new rotation
x: INT16 x position of CRTC within screen
y: INT16 y position of CRTC within screen
+ width: CARD16 width of new mode
+ height: CARD16 height of new mode
└───
This event is generated whenever the CRTC configuration is changed
and sent to requesting clients. 'timestamp' indicates when the
- CRTC configuration was changed. 'config-timestamp' says when the
- last time the configuration was changed. 'root' is the root of the
- screen the change occurred on, 'window' is window selecting for this
- event.
+ CRTC configuration was changed. 'window' is window selecting for this
+ event. 'mode' is the new mode, or None if the crtc is disabled.
+ 'x' and 'y' mark the location in the screen where this CRTC
+ is reading data. 'width' and 'height' indicate the size of the
+ mode. 'x', 'y, 'width' and 'height' are all zero when 'mode' is None.
This event is sent whenever the monitor's configuration changes
or if a new monitor configuration becomes available that was
- not available in the past. In this case (config-timestamp in
- the event not being equal to the config-timestamp returned in
- the last call to RRGetCrtcModes), the client MUST call
+ not available in the past. In this case, the client MUST call
RRGetCrtcModes to update its view of possible monitor
configurations to have a correct view of possible monitor
organizations.
@@ -1100,7 +1378,173 @@ factors, such as re-cabling a monitor, etc.
❧❧❧❧❧❧❧❧❧❧❧
-9. Extension Versioning
+9. Properties
+
+Properties are used for output specific parameters, and for announcing
+static or rarely changing data. Announced data is typically
+immutable. Properties are also used for evaluating new parameters
+before adding them to the RandR protocol.
+
+The following properties are hereby declared official, and drivers SHOULD
+prefix driver specific properties with '_', unless they are planned to be
+added to this specification. List values, that are not declared by the table
+below, and will remain driver specific or are not planned to be added to this
+specification, SHOULD be prefixed with "_" as well in order to avoid name
+space or semantics clashes with future extensions of these values.
+
+Beginning with version 1.3 of the RandR extension, certain properties
+are mandatory and MUST be provided by implementations. Earlier
+versions of the RandR extension MAY provide these properties as well,
+as long as the semantics are not altered. Clients SHOULD fall back
+gracefully to lower version functionality, though, if the driver
+doesn't handle a mandatory property correctly.
+
+9.1 Known properties
+
+ "EDID" aka RR_PROPERTY_RANDR_EDID
+ Type: int8 [n]
+ Flags: Immutable
+ Range/List: -
+
+ Raw EDID data from the device attached to the according
+ output. Should include main EDID data and all extension
+ blocks.
+
+ "SignalFormat" aka RR_PROPERTY_SIGNAL_FORMAT
+ Type: int32 / Atom
+ Flags: -
+ Range/List: unknown VGA TMDS LVDS Composite Composite-PAL
+ Composite-NTSC Composite-SECAM SVideo
+ Component DisplayPort
+
+ Signal format / physical protocol format that is used for the
+ specified output. valid-values lists all possible formats on this
+ output, which SHOULD be a subset of the list above and MUST be static.
+ Values with dashes (Composite-PAL) describe more specific versions of
+ the base values (Composite) and SHOULD be used if known to the driver.
+ A driver MAY change this property of an output if the underlying
+ hardware indicates a protocol change (e.g. TV formats). Clients are
+ allowed to change the signal format in order to select a different
+ signal format (e.g. Composite etc.) or physical protocol (e.g. VGA or
+ TMDS on DVI-I).
+ Laptop panels SHOULD not be detected with this property, but rather by
+ ConnectorType.
+
+ "SignalProperties" aka RR_PROPERTY_SIGNAL_FORMAT
+ Type: int32 [n] / Atom
+ Flags: -
+ Range/List: For Composite signals:
+ NTSC NTSC-M NTSC-J NTSC-N NTSC-4.43 NTSC-film
+ PAL PAL-B PAL-G PAL-H PAL-H PAL-I PAL-M PAL-D
+ PAL-N PAL-Nc PAL-L PAL-60
+ SECAM SECAM-L SECAM-B SECAM-G SECAM-D SECAM-K
+ SECAM-H SECAM-K
+ For TMDS signals:
+ SingleLink DualLink
+ For DisplayPort signals:
+ Lane1 Lane2 Lane4 LowSpeed HiSpeed
+
+ Properties of the signal format that is currently used for the
+ specified output. valid-values lists all possible properties on this
+ output, which SHOULD be a subset of the list above. It will change if
+ SignalFormat changes. Multiple properties are allowed.
+ Values with dashes (PAL-B) describe more specific versions of the base
+ values (PAL) and SHOULD be used if known to the driver. A driver MAY
+ change this property of an output if the underlying hardware indicates
+ a signal change (e.g. TV formats). Clients are allowed to change the
+ properties in order to select a different signal subformat.
+
+ "ConnectorType" aka RR_PROPERTY_CONNECTOR_TYPE
+ Type: int32 / Atom
+ Flags: Immutable, Static
+ Range/List: unknown VGA DVI DVI‐I DVI‐A DVI‐D HDMI Panel
+ TV TV-Composite TV-SVideo TV-Component
+ TV-SCART TV-C4 DisplayPort
+
+ Connector type, as far as known to the driver.
+ Values with dashes (TV‐Composite) describe more specific versions of
+ the base values (TV). The former SHOULD be used if the connector is
+ not capable of producing other signal formats. The later SHOULD be
+ used if the exact connector is unknown, or the connector is a
+ multi‐format connector that is not described otherwise. DVI, for
+ instance, SHOULD be handled like a DVI‐I connector, unless additional
+ information is available to the user agent. PANEL describes
+ laptop‐internal (normally LVDS) displays. TV, TV‐SCART, TV‐Component,
+ and TV‐C4 with signal format VGA are valid combinations and describe
+ RGB TV signals.
+
+ "ConnectorNumber" aka RR_PROPERTY_CONNECTOR_NUMBER
+ Type: int32
+ Flags: Immutable, Static
+ Range/List: 0-
+
+ Outputs that route their signal to the same connector MUST
+ have the same connector number. Outputs with the same
+ connector number MUST route their signal to the same
+ connector, except if it is 0, which indicates unknown
+ connectivity. 1 is called the primary connector, 2 the
+ secondary. 3 is typically a TV connector, but that is completely
+ driver / hardware dependent.
+ Outputs with the same connector number SHOULD have the same
+ connector type. Meaning and client behavior for mismatching
+ connector types is undefined at the moment.
+
+ "CompatibilityList" aka RR_PROPERTY_COMPATIBILITY_LIST
+ Type: int32 [2*n] / Atom pairs
+ Flags: Immutable
+ Range/List: 0-
+
+ Some combinations of outputs on some cards cannot be served at all,
+ because the according encoder is only capable of driving one output at
+ a time.
+ This property lists all output + signal format pairs that can be
+ driven together with this output. NULL atoms specify any output / any
+ signal format, respectively.
+ This property MUST be symmetric, but may change with changing signal
+ format. I.e. if the property for DVI-1/TMDS specifies VGA-1/VGA to be
+ available, VGA-1/VGA has to list DVI-1/TMDS as well.
+
+ "CloneList" aka RR_PROPERTY_CLONE_LIST
+ Type: int32 [2*n] / Atom pairs
+ Flags: Immutable
+ Range/List: 0-
+
+ Some combinations of outputs on some cards cannot be served
+ independently from each other, because they are wired up to the same
+ encoder outputs.
+ This property lists all output + signal format pairs that are
+ driven together with this output, and thus can only be programmed in
+ clone mode with the same CRTC.
+ This property MUST be symmetric, but may change with changing signal
+ format. I.e. if the property for DVI-1/VGA specifies VGA-1/VGA to be
+ cloned, VGA-1/VGA has to list DVI-1/VGA as well.
+ Outputs / format pairs listed in this property MUST be included in the
+ CompatibilityList.
+
+
+9.2 Properties introduced with version 1.2 of the RandR extension
+
+Property Immutable Mandatory since
+──────── ───────── ───────────────
+EdidData yes n/a
+
+EdidData is provided by the RandR frontend, thus not driver specific.
+
+
+9.3 Properties introduced with version 1.3 of the RandR extension
+
+Property Immutable Mandatory since
+──────── ───────── ───────────────
+SignalFormat no RandR 1.3
+SignalProperties no not mandatory
+ConnectorType yes: static RandR 1.3
+ConnectorNumber yes: static not mandatory
+CompatibilityList yes not mandatory
+CloneList yes not mandatory
+
+ ❧❧❧❧❧❧❧❧❧❧❧
+
+10. Extension Versioning
The RandR extension was developed in parallel with the implementation
to ensure the feasibility of various portions of the design. As
@@ -1128,23 +1572,29 @@ list of what each version provided:
1.2: Separate screens from CRTCs and outputs, switch to full VESA
modes
+ 1.3: Added cheap version of RRGetScreenResources. Added CRTC
+ transformations. Added panning. Added primary outputs.
+ Added standard properties.
+
Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients
will fail against 1.0 servers. The wire encoding op-codes were
changed for GetScreenInfo to ensure this failure in a relatively
graceful way. Version 1.1 servers and clients are cross compatible with
1.0. Version 1.1 is considered to be stable and we intend upward
compatibility from this point. Version 1.2 offers an extended model of the
-system with multiple output support. It offers backward compatibility with
-version 1.1.
+system with multiple output support. Version 1.3 adds a cheap version of
+GetScreenResources to avoid expensive DDC operations, CRTC transformations,
+panning, and the primary output concept. 1.2 and 1.3 are backward-compatible
+with 1.1.
❧❧❧❧❧❧❧❧❧❧❧
-10. Relationship with other extensions
+11. Relationship with other extensions
Two other extensions have a direct relationship with this extension. This
section attempts to explain how these three are supposed to work together.
-10.1 XFree86-VidModeExtension
+11.1 XFree86-VidModeExtension
XFree86-VidModeExtension changes the configuration of a single monitor
attached to the screen without changing the configuration of the screen
@@ -1161,7 +1611,7 @@ All of the utility of this extension is subsumed by RandR version 1.2, RandR
should be used in preference to XFree86-VidModeExtension where both are
present.
-10.2 Xinerama
+11.2 Xinerama
Xinerama provides a mechanism for describing the relationship between the
overall screen display and monitors placed within that area. As such, it
@@ -1434,6 +1884,7 @@ A.2.1 Protocol Requests added with version 1.2
2 n length of name
4c LISTofCRTC crtcs
4m LISTofMODE modes
+ 4o LISTofOUTPUT clones
n STRING8 name
p unused, p=pad(n)
└───
@@ -1680,6 +2131,155 @@ A.2.1 Protocol Requests added with version 1.2
p unused, p=pad(6n)
└───
+A.2.2 Protocol Requests added with version 1.3
+
+┌───
+ RRGetScreenResourcesCurrent
+ 1 CARD8 major opcode
+ 1 25 RandR opcode
+ 2 2 length
+ 4 WINDOW window
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 c+o+8m+(b+p)/4 reply length
+ 4 TIMESTAMP timestamp
+ 4 TIMESTAMP config-timestamp
+ 2 c number of CRTCs
+ 2 o number of outputs
+ 2 m number of modeinfos
+ 2 b total bytes in mode names
+ 8 unused
+ 4c LISTofCRTC crtcs
+ 4o LISTofOUTPUT outputs
+ 32m LISTofMODEINFO modeinfos
+ b STRING8 mode names
+ p unused, p=pad(b)
+└───
+
+┌───
+ RRSetCrtcTransform
+ 1 CARD8 major opcode
+ 1 26 RandR opcode
+ 2 12+(n+p)/4+v length
+ 4 CRTC crtc
+ 36 TRANSFORM transform
+ 2 CARD16 filter length
+ 2 unused
+ n STRING8 filter name
+ p unused, p=pad(n)
+ 4v FIXED filter params
+└───
+
+┌───
+ RRGetCrtcTransform
+ 1 CARD8 major opcode
+ 1 27 RandR opcode
+ 2 2 length
+ 4 CRTC crtc
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 16+(pn+pnp)/4+(cn+cnp)/4+pf+cf reply length
+ 36 TRANSFORM pending transform
+ 1 BOOL has transforms
+ 3 unused
+ 36 TRANSFORM current transform
+ 4 unused
+ 2 pn pending filter name length
+ 2 pf pending filter num params
+ 2 cn current filter name length
+ 2 cf current filter num params
+ pn STRING8 pending filter name
+ pnp unused, pnp=pad(pn)
+ 4*pf FIXED pending filter params
+ cn STRING8 current filter name
+ cnp unused, cnp=pad(cn)
+ 4*cf FIXED current filter params
+└───
+
+┌───
+ RRGetPanning
+ 1 CARD8 major opcode
+ 1 28 RandR opcode
+ 2 2 length
+ 4 CRTC crtc
+ ▶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 1 reply length
+ 4 TIMESTAMP timestamp
+ 2 CARD16 left
+ 2 CARD16 top
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 track_left
+ 2 CARD16 track_top
+ 2 CARD16 track_width
+ 2 CARD16 track_height
+ 2 INT16 border_left
+ 2 INT16 border_top
+ 2 INT16 border_right
+ 2 INT16 border_bottom
+└───
+┌───
+ RRSetPanning
+ 1 CARD8 major opcode
+ 1 29 RandR opcode
+ 2 9 length
+ 4 CRTC crtc
+ 4 TIMESTAMP timestamp
+ 2 CARD16 left
+ 2 CARD16 top
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 CARD16 track_left
+ 2 CARD16 track_top
+ 2 CARD16 track_width
+ 2 CARD16 track_height
+ 2 INT16 border_left
+ 2 INT16 border_top
+ 2 INT16 border_right
+ 2 INT16 border_bottom
+ ▶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 TIMESTAMP new timestamp
+ 20 unused
+└───
+
+┌───
+ RRSetOutputPrimary
+ 1 CARD8 major opcode
+ 1 30 RandR opcode
+ 2 3 length
+ 4 WINDOW window
+ 4 OUTPUT output
+└───
+
+┌───
+ RRGetOutputPrimary
+ 1 CARD8 major opcode
+ 1 31 RandR opcode
+ 2 2 length
+ 4 WINDOW window
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 CARD32 length
+ 4 OUTPUT output
+ 4 CARD32 pad1
+ 4 CARD32 pad2
+ 4 CARD32 pad3
+ 4 CARD32 pad4
+└───
+
A.3 Protocol Events
┌───
diff --git a/X11/extensions/render.h b/X11/extensions/render.h
index 497af6d10..1afb1ca43 100644
--- a/X11/extensions/render.h
+++ b/X11/extensions/render.h
@@ -33,7 +33,7 @@ typedef XID PictFormat;
#define RENDER_NAME "RENDER"
#define RENDER_MAJOR 0
-#define RENDER_MINOR 10
+#define RENDER_MINOR 11
#define X_RenderQueryVersion 0
#define X_RenderQueryPictFormats 1
@@ -139,6 +139,27 @@ typedef XID PictFormat;
#define PictOpConjointXor 0x2b
#define PictOpConjointMaximum 0x2b
+/*
+ * Operators only available in version 0.11
+ */
+#define PictOpBlendMinimum 0x30
+#define PictOpMultiply 0x30
+#define PictOpScreen 0x31
+#define PictOpOverlay 0x32
+#define PictOpDarken 0x33
+#define PictOpLighten 0x34
+#define PictOpColorDodge 0x35
+#define PictOpColorBurn 0x36
+#define PictOpHardLight 0x37
+#define PictOpSoftLight 0x38
+#define PictOpDifference 0x39
+#define PictOpExclusion 0x3a
+#define PictOpHSLHue 0x3b
+#define PictOpHSLSaturation 0x3c
+#define PictOpHSLColor 0x3d
+#define PictOpHSLLuminosity 0x3e
+#define PictOpBlendMaximum 0x3e
+
#define PolyEdgeSharp 0
#define PolyEdgeSmooth 1
diff --git a/X11/extensions/renderproto.txt b/X11/extensions/renderproto.txt
index af158b500..5249e6c9e 100644
--- a/X11/extensions/renderproto.txt
+++ b/X11/extensions/renderproto.txt
@@ -139,7 +139,11 @@ PICTOP { Clear, Src, Dst, Over, OverReverse, In, InReverse,
ConjointClear, ConjointSrc, ConjointDst, ConjointOver,
ConjointOverReverse, ConjointIn, ConjointInReverse,
ConjointOut, ConjointOutReverse, ConjointAtop,
- ConjointAtopReverse, ConjointXor }
+ ConjointAtopReverse, ConjointXor,
+ Multiply, Screen, Overlay, Darken, Lighten, ColorDodge,
+ ColorBurn, HardLight, SoftLight, Difference, Exclusion,
+ HSLHue, HSLSaturation, HSLColor, HSLLuminosity
+ }
SUBPIXEL { Unknown, HorizontalRGB, HorizontalBGR,
VerticalRGB, VerticalBGR, None
}
@@ -216,12 +220,6 @@ TRAPEZOID [
left, right: LINEFIX
]
(TRAPEZOID is deprecated)
-COLORTRIANGLE [
- p1, p2, p3: COLORPOINT
- ]
-COLORTRAP [
- top, bottom: COLORSPANFIX
- ]
GLYPHSET 32-bit value (top three bits guaranteed to be zero)
GLYPH 32-bit value
GLYPHINFO [
@@ -349,25 +347,27 @@ alpha channel is used in the final image composition.
9. Source and Mask Transformations
-When fetching pixels from the source or mask pictures, Render provides three
+When fetching pixels from the source or mask pictures, Render provides four
options for pixel values which fall outside the drawable (this includes
-pixels within a window geometry obscured by other windows).
+pixels within a window geometry obscured by other windows).
- + Transparent. Missing values are replaced with transparent.
+ + None. Missing values are replaced with transparent.
- + Nearest. Replace missing pixels with the nearest available
+ + Pad. Replace missing pixels with the nearest available
pixel. Where multiple pixels are equidistant, select
those with smallest Y and then smallest X coordinates
- + Tile. Select the pixel which would appear were the
+ + Normal. Select the pixel which would appear were the
drawable tiled to enclose the missing coordinate. If
the tiling doesn't cover the coordinate, use the
selected Constant or Nearest mode.
-When GraphicsExposures are selected in the destination picture, a region
-containing at least the union of all destination pixel values affected by
-data replaced as above is delivered after each compositing operation. If
-the resulting region is empty, a NoExpose event is delivered instead.
+ * Reflect. Select the pixel which would appear were the
+ drawable tiled to enclose the missing coordinate in such a
+ way that tiles in even numbered columns are reflected in the Y
+ axis, and tiles in even numbered rows are reflected in the X
+ axis. Tiles that in both an even numbered row and an even
+ numbered column are reflected in both axes.
To construct the source and mask operands, the computed pixels values are
transformed through a homogeneous matrix, filtered and then used in the
@@ -606,70 +606,62 @@ CreatePicture
dither: ATOM or None
component-alpha: BOOL
- When used as a source or mask operand, the repeat and fill-constant
- values control how pixels outside the geometry of the drawable are
- computed.
-
- Repeat indicates how the drawable contents should be extented
- in both directions.
+ When used as a source or mask operand, Repeat indicates how the
+ drawable contents should be extented in both directions.
The alpha channel of alpha-map is used in place of any alpha channel
contained within the drawable for all rendering operations. The
alpha-mask origin is interpreted relative to the origin of drawable.
- Rendering is additionally clipped by the geometry of alpha-map.
- Exposures to the window do not affect the contents of alpha-map.
- Alpha-map must refer to a picture containing a Pixmap, not a Window
- (or a Match error results).
+ Rendering is additionally clipped by the geometry and clip mask of
+ alpha-map. Exposures to the window do not affect the contents of
+ alpha-map. Alpha-map must refer to a picture containing a Pixmap,
+ not a Window (or a Match error results).
The clip-mask restricts reads and writes to drawable. Only pixels
where the clip-mask has bits set to 1 are read or written. Pixels
are not accessed 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, including sources. The clip-mask origin is interpreted
- relative to the origin of drawable. If a pixmap is specified as the
- clip-mask, it must have depth 1 and have the same root as the
+ relative to the origin of the picture. If a pixmap is specified as
+ the clip-mask, it must have depth 1 and have the same root as the
drawable (or a Match error results). If clip-mask is None, then
pixels are always drawn, regardless of the clip origin. The
clip-mask can also be set with the SetPictureClipRectangles request.
-
- For ClipByChildren, both source and destination windows are
- additionally clipped by all viewable InputOutput children. For
- IncludeInferiors , 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 IncludeInferiors with a source or
- destination window of one depth with mapped inferiors of differing
- depth is not illegal, but the semantics are undefined by this
- extension.
-
- The graphics-exposures flag controls GraphicsExposure event
- generation for Composite requests (and any similar requests
- defined by additional extensions).
-
- Poly-edge and poly-mode control the rasterization of polygons
- as described above.
-
- Dither selects which of the available dither patterns should
- be used. If dither is None, no dithering will be done.
-
- Component-alpha indicates whether each image component is
- intended as a separate alpha value when the picture is used
- as a mask operand.
+ Transformations, filters and repeat modes do not affect the clip
+ mask.
+
+ When a window is used as a destination, the subwindow_mode
+ determines what happens to pixels obscured by inferior
+ windows. For ClipByChildren the window is clipped by inferiors
+ and siblings. For IncludeInferior, the window is clipped by
+ siblings, but not by inferiors.
+
+ When a window is used as source or mask, the subwindow_mode is
+ ignored. Pixels that are obscured by other windows, whether
+ siblings or inferiors, have undefined contents.
+
+ The graphics-exposures flag is ignored. GraphicsExposure events are
+ never generated by this extension.
+
+ Poly-edge and poly-mode control the rasterization of polygons as
+ described above.
+
+ Dither is ignored.
+
+ Component-alpha indicates whether each image component is intended as
+ a separate alpha value when the picture is used as a mask operand.
The default component values are
Component Default
-------------------------------
- repeat False
- fill-nearest: False
+ repeat None
clip-x-origin 0
clip-y-origin 0
clip-mask None
- graphics-exposures True
subwindow-mode ClipByChildren
poly-edge Smooth
poly-mode Precise
- dither None
component-alpha False
ChangePicture
@@ -698,12 +690,14 @@ SetPictureClipRectangles
This request changes clip-mask in picture to the specified list of
rectangles and sets the clip origin. Input and output will be
clipped to remain contained within the rectangles. The clip origin
- is interpreted relative to the origin of the drawable associated
- with picture. The rectangle coordinates are interpreted relative to
- the clip origin. Note that the list of rectangles can be empty,
- which effectively disables output. This is the opposite of passing
- None as the clip-mask in CreatePicture and ChangePicture.
-
+ is interpreted relative to the origin of picture after
+ transformations and repeats have been applied. The rectangle
+ coordinates are interpreted relative to the clip origin.
+
+ The list of rectangles can be empty, which effectively disables
+ output. This is the opposite of passing None as the clip-mask in
+ CreatePicture and ChangePicture.
+
Note that output is clipped to the union of all of the rectangles
and that no particular ordering among the rectangles is required.
@@ -782,12 +776,6 @@ Composite
If mask is None, it is replaced by a constant alpha value of 1.
- When dst has graphics-exposures true, a region covering all dst
- pixels affected by substitutions performed on src or mask pixels
- outside their respective geometries is computed. If that region is
- empty, a NoExpose event is sent. Otherwise, a sequence of
- GraphicsExpose events are sent covering that region.
-
FillRectangles
op: PICTOP
@@ -833,6 +821,8 @@ Trapezoids
for each trapezoid
Combine (op, dst, source, trapezoid)
+ (The Trapezoids request is deprecated)
+
Triangles
op: PICTOP
@@ -917,31 +907,6 @@ TriFan
for each triangle
Combine (op, dst, source, triangle)
-ColorTrapezoids
-
- op: PICTOP
- dst: PICTURE
- trapezoids: LISTofCOLORTRAP
-
- The geometry of the trapezoids must meet the same requirements as
- for the Trapezoids request. The trapezoids are filled in the order
- they occur in the list.
-
-ColorTriangles
-
- op: PICTOP
- dst: PICTURE
- triangles: LISTofCOLORTRIANGLE
-
- The colored triangles are rasterized in the order they occur in the
- list.
-
-???
-
-Should I included compressed triangle representations here?
-
-???
-
CreateGlyphSet
gsid: GLYPHSET
@@ -992,21 +957,6 @@ AddGlyphs
are stored with each glyph in a separate Z-format image padded to a
32-bit boundary. Existing glyphs with the same names are replaced.
-AddGlyphsFromPicture
-
- glyphset: GLYPHSET
- src: PICTURE
- glyphs: LISTofPICTGLYPH
-
- Errors:
- GlyphSet, Alloc
-
- This request adds glyphs to glyphset by copying them from src from
- the locations included in glyphs. Existing glyphs with the same
- names are replaced. Src may be in a different PictFormat than
- glyphset, in which case the images are converted to the glyphset
- format.
-
FreeGlyphs
glyphset: GLYPHSET
@@ -1251,3 +1201,7 @@ what each version before 1.0 implemented:
The repeat picture attribute now supports Pad and
Reflect, older versions only supported None and Normal.
+
+ 0.11:
+ Blend mode operators
+
diff --git a/X11/extensions/secur.h b/X11/extensions/secur.h
new file mode 100644
index 000000000..ca27b29e6
--- /dev/null
+++ b/X11/extensions/secur.h
@@ -0,0 +1,61 @@
+/*
+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.
+*/
+
+#ifndef _SECUR_H
+#define _SECUR_H
+
+#define SECURITY_EXTENSION_NAME "SECURITY"
+#define SECURITY_MAJOR_VERSION 1
+#define SECURITY_MINOR_VERSION 0
+
+#define XSecurityNumberEvents 1
+#define XSecurityNumberErrors 2
+#define XSecurityBadAuthorization 0
+#define XSecurityBadAuthorizationProtocol 1
+
+/* trust levels */
+#define XSecurityClientTrusted 0
+#define XSecurityClientUntrusted 1
+
+/* authorization attribute masks */
+#define XSecurityTimeout (1<<0)
+#define XSecurityTrustLevel (1<<1)
+#define XSecurityGroup (1<<2)
+#define XSecurityEventMask (1<<3)
+#define XSecurityAllAuthorizationAttributes \
+ (XSecurityTimeout | XSecurityTrustLevel | XSecurityGroup | XSecurityEventMask)
+
+/* event masks */
+#define XSecurityAuthorizationRevokedMask (1<<0)
+#define XSecurityAllEventMasks XSecurityAuthorizationRevokedMask
+
+/* event offsets */
+#define XSecurityAuthorizationRevoked 0
+
+#define XSecurityAuthorizationName "XC-QUERY-SECURITY-1"
+#define XSecurityAuthorizationNameLen 19
+
+#endif /* _SECUR_H */
diff --git a/X11/extensions/securproto.h b/X11/extensions/securproto.h
new file mode 100644
index 000000000..409a4c5d0
--- /dev/null
+++ b/X11/extensions/securproto.h
@@ -0,0 +1,110 @@
+/*
+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.
+*/
+
+#ifndef _SECURPROTO_H
+#define _SECURPROTO_H
+
+#include <X11/extensions/secur.h>
+
+#define X_SecurityQueryVersion 0
+#define X_SecurityGenerateAuthorization 1
+#define X_SecurityRevokeAuthorization 2
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 securityReqType;
+ CARD16 length B16;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+} xSecurityQueryVersionReq;
+#define sz_xSecurityQueryVersionReq 8
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16;
+ CARD16 minorVersion B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xSecurityQueryVersionReply;
+#define sz_xSecurityQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 securityReqType;
+ CARD16 length B16;
+ CARD16 nbytesAuthProto B16;
+ CARD16 nbytesAuthData B16;
+ CARD32 valueMask B32;
+ /* auth protocol name padded to 4 bytes */
+ /* auth protocol data padded to 4 bytes */
+ /* list of CARD32 values, if any */
+} xSecurityGenerateAuthorizationReq;
+#define sz_xSecurityGenerateAuthorizationReq 12
+
+typedef struct {
+ CARD8 type;
+ CARD8 pad0;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 authId B32;
+ CARD16 dataLength B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ } xSecurityGenerateAuthorizationReply;
+#define sz_xSecurityGenerateAuthorizationReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 securityReqType;
+ CARD16 length B16;
+ CARD32 authId B32;
+} xSecurityRevokeAuthorizationReq;
+#define sz_xSecurityRevokeAuthorizationReq 8
+
+typedef struct _xSecurityAuthorizationRevokedEvent {
+ BYTE type;
+ BYTE detail;
+ CARD16 sequenceNumber B16;
+ CARD32 authId B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xSecurityAuthorizationRevokedEvent;
+#define sz_xSecurityAuthorizationRevokedEvent 32
+
+#endif /* _SECURPROTO_H */
diff --git a/X11/extensions/shapeconst.h b/X11/extensions/shapeconst.h
new file mode 100644
index 000000000..9088956f1
--- /dev/null
+++ b/X11/extensions/shapeconst.h
@@ -0,0 +1,55 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+#ifndef _SHAPECONST_H_
+#define _SHAPECONST_H_
+
+/*
+ * Protocol requests constants and alignment values
+ * These would really be in SHAPE's X.h and Xproto.h equivalents
+ */
+
+#define SHAPENAME "SHAPE"
+
+#define SHAPE_MAJOR_VERSION 1 /* current version numbers */
+#define SHAPE_MINOR_VERSION 1
+
+#define ShapeSet 0
+#define ShapeUnion 1
+#define ShapeIntersect 2
+#define ShapeSubtract 3
+#define ShapeInvert 4
+
+#define ShapeBounding 0
+#define ShapeClip 1
+#define ShapeInput 2
+
+#define ShapeNotifyMask (1L << 0)
+#define ShapeNotify 0
+
+#define ShapeNumberEvents (ShapeNotify + 1)
+
+#endif /* _SHAPECONST_H_ */
diff --git a/X11/extensions/shapeproto.h b/X11/extensions/shapeproto.h
new file mode 100644
index 000000000..49bd1a1a4
--- /dev/null
+++ b/X11/extensions/shapeproto.h
@@ -0,0 +1,237 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+#ifndef _SHAPEPROTO_H_
+#define _SHAPEPROTO_H_
+
+#include <X11/extensions/shapeconst.h>
+
+/*
+ * Protocol requests constants and alignment values
+ * These would really be in SHAPE's X.h and Xproto.h equivalents
+ */
+
+#define Window CARD32
+#define Time CARD32
+
+#define X_ShapeQueryVersion 0
+#define X_ShapeRectangles 1
+#define X_ShapeMask 2
+#define X_ShapeCombine 3
+#define X_ShapeOffset 4
+#define X_ShapeQueryExtents 5
+#define X_ShapeSelectInput 6
+#define X_ShapeInputSelected 7
+#define X_ShapeGetRectangles 8
+
+typedef struct _ShapeQueryVersion {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeQueryVersion */
+ CARD16 length B16;
+} xShapeQueryVersionReq;
+#define sz_xShapeQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of SHAPE protocol */
+ CARD16 minorVersion B16; /* minor version of SHAPE protocol */
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xShapeQueryVersionReply;
+#define sz_xShapeQueryVersionReply 32
+
+typedef struct _ShapeRectangles {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeRectangles */
+ CARD16 length B16;
+ CARD8 op; /* Set, ... */
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
+ CARD8 pad0; /* not used */
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+} xShapeRectanglesReq; /* followed by xRects */
+#define sz_xShapeRectanglesReq 16
+
+typedef struct _ShapeMask {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeMask */
+ CARD16 length B16;
+
+ CARD8 op; /* Set, ... */
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD16 junk B16; /* not used */
+
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+ CARD32 src B32; /* 1 bit pixmap */
+} xShapeMaskReq;
+#define sz_xShapeMaskReq 20
+
+typedef struct _ShapeCombine {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeCombine */
+ CARD16 length B16;
+ CARD8 op; /* Set, ... */
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD8 srcKind; /* ShapeBounding or ShapeClip */
+ CARD8 junk; /* not used */
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+ Window src B32;
+} xShapeCombineReq;
+#define sz_xShapeCombineReq 20
+
+typedef struct _ShapeOffset {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeOffset */
+ CARD16 length B16;
+ CARD8 destKind; /* ShapeBounding or ShapeClip */
+ CARD8 junk1; /* not used */
+ CARD16 junk2 B16; /* not used */
+ Window dest B32;
+ INT16 xOff B16;
+ INT16 yOff B16;
+} xShapeOffsetReq;
+#define sz_xShapeOffsetReq 16
+
+typedef struct _ShapeQueryExtents {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeQueryExtents */
+ CARD16 length B16;
+ Window window B32;
+} xShapeQueryExtentsReq;
+#define sz_xShapeQueryExtentsReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 unused; /* not used */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 boundingShaped; /* window has bounding shape */
+ CARD8 clipShaped; /* window has clip shape */
+ CARD16 unused1 B16;
+ INT16 xBoundingShape B16; /* extents of bounding shape */
+ INT16 yBoundingShape B16;
+ CARD16 widthBoundingShape B16;
+ CARD16 heightBoundingShape B16;
+ INT16 xClipShape B16; /* extents of clip shape */
+ INT16 yClipShape B16;
+ CARD16 widthClipShape B16;
+ CARD16 heightClipShape B16;
+ CARD32 pad1 B32;
+} xShapeQueryExtentsReply;
+#define sz_xShapeQueryExtentsReply 32
+
+typedef struct _ShapeSelectInput {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeSelectInput */
+ CARD16 length B16;
+ Window window B32;
+ BYTE enable; /* xTrue -> send events */
+ BYTE pad1;
+ CARD16 pad2 B16;
+} xShapeSelectInputReq;
+#define sz_xShapeSelectInputReq 12
+
+typedef struct _ShapeNotify {
+ BYTE type; /* always eventBase + ShapeNotify */
+ BYTE kind; /* either ShapeBounding or ShapeClip */
+ CARD16 sequenceNumber B16;
+ Window window B32;
+ INT16 x B16;
+ INT16 y B16; /* extents of new shape */
+ CARD16 width B16;
+ CARD16 height B16;
+ Time time B32; /* time of change */
+ BYTE shaped; /* set when a shape actual exists */
+ BYTE pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xShapeNotifyEvent;
+#define sz_xShapeNotifyEvent 32
+
+typedef struct _ShapeInputSelected {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeInputSelected */
+ CARD16 length B16;
+ Window window B32;
+} xShapeInputSelectedReq;
+#define sz_xShapeInputSelectedReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 enabled; /* current status */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD32 pad1 B32; /* unused */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xShapeInputSelectedReply;
+#define sz_xShapeInputSelectedReply 32
+
+typedef struct _ShapeGetRectangles {
+ CARD8 reqType; /* always ShapeReqCode */
+ CARD8 shapeReqType; /* always X_ShapeGetRectangles */
+ CARD16 length B16;
+ Window window B32;
+ CARD8 kind; /* ShapeBounding or ShapeClip */
+ CARD8 junk1;
+ CARD16 junk2 B16;
+} xShapeGetRectanglesReq;
+#define sz_xShapeGetRectanglesReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* not zero */
+ CARD32 nrects B32; /* number of rectangles */
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xShapeGetRectanglesReply; /* followed by xRectangles */
+#define sz_xShapeGetRectanglesReply 32
+
+#undef Window
+#undef Time
+
+#endif /* _SHAPEPROTO_H_ */
diff --git a/X11/extensions/shm.h b/X11/extensions/shm.h
new file mode 100644
index 000000000..e076402a8
--- /dev/null
+++ b/X11/extensions/shm.h
@@ -0,0 +1,44 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _SHM_H_
+#define _SHM_H_
+
+#define SHMNAME "MIT-SHM"
+
+#define SHM_MAJOR_VERSION 1 /* current version numbers */
+#define SHM_MINOR_VERSION 1
+
+#define ShmCompletion 0
+#define ShmNumberEvents (ShmCompletion + 1)
+
+#define BadShmSeg 0
+#define ShmNumberErrors (BadShmSeg + 1)
+
+
+#endif /* _SHM_H_ */
diff --git a/X11/extensions/shmproto.h b/X11/extensions/shmproto.h
new file mode 100644
index 000000000..e5de377b9
--- /dev/null
+++ b/X11/extensions/shmproto.h
@@ -0,0 +1,187 @@
+/************************************************************
+
+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.
+
+********************************************************/
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _SHMPROTO_H_
+#define _SHMPROTO_H_
+
+#include <X11/extensions/shm.h>
+
+#define ShmSeg CARD32
+#define Drawable CARD32
+#define VisualID CARD32
+#define GContext CARD32
+#define Pixmap CARD32
+
+#define X_ShmQueryVersion 0
+#define X_ShmAttach 1
+#define X_ShmDetach 2
+#define X_ShmPutImage 3
+#define X_ShmGetImage 4
+#define X_ShmCreatePixmap 5
+
+typedef struct _ShmQueryVersion {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmQueryVersion */
+ CARD16 length B16;
+} xShmQueryVersionReq;
+#define sz_xShmQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL sharedPixmaps;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of SHM protocol */
+ CARD16 minorVersion B16; /* minor version of SHM protocol */
+ CARD16 uid B16;
+ CARD16 gid B16;
+ CARD8 pixmapFormat;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xShmQueryVersionReply;
+#define sz_xShmQueryVersionReply 32
+
+typedef struct _ShmAttach {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmAttach */
+ CARD16 length B16;
+ ShmSeg shmseg B32;
+ CARD32 shmid B32;
+ BOOL readOnly;
+ BYTE pad0;
+ CARD16 pad1 B16;
+} xShmAttachReq;
+#define sz_xShmAttachReq 16
+
+typedef struct _ShmDetach {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmDetach */
+ CARD16 length B16;
+ ShmSeg shmseg B32;
+} xShmDetachReq;
+#define sz_xShmDetachReq 8
+
+typedef struct _ShmPutImage {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmPutImage */
+ CARD16 length B16;
+ Drawable drawable B32;
+ GContext gc B32;
+ CARD16 totalWidth B16;
+ CARD16 totalHeight B16;
+ CARD16 srcX B16;
+ CARD16 srcY B16;
+ CARD16 srcWidth B16;
+ CARD16 srcHeight B16;
+ INT16 dstX B16;
+ INT16 dstY B16;
+ CARD8 depth;
+ CARD8 format;
+ CARD8 sendEvent;
+ CARD8 bpad;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+} xShmPutImageReq;
+#define sz_xShmPutImageReq 40
+
+typedef struct _ShmGetImage {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmGetImage */
+ CARD16 length B16;
+ Drawable drawable B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD32 planeMask B32;
+ CARD8 format;
+ CARD8 pad0;
+ CARD8 pad1;
+ CARD8 pad2;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+} xShmGetImageReq;
+#define sz_xShmGetImageReq 32
+
+typedef struct _ShmGetImageReply {
+ BYTE type; /* X_Reply */
+ CARD8 depth;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ VisualID visual B32;
+ CARD32 size B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xShmGetImageReply;
+#define sz_xShmGetImageReply 32
+
+typedef struct _ShmCreatePixmap {
+ CARD8 reqType; /* always ShmReqCode */
+ CARD8 shmReqType; /* always X_ShmCreatePixmap */
+ CARD16 length B16;
+ Pixmap pid B32;
+ Drawable drawable B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD8 depth;
+ CARD8 pad0;
+ CARD8 pad1;
+ CARD8 pad2;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+} xShmCreatePixmapReq;
+#define sz_xShmCreatePixmapReq 28
+
+typedef struct _ShmCompletion {
+ BYTE type; /* always eventBase + ShmCompletion */
+ BYTE bpad0;
+ CARD16 sequenceNumber B16;
+ Drawable drawable B32;
+ CARD16 minorEvent B16;
+ BYTE majorEvent;
+ BYTE bpad1;
+ ShmSeg shmseg B32;
+ CARD32 offset B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xShmCompletionEvent;
+#define sz_xShmCompletionEvent 32
+
+#undef ShmSeg
+#undef Drawable
+#undef VisualID
+#undef GContext
+#undef Pixmap
+
+#endif /* _SHMPROTO_H_ */
diff --git a/X11/extensions/syncconst.h b/X11/extensions/syncconst.h
new file mode 100644
index 000000000..2ad5db7b9
--- /dev/null
+++ b/X11/extensions/syncconst.h
@@ -0,0 +1,179 @@
+/*
+
+Copyright 1991, 1993, 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 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+ 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 Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY 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 _SYNCCONST_H_
+#define _SYNCCONST_H_
+
+#define SYNC_NAME "SYNC"
+
+#define SYNC_MAJOR_VERSION 3
+#define SYNC_MINOR_VERSION 0
+
+
+#define XSyncCounterNotify 0
+#define XSyncAlarmNotify 1
+#define XSyncAlarmNotifyMask (1L << XSyncAlarmNotify)
+
+#define XSyncNumberEvents 2L
+
+#define XSyncBadCounter 0L
+#define XSyncBadAlarm 1L
+#define XSyncNumberErrors (XSyncBadAlarm + 1)
+
+/*
+ * Flags for Alarm Attributes
+ */
+#define XSyncCACounter (1L<<0)
+#define XSyncCAValueType (1L<<1)
+#define XSyncCAValue (1L<<2)
+#define XSyncCATestType (1L<<3)
+#define XSyncCADelta (1L<<4)
+#define XSyncCAEvents (1L<<5)
+
+/* The _XSync macros below are for library internal use only. They exist
+ * so that if we have to make a fix, we can change it in this one place
+ * and have both the macro and function variants inherit the fix.
+ */
+
+#define _XSyncIntToValue(pv, i) ((pv)->hi=((i<0)?~0:0),(pv)->lo=(i))
+#define _XSyncIntsToValue(pv, l, h) ((pv)->lo = (l), (pv)->hi = (h))
+#define _XSyncValueGreaterThan(a, b)\
+ ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>(b).lo))
+#define _XSyncValueLessThan(a, b)\
+ ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<(b).lo))
+#define _XSyncValueGreaterOrEqual(a, b)\
+ ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>=(b).lo))
+#define _XSyncValueLessOrEqual(a, b)\
+ ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<=(b).lo))
+#define _XSyncValueEqual(a, b) ((a).lo==(b).lo && (a).hi==(b).hi)
+#define _XSyncValueIsNegative(v) (((v).hi & 0x80000000) ? 1 : 0)
+#define _XSyncValueIsZero(a) ((a).lo==0 && (a).hi==0)
+#define _XSyncValueIsPositive(v) (((v).hi & 0x80000000) ? 0 : 1)
+#define _XSyncValueLow32(v) ((v).lo)
+#define _XSyncValueHigh32(v) ((v).hi)
+#define _XSyncValueAdd(presult,a,b,poverflow) {\
+ int t = (a).lo;\
+ Bool signa = XSyncValueIsNegative(a);\
+ Bool signb = XSyncValueIsNegative(b);\
+ ((presult)->lo = (a).lo + (b).lo);\
+ ((presult)->hi = (a).hi + (b).hi);\
+ if (t>(presult)->lo) (presult)->hi++;\
+ *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
+ }
+#define _XSyncValueSubtract(presult,a,b,poverflow) {\
+ int t = (a).lo;\
+ Bool signa = XSyncValueIsNegative(a);\
+ Bool signb = XSyncValueIsNegative(b);\
+ ((presult)->lo = (a).lo - (b).lo);\
+ ((presult)->hi = (a).hi - (b).hi);\
+ if (t>(presult)->lo) (presult)->hi--;\
+ *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
+ }
+#define _XSyncMaxValue(pv) ((pv)->hi = 0x7fffffff, (pv)->lo = 0xffffffff)
+#define _XSyncMinValue(pv) ((pv)->hi = 0x80000000, (pv)->lo = 0)
+
+/*
+ * These are the publically usable macros. If you want the function version
+ * of one of these, just #undef the macro to uncover the function.
+ * (This is the same convention that the ANSI C library uses.)
+ */
+
+#define XSyncIntToValue(pv, i) _XSyncIntToValue(pv, i)
+#define XSyncIntsToValue(pv, l, h) _XSyncIntsToValue(pv, l, h)
+#define XSyncValueGreaterThan(a, b) _XSyncValueGreaterThan(a, b)
+#define XSyncValueLessThan(a, b) _XSyncValueLessThan(a, b)
+#define XSyncValueGreaterOrEqual(a, b) _XSyncValueGreaterOrEqual(a, b)
+#define XSyncValueLessOrEqual(a, b) _XSyncValueLessOrEqual(a, b)
+#define XSyncValueEqual(a, b) _XSyncValueEqual(a, b)
+#define XSyncValueIsNegative(v) _XSyncValueIsNegative(v)
+#define XSyncValueIsZero(a) _XSyncValueIsZero(a)
+#define XSyncValueIsPositive(v) _XSyncValueIsPositive(v)
+#define XSyncValueLow32(v) _XSyncValueLow32(v)
+#define XSyncValueHigh32(v) _XSyncValueHigh32(v)
+#define XSyncValueAdd(presult,a,b,poverflow) _XSyncValueAdd(presult,a,b,poverflow)
+#define XSyncValueSubtract(presult,a,b,poverflow) _XSyncValueSubtract(presult,a,b,poverflow)
+#define XSyncMaxValue(pv) _XSyncMaxValue(pv)
+#define XSyncMinValue(pv) _XSyncMinValue(pv)
+
+/*
+ * Constants for the value_type argument of various requests
+ */
+typedef enum {
+ XSyncAbsolute,
+ XSyncRelative
+} XSyncValueType;
+
+/*
+ * Alarm Test types
+ */
+typedef enum {
+ XSyncPositiveTransition,
+ XSyncNegativeTransition,
+ XSyncPositiveComparison,
+ XSyncNegativeComparison
+} XSyncTestType;
+
+/*
+ * Alarm state constants
+ */
+typedef enum {
+ XSyncAlarmActive,
+ XSyncAlarmInactive,
+ XSyncAlarmDestroyed
+} XSyncAlarmState;
+
+
+typedef XID XSyncCounter;
+typedef XID XSyncAlarm;
+typedef struct _XSyncValue {
+ int hi;
+ unsigned int lo;
+} XSyncValue;
+#endif /* _SYNCCONST_H_ */
diff --git a/X11/extensions/syncproto.h b/X11/extensions/syncproto.h
new file mode 100644
index 000000000..13b53d531
--- /dev/null
+++ b/X11/extensions/syncproto.h
@@ -0,0 +1,378 @@
+/*
+
+Copyright 1991, 1993, 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 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+ 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 Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY 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 _SYNCPROTO_H_
+#define _SYNCPROTO_H_
+
+#include <X11/extensions/syncconst.h>
+
+#define X_SyncInitialize 0
+#define X_SyncListSystemCounters 1
+#define X_SyncCreateCounter 2
+#define X_SyncSetCounter 3
+#define X_SyncChangeCounter 4
+#define X_SyncQueryCounter 5
+#define X_SyncDestroyCounter 6
+#define X_SyncAwait 7
+#define X_SyncCreateAlarm 8
+#define X_SyncChangeAlarm 9
+#define X_SyncQueryAlarm 10
+#define X_SyncDestroyAlarm 11
+#define X_SyncSetPriority 12
+#define X_SyncGetPriority 13
+
+/* cover up types from sync.h to make sure they're the right size for
+ * protocol packaging. These will be undef'ed after all the protocol
+ * structures are defined.
+ */
+#define XSyncCounter CARD32
+#define XSyncAlarm CARD32
+
+/*
+ * Initialize
+ */
+typedef struct _xSyncInitialize {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ CARD8 majorVersion;
+ CARD8 minorVersion;
+ CARD16 pad B16;
+} xSyncInitializeReq;
+#define sz_xSyncInitializeReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD8 majorVersion;
+ CARD8 minorVersion;
+ CARD16 pad B16;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xSyncInitializeReply;
+#define sz_xSyncInitializeReply 32
+
+/*
+ * ListSystemCounters
+ */
+typedef struct _xSyncListSystemCounters
+{
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+} xSyncListSystemCountersReq;
+#define sz_xSyncListSystemCountersReq 4
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT32 nCounters B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xSyncListSystemCountersReply;
+#define sz_xSyncListSystemCountersReply 32
+
+typedef struct {
+ XSyncCounter counter B32;
+ INT32 resolution_hi B32;
+ CARD32 resolution_lo B32;
+ CARD16 name_length B16;
+} xSyncSystemCounter;
+#define sz_xSyncSystemCounter 14
+
+/*
+ * Create Counter
+ */
+typedef struct _xSyncCreateCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter cid B32;
+ INT32 initial_value_hi B32;
+ CARD32 initial_value_lo B32;
+} xSyncCreateCounterReq;
+#define sz_xSyncCreateCounterReq 16
+
+/*
+ * Change Counter
+ */
+typedef struct _xSyncChangeCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter cid B32;
+ INT32 value_hi B32;
+ CARD32 value_lo B32;
+} xSyncChangeCounterReq;
+#define sz_xSyncChangeCounterReq 16
+
+/*
+ * Set Counter
+ */
+typedef struct _xSyncSetCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter cid B32;
+ INT32 value_hi B32;
+ CARD32 value_lo B32;
+} xSyncSetCounterReq;
+#define sz_xSyncSetCounterReq 16
+
+/*
+ * Destroy Counter
+ */
+typedef struct _xSyncDestroyCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter counter B32;
+} xSyncDestroyCounterReq;
+#define sz_xSyncDestroyCounterReq 8
+
+/*
+ * Query Counter
+ */
+typedef struct _xSyncQueryCounterReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncCounter counter B32;
+} xSyncQueryCounterReq;
+#define sz_xSyncQueryCounterReq 8
+
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT32 value_hi B32;
+ CARD32 value_lo B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xSyncQueryCounterReply;
+#define sz_xSyncQueryCounterReply 32
+
+/*
+ * Await
+ */
+typedef struct _xSyncAwaitReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+} xSyncAwaitReq;
+#define sz_xSyncAwaitReq 4
+
+typedef struct _xSyncWaitCondition {
+ XSyncCounter counter B32;
+ CARD32 value_type B32;
+ INT32 wait_value_hi B32;
+ CARD32 wait_value_lo B32;
+ CARD32 test_type B32;
+ INT32 event_threshold_hi B32;
+ CARD32 event_threshold_lo B32;
+} xSyncWaitCondition;
+#define sz_xSyncWaitCondition 28
+
+/*
+ * Create Alarm
+ */
+typedef struct _xSyncCreateAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm id B32;
+ CARD32 valueMask B32;
+} xSyncCreateAlarmReq;
+#define sz_xSyncCreateAlarmReq 12
+
+/*
+ * Destroy Alarm
+ */
+typedef struct _xSyncDestroyAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm alarm B32;
+} xSyncDestroyAlarmReq;
+#define sz_xSyncDestroyAlarmReq 8
+
+/*
+ * Query Alarm
+ */
+typedef struct _xSyncQueryAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm alarm B32;
+} xSyncQueryAlarmReq;
+#define sz_xSyncQueryAlarmReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ XSyncCounter counter B32;
+ CARD32 value_type B32;
+ INT32 wait_value_hi B32;
+ CARD32 wait_value_lo B32;
+ CARD32 test_type B32;
+ INT32 delta_hi B32;
+ CARD32 delta_lo B32;
+ BOOL events;
+ BYTE state;
+ BYTE pad0;
+ BYTE pad1;
+} xSyncQueryAlarmReply;
+#define sz_xSyncQueryAlarmReply 40
+
+/*
+ * Change Alarm
+ */
+typedef struct _xSyncChangeAlarmReq {
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ XSyncAlarm alarm B32;
+ CARD32 valueMask B32;
+} xSyncChangeAlarmReq;
+#define sz_xSyncChangeAlarmReq 12
+
+/*
+ * SetPriority
+ */
+typedef struct _xSyncSetPriority{
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ CARD32 id B32;
+ INT32 priority B32;
+} xSyncSetPriorityReq;
+#define sz_xSyncSetPriorityReq 12
+
+/*
+ * Get Priority
+ */
+typedef struct _xSyncGetPriority{
+ CARD8 reqType;
+ CARD8 syncReqType;
+ CARD16 length B16;
+ CARD32 id B32; /*XXX XID? */
+} xSyncGetPriorityReq;
+#define sz_xSyncGetPriorityReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 unused;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT32 priority B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xSyncGetPriorityReply;
+#define sz_xSyncGetPriorityReply 32
+
+/*
+ * Events
+ */
+
+typedef struct _xSyncCounterNotifyEvent {
+ BYTE type;
+ BYTE kind;
+ CARD16 sequenceNumber B16;
+ XSyncCounter counter B32;
+ INT32 wait_value_hi B32;
+ CARD32 wait_value_lo B32;
+ INT32 counter_value_hi B32;
+ CARD32 counter_value_lo B32;
+ CARD32 time B32;
+ CARD16 count B16;
+ BOOL destroyed;
+ BYTE pad0;
+} xSyncCounterNotifyEvent;
+
+typedef struct _xSyncAlarmNotifyEvent {
+ BYTE type;
+ BYTE kind;
+ CARD16 sequenceNumber B16;
+ XSyncAlarm alarm B32;
+ INT32 counter_value_hi B32;
+ CARD32 counter_value_lo B32;
+ INT32 alarm_value_hi B32;
+ CARD32 alarm_value_lo B32;
+ CARD32 time B32;
+ CARD8 state;
+ BYTE pad0;
+ BYTE pad1;
+ BYTE pad2;
+} xSyncAlarmNotifyEvent;
+
+#undef XSyncCounter
+#undef XSyncAlarm
+
+
+#endif /* _SYNCPROTO_H_ */
diff --git a/X11/extensions/xfixesproto.h b/X11/extensions/xfixesproto.h
index d3899810a..545e325a9 100644
--- a/X11/extensions/xfixesproto.h
+++ b/X11/extensions/xfixesproto.h
@@ -1,7 +1,7 @@
/*
* $XFree86: xc/include/extensions/xfixesproto.h,v 1.1 2002/11/30 06:21:43 keithp Exp $
*
- * Copyright © 2006 Sun Microsystems
+ * Copyright 2006 Sun Microsystems
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ * 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
@@ -47,9 +47,7 @@
#include <X11/Xmd.h>
#include <X11/extensions/xfixeswire.h>
-#define _SHAPE_SERVER_
-#include <X11/extensions/shape.h>
-#undef _SHAPE_SERVER_
+#include <X11/extensions/shapeconst.h>
#define Window CARD32
#define Drawable CARD32
diff --git a/X11/extensions/xfixeswire.h b/X11/extensions/xfixeswire.h
index e9bb5f5d0..6f2027057 100644
--- a/X11/extensions/xfixeswire.h
+++ b/X11/extensions/xfixeswire.h
@@ -1,7 +1,7 @@
/*
* $XFree86: xc/include/extensions/xfixeswire.h,v 1.1 2002/11/30 06:21:43 keithp Exp $
*
- * Copyright © 2006 Sun Microsystems
+ * Copyright 2006 Sun Microsystems
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ * 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
diff --git a/X11/extensions/xtestconst.h b/X11/extensions/xtestconst.h
new file mode 100644
index 000000000..e74b9042e
--- /dev/null
+++ b/X11/extensions/xtestconst.h
@@ -0,0 +1,41 @@
+/*
+
+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 _XTEST_CONST_H_
+#define _XTEST_CONST_H_
+
+#define XTestNumberEvents 0
+
+#define XTestNumberErrors 0
+
+#define XTestCurrentCursor ((Cursor)1)
+
+#define XTestMajorVersion 2
+#define XTestMinorVersion 2
+
+#define XTestExtensionName "XTEST"
+
+#endif
diff --git a/X11/extensions/xtestext1const.h b/X11/extensions/xtestext1const.h
new file mode 100644
index 000000000..656edc6ba
--- /dev/null
+++ b/X11/extensions/xtestext1const.h
@@ -0,0 +1,160 @@
+/*
+ * xtestext1.h
+ *
+ * X11 Input Synthesis Extension include file
+ */
+
+/*
+
+
+Copyright 1986, 1987, 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 1986, 1987, 1988 by Hewlett-Packard Corporation
+
+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 makes no representations about the
+suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
+
+*/
+
+#ifndef _XTESTEXT1CONST_H
+#define _XTESTEXT1CONST_H 1
+
+#define XTestMAX_ACTION_LIST_SIZE 64
+#define XTestACTIONS_SIZE 28
+
+
+/*
+ * used in the XTestPressButton and XTestPressKey functions
+ */
+#define XTestPRESS 1 << 0
+#define XTestRELEASE 1 << 1
+#define XTestSTROKE 1 << 2
+
+/*
+ * When doing a key or button stroke, the number of milliseconds
+ * to delay between the press and the release of a key or button
+ * in the XTestPressButton and XTestPressKey functions.
+ */
+
+#define XTestSTROKE_DELAY_TIME 10
+
+/*
+ * used in the XTestGetInput function
+ */
+#define XTestEXCLUSIVE 1 << 0
+#define XTestPACKED_ACTIONS 1 << 1
+#define XTestPACKED_MOTION 1 << 2
+
+/*
+ * used in the XTestFakeInput function
+ */
+#define XTestFAKE_ACK_NOT_NEEDED 0
+#define XTestFAKE_ACK_REQUEST 1
+
+/*
+ * used in the XTest extension initialization routine
+ */
+#define XTestEXTENSION_NAME "XTestExtension1"
+#define XTestEVENT_COUNT 2
+
+/*
+ * This is the definition for the format of the header byte
+ * in the input action structures.
+ */
+#define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */
+#define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */
+#define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */
+#define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */
+#define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */
+
+#define XTestMAX_DEVICE_ID 0x0f
+#define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4)
+#define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4)
+
+/*
+ * These are the possible action types.
+ */
+#define XTestDELAY_ACTION 0
+#define XTestKEY_ACTION 1
+#define XTestMOTION_ACTION 2
+#define XTestJUMP_ACTION 3
+
+/*
+ * These are the definitions for key/button motion input actions.
+ */
+#define XTestKEY_UP 0x04
+#define XTestKEY_DOWN 0x00
+
+/*
+ * These are the definitions for pointer relative motion input
+ * actions.
+ *
+ * The sign bits for the x and y relative motions are contained
+ * in the header byte. The x and y relative motions are packed
+ * into one byte to make things fit in 32 bits. If the relative
+ * motion range is larger than +/-15, use the pointer jump action.
+ */
+#define XTestMOTION_MAX 15
+#define XTestMOTION_MIN -15
+
+#define XTestX_NEGATIVE 0x04
+#define XTestY_NEGATIVE 0x08
+
+#define XTestX_MOTION_MASK 0x0f
+#define XTestY_MOTION_MASK 0xf0
+
+#define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
+#define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK)
+
+#define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
+#define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4)
+/*
+ * These are the definitions for a long delay input action. It is
+ * used when more than XTestSHORT_DELAY_TIME milliseconds of delay
+ * (approximately one minute) is needed.
+ *
+ * The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
+ * This guarantees that a header byte with a value of 0 is not
+ * a valid header, so it can be used as a flag to indicate that
+ * there are no more input actions in an XTestInputAction event.
+ */
+
+#define XTestSHORT_DELAY_TIME 0xffff
+#define XTestDELAY_DEVICE_ID 0x0f
+
+#endif /* _XTESTEXT1CONST_H */
diff --git a/X11/extensions/xtestext1proto.h b/X11/extensions/xtestext1proto.h
new file mode 100644
index 000000000..e9bdee09f
--- /dev/null
+++ b/X11/extensions/xtestext1proto.h
@@ -0,0 +1,221 @@
+/*
+ * xtestext1.h
+ *
+ * X11 Input Synthesis Extension include file
+ */
+
+/*
+Copyright 1986, 1987, 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 1986, 1987, 1988 by Hewlett-Packard Corporation
+
+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 makes no representations about the
+suitability of this software for any purpose. It is provided
+"as is" without express or implied warranty.
+
+This software is not subject to any license of the American
+Telephone and Telegraph Company or of the Regents of the
+University of California.
+
+*/
+
+#ifndef _XTESTEXT1PROTO_H
+#define _XTESTEXT1PROTO_H 1
+
+#include <X11/extensions/xtestext1const.h>
+
+/*
+ * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h
+ */
+
+/*
+ * XTest request type values
+ *
+ * used in the XTest extension protocol requests
+ */
+#define X_TestFakeInput 1
+#define X_TestGetInput 2
+#define X_TestStopInput 3
+#define X_TestReset 4
+#define X_TestQueryInputSize 5
+
+/*
+ * This defines the maximum size of a list of input actions
+ * to be sent to the server. It should always be a multiple of
+ * 4 so that the entire xTestFakeInputReq structure size is a
+ * multiple of 4.
+ */
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestFakeInput */
+ CARD16 length B16; /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */
+ CARD32 ack B32;
+ CARD8 action_list[XTestMAX_ACTION_LIST_SIZE];
+} xTestFakeInputReq;
+#define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8)
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestGetInput */
+ CARD16 length B16; /* 2 */
+ CARD32 mode B32;
+} xTestGetInputReq;
+#define sz_xTestGetInputReq 8
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestStopInput */
+ CARD16 length B32; /* 1 */
+} xTestStopInputReq;
+#define sz_xTestStopInputReq 4
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestReset */
+ CARD16 length B16; /* 1 */
+} xTestResetReq;
+#define sz_xTestResetReq 4
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 XTestReqType; /* always X_TestQueryInputSize */
+ CARD16 length B16; /* 1 */
+} xTestQueryInputSizeReq;
+#define sz_xTestQueryInputSizeReq 4
+
+/*
+ * This is the definition of the reply for the xTestQueryInputSize
+ * request. It should remain the same minimum size as other replies
+ * (32 bytes).
+ */
+typedef struct {
+ CARD8 type; /* always X_Reply */
+ CARD8 pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* always 0 */
+ CARD32 size_return B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xTestQueryInputSizeReply;
+
+/*
+ * This is the definition for the input action wire event structure.
+ * This event is sent to the client when the server has one or
+ * more user input actions to report to the client. It must
+ * remain the same size as all other wire events (32 bytes).
+ */
+typedef struct {
+ CARD8 type; /* always XTestInputActionType */
+ CARD8 pad00;
+ CARD16 sequenceNumber B16;
+ CARD8 actions[XTestACTIONS_SIZE];
+} xTestInputActionEvent;
+
+/*
+ * This is the definition for the xTestFakeAck wire event structure.
+ * This event is sent to the client when the server has completely
+ * processed its input action buffer, and is ready for more.
+ * It must remain the same size as all other wire events (32 bytes).
+ */
+typedef struct {
+ CARD8 type; /* always XTestFakeAckType */
+ CARD8 pad00;
+ CARD16 sequenceNumber B16;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+ CARD32 pad06 B32;
+ CARD32 pad07 B32;
+ CARD32 pad08 B32;
+} xTestFakeAckEvent;
+
+/*
+ * These are the definitions for key/button motion input actions.
+ */
+typedef struct {
+ CARD8 header; /* which device, key up/down */
+ CARD8 keycode; /* which key/button to move */
+ CARD16 delay_time B16; /* how long to delay (in ms) */
+} XTestKeyInfo;
+
+/*
+ * This is the definition for pointer jump input actions.
+ */
+typedef struct {
+ CARD8 header; /* which pointer */
+ CARD8 pad1; /* unused padding byte */
+ CARD16 jumpx B16; /* x coord to jump to */
+ CARD16 jumpy B16; /* y coord to jump to */
+ CARD16 delay_time B16; /* how long to delay (in ms) */
+} XTestJumpInfo;
+
+/*
+ * These are the definitions for pointer relative motion input
+ * actions.
+ *
+ * The sign bits for the x and y relative motions are contained
+ * in the header byte. The x and y relative motions are packed
+ * into one byte to make things fit in 32 bits. If the relative
+ * motion range is larger than +/-15, use the pointer jump action.
+ */
+
+typedef struct {
+ CARD8 header; /* which pointer */
+ CARD8 motion_data; /* x,y relative motion */
+ CARD16 delay_time B16; /* how long to delay (in ms) */
+} XTestMotionInfo;
+
+/*
+ * These are the definitions for a long delay input action. It is
+ * used when more than XTestSHORT_DELAY_TIME milliseconds of delay
+ * (approximately one minute) is needed.
+ *
+ * The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
+ * This guarantees that a header byte with a value of 0 is not
+ * a valid header, so it can be used as a flag to indicate that
+ * there are no more input actions in an XTestInputAction event.
+ */
+
+typedef struct {
+ CARD8 header; /* always XTestDELAY_DEVICE_ID */
+ CARD8 pad1; /* unused padding byte */
+ CARD16 pad2 B16; /* unused padding word */
+ CARD32 delay_time B32; /* how long to delay (in ms) */
+} XTestDelayInfo;
+
+#endif /* _XTESTEXT1PROTO_H */
diff --git a/X11/extensions/xtestproto.h b/X11/extensions/xtestproto.h
new file mode 100644
index 000000000..4f8db2652
--- /dev/null
+++ b/X11/extensions/xtestproto.h
@@ -0,0 +1,124 @@
+/*
+
+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 _XTESTPROTO_H_
+#define _XTESTPROTO_H_
+
+#include <X11/extensions/xtestconst.h>
+
+#define Window CARD32
+#define Time CARD32
+#define Cursor CARD32
+
+#define X_XTestGetVersion 0
+#define X_XTestCompareCursor 1
+#define X_XTestFakeInput 2
+#define X_XTestGrabControl 3
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestGetVersion */
+ CARD16 length B16;
+ CARD8 majorVersion;
+ CARD8 pad;
+ CARD16 minorVersion B16;
+} xXTestGetVersionReq;
+#define sz_xXTestGetVersionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ CARD8 majorVersion;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 minorVersion B16;
+ CARD16 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXTestGetVersionReply;
+#define sz_xXTestGetVersionReply 32
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestCompareCursor */
+ CARD16 length B16;
+ Window window B32;
+ Cursor cursor B32;
+} xXTestCompareCursorReq;
+#define sz_xXTestCompareCursorReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL same;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad0 B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXTestCompareCursorReply;
+#define sz_xXTestCompareCursorReply 32
+
+/* used only on the client side */
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestFakeInput */
+ CARD16 length B16;
+ BYTE type;
+ BYTE detail;
+ CARD16 pad0 B16;
+ Time time B32;
+ Window root B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ INT16 rootX B16, rootY B16;
+ CARD32 pad3 B32;
+ CARD16 pad4 B16;
+ CARD8 pad5;
+ CARD8 deviceid;
+} xXTestFakeInputReq;
+#define sz_xXTestFakeInputReq 36
+
+typedef struct {
+ CARD8 reqType; /* always XTestReqCode */
+ CARD8 xtReqType; /* always X_XTestGrabControl */
+ CARD16 length B16;
+ BOOL impervious;
+ CARD8 pad0;
+ CARD8 pad1;
+ CARD8 pad2;
+} xXTestGrabControlReq;
+#define sz_xXTestGrabControlReq 8
+
+#undef Window
+#undef Time
+#undef Cursor
+
+#endif /* _XTESTPROTO_H_ */