diff options
author | David 'Digit' Turner <digit@google.com> | 2014-09-29 16:29:08 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2014-09-29 18:59:24 +0200 |
commit | fdd759c108d1ad27b9b6e134ee346c3b52d52125 (patch) | |
tree | 0414f4cc0d09889d352d85dcb27ae069d6207ed5 | |
parent | fe610b19e10b4db855c69f42480b58f0ff7f2d9a (diff) | |
download | x86_64-linux-glibc2.11-4.8-gradle_1.1.2.tar.gz |
Add libxi / libxfixes headers.studio_1.0.1studio_1.0.0gradle_1.1.3gradle_1.1.2gradle_1.1.1gradle_1.1.0-rc3gradle_1.1.0-rc2gradle_1.1.0-rc1gradle_1.1.0gradle_1.0.1gradle_1.0.0-rc4gradle_1.0.0-rc3gradle_1.0.0-rc2gradle_1.0.0-rc1gradle_1.0.0gradle_0.14.4gradle_0.14.3gradle_0.14.2gradle_0.14.1gradle_0.14.0android-wear-5.0.0_r1android-l-preview_r2studio-1.1-releasestudio-1.0-releaselollipop-wear-releasel-preview
This patch updates the sysroot headers to include _recent_ versions
of the Xi / XFixes headers that are required to compile SDL2 on Linux.
Note that, while this modifies build-lucid-multilib-toolchain.sh to
list the missing packages, running the script will not produce the
same output because:
1/ Several manual header overrides were already performed on the
sysroot, and would be lost when re-running the script :(
2/ The Lucid version of the new X11 headers are missing important
definitions (e.g. touch support in XInput2.h), and wouldn't
work when trying to build SDL2 anyway.
Change-Id: I90a66fdf4824331f67382edb477dfa58110a216a
-rwxr-xr-x | build-lucid-multilib-toolchain.sh | 3 | ||||
-rw-r--r-- | sysroot/usr/include/X11/extensions/XI2.h | 86 | ||||
-rw-r--r-- | sysroot/usr/include/X11/extensions/XI2proto.h | 125 | ||||
-rw-r--r-- | sysroot/usr/include/X11/extensions/XInput.h | 1277 | ||||
-rw-r--r-- | sysroot/usr/include/X11/extensions/XInput2.h | 657 | ||||
-rw-r--r-- | sysroot/usr/include/X11/extensions/Xfixes.h | 269 | ||||
-rw-r--r-- | sysroot/usr/include/X11/extensions/xfixesproto.h | 551 | ||||
-rw-r--r-- | sysroot/usr/include/X11/extensions/xfixeswire.h | 139 |
8 files changed, 3091 insertions, 16 deletions
diff --git a/build-lucid-multilib-toolchain.sh b/build-lucid-multilib-toolchain.sh index 4d509bf..0bb489d 100755 --- a/build-lucid-multilib-toolchain.sh +++ b/build-lucid-multilib-toolchain.sh @@ -189,7 +189,10 @@ add_ubuntu_package \ libxcb1-dev \ libxdmcp6 \ libxext-dev \ + libxfixes-dev \ + libxi-dev \ x11proto-core-dev \ + x11proto-fixes-dev \ x11proto-xext-dev \ x11proto-input-dev \ x11proto-kb-dev diff --git a/sysroot/usr/include/X11/extensions/XI2.h b/sysroot/usr/include/X11/extensions/XI2.h index 6ba1377..b1498a7 100644 --- a/sysroot/usr/include/X11/extensions/XI2.h +++ b/sysroot/usr/include/X11/extensions/XI2.h @@ -25,23 +25,26 @@ #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 - +/* DO NOT ADD TO THIS LIST. These are libXi-specific defines. + See commit libXi-1.4.2-21-ge8531dd */ #define XI_2_Major 2 -#define XI_2_Minor 0 +#define XI_2_Minor 3 /* Property event flags */ #define XIPropertyDeleted 0 #define XIPropertyCreated 1 #define XIPropertyModified 2 +/* Property modes */ +#define XIPropModeReplace 0 +#define XIPropModePrepend 1 +#define XIPropModeAppend 2 + +/* Special property type used for XIGetProperty */ +#define XIAnyPropertyType 0L + /* Enter/Leave and Focus In/Out modes */ #define XINotifyNormal 0 #define XINotifyGrab 1 @@ -60,11 +63,28 @@ #define XINotifyPointerRoot 6 #define XINotifyDetailNone 7 +/* Grab modes */ +#define XIGrabModeSync 0 +#define XIGrabModeAsync 1 +#define XIGrabModeTouch 2 + +/* Grab reply status codes */ +#define XIGrabSuccess 0 +#define XIAlreadyGrabbed 1 +#define XIGrabInvalidTime 2 +#define XIGrabNotViewable 3 +#define XIGrabFrozen 4 + +/* Grab owner events values */ +#define XIOwnerEvents True +#define XINoOwnerEvents False + /* Passive grab types */ #define XIGrabtypeButton 0 #define XIGrabtypeKeycode 1 #define XIGrabtypeEnter 2 #define XIGrabtypeFocusIn 3 +#define XIGrabtypeTouchBegin 4 /* Passive grab modifier */ #define XIAnyModifier (1U << 31) @@ -78,6 +98,8 @@ #define XIAsyncPairedDevice 3 #define XIAsyncPair 4 #define XISyncPair 5 +#define XIAcceptTouch 6 +#define XIRejectTouch 7 /* DeviceChangedEvent change reasons */ #define XISlaveSwitch 1 @@ -113,21 +135,45 @@ #define XISlaveKeyboard 4 #define XIFloatingSlave 5 -/* Device classes */ +/* Device classes: classes that are not identical to Xi 1.x classes must be + * numbered starting from 8. */ #define XIKeyClass 0 #define XIButtonClass 1 #define XIValuatorClass 2 +#define XIScrollClass 3 +#define XITouchClass 8 + +/* Scroll class types */ +#define XIScrollTypeVertical 1 +#define XIScrollTypeHorizontal 2 + +/* Scroll class flags */ +#define XIScrollFlagNoEmulation (1 << 0) +#define XIScrollFlagPreferred (1 << 1) /* Device event flags (common) */ /* Device event flags (key events only) */ #define XIKeyRepeat (1 << 16) /* Device event flags (pointer events only) */ +#define XIPointerEmulated (1 << 16) +/* Device event flags (touch events only) */ +#define XITouchPendingEnd (1 << 16) +#define XITouchEmulatingPointer (1 << 17) + +/* Barrier event flags */ +#define XIBarrierPointerReleased (1 << 0) +#define XIBarrierDeviceIsGrabbed (1 << 1) + + +/* Touch modes */ +#define XIDirectTouch 1 +#define XIDependentTouch 2 /* XI2 event mask macros */ #define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7))) #define XIClearMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] &= ~(1 << ((event) & 7))) #define XIMaskIsSet(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7))) -#define XIMaskLen(event) (((event + 7) >> 3)) +#define XIMaskLen(event) (((event) >> 3) + 1) /* Fake device ID's for event selection */ #define XIAllDevices 0 @@ -151,7 +197,16 @@ #define XI_RawButtonPress 15 #define XI_RawButtonRelease 16 #define XI_RawMotion 17 -#define XI_LASTEVENT XI_RawMotion +#define XI_TouchBegin 18 /* XI 2.2 */ +#define XI_TouchUpdate 19 +#define XI_TouchEnd 20 +#define XI_TouchOwnership 21 +#define XI_RawTouchBegin 22 +#define XI_RawTouchUpdate 23 +#define XI_RawTouchEnd 24 +#define XI_BarrierHit 25 /* XI 2.3 */ +#define XI_BarrierLeave 26 +#define XI_LASTEVENT XI_BarrierLeave /* NOTE: XI2LASTEVENT in xserver/include/inputstr.h must be the same value * as XI_LASTEVENT if the server is supposed to handle masks etc. for this * type of event. */ @@ -177,5 +232,14 @@ #define XI_RawButtonPressMask (1 << XI_RawButtonPress) #define XI_RawButtonReleaseMask (1 << XI_RawButtonRelease) #define XI_RawMotionMask (1 << XI_RawMotion) +#define XI_TouchBeginMask (1 << XI_TouchBegin) +#define XI_TouchEndMask (1 << XI_TouchEnd) +#define XI_TouchOwnershipChangedMask (1 << XI_TouchOwnershipChanged) +#define XI_TouchUpdateMask (1 << XI_TouchUpdate) +#define XI_RawTouchBeginMask (1 << XI_RawTouchBegin) +#define XI_RawTouchEndMask (1 << XI_RawTouchEnd) +#define XI_RawTouchUpdateMask (1 << XI_RawTouchUpdate) +#define XI_BarrierHitMask (1 << XI_BarrierHit) +#define XI_BarrierLeaveMask (1 << XI_BarrierLeave) #endif /* _XI2_H_ */ diff --git a/sysroot/usr/include/X11/extensions/XI2proto.h b/sysroot/usr/include/X11/extensions/XI2proto.h index 2fd91eb..4cdaa0d 100644 --- a/sysroot/usr/include/X11/extensions/XI2proto.h +++ b/sysroot/usr/include/X11/extensions/XI2proto.h @@ -60,12 +60,14 @@ #include <X11/Xproto.h> #include <X11/X.h> #include <X11/extensions/XI2.h> +#include <stdint.h> /* make sure types have right sizes for protocol structures. */ #define Window uint32_t #define Time uint32_t #define Atom uint32_t #define Cursor uint32_t +#define Barrier uint32_t /** * XI2 Request opcodes @@ -91,9 +93,10 @@ #define X_XIDeleteProperty 58 #define X_XIGetProperty 59 #define X_XIGetSelectedEvents 60 +#define X_XIBarrierReleasePointer 61 /** Number of XI requests */ -#define XI2REQUESTS (X_XIGetSelectedEvents - X_XIQueryPointer + 1) +#define XI2REQUESTS (X_XIBarrierReleasePointer - X_XIQueryPointer + 1) /** Number of XI2 events */ #define XI2EVENTS (XI_LASTEVENT + 1) @@ -153,7 +156,7 @@ 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 */ + uint16_t num_buttons; /**< Number of buttons provided */ } xXIButtonInfo; /** @@ -187,6 +190,32 @@ typedef struct { uint16_t pad2; } xXIValuatorInfo; +/*** + * Denotes a scroll valuator on a device. + * One XIScrollInfo describes exactly one scroll valuator that must have a + * XIValuatorInfo struct. + */ +typedef struct { + uint16_t type; /**< Always ValuatorClass */ + uint16_t length; /**< Length in 4 byte units */ + uint16_t sourceid; /**< source device for this class */ + uint16_t number; /**< Valuator number */ + uint16_t scroll_type; /**< ::XIScrollTypeVertical, ::XIScrollTypeHorizontal */ + uint16_t pad0; + uint32_t flags; /**< ::XIScrollFlagEmulate, ::XIScrollFlagPreferred */ + FP3232 increment; /**< Increment for one unit of scrolling */ +} xXIScrollInfo; + +/** + * Denotes multitouch capability on a device. + */ +typedef struct { + uint16_t type; /**< Always TouchClass */ + uint16_t length; /**< Length in 4 byte units */ + uint16_t sourceid; /**< source device for this class */ + uint8_t mode; /**< DirectTouch or DependentTouch */ + uint8_t num_touches; /**< Maximum number of touches (0==unlimited) */ +} xXITouchInfo; /** * Used to select for events on a given window. @@ -623,6 +652,23 @@ typedef struct { } xXIAllowEventsReq; #define sz_xXIAllowEventsReq 12 +/** + * Allow or replay events on the specified grabbed device. + * Since XI 2.2 + */ +typedef struct { + uint8_t reqType; + uint8_t ReqType; /**< Always ::X_XIAllowEvents */ + uint16_t length; /**< Length in 4 byte units */ + Time time; + uint16_t deviceid; + uint8_t mode; + uint8_t pad; + uint32_t touchid; /**< Since XI 2.2 */ + Window grab_window; /**< Since XI 2.2 */ +} xXI2_2AllowEventsReq; +#define sz_xXI2_2AllowEventsReq 20 + /** * Passively grab the device. @@ -771,6 +817,22 @@ typedef struct { } xXIGetPropertyReply; #define sz_xXIGetPropertyReply 32 +typedef struct { + uint16_t deviceid; + uint16_t pad; + Barrier barrier; + uint32_t eventid; +} xXIBarrierReleasePointerInfo; + +typedef struct { + uint8_t reqType; /**< Input extension major opcode */ + uint8_t ReqType; /**< Always X_XIBarrierReleasePointer */ + uint16_t length; + uint32_t num_barriers; + /* array of xXIBarrierReleasePointerInfo */ +} xXIBarrierReleasePointerReq; +#define sz_xXIBarrierReleasePointerReq 8 + /************************************************************************************* * * * EVENTS * @@ -856,7 +918,31 @@ typedef struct } xXIDeviceChangedEvent; /** - * Default input event for pointer or keyboard input. + * The owner of a touch stream has passed on ownership to another client. + */ +typedef struct +{ + uint8_t type; /**< Always GenericEvent */ + uint8_t extension; /**< XI extension offset */ + uint16_t sequenceNumber; + uint32_t length; /**< Length in 4 byte units */ + uint16_t evtype; /**< XI_TouchOwnership */ + uint16_t deviceid; /**< Device that has changed */ + Time time; + uint32_t touchid; + Window root; + Window event; + Window child; +/* └──────── 32 byte boundary ────────┘ */ + uint16_t sourceid; + uint16_t pad0; + uint32_t flags; + uint32_t pad1; + uint32_t pad2; +} xXITouchOwnershipEvent; + +/** + * Default input event for pointer, keyboard or touch input. */ typedef struct { @@ -901,7 +987,7 @@ typedef struct uint16_t deviceid; Time time; uint32_t detail; - uint16_t pad0; + uint16_t sourceid; /**< The source device (XI 2.1) */ uint16_t valuators_len; /**< Length of trailing valuator mask in 4 byte units */ uint32_t flags; /**< ::XIKeyRepeat */ @@ -953,7 +1039,7 @@ typedef struct uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; - uint32_t length; /**< Length in 4 byte uints */ + uint32_t length; /**< Length in 4 byte units */ uint16_t evtype; /**< ::XI_PropertyEvent */ uint16_t deviceid; Time time; @@ -967,10 +1053,39 @@ typedef struct uint32_t pad3; } xXIPropertyEvent; +typedef struct +{ + uint8_t type; /**< Always GenericEvent */ + uint8_t extension; /**< XI extension offset */ + uint16_t sequenceNumber; + uint32_t length; /**< Length in 4 byte units */ + uint16_t evtype; /**< ::XI_BarrierHit or ::XI_BarrierLeave */ + uint16_t deviceid; + Time time; + uint32_t eventid; + Window root; + Window event; + Barrier barrier; +/* └──────── 32 byte boundary ────────┘ */ + uint32_t dtime; + uint32_t flags; /**< ::XIBarrierPointerReleased + ::XIBarrierDeviceIsGrabbed */ + uint16_t sourceid; + int16_t pad; + FP1616 root_x; + FP1616 root_y; + FP3232 dx; + FP3232 dy; +} xXIBarrierEvent; + +typedef xXIBarrierEvent xXIBarrierHitEvent; +typedef xXIBarrierEvent xXIBarrierPointerReleasedEvent; +typedef xXIBarrierEvent xXIBarrierLeaveEvent; #undef Window #undef Time #undef Atom #undef Cursor +#undef Barrier #endif /* _XI2PROTO_H_ */ diff --git a/sysroot/usr/include/X11/extensions/XInput.h b/sysroot/usr/include/X11/extensions/XInput.h new file mode 100644 index 0000000..b17f388 --- /dev/null +++ b/sysroot/usr/include/X11/extensions/XInput.h @@ -0,0 +1,1277 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +********************************************************/ + +/* Definitions used by the library and client */ + +#ifndef _XINPUT_H_ +#define _XINPUT_H_ + +#include <X11/Xlib.h> +#include <X11/extensions/XI.h> + +#define _deviceKeyPress 0 +#define _deviceKeyRelease 1 + +#define _deviceButtonPress 0 +#define _deviceButtonRelease 1 + +#define _deviceMotionNotify 0 + +#define _deviceFocusIn 0 +#define _deviceFocusOut 1 + +#define _proximityIn 0 +#define _proximityOut 1 + +#define _deviceStateNotify 0 +#define _deviceMappingNotify 1 +#define _changeDeviceNotify 2 +/* Space of 3 between is necessary! Reserved for DeviceKeyStateNotify, + DeviceButtonStateNotify, DevicePresenceNotify (essentially unused). This + code has to be in sync with FixExtensionEvents() in xserver/Xi/extinit.c */ +#define _propertyNotify 6 + +#define FindTypeAndClass(d,type,_class,classid,offset) \ + { int _i; XInputClassInfo *_ip; \ + type = 0; _class = 0; \ + for (_i=0, _ip= ((XDevice *) d)->classes; \ + _i< ((XDevice *) d)->num_classes; \ + _i++, _ip++) \ + if (_ip->input_class == classid) \ + {type = _ip->event_type_base + offset; \ + _class = ((XDevice *) d)->device_id << 8 | type;}} + +#define DeviceKeyPress(d,type,_class) \ + FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyPress) + +#define DeviceKeyRelease(d,type,_class) \ + FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyRelease) + +#define DeviceButtonPress(d,type,_class) \ + FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonPress) + +#define DeviceButtonRelease(d,type,_class) \ + FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonRelease) + +#define DeviceMotionNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, ValuatorClass, _deviceMotionNotify) + +#define DeviceFocusIn(d,type,_class) \ + FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusIn) + +#define DeviceFocusOut(d,type,_class) \ + FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusOut) + +#define ProximityIn(d,type,_class) \ + FindTypeAndClass(d, type, _class, ProximityClass, _proximityIn) + +#define ProximityOut(d,type,_class) \ + FindTypeAndClass(d, type, _class, ProximityClass, _proximityOut) + +#define DeviceStateNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, OtherClass, _deviceStateNotify) + +#define DeviceMappingNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, OtherClass, _deviceMappingNotify) + +#define ChangeDeviceNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, OtherClass, _changeDeviceNotify) + +#define DevicePropertyNotify(d, type, _class) \ + FindTypeAndClass(d, type, _class, OtherClass, _propertyNotify) + +#define DevicePointerMotionHint(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _devicePointerMotionHint;} + +#define DeviceButton1Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton1Motion;} + +#define DeviceButton2Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton2Motion;} + +#define DeviceButton3Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton3Motion;} + +#define DeviceButton4Motion(d,type, _class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton4Motion;} + +#define DeviceButton5Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton5Motion;} + +#define DeviceButtonMotion(d,type, _class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonMotion;} + +#define DeviceOwnerGrabButton(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceOwnerGrabButton;} + +#define DeviceButtonPressGrab(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonGrab;} + +#define NoExtensionEvent(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;} + + +/* We need the declaration for DevicePresence. */ +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + extern int _XiGetDevicePresenceNotifyEvent(Display *); + extern void _xibaddevice( Display *dpy, int *error); + extern void _xibadclass( Display *dpy, int *error); + extern void _xibadevent( Display *dpy, int *error); + extern void _xibadmode( Display *dpy, int *error); + extern void _xidevicebusy( Display *dpy, int *error); +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#define DevicePresence(dpy, type, _class) \ + { \ + type = _XiGetDevicePresenceNotifyEvent(dpy); \ + _class = (0x10000 | _devicePresence); \ + } + +/* Errors */ +#define BadDevice(dpy,error) _xibaddevice(dpy, &error) + +#define BadClass(dpy,error) _xibadclass(dpy, &error) + +#define BadEvent(dpy,error) _xibadevent(dpy, &error) + +#define BadMode(dpy,error) _xibadmode(dpy, &error) + +#define DeviceBusy(dpy,error) _xidevicebusy(dpy, &error) + +typedef struct _XAnyClassinfo *XAnyClassPtr; + +/*************************************************************** + * + * DeviceKey events. These events are sent by input devices that + * support input class Keys. + * The location of the X pointer is reported in the coordinate + * fields of the x,y and x_root,y_root fields. + * + */ + +typedef struct + { + int type; /* of event */ + unsigned long serial; /* # of last request processed */ + Bool send_event; /* true if from SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + Window root; /* root window event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* x, y coordinates in event window */ + int x_root; /* coordinates relative to root */ + int y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + unsigned int keycode; /* detail */ + Bool same_screen; /* same screen flag */ + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XDeviceKeyEvent; + +typedef XDeviceKeyEvent XDeviceKeyPressedEvent; +typedef XDeviceKeyEvent XDeviceKeyReleasedEvent; + +/******************************************************************* + * + * DeviceButton events. These events are sent by extension devices + * that support input class Buttons. + * + */ + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* x, y coordinates in event window */ + int x_root; /* coordinates relative to root */ + int y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + unsigned int button; /* detail */ + Bool same_screen; /* same screen flag */ + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XDeviceButtonEvent; + +typedef XDeviceButtonEvent XDeviceButtonPressedEvent; +typedef XDeviceButtonEvent XDeviceButtonReleasedEvent; + +/******************************************************************* + * + * DeviceMotionNotify event. These events are sent by extension devices + * that support input class Valuators. + * + */ + +typedef struct + { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* x, y coordinates in event window */ + int x_root; /* coordinates relative to root */ + int y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + char is_hint; /* detail */ + Bool same_screen; /* same screen flag */ + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XDeviceMotionEvent; + +/******************************************************************* + * + * DeviceFocusChange events. These events are sent when the focus + * of an extension device that can be focused is changed. + * + */ + +typedef struct + { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ + int detail; + /* + * NotifyAncestor, NotifyVirtual, NotifyInferior, + * NotifyNonLinear,NotifyNonLinearVirtual, NotifyPointer, + * NotifyPointerRoot, NotifyDetailNone + */ + Time time; + } XDeviceFocusChangeEvent; + +typedef XDeviceFocusChangeEvent XDeviceFocusInEvent; +typedef XDeviceFocusChangeEvent XDeviceFocusOutEvent; + +/******************************************************************* + * + * ProximityNotify events. These events are sent by those absolute + * positioning devices that are capable of generating proximity information. + * + */ + +typedef struct + { + int type; /* ProximityIn or ProximityOut */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + XID deviceid; + Window root; + Window subwindow; + Time time; + int x, y; + int x_root, y_root; + unsigned int state; + Bool same_screen; + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XProximityNotifyEvent; +typedef XProximityNotifyEvent XProximityInEvent; +typedef XProximityNotifyEvent XProximityOutEvent; + +/******************************************************************* + * + * DeviceStateNotify events are generated on EnterWindow and FocusIn + * for those clients who have selected DeviceState. + * + */ + +typedef struct + { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + } XInputClass; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + XID deviceid; + Time time; + int num_classes; + char data[64]; +} XDeviceStateNotifyEvent; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + unsigned char num_valuators; + unsigned char mode; + int valuators[6]; +} XValuatorStatus; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_keys; + char keys[32]; +} XKeyStatus; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_buttons; + char buttons[32]; +} XButtonStatus; + +/******************************************************************* + * + * DeviceMappingNotify event. This event is sent when the key mapping, + * modifier mapping, or button mapping of an extension device is changed. + * + */ + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + XID deviceid; + Time time; + int request; /* one of MappingModifier, MappingKeyboard, + MappingPointer */ + int first_keycode;/* first keycode */ + int count; /* defines range of change w. first_keycode*/ +} XDeviceMappingEvent; + +/******************************************************************* + * + * ChangeDeviceNotify event. This event is sent when an + * XChangeKeyboard or XChangePointer request is made. + * + */ + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + XID deviceid; + Time time; + int request; /* NewPointer or NewKeyboard */ +} XChangeDeviceNotifyEvent; + +/******************************************************************* + * + * DevicePresenceNotify event. This event is sent when the list of + * input devices changes, in which case devchange will be false, and + * no information about the change will be contained in the event; + * the client should use XListInputDevices() to learn what has changed. + * + * If devchange is true, an attribute that the server believes is + * important has changed on a device, and the client should use + * XGetDeviceControl to examine the device. If control is non-zero, + * then that control has changed meaningfully. + */ + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + Time time; + Bool devchange; + XID deviceid; + XID control; +} XDevicePresenceNotifyEvent; + +/* + * Notifies the client that a property on a device has changed value. The + * client is expected to query the server for updated value of the property. + */ +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + Time time; + XID deviceid; /* id of the device that changed */ + Atom atom; /* the property that changed */ + int state; /* PropertyNewValue or PropertyDeleted */ +} XDevicePropertyNotifyEvent; + + +/******************************************************************* + * + * Control structures for input devices that support input class + * Feedback. These are used by the XGetFeedbackControl and + * XChangeFeedbackControl functions. + * + */ + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; +} XFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int click; + int percent; + int pitch; + int duration; + int led_mask; + int global_auto_repeat; + char auto_repeats[32]; +} XKbdFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int accelNum; + int accelDenom; + int threshold; +} XPtrFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int resolution; + int minVal; + int maxVal; +} XIntegerFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int max_symbols; + int num_syms_supported; + KeySym *syms_supported; +} XStringFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int percent; + int pitch; + int duration; +} XBellFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int led_values; + int led_mask; +} XLedFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; +} XFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int accelNum; + int accelDenom; + int threshold; +} XPtrFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int click; + int percent; + int pitch; + int duration; + int led_mask; + int led_value; + int key; + int auto_repeat_mode; +} XKbdFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int num_keysyms; + KeySym *syms_to_display; +} XStringFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int int_to_display; +} XIntegerFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int percent; + int pitch; + int duration; +} XBellFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int led_mask; + int led_values; +} XLedFeedbackControl; + +/******************************************************************* + * + * Device control structures. + * + */ + +typedef struct { + XID control; + int length; +} XDeviceControl; + +typedef struct { + XID control; + int length; + int first_valuator; + int num_valuators; + int *resolutions; +} XDeviceResolutionControl; + +typedef struct { + XID control; + int length; + int num_valuators; + int *resolutions; + int *min_resolutions; + int *max_resolutions; +} XDeviceResolutionState; + +typedef struct { + XID control; + int length; + int min_x; + int max_x; + int min_y; + int max_y; + int flip_x; + int flip_y; + int rotation; + int button_threshold; +} XDeviceAbsCalibControl, XDeviceAbsCalibState; + +typedef struct { + XID control; + int length; + int offset_x; + int offset_y; + int width; + int height; + int screen; + XID following; +} XDeviceAbsAreaControl, XDeviceAbsAreaState; + +typedef struct { + XID control; + int length; + int status; +} XDeviceCoreControl; + +typedef struct { + XID control; + int length; + int status; + int iscore; +} XDeviceCoreState; + +typedef struct { + XID control; + int length; + int enable; +} XDeviceEnableControl, XDeviceEnableState; + +/******************************************************************* + * + * An array of XDeviceList structures is returned by the + * XListInputDevices function. Each entry contains information + * about one input device. Among that information is an array of + * pointers to structures that describe the characteristics of + * the input device. + * + */ + +typedef struct _XAnyClassinfo { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + } XAnyClassInfo; + +typedef struct _XDeviceInfo *XDeviceInfoPtr; + +typedef struct _XDeviceInfo + { + XID id; + Atom type; + char *name; + int num_classes; + int use; + XAnyClassPtr inputclassinfo; + } XDeviceInfo; + +typedef struct _XKeyInfo *XKeyInfoPtr; + +typedef struct _XKeyInfo + { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + unsigned short min_keycode; + unsigned short max_keycode; + unsigned short num_keys; + } XKeyInfo; + +typedef struct _XButtonInfo *XButtonInfoPtr; + +typedef struct _XButtonInfo { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + short num_buttons; + } XButtonInfo; + +typedef struct _XAxisInfo *XAxisInfoPtr; + +typedef struct _XAxisInfo { + int resolution; + int min_value; + int max_value; + } XAxisInfo; + +typedef struct _XValuatorInfo *XValuatorInfoPtr; + +typedef struct _XValuatorInfo + { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + unsigned char num_axes; + unsigned char mode; + unsigned long motion_buffer; + XAxisInfoPtr axes; + } XValuatorInfo; + +/******************************************************************* + * + * An XDevice structure is returned by the XOpenDevice function. + * It contains an array of pointers to XInputClassInfo structures. + * Each contains information about a class of input supported by the + * device, including a pointer to an array of data for each type of event + * the device reports. + * + */ + + +typedef struct { + unsigned char input_class; + unsigned char event_type_base; +} XInputClassInfo; + +typedef struct { + XID device_id; + int num_classes; + XInputClassInfo *classes; +} XDevice; + + +/******************************************************************* + * + * The following structure is used to return information for the + * XGetSelectedExtensionEvents function. + * + */ + +typedef struct { + XEventClass event_type; + XID device; +} XEventList; + +/******************************************************************* + * + * The following structure is used to return motion history data from + * an input device that supports the input class Valuators. + * This information is returned by the XGetDeviceMotionEvents function. + * + */ + +typedef struct { + Time time; + int *data; +} XDeviceTimeCoord; + + +/******************************************************************* + * + * Device state structure. + * This is returned by the XQueryDeviceState request. + * + */ + +typedef struct { + XID device_id; + int num_classes; + XInputClass *data; +} XDeviceState; + +/******************************************************************* + * + * Note that the mode field is a bitfield that reports the Proximity + * status of the device as well as the mode. The mode field should + * be OR'd with the mask DeviceMode and compared with the values + * Absolute and Relative to determine the mode, and should be OR'd + * with the mask ProximityState and compared with the values InProximity + * and OutOfProximity to determine the proximity state. + * + */ + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + unsigned char num_valuators; + unsigned char mode; + int *valuators; +} XValuatorState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_keys; + char keys[32]; +} XKeyState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_buttons; + char buttons[32]; +} XButtonState; + + + +/******************************************************************* + * + * Function definitions. + * + */ + +_XFUNCPROTOBEGIN + +extern int XChangeKeyboardDevice( + Display* /* display */, + XDevice* /* device */ +); + +extern int XChangePointerDevice( + Display* /* display */, + XDevice* /* device */, + int /* xaxis */, + int /* yaxis */ +); + +extern int XGrabDevice( + Display* /* display */, + XDevice* /* device */, + Window /* grab_window */, + Bool /* ownerEvents */, + int /* event count */, + XEventClass* /* event_list */, + int /* this_device_mode */, + int /* other_devices_mode */, + Time /* time */ +); + +extern int XUngrabDevice( + Display* /* display */, + XDevice* /* device */, + Time /* time */ +); + +extern int XGrabDeviceKey( + Display* /* display */, + XDevice* /* device */, + unsigned int /* key */, + unsigned int /* modifiers */, + XDevice* /* modifier_device */, + Window /* grab_window */, + Bool /* owner_events */, + unsigned int /* event_count */, + XEventClass* /* event_list */, + int /* this_device_mode */, + int /* other_devices_mode */ +); + +extern int XUngrabDeviceKey( + Display* /* display */, + XDevice* /* device */, + unsigned int /* key */, + unsigned int /* modifiers */, + XDevice* /* modifier_dev */, + Window /* grab_window */ +); + +extern int XGrabDeviceButton( + Display* /* display */, + XDevice* /* device */, + unsigned int /* button */, + unsigned int /* modifiers */, + XDevice* /* modifier_device */, + Window /* grab_window */, + Bool /* owner_events */, + unsigned int /* event_count */, + XEventClass* /* event_list */, + int /* this_device_mode */, + int /* other_devices_mode */ +); + +extern int XUngrabDeviceButton( + Display* /* display */, + XDevice* /* device */, + unsigned int /* button */, + unsigned int /* modifiers */, + XDevice* /* modifier_dev */, + Window /* grab_window */ +); + +extern int XAllowDeviceEvents( + Display* /* display */, + XDevice* /* device */, + int /* event_mode */, + Time /* time */ +); + +extern int XGetDeviceFocus( + Display* /* display */, + XDevice* /* device */, + Window* /* focus */, + int* /* revert_to */, + Time* /* time */ +); + +extern int XSetDeviceFocus( + Display* /* display */, + XDevice* /* device */, + Window /* focus */, + int /* revert_to */, + Time /* time */ +); + +extern XFeedbackState *XGetFeedbackControl( + Display* /* display */, + XDevice* /* device */, + int* /* num_feedbacks */ +); + +extern void XFreeFeedbackList( + XFeedbackState* /* list */ +); + +extern int XChangeFeedbackControl( + Display* /* display */, + XDevice* /* device */, + unsigned long /* mask */, + XFeedbackControl* /* f */ +); + +extern int XDeviceBell( + Display* /* display */, + XDevice* /* device */, + XID /* feedbackclass */, + XID /* feedbackid */, + int /* percent */ +); + +extern KeySym *XGetDeviceKeyMapping( + Display* /* display */, + XDevice* /* device */, +#if NeedWidePrototypes + unsigned int /* first */, +#else + KeyCode /* first */, +#endif + int /* keycount */, + int* /* syms_per_code */ +); + +extern int XChangeDeviceKeyMapping( + Display* /* display */, + XDevice* /* device */, + int /* first */, + int /* syms_per_code */, + KeySym* /* keysyms */, + int /* count */ +); + +extern XModifierKeymap *XGetDeviceModifierMapping( + Display* /* display */, + XDevice* /* device */ +); + +extern int XSetDeviceModifierMapping( + Display* /* display */, + XDevice* /* device */, + XModifierKeymap* /* modmap */ +); + +extern int XSetDeviceButtonMapping( + Display* /* display */, + XDevice* /* device */, + unsigned char* /* map[] */, + int /* nmap */ +); + +extern int XGetDeviceButtonMapping( + Display* /* display */, + XDevice* /* device */, + unsigned char* /* map[] */, + unsigned int /* nmap */ +); + +extern XDeviceState *XQueryDeviceState( + Display* /* display */, + XDevice* /* device */ +); + +extern void XFreeDeviceState( + XDeviceState* /* list */ +); + +extern XExtensionVersion *XGetExtensionVersion( + Display* /* display */, + _Xconst char* /* name */ +); + +extern XDeviceInfo *XListInputDevices( + Display* /* display */, + int* /* ndevices */ +); + +extern void XFreeDeviceList( + XDeviceInfo* /* list */ +); + +extern XDevice *XOpenDevice( + Display* /* display */, + XID /* id */ +); + +extern int XCloseDevice( + Display* /* display */, + XDevice* /* device */ +); + +extern int XSetDeviceMode( + Display* /* display */, + XDevice* /* device */, + int /* mode */ +); + +extern int XSetDeviceValuators( + Display* /* display */, + XDevice* /* device */, + int* /* valuators */, + int /* first_valuator */, + int /* num_valuators */ +); + +extern XDeviceControl *XGetDeviceControl( + Display* /* display */, + XDevice* /* device */, + int /* control */ +); + +extern int XChangeDeviceControl( + Display* /* display */, + XDevice* /* device */, + int /* control */, + XDeviceControl* /* d */ +); + +extern int XSelectExtensionEvent( + Display* /* display */, + Window /* w */, + XEventClass* /* event_list */, + int /* count */ +); + +extern int XGetSelectedExtensionEvents( + Display* /* display */, + Window /* w */, + int* /* this_client_count */, + XEventClass** /* this_client_list */, + int* /* all_clients_count */, + XEventClass** /* all_clients_list */ +); + +extern int XChangeDeviceDontPropagateList( + Display* /* display */, + Window /* window */, + int /* count */, + XEventClass* /* events */, + int /* mode */ +); + +extern XEventClass *XGetDeviceDontPropagateList( + Display* /* display */, + Window /* window */, + int* /* count */ +); + +extern Status XSendExtensionEvent( + Display* /* display */, + XDevice* /* device */, + Window /* dest */, + Bool /* prop */, + int /* count */, + XEventClass* /* list */, + XEvent* /* event */ +); + +extern XDeviceTimeCoord *XGetDeviceMotionEvents( + Display* /* display */, + XDevice* /* device */, + Time /* start */, + Time /* stop */, + int* /* nEvents */, + int* /* mode */, + int* /* axis_count */ +); + +extern void XFreeDeviceMotionEvents( + XDeviceTimeCoord* /* events */ +); + +extern void XFreeDeviceControl( + XDeviceControl* /* control */ +); + +extern Atom* XListDeviceProperties( + Display* /* dpy */, + XDevice* /* dev */, + int* /* nprops_return */ +); + +extern void XChangeDeviceProperty( + Display* /* dpy */, + XDevice* /* dev */, + Atom /* property */, + Atom /* type */, + int /* format */, + int /* mode */, + _Xconst unsigned char * /*data */, + int /* nelements */ +); + +extern void +XDeleteDeviceProperty( + Display* /* dpy */, + XDevice* /* dev */, + Atom /* property */ +); + +extern Status +XGetDeviceProperty( + Display* /* dpy*/, + XDevice* /* dev*/, + Atom /* property*/, + long /* offset*/, + long /* length*/, + Bool /* delete*/, + Atom /* req_type*/, + Atom* /* actual_type*/, + int* /* actual_format*/, + unsigned long* /* nitems*/, + unsigned long* /* bytes_after*/, + unsigned char** /* prop*/ +); + +_XFUNCPROTOEND + +#endif /* _XINPUT_H_ */ diff --git a/sysroot/usr/include/X11/extensions/XInput2.h b/sysroot/usr/include/X11/extensions/XInput2.h new file mode 100644 index 0000000..33670eb --- /dev/null +++ b/sysroot/usr/include/X11/extensions/XInput2.h @@ -0,0 +1,657 @@ +/* + * 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. + * + */ + +/* Definitions used by the library and client */ + +#ifndef _XINPUT2_H_ +#define _XINPUT2_H_ + +#include <X11/Xlib.h> +#include <X11/extensions/XI2.h> +#include <X11/extensions/Xge.h> +#include <X11/extensions/Xfixes.h> /* PointerBarrier */ + +/******************************************************************* + * + */ +typedef struct { + int type; + char* name; + Bool send_core; + Bool enable; +} XIAddMasterInfo; + +typedef struct { + int type; + int deviceid; + int return_mode; /* AttachToMaster, Floating */ + int return_pointer; + int return_keyboard; +} XIRemoveMasterInfo; + +typedef struct { + int type; + int deviceid; + int new_master; +} XIAttachSlaveInfo; + +typedef struct { + int type; + int deviceid; +} XIDetachSlaveInfo; + +typedef union { + int type; /* must be first element */ + XIAddMasterInfo add; + XIRemoveMasterInfo remove; + XIAttachSlaveInfo attach; + XIDetachSlaveInfo detach; +} XIAnyHierarchyChangeInfo; + +typedef struct +{ + int base; + int latched; + int locked; + int effective; +} XIModifierState; + +typedef XIModifierState XIGroupState; + +typedef struct { + int mask_len; + unsigned char *mask; +} XIButtonState; + +typedef struct { + int mask_len; + unsigned char *mask; + double *values; +} XIValuatorState; + + +typedef struct +{ + int deviceid; + int mask_len; + unsigned char* mask; +} XIEventMask; + +typedef struct +{ + int type; + int sourceid; +} XIAnyClassInfo; + +typedef struct +{ + int type; + int sourceid; + int num_buttons; + Atom *labels; + XIButtonState state; +} XIButtonClassInfo; + +typedef struct +{ + int type; + int sourceid; + int num_keycodes; + int *keycodes; +} XIKeyClassInfo; + +typedef struct +{ + int type; + int sourceid; + int number; + Atom label; + double min; + double max; + double value; + int resolution; + int mode; +} XIValuatorClassInfo; + +/* new in XI 2.1 */ +typedef struct +{ + int type; + int sourceid; + int number; + int scroll_type; + double increment; + int flags; +} XIScrollClassInfo; + +typedef struct +{ + int type; + int sourceid; + int mode; + int num_touches; +} XITouchClassInfo; + +typedef struct +{ + int deviceid; + char *name; + int use; + int attachment; + Bool enabled; + int num_classes; + XIAnyClassInfo **classes; +} XIDeviceInfo; + +typedef struct +{ + int modifiers; + int status; +} XIGrabModifiers; + +typedef unsigned int BarrierEventID; + +typedef struct +{ + int deviceid; + PointerBarrier barrier; + BarrierEventID eventid; +} XIBarrierReleasePointerInfo; + +/** + * Generic XI2 event. All XI2 events have the same header. + */ +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; + Time time; +} XIEvent; + + +typedef struct { + int deviceid; + int attachment; + int use; + Bool enabled; + int flags; +} XIHierarchyInfo; + +/* + * Notifies the client that the device hierarchy has been changed. The client + * is expected to re-query the server for the device hierarchy. + */ +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; /* XI_HierarchyChanged */ + Time time; + int flags; + int num_info; + XIHierarchyInfo *info; +} XIHierarchyEvent; + +/* + * Notifies the client that the classes have been changed. This happens when + * the slave device that sends through the master changes. + */ +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; /* XI_DeviceChanged */ + Time time; + int deviceid; /* id of the device that changed */ + int sourceid; /* Source for the new classes. */ + int reason; /* Reason for the change */ + int num_classes; + XIAnyClassInfo **classes; /* same as in XIDeviceInfo */ +} XIDeviceChangedEvent; + +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; + Time time; + int deviceid; + int sourceid; + int detail; + Window root; + Window event; + Window child; + double root_x; + double root_y; + double event_x; + double event_y; + int flags; + XIButtonState buttons; + XIValuatorState valuators; + XIModifierState mods; + XIGroupState group; +} XIDeviceEvent; + +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; /* XI_RawKeyPress, XI_RawKeyRelease, etc. */ + Time time; + int deviceid; + int sourceid; /* Bug: Always 0. https://bugs.freedesktop.org//show_bug.cgi?id=34240 */ + int detail; + int flags; + XIValuatorState valuators; + double *raw_values; +} XIRawEvent; + +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; + Time time; + int deviceid; + int sourceid; + int detail; + Window root; + Window event; + Window child; + double root_x; + double root_y; + double event_x; + double event_y; + int mode; + Bool focus; + Bool same_screen; + XIButtonState buttons; + XIModifierState mods; + XIGroupState group; +} XIEnterEvent; + +typedef XIEnterEvent XILeaveEvent; +typedef XIEnterEvent XIFocusInEvent; +typedef XIEnterEvent XIFocusOutEvent; + +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; /* XI_PropertyEvent */ + Time time; + int deviceid; /* id of the device that changed */ + Atom property; + int what; +} XIPropertyEvent; + +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; + Time time; + int deviceid; + int sourceid; + unsigned int touchid; + Window root; + Window event; + Window child; + int flags; +} XITouchOwnershipEvent; + +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; + Time time; + int deviceid; + int sourceid; + Window event; + Window root; + double root_x; + double root_y; + double dx; + double dy; + int dtime; + int flags; + PointerBarrier barrier; + BarrierEventID eventid; +} XIBarrierEvent; + +_XFUNCPROTOBEGIN + +extern Bool XIQueryPointer( + Display* display, + int deviceid, + Window win, + Window* root, + Window* child, + double* root_x, + double* root_y, + double* win_x, + double* win_y, + XIButtonState *buttons, + XIModifierState *mods, + XIGroupState *group +); + +extern Bool XIWarpPointer( + Display* display, + int deviceid, + Window src_win, + Window dst_win, + double src_x, + double src_y, + unsigned int src_width, + unsigned int src_height, + double dst_x, + double dst_y +); + +extern Status XIDefineCursor( + Display* display, + int deviceid, + Window win, + Cursor cursor +); + +extern Status XIUndefineCursor( + Display* display, + int deviceid, + Window win +); + +extern Status XIChangeHierarchy( + Display* display, + XIAnyHierarchyChangeInfo* changes, + int num_changes +); + +extern Status XISetClientPointer( + Display* dpy, + Window win, + int deviceid +); + +extern Bool XIGetClientPointer( + Display* dpy, + Window win, + int* deviceid +); + +extern int XISelectEvents( + Display* dpy, + Window win, + XIEventMask *masks, + int num_masks +); + +extern XIEventMask *XIGetSelectedEvents( + Display* dpy, + Window win, + int *num_masks_return +); + +extern Status XIQueryVersion( + Display* dpy, + int* major_version_inout, + int* minor_version_inout +); + +extern XIDeviceInfo* XIQueryDevice( + Display* dpy, + int deviceid, + int* ndevices_return +); + +extern Status XISetFocus( + Display* dpy, + int deviceid, + Window focus, + Time time +); + +extern Status XIGetFocus( + Display* dpy, + int deviceid, + Window *focus_return); + +extern Status XIGrabDevice( + Display* dpy, + int deviceid, + Window grab_window, + Time time, + Cursor cursor, + int grab_mode, + int paired_device_mode, + Bool owner_events, + XIEventMask *mask +); + +extern Status XIUngrabDevice( + Display* dpy, + int deviceid, + Time time +); + +extern Status XIAllowEvents( + Display* display, + int deviceid, + int event_mode, + Time time +); + +extern Status XIAllowTouchEvents( + Display* display, + int deviceid, + unsigned int touchid, + Window grab_window, + int event_mode +); + +extern int XIGrabButton( + Display* display, + int deviceid, + int button, + Window grab_window, + Cursor cursor, + int grab_mode, + int paired_device_mode, + int owner_events, + XIEventMask *mask, + int num_modifiers, + XIGrabModifiers *modifiers_inout +); + +extern int XIGrabKeycode( + Display* display, + int deviceid, + int keycode, + Window grab_window, + int grab_mode, + int paired_device_mode, + int owner_events, + XIEventMask *mask, + int num_modifiers, + XIGrabModifiers *modifiers_inout +); + +extern int XIGrabEnter( + Display* display, + int deviceid, + Window grab_window, + Cursor cursor, + int grab_mode, + int paired_device_mode, + int owner_events, + XIEventMask *mask, + int num_modifiers, + XIGrabModifiers *modifiers_inout +); + +extern int XIGrabFocusIn( + Display* display, + int deviceid, + Window grab_window, + int grab_mode, + int paired_device_mode, + int owner_events, + XIEventMask *mask, + int num_modifiers, + XIGrabModifiers *modifiers_inout +); + +extern int XIGrabTouchBegin( + Display* display, + int deviceid, + Window grab_window, + int owner_events, + XIEventMask *mask, + int num_modifiers, + XIGrabModifiers *modifiers_inout +); + +extern Status XIUngrabButton( + Display* display, + int deviceid, + int button, + Window grab_window, + int num_modifiers, + XIGrabModifiers *modifiers +); + +extern Status XIUngrabKeycode( + Display* display, + int deviceid, + int keycode, + Window grab_window, + int num_modifiers, + XIGrabModifiers *modifiers +); + +extern Status XIUngrabEnter( + Display* display, + int deviceid, + Window grab_window, + int num_modifiers, + XIGrabModifiers *modifiers +); + +extern Status XIUngrabFocusIn( + Display* display, + int deviceid, + Window grab_window, + int num_modifiers, + XIGrabModifiers *modifiers +); + +extern Status XIUngrabTouchBegin( + Display* display, + int deviceid, + Window grab_window, + int num_modifiers, + XIGrabModifiers *modifiers +); + +extern Atom *XIListProperties( + Display* display, + int deviceid, + int *num_props_return +); + +extern void XIChangeProperty( + Display* display, + int deviceid, + Atom property, + Atom type, + int format, + int mode, + unsigned char *data, + int num_items +); + +extern void +XIDeleteProperty( + Display* display, + int deviceid, + Atom property +); + +extern Status +XIGetProperty( + Display* display, + int deviceid, + Atom property, + long offset, + long length, + Bool delete_property, + Atom type, + Atom *type_return, + int *format_return, + unsigned long *num_items_return, + unsigned long *bytes_after_return, + unsigned char **data +); + +extern void +XIBarrierReleasePointers( + Display* display, + XIBarrierReleasePointerInfo *barriers, + int num_barriers +); + +extern void +XIBarrierReleasePointer( + Display* display, + int deviceid, + PointerBarrier barrier, + BarrierEventID eventid +); + +extern void XIFreeDeviceInfo(XIDeviceInfo *info); + +_XFUNCPROTOEND + +#endif /* XINPUT2_H */ diff --git a/sysroot/usr/include/X11/extensions/Xfixes.h b/sysroot/usr/include/X11/extensions/Xfixes.h new file mode 100644 index 0000000..8995d14 --- /dev/null +++ b/sysroot/usr/include/X11/extensions/Xfixes.h @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _XFIXES_H_ +#define _XFIXES_H_ + +#include <X11/extensions/xfixeswire.h> + +#include <X11/Xfuncproto.h> +#include <X11/Xlib.h> + +/* + * This revision number also appears in configure.ac, they have + * to be manually synchronized + */ +#define XFIXES_REVISION 1 +#define XFIXES_VERSION ((XFIXES_MAJOR * 10000) + (XFIXES_MINOR * 100) + (XFIXES_REVISION)) + +typedef struct { + int type; /* event base */ + unsigned long serial; + Bool send_event; + Display *display; + Window window; + int subtype; + Window owner; + Atom selection; + Time timestamp; + Time selection_timestamp; +} XFixesSelectionNotifyEvent; + +typedef struct { + int type; /* event base */ + unsigned long serial; + Bool send_event; + Display *display; + Window window; + int subtype; + unsigned long cursor_serial; + Time timestamp; + Atom cursor_name; +} XFixesCursorNotifyEvent; + +typedef struct { + short x, y; + unsigned short width, height; + unsigned short xhot, yhot; + unsigned long cursor_serial; + unsigned long *pixels; +#if XFIXES_MAJOR >= 2 + Atom atom; /* Version >= 2 only */ + const char *name; /* Version >= 2 only */ +#endif +} XFixesCursorImage; + +#if XFIXES_MAJOR >= 2 +/* Version 2 types */ + +typedef XID XserverRegion; + +typedef struct { + short x, y; + unsigned short width, height; + unsigned short xhot, yhot; + unsigned long cursor_serial; + unsigned long *pixels; + Atom atom; + const char *name; +} XFixesCursorImageAndName; + +#endif + +_XFUNCPROTOBEGIN + +Bool XFixesQueryExtension (Display *dpy, + int *event_base_return, + int *error_base_return); +Status XFixesQueryVersion (Display *dpy, + int *major_version_return, + int *minor_version_return); + +int XFixesVersion (void); + +void +XFixesChangeSaveSet (Display *dpy, + Window win, + int mode, + int target, + int map); + +void +XFixesSelectSelectionInput (Display *dpy, + Window win, + Atom selection, + unsigned long eventMask); + +void +XFixesSelectCursorInput (Display *dpy, + Window win, + unsigned long eventMask); + +XFixesCursorImage * +XFixesGetCursorImage (Display *dpy); + +#if XFIXES_MAJOR >= 2 +/* Version 2 functions */ + +XserverRegion +XFixesCreateRegion (Display *dpy, XRectangle *rectangles, int nrectangles); + +XserverRegion +XFixesCreateRegionFromBitmap (Display *dpy, Pixmap bitmap); + +XserverRegion +XFixesCreateRegionFromWindow (Display *dpy, Window window, int kind); + +XserverRegion +XFixesCreateRegionFromGC (Display *dpy, GC gc); + +XserverRegion +XFixesCreateRegionFromPicture (Display *dpy, XID picture); + +void +XFixesDestroyRegion (Display *dpy, XserverRegion region); + +void +XFixesSetRegion (Display *dpy, XserverRegion region, + XRectangle *rectangles, int nrectangles); + +void +XFixesCopyRegion (Display *dpy, XserverRegion dst, XserverRegion src); + +void +XFixesUnionRegion (Display *dpy, XserverRegion dst, + XserverRegion src1, XserverRegion src2); + +void +XFixesIntersectRegion (Display *dpy, XserverRegion dst, + XserverRegion src1, XserverRegion src2); + +void +XFixesSubtractRegion (Display *dpy, XserverRegion dst, + XserverRegion src1, XserverRegion src2); + +void +XFixesInvertRegion (Display *dpy, XserverRegion dst, + XRectangle *rect, XserverRegion src); + +void +XFixesTranslateRegion (Display *dpy, XserverRegion region, int dx, int dy); + +void +XFixesRegionExtents (Display *dpy, XserverRegion dst, XserverRegion src); + +XRectangle * +XFixesFetchRegion (Display *dpy, XserverRegion region, int *nrectanglesRet); + +XRectangle * +XFixesFetchRegionAndBounds (Display *dpy, XserverRegion region, + int *nrectanglesRet, + XRectangle *bounds); + +void +XFixesSetGCClipRegion (Display *dpy, GC gc, + int clip_x_origin, int clip_y_origin, + XserverRegion region); + +void +XFixesSetWindowShapeRegion (Display *dpy, Window win, int shape_kind, + int x_off, int y_off, XserverRegion region); + +void +XFixesSetPictureClipRegion (Display *dpy, XID picture, + int clip_x_origin, int clip_y_origin, + XserverRegion region); + +void +XFixesSetCursorName (Display *dpy, Cursor cursor, const char *name); + +const char * +XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom); + +void +XFixesChangeCursor (Display *dpy, Cursor source, Cursor destination); + +void +XFixesChangeCursorByName (Display *dpy, Cursor source, const char *name); + +#endif /* XFIXES_MAJOR >= 2 */ + +#if XFIXES_MAJOR >= 3 + +void +XFixesExpandRegion (Display *dpy, XserverRegion dst, XserverRegion src, + unsigned left, unsigned right, + unsigned top, unsigned bottom); + +#endif /* XFIXES_MAJOR >= 3 */ + +#if XFIXES_MAJOR >= 4 +/* Version 4.0 externs */ + +void +XFixesHideCursor (Display *dpy, Window win); + +void +XFixesShowCursor (Display *dpy, Window win); + +#endif /* XFIXES_MAJOR >= 4 */ + +#if XFIXES_MAJOR >= 5 + +typedef XID PointerBarrier; + +PointerBarrier +XFixesCreatePointerBarrier(Display *dpy, Window w, int x1, int y1, + int x2, int y2, int directions, + int num_devices, int *devices); + +void +XFixesDestroyPointerBarrier(Display *dpy, PointerBarrier b); + +#endif /* XFIXES_MAJOR >= 5 */ + +_XFUNCPROTOEND + +#endif /* _XFIXES_H_ */ diff --git a/sysroot/usr/include/X11/extensions/xfixesproto.h b/sysroot/usr/include/X11/extensions/xfixesproto.h new file mode 100644 index 0000000..fcf409a --- /dev/null +++ b/sysroot/usr/include/X11/extensions/xfixesproto.h @@ -0,0 +1,551 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright 2010 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _XFIXESPROTO_H_ +#define _XFIXESPROTO_H_ + +#include <X11/Xmd.h> +#include <X11/extensions/xfixeswire.h> +#include <X11/extensions/shapeconst.h> + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define Picture CARD32 + +/*************** Version 1 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesReq; + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xXFixesQueryVersionReq; + +#define sz_xXFixesQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXFixesQueryVersionReply; + +#define sz_xXFixesQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + BYTE mode; /* SetModeInsert/SetModeDelete*/ + BYTE target; /* SaveSetNearest/SaveSetRoot*/ + BYTE map; /* SaveSetMap/SaveSetUnmap */ + BYTE pad1; + Window window; +} xXFixesChangeSaveSetReq; + +#define sz_xXFixesChangeSaveSetReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + Atom selection B32; + CARD32 eventMask B32; +} xXFixesSelectSelectionInputReq; + +#define sz_xXFixesSelectSelectionInputReq 16 + +typedef struct { + CARD8 type; + CARD8 subtype; + CARD16 sequenceNumber B16; + Window window B32; + Window owner B32; + Atom selection B32; + Time timestamp B32; + Time selectionTimestamp B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesSelectionNotifyEvent; + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + CARD32 eventMask B32; +} xXFixesSelectCursorInputReq; + +#define sz_xXFixesSelectCursorInputReq 12 + +typedef struct { + CARD8 type; + CARD8 subtype; + CARD16 sequenceNumber B16; + Window window B32; + CARD32 cursorSerial B32; + Time timestamp; + Atom name B32; /* Version 2 */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesCursorNotifyEvent; + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesGetCursorImageReq; + +#define sz_xXFixesGetCursorImageReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 xhot B16; + CARD16 yhot B16; + CARD32 cursorSerial B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesGetCursorImageReply; + +#define sz_xXFixesGetCursorImageReply 32 + +/*************** Version 2 ******************/ + +#define Region CARD32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + /* LISTofRECTANGLE */ +} xXFixesCreateRegionReq; + +#define sz_xXFixesCreateRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Pixmap bitmap B32; +} xXFixesCreateRegionFromBitmapReq; + +#define sz_xXFixesCreateRegionFromBitmapReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Window window B32; + CARD8 kind; + CARD8 pad1; + CARD16 pad2 B16; +} xXFixesCreateRegionFromWindowReq; + +#define sz_xXFixesCreateRegionFromWindowReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + GContext gc B32; +} xXFixesCreateRegionFromGCReq; + +#define sz_xXFixesCreateRegionFromGCReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Picture picture B32; +} xXFixesCreateRegionFromPictureReq; + +#define sz_xXFixesCreateRegionFromPictureReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; +} xXFixesDestroyRegionReq; + +#define sz_xXFixesDestroyRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + /* LISTofRECTANGLE */ +} xXFixesSetRegionReq; + +#define sz_xXFixesSetRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; +} xXFixesCopyRegionReq; + +#define sz_xXFixesCopyRegionReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source1 B32; + Region source2 B32; + Region destination B32; +} xXFixesCombineRegionReq, + xXFixesUnionRegionReq, + xXFixesIntersectRegionReq, + xXFixesSubtractRegionReq; + +#define sz_xXFixesCombineRegionReq 16 +#define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq +#define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq +#define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + Region destination B32; +} xXFixesInvertRegionReq; + +#define sz_xXFixesInvertRegionReq 20 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + INT16 dx B16, dy B16; +} xXFixesTranslateRegionReq; + +#define sz_xXFixesTranslateRegionReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; +} xXFixesRegionExtentsReq; + +#define sz_xXFixesRegionExtentsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; +} xXFixesFetchRegionReq; + +#define sz_xXFixesFetchRegionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXFixesFetchRegionReply; + +#define sz_xXFixesFetchRegionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + GContext gc B32; + Region region B32; + INT16 xOrigin B16, yOrigin B16; +} xXFixesSetGCClipRegionReq; + +#define sz_xXFixesSetGCClipRegionReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window dest; + BYTE destKind; + CARD8 pad1; + CARD16 pad2 B16; + INT16 xOff B16, yOff B16; + Region region; +} xXFixesSetWindowShapeRegionReq; + +#define sz_xXFixesSetWindowShapeRegionReq 20 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Picture picture B32; + Region region B32; + INT16 xOrigin B16, yOrigin B16; +} xXFixesSetPictureClipRegionReq; + +#define sz_xXFixesSetPictureClipRegionReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor cursor B32; + CARD16 nbytes B16; + CARD16 pad B16; +} xXFixesSetCursorNameReq; + +#define sz_xXFixesSetCursorNameReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor cursor B32; +} xXFixesGetCursorNameReq; + +#define sz_xXFixesGetCursorNameReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom atom B32; + CARD16 nbytes B16; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXFixesGetCursorNameReply; + +#define sz_xXFixesGetCursorNameReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesGetCursorImageAndNameReq; + +#define sz_xXFixesGetCursorImageAndNameReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 xhot B16; + CARD16 yhot B16; + CARD32 cursorSerial B32; + Atom cursorName B32; + CARD16 nbytes B16; + CARD16 pad B16; +} xXFixesGetCursorImageAndNameReply; + +#define sz_xXFixesGetCursorImageAndNameReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor source B32; + Cursor destination B32; +} xXFixesChangeCursorReq; + +#define sz_xXFixesChangeCursorReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor source B32; + CARD16 nbytes; + CARD16 pad; +} xXFixesChangeCursorByNameReq; + +#define sz_xXFixesChangeCursorByNameReq 12 + +/*************** Version 3 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; + CARD16 left B16; + CARD16 right B16; + CARD16 top B16; + CARD16 bottom B16; +} xXFixesExpandRegionReq; + +#define sz_xXFixesExpandRegionReq 20 + +/*************** Version 4.0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; +} xXFixesHideCursorReq; + +#define sz_xXFixesHideCursorReq sizeof(xXFixesHideCursorReq) + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; +} xXFixesShowCursorReq; + +#define sz_xXFixesShowCursorReq sizeof(xXFixesShowCursorReq) + +/*************** Version 5.0 ******************/ + +#define Barrier CARD32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Barrier barrier B32; + Window window B32; + INT16 x1 B16; + INT16 y1 B16; + INT16 x2 B16; + INT16 y2 B16; + CARD32 directions; + CARD16 pad B16; + CARD16 num_devices B16; + /* array of CARD16 devices */ +} xXFixesCreatePointerBarrierReq; + +#define sz_xXFixesCreatePointerBarrierReq 28 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Barrier barrier B32; +} xXFixesDestroyPointerBarrierReq; + +#define sz_xXFixesDestroyPointerBarrierReq 8 + +#undef Barrier +#undef Region +#undef Picture +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _XFIXESPROTO_H_ */ diff --git a/sysroot/usr/include/X11/extensions/xfixeswire.h b/sysroot/usr/include/X11/extensions/xfixeswire.h new file mode 100644 index 0000000..432349a --- /dev/null +++ b/sysroot/usr/include/X11/extensions/xfixeswire.h @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright 2010 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + + +#ifndef _XFIXESWIRE_H_ +#define _XFIXESWIRE_H_ + +#define XFIXES_NAME "XFIXES" +#define XFIXES_MAJOR 5 +#define XFIXES_MINOR 0 + +/*************** Version 1 ******************/ +#define X_XFixesQueryVersion 0 +#define X_XFixesChangeSaveSet 1 +#define X_XFixesSelectSelectionInput 2 +#define X_XFixesSelectCursorInput 3 +#define X_XFixesGetCursorImage 4 +/*************** Version 2 ******************/ +#define X_XFixesCreateRegion 5 +#define X_XFixesCreateRegionFromBitmap 6 +#define X_XFixesCreateRegionFromWindow 7 +#define X_XFixesCreateRegionFromGC 8 +#define X_XFixesCreateRegionFromPicture 9 +#define X_XFixesDestroyRegion 10 +#define X_XFixesSetRegion 11 +#define X_XFixesCopyRegion 12 +#define X_XFixesUnionRegion 13 +#define X_XFixesIntersectRegion 14 +#define X_XFixesSubtractRegion 15 +#define X_XFixesInvertRegion 16 +#define X_XFixesTranslateRegion 17 +#define X_XFixesRegionExtents 18 +#define X_XFixesFetchRegion 19 +#define X_XFixesSetGCClipRegion 20 +#define X_XFixesSetWindowShapeRegion 21 +#define X_XFixesSetPictureClipRegion 22 +#define X_XFixesSetCursorName 23 +#define X_XFixesGetCursorName 24 +#define X_XFixesGetCursorImageAndName 25 +#define X_XFixesChangeCursor 26 +#define X_XFixesChangeCursorByName 27 +/*************** Version 3 ******************/ +#define X_XFixesExpandRegion 28 +/*************** Version 4 ******************/ +#define X_XFixesHideCursor 29 +#define X_XFixesShowCursor 30 +/*************** Version 5 ******************/ +#define X_XFixesCreatePointerBarrier 31 +#define X_XFixesDestroyPointerBarrier 32 + +#define XFixesNumberRequests (X_XFixesDestroyPointerBarrier+1) + +/* Selection events share one event number */ +#define XFixesSelectionNotify 0 + +/* Within the selection, the 'subtype' field distinguishes */ +#define XFixesSetSelectionOwnerNotify 0 +#define XFixesSelectionWindowDestroyNotify 1 +#define XFixesSelectionClientCloseNotify 2 + +#define XFixesSetSelectionOwnerNotifyMask (1L << 0) +#define XFixesSelectionWindowDestroyNotifyMask (1L << 1) +#define XFixesSelectionClientCloseNotifyMask (1L << 2) + +/* There's only one cursor event so far */ +#define XFixesCursorNotify 1 + +#define XFixesDisplayCursorNotify 0 + +#define XFixesDisplayCursorNotifyMask (1L << 0) + +#define XFixesNumberEvents (2) + +/* errors */ +#define BadRegion 0 +#define BadBarrier 1 +#define XFixesNumberErrors (BadBarrier+1) + +#define SaveSetNearest 0 +#define SaveSetRoot 1 + +#define SaveSetMap 0 +#define SaveSetUnmap 1 + +/*************** Version 2 ******************/ + +#define WindowRegionBounding 0 +#define WindowRegionClip 1 + +/*************** Version 5 ******************/ + +#define BarrierPositiveX (1L << 0) +#define BarrierPositiveY (1L << 1) +#define BarrierNegativeX (1L << 2) +#define BarrierNegativeY (1L << 3) + +#endif /* _XFIXESWIRE_H_ */ |