diff options
Diffstat (limited to 'thirdparty/linuxbsd_headers/X11/extensions')
17 files changed, 6510 insertions, 0 deletions
diff --git a/thirdparty/linuxbsd_headers/X11/extensions/XI2.h b/thirdparty/linuxbsd_headers/X11/extensions/XI2.h new file mode 100644 index 0000000000..cc47085df0 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/XI2.h @@ -0,0 +1,259 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _XI2_H_ +#define _XI2_H_ + +#define XInput_2_0 7 +/* DO NOT ADD TO THIS LIST. These are libXi-specific defines. + See commit libXi-1.4.2-21-ge8531dd */ + +#define XI_2_Major 2 +#define XI_2_Minor 4 + +/* Property event flags */ +#define XIPropertyDeleted 0 +#define XIPropertyCreated 1 +#define XIPropertyModified 2 + +/* Property modes */ +#define XIPropModeReplace 0 +#define XIPropModePrepend 1 +#define XIPropModeAppend 2 + +/* Special property type used for XIGetProperty */ +#define XIAnyPropertyType 0L + +/* Enter/Leave and Focus In/Out modes */ +#define XINotifyNormal 0 +#define XINotifyGrab 1 +#define XINotifyUngrab 2 +#define XINotifyWhileGrabbed 3 +#define XINotifyPassiveGrab 4 +#define XINotifyPassiveUngrab 5 + +/* Enter/Leave and focus In/out detail */ +#define XINotifyAncestor 0 +#define XINotifyVirtual 1 +#define XINotifyInferior 2 +#define XINotifyNonlinear 3 +#define XINotifyNonlinearVirtual 4 +#define XINotifyPointer 5 +#define XINotifyPointerRoot 6 +#define XINotifyDetailNone 7 + +/* Grab modes */ +#define XIGrabModeSync 0 +#define XIGrabModeAsync 1 +#define XIGrabModeTouch 2 + +/* Grab reply status codes */ +#define XIGrabSuccess 0 +#define XIAlreadyGrabbed 1 +#define XIGrabInvalidTime 2 +#define XIGrabNotViewable 3 +#define XIGrabFrozen 4 + +/* Grab owner events values */ +#define XIOwnerEvents True +#define XINoOwnerEvents False + +/* Passive grab types */ +#define XIGrabtypeButton 0 +#define XIGrabtypeKeycode 1 +#define XIGrabtypeEnter 2 +#define XIGrabtypeFocusIn 3 +#define XIGrabtypeTouchBegin 4 +#define XIGrabtypeGesturePinchBegin 5 +#define XIGrabtypeGestureSwipeBegin 6 + +/* Passive grab modifier */ +#define XIAnyModifier (1U << 31) +#define XIAnyButton 0 +#define XIAnyKeycode 0 + +/* XIAllowEvents event-modes */ +#define XIAsyncDevice 0 +#define XISyncDevice 1 +#define XIReplayDevice 2 +#define XIAsyncPairedDevice 3 +#define XIAsyncPair 4 +#define XISyncPair 5 +#define XIAcceptTouch 6 +#define XIRejectTouch 7 + +/* DeviceChangedEvent change reasons */ +#define XISlaveSwitch 1 +#define XIDeviceChange 2 + +/* Hierarchy flags */ +#define XIMasterAdded (1 << 0) +#define XIMasterRemoved (1 << 1) +#define XISlaveAdded (1 << 2) +#define XISlaveRemoved (1 << 3) +#define XISlaveAttached (1 << 4) +#define XISlaveDetached (1 << 5) +#define XIDeviceEnabled (1 << 6) +#define XIDeviceDisabled (1 << 7) + +/* ChangeHierarchy constants */ +#define XIAddMaster 1 +#define XIRemoveMaster 2 +#define XIAttachSlave 3 +#define XIDetachSlave 4 + +#define XIAttachToMaster 1 +#define XIFloating 2 + +/* Valuator modes */ +#define XIModeRelative 0 +#define XIModeAbsolute 1 + +/* Device types */ +#define XIMasterPointer 1 +#define XIMasterKeyboard 2 +#define XISlavePointer 3 +#define XISlaveKeyboard 4 +#define XIFloatingSlave 5 + +/* Device classes: classes that are not identical to Xi 1.x classes must be + * numbered starting from 8. */ +#define XIKeyClass 0 +#define XIButtonClass 1 +#define XIValuatorClass 2 +#define XIScrollClass 3 +#define XITouchClass 8 +#define XIGestureClass 9 + +/* 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) + +/* Gesture pinch event flags */ +#define XIGesturePinchEventCancelled (1 << 0) + +/* Gesture swipe event flags */ +#define XIGestureSwipeEventCancelled (1 << 0) + +/* Touch modes */ +#define XIDirectTouch 1 +#define XIDependentTouch 2 + +/* XI2 event mask macros */ +#define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7))) +#define XIClearMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] &= ~(1 << ((event) & 7))) +#define XIMaskIsSet(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7))) +#define XIMaskLen(event) (((event) >> 3) + 1) + +/* Fake device ID's for event selection */ +#define XIAllDevices 0 +#define XIAllMasterDevices 1 + +/* Event types */ +#define XI_DeviceChanged 1 +#define XI_KeyPress 2 +#define XI_KeyRelease 3 +#define XI_ButtonPress 4 +#define XI_ButtonRelease 5 +#define XI_Motion 6 +#define XI_Enter 7 +#define XI_Leave 8 +#define XI_FocusIn 9 +#define XI_FocusOut 10 +#define XI_HierarchyChanged 11 +#define XI_PropertyEvent 12 +#define XI_RawKeyPress 13 +#define XI_RawKeyRelease 14 +#define XI_RawButtonPress 15 +#define XI_RawButtonRelease 16 +#define XI_RawMotion 17 +#define XI_TouchBegin 18 /* XI 2.2 */ +#define XI_TouchUpdate 19 +#define XI_TouchEnd 20 +#define XI_TouchOwnership 21 +#define XI_RawTouchBegin 22 +#define XI_RawTouchUpdate 23 +#define XI_RawTouchEnd 24 +#define XI_BarrierHit 25 /* XI 2.3 */ +#define XI_BarrierLeave 26 +#define XI_GesturePinchBegin 27 /* XI 2.4 */ +#define XI_GesturePinchUpdate 28 +#define XI_GesturePinchEnd 29 +#define XI_GestureSwipeBegin 30 +#define XI_GestureSwipeUpdate 31 +#define XI_GestureSwipeEnd 32 +#define XI_LASTEVENT XI_GestureSwipeEnd +/* NOTE: XI2LASTEVENT in xserver/include/inputstr.h must be the same value + * as XI_LASTEVENT if the server is supposed to handle masks etc. for this + * type of event. */ + +/* Event masks. + * Note: the protocol spec defines a mask to be of (1 << type). Clients are + * free to create masks by bitshifting instead of using these defines. + */ +#define XI_DeviceChangedMask (1 << XI_DeviceChanged) +#define XI_KeyPressMask (1 << XI_KeyPress) +#define XI_KeyReleaseMask (1 << XI_KeyRelease) +#define XI_ButtonPressMask (1 << XI_ButtonPress) +#define XI_ButtonReleaseMask (1 << XI_ButtonRelease) +#define XI_MotionMask (1 << XI_Motion) +#define XI_EnterMask (1 << XI_Enter) +#define XI_LeaveMask (1 << XI_Leave) +#define XI_FocusInMask (1 << XI_FocusIn) +#define XI_FocusOutMask (1 << XI_FocusOut) +#define XI_HierarchyChangedMask (1 << XI_HierarchyChanged) +#define XI_PropertyEventMask (1 << XI_PropertyEvent) +#define XI_RawKeyPressMask (1 << XI_RawKeyPress) +#define XI_RawKeyReleaseMask (1 << XI_RawKeyRelease) +#define XI_RawButtonPressMask (1 << XI_RawButtonPress) +#define XI_RawButtonReleaseMask (1 << XI_RawButtonRelease) +#define XI_RawMotionMask (1 << XI_RawMotion) +#define XI_TouchBeginMask (1 << XI_TouchBegin) +#define XI_TouchEndMask (1 << XI_TouchEnd) +#define XI_TouchOwnershipChangedMask (1 << XI_TouchOwnership) +#define XI_TouchUpdateMask (1 << XI_TouchUpdate) +#define XI_RawTouchBeginMask (1 << XI_RawTouchBegin) +#define XI_RawTouchEndMask (1 << XI_RawTouchEnd) +#define XI_RawTouchUpdateMask (1 << XI_RawTouchUpdate) +#define XI_BarrierHitMask (1 << XI_BarrierHit) +#define XI_BarrierLeaveMask (1 << XI_BarrierLeave) + +#endif /* _XI2_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/XInput2.h b/thirdparty/linuxbsd_headers/X11/extensions/XInput2.h new file mode 100644 index 0000000000..33670ebf20 --- /dev/null +++ b/thirdparty/linuxbsd_headers/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/thirdparty/linuxbsd_headers/X11/extensions/XKB.h b/thirdparty/linuxbsd_headers/X11/extensions/XKB.h new file mode 100644 index 0000000000..5d3f87016f --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/XKB.h @@ -0,0 +1,786 @@ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifndef _XKB_H_ +#define _XKB_H_ + + /* + * XKB request codes, used in: + * - xkbReqType field of all requests + * - requestMinor field of some events + */ +#define X_kbUseExtension 0 +#define X_kbSelectEvents 1 +#define X_kbBell 3 +#define X_kbGetState 4 +#define X_kbLatchLockState 5 +#define X_kbGetControls 6 +#define X_kbSetControls 7 +#define X_kbGetMap 8 +#define X_kbSetMap 9 +#define X_kbGetCompatMap 10 +#define X_kbSetCompatMap 11 +#define X_kbGetIndicatorState 12 +#define X_kbGetIndicatorMap 13 +#define X_kbSetIndicatorMap 14 +#define X_kbGetNamedIndicator 15 +#define X_kbSetNamedIndicator 16 +#define X_kbGetNames 17 +#define X_kbSetNames 18 +#define X_kbGetGeometry 19 +#define X_kbSetGeometry 20 +#define X_kbPerClientFlags 21 +#define X_kbListComponents 22 +#define X_kbGetKbdByName 23 +#define X_kbGetDeviceInfo 24 +#define X_kbSetDeviceInfo 25 +#define X_kbSetDebuggingFlags 101 + + /* + * In the X sense, XKB reports only one event. + * The type field of all XKB events is XkbEventCode + */ +#define XkbEventCode 0 +#define XkbNumberEvents (XkbEventCode+1) + + /* + * XKB has a minor event code so it can use one X event code for + * multiple purposes. + * - reported in the xkbType field of all XKB events. + * - XkbSelectEventDetails: Indicates the event for which event details + * are being changed + */ +#define XkbNewKeyboardNotify 0 +#define XkbMapNotify 1 +#define XkbStateNotify 2 +#define XkbControlsNotify 3 +#define XkbIndicatorStateNotify 4 +#define XkbIndicatorMapNotify 5 +#define XkbNamesNotify 6 +#define XkbCompatMapNotify 7 +#define XkbBellNotify 8 +#define XkbActionMessage 9 +#define XkbAccessXNotify 10 +#define XkbExtensionDeviceNotify 11 + + /* + * Event Mask: + * - XkbSelectEvents: Specifies event interest. + */ +#define XkbNewKeyboardNotifyMask (1L << 0) +#define XkbMapNotifyMask (1L << 1) +#define XkbStateNotifyMask (1L << 2) +#define XkbControlsNotifyMask (1L << 3) +#define XkbIndicatorStateNotifyMask (1L << 4) +#define XkbIndicatorMapNotifyMask (1L << 5) +#define XkbNamesNotifyMask (1L << 6) +#define XkbCompatMapNotifyMask (1L << 7) +#define XkbBellNotifyMask (1L << 8) +#define XkbActionMessageMask (1L << 9) +#define XkbAccessXNotifyMask (1L << 10) +#define XkbExtensionDeviceNotifyMask (1L << 11) +#define XkbAllEventsMask (0xFFF) + + /* + * NewKeyboardNotify event details: + */ +#define XkbNKN_KeycodesMask (1L << 0) +#define XkbNKN_GeometryMask (1L << 1) +#define XkbNKN_DeviceIDMask (1L << 2) +#define XkbAllNewKeyboardEventsMask (0x7) + + /* + * AccessXNotify event types: + * - The 'what' field of AccessXNotify events reports the + * reason that the event was generated. + */ +#define XkbAXN_SKPress 0 +#define XkbAXN_SKAccept 1 +#define XkbAXN_SKReject 2 +#define XkbAXN_SKRelease 3 +#define XkbAXN_BKAccept 4 +#define XkbAXN_BKReject 5 +#define XkbAXN_AXKWarning 6 + + /* + * AccessXNotify details: + * - Used as an event detail mask to limit the conditions under which + * AccessXNotify events are reported + */ +#define XkbAXN_SKPressMask (1L << 0) +#define XkbAXN_SKAcceptMask (1L << 1) +#define XkbAXN_SKRejectMask (1L << 2) +#define XkbAXN_SKReleaseMask (1L << 3) +#define XkbAXN_BKAcceptMask (1L << 4) +#define XkbAXN_BKRejectMask (1L << 5) +#define XkbAXN_AXKWarningMask (1L << 6) +#define XkbAllAccessXEventsMask (0x7f) + + /* + * Miscellaneous event details: + * - event detail masks for assorted events that don't really + * have any details. + */ +#define XkbAllStateEventsMask XkbAllStateComponentsMask +#define XkbAllMapEventsMask XkbAllMapComponentsMask +#define XkbAllControlEventsMask XkbAllControlsMask +#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask +#define XkbAllNameEventsMask XkbAllNamesMask +#define XkbAllCompatMapEventsMask XkbAllCompatMask +#define XkbAllBellEventsMask (1L << 0) +#define XkbAllActionMessagesMask (1L << 0) + + /* + * XKB reports one error: BadKeyboard + * A further reason for the error is encoded into to most significant + * byte of the resourceID for the error: + * XkbErr_BadDevice - the device in question was not found + * XkbErr_BadClass - the device was found but it doesn't belong to + * the appropriate class. + * XkbErr_BadId - the device was found and belongs to the right + * class, but not feedback with a matching id was + * found. + * The low byte of the resourceID for this error contains the device + * id, class specifier or feedback id that failed. + */ +#define XkbKeyboard 0 +#define XkbNumberErrors 1 + +#define XkbErr_BadDevice 0xff +#define XkbErr_BadClass 0xfe +#define XkbErr_BadId 0xfd + + /* + * Keyboard Components Mask: + * - Specifies the components that follow a GetKeyboardByNameReply + */ +#define XkbClientMapMask (1L << 0) +#define XkbServerMapMask (1L << 1) +#define XkbCompatMapMask (1L << 2) +#define XkbIndicatorMapMask (1L << 3) +#define XkbNamesMask (1L << 4) +#define XkbGeometryMask (1L << 5) +#define XkbControlsMask (1L << 6) +#define XkbAllComponentsMask (0x7f) + + /* + * State detail mask: + * - The 'changed' field of StateNotify events reports which of + * the keyboard state components have changed. + * - Used as an event detail mask to limit the conditions under + * which StateNotify events are reported. + */ +#define XkbModifierStateMask (1L << 0) +#define XkbModifierBaseMask (1L << 1) +#define XkbModifierLatchMask (1L << 2) +#define XkbModifierLockMask (1L << 3) +#define XkbGroupStateMask (1L << 4) +#define XkbGroupBaseMask (1L << 5) +#define XkbGroupLatchMask (1L << 6) +#define XkbGroupLockMask (1L << 7) +#define XkbCompatStateMask (1L << 8) +#define XkbGrabModsMask (1L << 9) +#define XkbCompatGrabModsMask (1L << 10) +#define XkbLookupModsMask (1L << 11) +#define XkbCompatLookupModsMask (1L << 12) +#define XkbPointerButtonMask (1L << 13) +#define XkbAllStateComponentsMask (0x3fff) + + /* + * Controls detail masks: + * The controls specified in XkbAllControlsMask: + * - The 'changed' field of ControlsNotify events reports which of + * the keyboard controls have changed. + * - The 'changeControls' field of the SetControls request specifies + * the controls for which values are to be changed. + * - Used as an event detail mask to limit the conditions under + * which ControlsNotify events are reported. + * + * The controls specified in the XkbAllBooleanCtrlsMask: + * - The 'enabledControls' field of ControlsNotify events reports the + * current status of the boolean controls. + * - The 'enabledControlsChanges' field of ControlsNotify events reports + * any boolean controls that have been turned on or off. + * - The 'affectEnabledControls' and 'enabledControls' fields of the + * kbSetControls request change the set of enabled controls. + * - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of + * an XkbControlsRec specify the controls to be changed if the keyboard + * times out and the values to which they should be changed. + * - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags + * request specifies the specify the controls to be reset when the + * client exits and the values to which they should be reset. + * - The 'ctrls' field of an indicator map specifies the controls + * that drive the indicator. + * - Specifies the boolean controls affected by the SetControls and + * LockControls key actions. + */ +#define XkbRepeatKeysMask (1L << 0) +#define XkbSlowKeysMask (1L << 1) +#define XkbBounceKeysMask (1L << 2) +#define XkbStickyKeysMask (1L << 3) +#define XkbMouseKeysMask (1L << 4) +#define XkbMouseKeysAccelMask (1L << 5) +#define XkbAccessXKeysMask (1L << 6) +#define XkbAccessXTimeoutMask (1L << 7) +#define XkbAccessXFeedbackMask (1L << 8) +#define XkbAudibleBellMask (1L << 9) +#define XkbOverlay1Mask (1L << 10) +#define XkbOverlay2Mask (1L << 11) +#define XkbIgnoreGroupLockMask (1L << 12) +#define XkbGroupsWrapMask (1L << 27) +#define XkbInternalModsMask (1L << 28) +#define XkbIgnoreLockModsMask (1L << 29) +#define XkbPerKeyRepeatMask (1L << 30) +#define XkbControlsEnabledMask (1L << 31) + +#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask) + +#define XkbAllBooleanCtrlsMask (0x00001FFF) +#define XkbAllControlsMask (0xF8001FFF) +#define XkbAllControlEventsMask XkbAllControlsMask + + /* + * AccessX Options Mask + * - The 'accessXOptions' field of an XkbControlsRec specifies the + * AccessX options that are currently in effect. + * - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues' + * fields of an XkbControlsRec specify the Access X options to be + * changed if the keyboard times out and the values to which they + * should be changed. + */ +#define XkbAX_SKPressFBMask (1L << 0) +#define XkbAX_SKAcceptFBMask (1L << 1) +#define XkbAX_FeatureFBMask (1L << 2) +#define XkbAX_SlowWarnFBMask (1L << 3) +#define XkbAX_IndicatorFBMask (1L << 4) +#define XkbAX_StickyKeysFBMask (1L << 5) +#define XkbAX_TwoKeysMask (1L << 6) +#define XkbAX_LatchToLockMask (1L << 7) +#define XkbAX_SKReleaseFBMask (1L << 8) +#define XkbAX_SKRejectFBMask (1L << 9) +#define XkbAX_BKRejectFBMask (1L << 10) +#define XkbAX_DumbBellFBMask (1L << 11) +#define XkbAX_FBOptionsMask (0xF3F) +#define XkbAX_SKOptionsMask (0x0C0) +#define XkbAX_AllOptionsMask (0xFFF) + + /* + * XkbUseCoreKbd is used to specify the core keyboard without having + * to look up its X input extension identifier. + * XkbUseCorePtr is used to specify the core pointer without having + * to look up its X input extension identifier. + * XkbDfltXIClass is used to specify "don't care" any place that the + * XKB protocol is looking for an X Input Extension + * device class. + * XkbDfltXIId is used to specify "don't care" any place that the + * XKB protocol is looking for an X Input Extension + * feedback identifier. + * XkbAllXIClasses is used to get information about all device indicators, + * whether they're part of the indicator feedback class + * or the keyboard feedback class. + * XkbAllXIIds is used to get information about all device indicator + * feedbacks without having to list them. + * XkbXINone is used to indicate that no class or id has been specified. + * XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs + * XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells + * XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device + * XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class + * XkbExplicitXIId(c) True if 'i' explicitly specifies a device id + * XkbSingleXIClass(c) True if 'c' specifies exactly one device class, + * including the default. + * XkbSingleXIId(i) True if 'i' specifies exactly one device + * identifier, including the default. + */ +#define XkbUseCoreKbd 0x0100 +#define XkbUseCorePtr 0x0200 +#define XkbDfltXIClass 0x0300 +#define XkbDfltXIId 0x0400 +#define XkbAllXIClasses 0x0500 +#define XkbAllXIIds 0x0600 +#define XkbXINone 0xff00 + +#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\ + ((c)==LedFeedbackClass)||\ + ((c)==XkbDfltXIClass)||\ + ((c)==XkbAllXIClasses)) +#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\ + ((c)==BellFeedbackClass)||\ + ((c)==XkbDfltXIClass)||\ + ((c)==XkbAllXIClasses)) +#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0) +#define XkbExplicitXIClass(c) (((c)&(~0xff))==0) +#define XkbExplicitXIId(c) (((c)&(~0xff))==0) +#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass)) +#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId)) + +#define XkbNoModifier 0xff +#define XkbNoShiftLevel 0xff +#define XkbNoShape 0xff +#define XkbNoIndicator 0xff + +#define XkbNoModifierMask 0 +#define XkbAllModifiersMask 0xff +#define XkbAllVirtualModsMask 0xffff + +#define XkbNumKbdGroups 4 +#define XkbMaxKbdGroup (XkbNumKbdGroups-1) + +#define XkbMaxMouseKeysBtn 4 + + /* + * Group Index and Mask: + * - Indices into the kt_index array of a key type. + * - Mask specifies types to be changed for XkbChangeTypesOfKey + */ +#define XkbGroup1Index 0 +#define XkbGroup2Index 1 +#define XkbGroup3Index 2 +#define XkbGroup4Index 3 +#define XkbAnyGroup 254 +#define XkbAllGroups 255 + +#define XkbGroup1Mask (1<<0) +#define XkbGroup2Mask (1<<1) +#define XkbGroup3Mask (1<<2) +#define XkbGroup4Mask (1<<3) +#define XkbAnyGroupMask (1<<7) +#define XkbAllGroupsMask (0xf) + + /* + * BuildCoreState: Given a keyboard group and a modifier state, + * construct the value to be reported an event. + * GroupForCoreState: Given the state reported in an event, + * determine the keyboard group. + * IsLegalGroup: Returns TRUE if 'g' is a valid group index. + */ +#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff)) +#define XkbGroupForCoreState(s) (((s)>>13)&0x3) +#define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups)) + + /* + * GroupsWrap values: + * - The 'groupsWrap' field of an XkbControlsRec specifies the + * treatment of out of range groups. + * - Bits 6 and 7 of the group info field of a key symbol map + * specify the interpretation of out of range groups for the + * corresponding key. + */ +#define XkbWrapIntoRange (0x00) +#define XkbClampIntoRange (0x40) +#define XkbRedirectIntoRange (0x80) + + /* + * Action flags: Reported in the 'flags' field of most key actions. + * Interpretation depends on the type of the action; not all actions + * accept all flags. + * + * Option Used for Actions + * ------ ---------------- + * ClearLocks SetMods, LatchMods, SetGroup, LatchGroup + * LatchToLock SetMods, LatchMods, SetGroup, LatchGroup + * LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn + * LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn + * UseModMapMods SetMods, LatchMods, LockMods, ISOLock + * GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock + * UseDfltButton PtrBtn, LockPtrBtn + * NoAcceleration MovePtr + * MoveAbsoluteX MovePtr + * MoveAbsoluteY MovePtr + * ISODfltIsGroup ISOLock + * ISONoAffectMods ISOLock + * ISONoAffectGroup ISOLock + * ISONoAffectPtr ISOLock + * ISONoAffectCtrls ISOLock + * MessageOnPress ActionMessage + * MessageOnRelease ActionMessage + * MessageGenKeyEvent ActionMessage + * AffectDfltBtn SetPtrDflt + * DfltBtnAbsolute SetPtrDflt + * SwitchApplication SwitchScreen + * SwitchAbsolute SwitchScreen + */ + +#define XkbSA_ClearLocks (1L << 0) +#define XkbSA_LatchToLock (1L << 1) + +#define XkbSA_LockNoLock (1L << 0) +#define XkbSA_LockNoUnlock (1L << 1) + +#define XkbSA_UseModMapMods (1L << 2) + +#define XkbSA_GroupAbsolute (1L << 2) +#define XkbSA_UseDfltButton 0 + +#define XkbSA_NoAcceleration (1L << 0) +#define XkbSA_MoveAbsoluteX (1L << 1) +#define XkbSA_MoveAbsoluteY (1L << 2) + +#define XkbSA_ISODfltIsGroup (1L << 7) +#define XkbSA_ISONoAffectMods (1L << 6) +#define XkbSA_ISONoAffectGroup (1L << 5) +#define XkbSA_ISONoAffectPtr (1L << 4) +#define XkbSA_ISONoAffectCtrls (1L << 3) +#define XkbSA_ISOAffectMask (0x78) + +#define XkbSA_MessageOnPress (1L << 0) +#define XkbSA_MessageOnRelease (1L << 1) +#define XkbSA_MessageGenKeyEvent (1L << 2) + +#define XkbSA_AffectDfltBtn 1 +#define XkbSA_DfltBtnAbsolute (1L << 2) + +#define XkbSA_SwitchApplication (1L << 0) +#define XkbSA_SwitchAbsolute (1L << 2) + + /* + * The following values apply to the SA_DeviceValuator + * action only. Valuator operations specify the action + * to be taken. Values specified in the action are + * multiplied by 2^scale before they are applied. + */ +#define XkbSA_IgnoreVal (0x00) +#define XkbSA_SetValMin (0x10) +#define XkbSA_SetValCenter (0x20) +#define XkbSA_SetValMax (0x30) +#define XkbSA_SetValRelative (0x40) +#define XkbSA_SetValAbsolute (0x50) +#define XkbSA_ValOpMask (0x70) +#define XkbSA_ValScaleMask (0x07) +#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask) +#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask) + + /* + * Action types: specifies the type of a key action. Reported in the + * type field of all key actions. + */ +#define XkbSA_NoAction 0x00 +#define XkbSA_SetMods 0x01 +#define XkbSA_LatchMods 0x02 +#define XkbSA_LockMods 0x03 +#define XkbSA_SetGroup 0x04 +#define XkbSA_LatchGroup 0x05 +#define XkbSA_LockGroup 0x06 +#define XkbSA_MovePtr 0x07 +#define XkbSA_PtrBtn 0x08 +#define XkbSA_LockPtrBtn 0x09 +#define XkbSA_SetPtrDflt 0x0a +#define XkbSA_ISOLock 0x0b +#define XkbSA_Terminate 0x0c +#define XkbSA_SwitchScreen 0x0d +#define XkbSA_SetControls 0x0e +#define XkbSA_LockControls 0x0f +#define XkbSA_ActionMessage 0x10 +#define XkbSA_RedirectKey 0x11 +#define XkbSA_DeviceBtn 0x12 +#define XkbSA_LockDeviceBtn 0x13 +#define XkbSA_DeviceValuator 0x14 +#define XkbSA_LastAction XkbSA_DeviceValuator +#define XkbSA_NumActions (XkbSA_LastAction+1) + +#define XkbSA_XFree86Private 0x86 + + /* + * Specifies the key actions that clear latched groups or modifiers. + */ +#define XkbSA_BreakLatch \ + ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\ + (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\ + (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\ + (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn)) + + /* + * Macros to classify key actions + */ +#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods)) +#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup)) +#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt)) + + + /* + * Key Behavior Qualifier: + * KB_Permanent indicates that the behavior describes an unalterable + * characteristic of the keyboard, not an XKB software-simulation of + * the listed behavior. + * Key Behavior Types: + * Specifies the behavior of the underlying key. + */ +#define XkbKB_Permanent 0x80 +#define XkbKB_OpMask 0x7f + +#define XkbKB_Default 0x00 +#define XkbKB_Lock 0x01 +#define XkbKB_RadioGroup 0x02 +#define XkbKB_Overlay1 0x03 +#define XkbKB_Overlay2 0x04 + +#define XkbKB_RGAllowNone 0x80 + + /* + * Various macros which describe the range of legal keycodes. + */ +#define XkbMinLegalKeyCode 8 +#define XkbMaxLegalKeyCode 255 +#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1) +#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8) +/* Seems kinda silly to check that an unsigned char is <= 255... */ +#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode) + + /* + * Assorted constants and limits. + */ +#define XkbNumModifiers 8 +#define XkbNumVirtualMods 16 +#define XkbNumIndicators 32 +#define XkbAllIndicatorsMask (0xffffffff) +#define XkbMaxRadioGroups 32 +#define XkbAllRadioGroupsMask (0xffffffff) +#define XkbMaxShiftLevel 63 +#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups) +#define XkbRGMaxMembers 12 +#define XkbActionMessageLength 6 +#define XkbKeyNameLength 4 +#define XkbMaxRedirectCount 8 + +#define XkbGeomPtsPerMM 10 +#define XkbGeomMaxColors 32 +#define XkbGeomMaxLabelColors 3 +#define XkbGeomMaxPriority 255 + + /* + * Key Type index and mask for the four standard key types. + */ +#define XkbOneLevelIndex 0 +#define XkbTwoLevelIndex 1 +#define XkbAlphabeticIndex 2 +#define XkbKeypadIndex 3 +#define XkbLastRequiredType XkbKeypadIndex +#define XkbNumRequiredTypes (XkbLastRequiredType+1) +#define XkbMaxKeyTypes 255 + +#define XkbOneLevelMask (1<<0) +#define XkbTwoLevelMask (1<<1) +#define XkbAlphabeticMask (1<<2) +#define XkbKeypadMask (1<<3) +#define XkbAllRequiredTypes (0xf) + +#define XkbShiftLevel(n) ((n)-1) +#define XkbShiftLevelMask(n) (1<<((n)-1)) + + /* + * Extension name and version information + */ +#define XkbName "XKEYBOARD" +#define XkbMajorVersion 1 +#define XkbMinorVersion 0 + + /* + * Explicit map components: + * - Used in the 'explicit' field of an XkbServerMap. Specifies + * the keyboard components that should _not_ be updated automatically + * in response to core protocol keyboard mapping requests. + */ +#define XkbExplicitKeyTypesMask (0x0f) +#define XkbExplicitKeyType1Mask (1<<0) +#define XkbExplicitKeyType2Mask (1<<1) +#define XkbExplicitKeyType3Mask (1<<2) +#define XkbExplicitKeyType4Mask (1<<3) +#define XkbExplicitInterpretMask (1<<4) +#define XkbExplicitAutoRepeatMask (1<<5) +#define XkbExplicitBehaviorMask (1<<6) +#define XkbExplicitVModMapMask (1<<7) +#define XkbAllExplicitMask (0xff) + + /* + * Map components masks: + * Those in AllMapComponentsMask: + * - Specifies the individual fields to be loaded or changed for the + * GetMap and SetMap requests. + * Those in ClientInfoMask: + * - Specifies the components to be allocated by XkbAllocClientMap. + * Those in ServerInfoMask: + * - Specifies the components to be allocated by XkbAllocServerMap. + */ +#define XkbKeyTypesMask (1<<0) +#define XkbKeySymsMask (1<<1) +#define XkbModifierMapMask (1<<2) +#define XkbExplicitComponentsMask (1<<3) +#define XkbKeyActionsMask (1<<4) +#define XkbKeyBehaviorsMask (1<<5) +#define XkbVirtualModsMask (1<<6) +#define XkbVirtualModMapMask (1<<7) + +#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask) +#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask) +#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask) + + /* + * Symbol interpretations flags: + * - Used in the flags field of a symbol interpretation + */ +#define XkbSI_AutoRepeat (1<<0) +#define XkbSI_LockingKey (1<<1) + + /* + * Symbol interpretations match specification: + * - Used in the match field of a symbol interpretation to specify + * the conditions under which an interpretation is used. + */ +#define XkbSI_LevelOneOnly (0x80) +#define XkbSI_OpMask (0x7f) +#define XkbSI_NoneOf (0) +#define XkbSI_AnyOfOrNone (1) +#define XkbSI_AnyOf (2) +#define XkbSI_AllOf (3) +#define XkbSI_Exactly (4) + + /* + * Indicator map flags: + * - Used in the flags field of an indicator map to indicate the + * conditions under which and indicator can be changed and the + * effects of changing the indicator. + */ +#define XkbIM_NoExplicit (1L << 7) +#define XkbIM_NoAutomatic (1L << 6) +#define XkbIM_LEDDrivesKB (1L << 5) + + /* + * Indicator map component specifications: + * - Used by the 'which_groups' and 'which_mods' fields of an indicator + * map to specify which keyboard components should be used to drive + * the indicator. + */ +#define XkbIM_UseBase (1L << 0) +#define XkbIM_UseLatched (1L << 1) +#define XkbIM_UseLocked (1L << 2) +#define XkbIM_UseEffective (1L << 3) +#define XkbIM_UseCompat (1L << 4) + +#define XkbIM_UseNone 0 +#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\ + |XkbIM_UseEffective) +#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat) + + /* + * Compatibility Map Components: + * - Specifies the components to be allocated in XkbAllocCompatMap. + */ +#define XkbSymInterpMask (1<<0) +#define XkbGroupCompatMask (1<<1) +#define XkbAllCompatMask (0x3) + + /* + * Names component mask: + * - Specifies the names to be loaded or changed for the GetNames and + * SetNames requests. + * - Specifies the names that have changed in a NamesNotify event. + * - Specifies the names components to be allocated by XkbAllocNames. + */ +#define XkbKeycodesNameMask (1<<0) +#define XkbGeometryNameMask (1<<1) +#define XkbSymbolsNameMask (1<<2) +#define XkbPhysSymbolsNameMask (1<<3) +#define XkbTypesNameMask (1<<4) +#define XkbCompatNameMask (1<<5) +#define XkbKeyTypeNamesMask (1<<6) +#define XkbKTLevelNamesMask (1<<7) +#define XkbIndicatorNamesMask (1<<8) +#define XkbKeyNamesMask (1<<9) +#define XkbKeyAliasesMask (1<<10) +#define XkbVirtualModNamesMask (1<<11) +#define XkbGroupNamesMask (1<<12) +#define XkbRGNamesMask (1<<13) +#define XkbComponentNamesMask (0x3f) +#define XkbAllNamesMask (0x3fff) + + /* + * GetByName components: + * - Specifies desired or necessary components to GetKbdByName request. + * - Reports the components that were found in a GetKbdByNameReply + */ +#define XkbGBN_TypesMask (1L << 0) +#define XkbGBN_CompatMapMask (1L << 1) +#define XkbGBN_ClientSymbolsMask (1L << 2) +#define XkbGBN_ServerSymbolsMask (1L << 3) +#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask) +#define XkbGBN_IndicatorMapMask (1L << 4) +#define XkbGBN_KeyNamesMask (1L << 5) +#define XkbGBN_GeometryMask (1L << 6) +#define XkbGBN_OtherNamesMask (1L << 7) +#define XkbGBN_AllComponentsMask (0xff) + + /* + * ListComponents flags + */ +#define XkbLC_Hidden (1L << 0) +#define XkbLC_Default (1L << 1) +#define XkbLC_Partial (1L << 2) + +#define XkbLC_AlphanumericKeys (1L << 8) +#define XkbLC_ModifierKeys (1L << 9) +#define XkbLC_KeypadKeys (1L << 10) +#define XkbLC_FunctionKeys (1L << 11) +#define XkbLC_AlternateGroup (1L << 12) + + /* + * X Input Extension Interactions + * - Specifies the possible interactions between XKB and the X input + * extension + * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo) + * XKB information about an extension device. + * - Reports the list of supported optional features in the reply to + * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event. + * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify + * events to indicate an attempt to use an unsupported feature. + */ +#define XkbXI_KeyboardsMask (1L << 0) +#define XkbXI_ButtonActionsMask (1L << 1) +#define XkbXI_IndicatorNamesMask (1L << 2) +#define XkbXI_IndicatorMapsMask (1L << 3) +#define XkbXI_IndicatorStateMask (1L << 4) +#define XkbXI_UnsupportedFeatureMask (1L << 15) +#define XkbXI_AllFeaturesMask (0x001f) +#define XkbXI_AllDeviceFeaturesMask (0x001e) + +#define XkbXI_IndicatorsMask (0x001c) +#define XkbAllExtensionDeviceEventsMask (0x801f) + + /* + * Per-Client Flags: + * - Specifies flags to be changed by the PerClientFlags request. + */ +#define XkbPCF_DetectableAutoRepeatMask (1L << 0) +#define XkbPCF_GrabsUseXKBStateMask (1L << 1) +#define XkbPCF_AutoResetControlsMask (1L << 2) +#define XkbPCF_LookupStateWhenGrabbed (1L << 3) +#define XkbPCF_SendEventUsesXKBState (1L << 4) +#define XkbPCF_AllFlagsMask (0x1F) + + /* + * Debugging flags and controls + */ +#define XkbDF_DisableLocks (1<<0) + +#endif /* _XKB_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/XKBstr.h b/thirdparty/linuxbsd_headers/X11/extensions/XKBstr.h new file mode 100644 index 0000000000..eaefae8220 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/XKBstr.h @@ -0,0 +1,643 @@ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifndef _XKBSTR_H_ +#define _XKBSTR_H_ + +#include <X11/Xfuncproto.h> +#include <X11/extensions/XKB.h> + +#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) +#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) +#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) + +/* + * The Xkb structs are full of implicit padding to properly align members. + * We can't clean that up without breaking ABI, so tell clang not to bother + * complaining about it. + */ +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif + + /* + * Common data structures and access macros + */ + +typedef struct _XkbStateRec { + unsigned char group; + unsigned char locked_group; + unsigned short base_group; + unsigned short latched_group; + unsigned char mods; + unsigned char base_mods; + unsigned char latched_mods; + unsigned char locked_mods; + unsigned char compat_state; + unsigned char grab_mods; + unsigned char compat_grab_mods; + unsigned char lookup_mods; + unsigned char compat_lookup_mods; + unsigned short ptr_buttons; +} XkbStateRec,*XkbStatePtr; +#define XkbModLocks(s) ((s)->locked_mods) +#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s)) +#define XkbGroupLock(s) ((s)->locked_group) +#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s)) +#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) +#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) + +typedef struct _XkbMods { + unsigned char mask; /* effective mods */ + unsigned char real_mods; + unsigned short vmods; +} XkbModsRec,*XkbModsPtr; + +typedef struct _XkbKTMapEntry { + Bool active; + unsigned char level; + XkbModsRec mods; +} XkbKTMapEntryRec,*XkbKTMapEntryPtr; + +typedef struct _XkbKeyType { + XkbModsRec mods; + unsigned char num_levels; + unsigned char map_count; + /* map is an array of map_count XkbKTMapEntryRec structs */ + XkbKTMapEntryPtr map; + /* preserve is an array of map_count XkbModsRec structs */ + XkbModsPtr preserve; + Atom name; + /* level_names is an array of num_levels Atoms */ + Atom * level_names; +} XkbKeyTypeRec, *XkbKeyTypePtr; + +#define XkbNumGroups(g) ((g)&0x0f) +#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0) +#define XkbOutOfRangeGroupAction(g) ((g)&0xc0) +#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4) +#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f)) +#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) + + /* + * Structures and access macros used primarily by the server + */ + +typedef struct _XkbBehavior { + unsigned char type; + unsigned char data; +} XkbBehavior; + +#define XkbAnyActionDataSize 7 +typedef struct _XkbAnyAction { + unsigned char type; + unsigned char data[XkbAnyActionDataSize]; +} XkbAnyAction; + +typedef struct _XkbModAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + unsigned char vmods1; + unsigned char vmods2; +} XkbModAction; +#define XkbModActionVMods(a) \ + ((short)(((a)->vmods1<<8)|((a)->vmods2))) +#define XkbSetModActionVMods(a,v) \ + (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff)) + +typedef struct _XkbGroupAction { + unsigned char type; + unsigned char flags; + char group_XXX; +} XkbGroupAction; +#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) +#define XkbSASetGroup(a,g) ((a)->group_XXX=(g)) + +typedef struct _XkbISOAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + char group_XXX; + unsigned char affect; + unsigned char vmods1; + unsigned char vmods2; +} XkbISOAction; + +typedef struct _XkbPtrAction { + unsigned char type; + unsigned char flags; + unsigned char high_XXX; + unsigned char low_XXX; + unsigned char high_YYY; + unsigned char low_YYY; +} XkbPtrAction; +#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX)) +#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY)) +#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX)) +#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY)) + +typedef struct _XkbPtrBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; +} XkbPtrBtnAction; + +typedef struct _XkbPtrDfltAction { + unsigned char type; + unsigned char flags; + unsigned char affect; + char valueXXX; +} XkbPtrDfltAction; +#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) +#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff)) + +typedef struct _XkbSwitchScreenAction { + unsigned char type; + unsigned char flags; + char screenXXX; +} XkbSwitchScreenAction; +#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) +#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff)) + +typedef struct _XkbCtrlsAction { + unsigned char type; + unsigned char flags; + unsigned char ctrls3; + unsigned char ctrls2; + unsigned char ctrls1; + unsigned char ctrls0; +} XkbCtrlsAction; +#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\ + ((a)->ctrls2=(((c)>>16)&0xff)),\ + ((a)->ctrls1=(((c)>>8)&0xff)),\ + ((a)->ctrls0=((c)&0xff))) +#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\ + (((unsigned int)(a)->ctrls2)<<16)|\ + (((unsigned int)(a)->ctrls1)<<8)|\ + ((unsigned int)((a)->ctrls0))) + +typedef struct _XkbMessageAction { + unsigned char type; + unsigned char flags; + unsigned char message[6]; +} XkbMessageAction; + +typedef struct _XkbRedirectKeyAction { + unsigned char type; + unsigned char new_key; + unsigned char mods_mask; + unsigned char mods; + unsigned char vmods_mask0; + unsigned char vmods_mask1; + unsigned char vmods0; + unsigned char vmods1; +} XkbRedirectKeyAction; + +#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ + ((unsigned int)(a)->vmods0)) +#define XkbSARedirectSetVMods(a,m) (((a)->vmods1=(((m)>>8)&0xff)),\ + ((a)->vmods0=((m)&0xff))) +#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ + ((unsigned int)(a)->vmods_mask0)) +#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ + ((a)->vmods_mask0=((m)&0xff))) + +typedef struct _XkbDeviceBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; + unsigned char device; +} XkbDeviceBtnAction; + +typedef struct _XkbDeviceValuatorAction { + unsigned char type; + unsigned char device; + unsigned char v1_what; + unsigned char v1_ndx; + unsigned char v1_value; + unsigned char v2_what; + unsigned char v2_ndx; + unsigned char v2_value; +} XkbDeviceValuatorAction; + +typedef union _XkbAction { + XkbAnyAction any; + XkbModAction mods; + XkbGroupAction group; + XkbISOAction iso; + XkbPtrAction ptr; + XkbPtrBtnAction btn; + XkbPtrDfltAction dflt; + XkbSwitchScreenAction screen; + XkbCtrlsAction ctrls; + XkbMessageAction msg; + XkbRedirectKeyAction redirect; + XkbDeviceBtnAction devbtn; + XkbDeviceValuatorAction devval; + unsigned char type; +} XkbAction; + +typedef struct _XkbControls { + unsigned char mk_dflt_btn; + unsigned char num_groups; + unsigned char groups_wrap; + XkbModsRec internal; + XkbModsRec ignore_lock; + unsigned int enabled_ctrls; + unsigned short repeat_delay; + unsigned short repeat_interval; + unsigned short slow_keys_delay; + unsigned short debounce_delay; + unsigned short mk_delay; + unsigned short mk_interval; + unsigned short mk_time_to_max; + unsigned short mk_max_speed; + short mk_curve; + unsigned short ax_options; + unsigned short ax_timeout; + unsigned short axt_opts_mask; + unsigned short axt_opts_values; + unsigned int axt_ctrls_mask; + unsigned int axt_ctrls_values; + unsigned char per_key_repeat[XkbPerKeyBitArraySize]; +} XkbControlsRec, *XkbControlsPtr; + +#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask) +#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w)) +#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) + +typedef struct _XkbServerMapRec { + /* acts is an array of XkbActions structs, with size_acts entries + allocated, and num_acts entries used. */ + unsigned short num_acts; + unsigned short size_acts; + XkbAction *acts; + + /* behaviors, key_acts, explicit, & vmodmap are all arrays with + (xkb->max_key_code + 1) entries allocated for each. */ + XkbBehavior *behaviors; + unsigned short *key_acts; +#if defined(__cplusplus) || defined(c_plusplus) + /* explicit is a C++ reserved word */ + unsigned char *c_explicit; +#else + unsigned char *explicit; +#endif + unsigned char vmods[XkbNumVirtualMods]; + unsigned short *vmodmap; +} XkbServerMapRec, *XkbServerMapPtr; + +#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]]) + + /* + * Structures and access macros used primarily by clients + */ + +typedef struct _XkbSymMapRec { + unsigned char kt_index[XkbNumKbdGroups]; + unsigned char group_info; + unsigned char width; + unsigned short offset; +} XkbSymMapRec, *XkbSymMapPtr; + +typedef struct _XkbClientMapRec { + /* types is an array of XkbKeyTypeRec structs, with size_types entries + allocated, and num_types entries used. */ + unsigned char size_types; + unsigned char num_types; + XkbKeyTypePtr types; + + /* syms is an array of size_syms KeySyms, in which num_syms are used */ + unsigned short size_syms; + unsigned short num_syms; + KeySym *syms; + /* key_sym_map is an array of (max_key_code + 1) XkbSymMapRec structs */ + XkbSymMapPtr key_sym_map; + + /* modmap is an array of (max_key_code + 1) unsigned chars */ + unsigned char *modmap; +} XkbClientMapRec, *XkbClientMapPtr; + +#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info) +#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info)) +#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels) +#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width) +#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3]) +#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)]) +#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k)) +#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset) +#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)]) + + /* + * Compatibility structures and access macros + */ + +typedef struct _XkbSymInterpretRec { + KeySym sym; + unsigned char flags; + unsigned char match; + unsigned char mods; + unsigned char virtual_mod; + XkbAnyAction act; +} XkbSymInterpretRec,*XkbSymInterpretPtr; + +typedef struct _XkbCompatMapRec { + /* sym_interpret is an array of XkbSymInterpretRec structs, + in which size_si are allocated & num_si are used. */ + XkbSymInterpretPtr sym_interpret; + XkbModsRec groups[XkbNumKbdGroups]; + unsigned short num_si; + unsigned short size_si; +} XkbCompatMapRec, *XkbCompatMapPtr; + +typedef struct _XkbIndicatorMapRec { + unsigned char flags; + unsigned char which_groups; + unsigned char groups; + unsigned char which_mods; + XkbModsRec mods; + unsigned int ctrls; +} XkbIndicatorMapRec, *XkbIndicatorMapPtr; + +#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\ + (((i)->which_groups&&(i)->groups)||\ + ((i)->which_mods&&(i)->mods.mask)||\ + ((i)->ctrls))) +#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\ + ((i)->which_mods)||((i)->ctrls)) + + +typedef struct _XkbIndicatorRec { + unsigned long phys_indicators; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbIndicatorRec,*XkbIndicatorPtr; + +typedef struct _XkbKeyNameRec { + char name[XkbKeyNameLength] _X_NONSTRING; +} XkbKeyNameRec,*XkbKeyNamePtr; + +typedef struct _XkbKeyAliasRec { + char real[XkbKeyNameLength] _X_NONSTRING; + char alias[XkbKeyNameLength] _X_NONSTRING; +} XkbKeyAliasRec,*XkbKeyAliasPtr; + + /* + * Names for everything + */ +typedef struct _XkbNamesRec { + Atom keycodes; + Atom geometry; + Atom symbols; + Atom types; + Atom compat; + Atom vmods[XkbNumVirtualMods]; + Atom indicators[XkbNumIndicators]; + Atom groups[XkbNumKbdGroups]; + /* keys is an array of (xkb->max_key_code + 1) XkbKeyNameRec entries */ + XkbKeyNamePtr keys; + /* key_aliases is an array of num_key_aliases XkbKeyAliasRec entries */ + XkbKeyAliasPtr key_aliases; + /* radio_groups is an array of num_rg Atoms */ + Atom *radio_groups; + Atom phys_symbols; + + /* num_keys seems to be unused in libX11 */ + unsigned char num_keys; + unsigned char num_key_aliases; + unsigned short num_rg; +} XkbNamesRec,*XkbNamesPtr; + +typedef struct _XkbGeometry *XkbGeometryPtr; + /* + * Tie it all together into one big keyboard description + */ +typedef struct _XkbDesc { + struct _XDisplay * dpy; + unsigned short flags; + unsigned short device_spec; + KeyCode min_key_code; + KeyCode max_key_code; + + XkbControlsPtr ctrls; + XkbServerMapPtr server; + XkbClientMapPtr map; + XkbIndicatorPtr indicators; + XkbNamesPtr names; + XkbCompatMapPtr compat; + XkbGeometryPtr geom; +} XkbDescRec, *XkbDescPtr; +#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g)) +#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g)) +#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g)) +#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k)) +#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k))) +#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k))) +#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k))) +#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k))) +#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n]) +#define XkbKeySymEntry(d,k,sl,g) \ + (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl)))) +#define XkbKeyAction(d,k,n) \ + (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL) +#define XkbKeyActionEntry(d,k,sl,g) \ + (XkbKeyHasActions(d,k)?\ + XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL) + +#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0) +#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1) +#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k)) +#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\ + ((k)<=(d)->max_key_code)) +#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1) + + + /* + * The following structures can be used to track changes + * to a keyboard device + */ +typedef struct _XkbMapChanges { + unsigned short changed; + KeyCode min_key_code; + KeyCode max_key_code; + unsigned char first_type; + unsigned char num_types; + KeyCode first_key_sym; + unsigned char num_key_syms; + KeyCode first_key_act; + unsigned char num_key_acts; + KeyCode first_key_behavior; + unsigned char num_key_behaviors; + KeyCode first_key_explicit; + unsigned char num_key_explicit; + KeyCode first_modmap_key; + unsigned char num_modmap_keys; + KeyCode first_vmodmap_key; + unsigned char num_vmodmap_keys; + unsigned char pad; + unsigned short vmods; +} XkbMapChangesRec,*XkbMapChangesPtr; + +typedef struct _XkbControlsChanges { + unsigned int changed_ctrls; + unsigned int enabled_ctrls_changes; + Bool num_groups_changed; +} XkbControlsChangesRec,*XkbControlsChangesPtr; + +typedef struct _XkbIndicatorChanges { + unsigned int state_changes; + unsigned int map_changes; +} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr; + +typedef struct _XkbNameChanges { + unsigned int changed; + unsigned char first_type; + unsigned char num_types; + unsigned char first_lvl; + unsigned char num_lvls; + unsigned char num_aliases; + unsigned char num_rg; + unsigned char first_key; + unsigned char num_keys; + unsigned short changed_vmods; + unsigned long changed_indicators; + unsigned char changed_groups; +} XkbNameChangesRec,*XkbNameChangesPtr; + +typedef struct _XkbCompatChanges { + unsigned char changed_groups; + unsigned short first_si; + unsigned short num_si; +} XkbCompatChangesRec,*XkbCompatChangesPtr; + +typedef struct _XkbChanges { + unsigned short device_spec; + unsigned short state_changes; + XkbMapChangesRec map; + XkbControlsChangesRec ctrls; + XkbIndicatorChangesRec indicators; + XkbNameChangesRec names; + XkbCompatChangesRec compat; +} XkbChangesRec, *XkbChangesPtr; + + /* + * These data structures are used to construct a keymap from + * a set of components or to list components in the server + * database. + */ +typedef struct _XkbComponentNames { + char * keymap; + char * keycodes; + char * types; + char * compat; + char * symbols; + char * geometry; +} XkbComponentNamesRec, *XkbComponentNamesPtr; + +typedef struct _XkbComponentName { + unsigned short flags; + char * name; +} XkbComponentNameRec,*XkbComponentNamePtr; + +typedef struct _XkbComponentList { + int num_keymaps; + int num_keycodes; + int num_types; + int num_compat; + int num_symbols; + int num_geometry; + XkbComponentNamePtr keymaps; + XkbComponentNamePtr keycodes; + XkbComponentNamePtr types; + XkbComponentNamePtr compat; + XkbComponentNamePtr symbols; + XkbComponentNamePtr geometry; +} XkbComponentListRec, *XkbComponentListPtr; + + /* + * The following data structures describe and track changes to a + * non-keyboard extension device + */ +typedef struct _XkbDeviceLedInfo { + unsigned short led_class; + unsigned short led_id; + unsigned int phys_indicators; + unsigned int maps_present; + unsigned int names_present; + unsigned int state; + Atom names[XkbNumIndicators]; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr; + +typedef struct _XkbDeviceInfo { + char * name; + Atom type; + unsigned short device_spec; + Bool has_own_state; + unsigned short supported; + unsigned short unsupported; + + /* btn_acts is an array of num_btn XkbAction entries */ + unsigned short num_btns; + XkbAction * btn_acts; + + unsigned short sz_leds; + unsigned short num_leds; + unsigned short dflt_kbd_fb; + unsigned short dflt_led_fb; + /* leds is an array of XkbDeviceLedInfoRec in which + sz_leds entries are allocated and num_leds entries are used */ + XkbDeviceLedInfoPtr leds; +} XkbDeviceInfoRec,*XkbDeviceInfoPtr; + +#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL)) +#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns)) +#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL)) + +typedef struct _XkbDeviceLedChanges { + unsigned short led_class; + unsigned short led_id; + unsigned int defined; /* names or maps changed */ + struct _XkbDeviceLedChanges *next; +} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr; + +typedef struct _XkbDeviceChanges { + unsigned int changed; + unsigned short first_btn; + unsigned short num_btns; + XkbDeviceLedChangesRec leds; +} XkbDeviceChangesRec,*XkbDeviceChangesPtr; + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#endif /* _XKBSTR_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/Xext.h b/thirdparty/linuxbsd_headers/X11/extensions/Xext.h new file mode 100644 index 0000000000..858592b78b --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/Xext.h @@ -0,0 +1,53 @@ +/* + * +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 _XEXT_H_ +#define _XEXT_H_ + +#include <X11/Xfuncproto.h> + +_XFUNCPROTOBEGIN + +typedef int (*XextErrorHandler) ( + Display * /* dpy */, + _Xconst char* /* ext_name */, + _Xconst char* /* reason */ +); + +extern XextErrorHandler XSetExtensionErrorHandler( + XextErrorHandler /* handler */ +); + +extern int XMissingExtension( + Display* /* dpy */, + _Xconst char* /* ext_name */ +); + +_XFUNCPROTOEND + +#define X_EXTENSION_UNKNOWN "unknown" +#define X_EXTENSION_MISSING "missing" + +#endif /* _XEXT_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/Xfixes.h b/thirdparty/linuxbsd_headers/X11/extensions/Xfixes.h new file mode 100644 index 0000000000..b62b95bac6 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/Xfixes.h @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011, 2021 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 */ + +#if XFIXES_MAJOR >= 6 + +void +XFixesSetClientDisconnectMode(Display *dpy, int disconnect_mode); + +int +XFixesGetClientDisconnectMode(Display *dpy); + +#endif /* XFIXES_MAJOR >= 6 */ + +_XFUNCPROTOEND + +#endif /* _XFIXES_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/Xge.h b/thirdparty/linuxbsd_headers/X11/extensions/Xge.h new file mode 100644 index 0000000000..76b5a6a019 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/Xge.h @@ -0,0 +1,57 @@ +/* + * Copyright © 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer, University of South Australia, NICTA + * + */ + + +/* XGE Client interfaces */ + +#ifndef _XGE_H_ +#define _XGE_H_ + +#include <X11/Xlib.h> +#include <X11/Xfuncproto.h> + +_XFUNCPROTOBEGIN + +/** + * Generic Event mask. + * To be used whenever a list of masks per extension has to be provided. + * + * But, don't actually use the CARD{8,16,32} types. We can't get them them + * defined here without polluting the namespace. + */ +typedef struct { + unsigned char extension; + unsigned char pad0; + unsigned short pad1; + unsigned int evmask; +} XGenericEventMask; + +Bool XGEQueryExtension(Display* dpy, int *event_basep, int *err_basep); +Bool XGEQueryVersion(Display* dpy, int *major, int* minor); + +_XFUNCPROTOEND + +#endif /* _XGE_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h b/thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h new file mode 100644 index 0000000000..8c0f8296ac --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h @@ -0,0 +1,74 @@ +/* + +Copyright 2003 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 _Xinerama_h +#define _Xinerama_h + +#include <X11/Xlib.h> + +typedef struct { + int screen_number; + short x_org; + short y_org; + short width; + short height; +} XineramaScreenInfo; + +_XFUNCPROTOBEGIN + +Bool XineramaQueryExtension ( + Display *dpy, + int *event_base, + int *error_base +); + +Status XineramaQueryVersion( + Display *dpy, + int *major_versionp, + int *minor_versionp +); + +Bool XineramaIsActive(Display *dpy); + + +/* + Returns the number of heads and a pointer to an array of + structures describing the position and size of the individual + heads. Returns NULL and number = 0 if Xinerama is not active. + + Returned array should be freed with XFree(). +*/ + +XineramaScreenInfo * +XineramaQueryScreens( + Display *dpy, + int *number +); + +_XFUNCPROTOEND + +#endif /* _Xinerama_h */ + diff --git a/thirdparty/linuxbsd_headers/X11/extensions/Xrandr.h b/thirdparty/linuxbsd_headers/X11/extensions/Xrandr.h new file mode 100644 index 0000000000..65940bbdb1 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/Xrandr.h @@ -0,0 +1,587 @@ +/* + * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett-Packard Company, Inc. + * 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 + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + * + * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. + * Keith Packard, Intel Corporation + */ + +#ifndef _XRANDR_H_ +#define _XRANDR_H_ + +#include <X11/extensions/randr.h> +#include <X11/extensions/Xrender.h> + +#include <X11/Xfuncproto.h> + +_XFUNCPROTOBEGIN + +typedef XID RROutput; +typedef XID RRCrtc; +typedef XID RRMode; +typedef XID RRProvider; + +typedef struct { + int width, height; + int mwidth, mheight; +} XRRScreenSize; + +/* + * Events. + */ + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + Window root; /* Root window for changed screen */ + Time timestamp; /* when the screen change occurred */ + Time config_timestamp; /* when the last configuration change */ + SizeID size_index; + SubpixelOrder subpixel_order; + Rotation rotation; + int width; + int height; + int mwidth; + int mheight; +} XRRScreenChangeNotifyEvent; + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + int subtype; /* RRNotify_ subtype */ +} XRRNotifyEvent; + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + int subtype; /* RRNotify_OutputChange */ + RROutput output; /* affected output */ + RRCrtc crtc; /* current crtc (or None) */ + RRMode mode; /* current mode (or None) */ + Rotation rotation; /* current rotation of associated crtc */ + Connection connection; /* current connection status */ + SubpixelOrder subpixel_order; +} XRROutputChangeNotifyEvent; + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + int subtype; /* RRNotify_CrtcChange */ + RRCrtc crtc; /* current crtc (or None) */ + RRMode mode; /* current mode (or None) */ + Rotation rotation; /* current rotation of associated crtc */ + int x, y; /* position */ + unsigned int width, height; /* size */ +} XRRCrtcChangeNotifyEvent; + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + int subtype; /* RRNotify_OutputProperty */ + RROutput output; /* related output */ + Atom property; /* changed property */ + Time timestamp; /* time of change */ + int state; /* NewValue, Deleted */ +} XRROutputPropertyNotifyEvent; + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + int subtype; /* RRNotify_ProviderChange */ + RRProvider provider; /* current provider (or None) */ + Time timestamp; /* time of change */ + unsigned int current_role; +} XRRProviderChangeNotifyEvent; + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + int subtype; /* RRNotify_ProviderProperty */ + RRProvider provider; /* related provider */ + Atom property; /* changed property */ + Time timestamp; /* time of change */ + int state; /* NewValue, Deleted */ +} XRRProviderPropertyNotifyEvent; + +typedef struct { + int type; /* event base */ + 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; /* window which selected for this event */ + int subtype; /* RRNotify_ResourceChange */ + Time timestamp; /* time of change */ +} XRRResourceChangeNotifyEvent; + +/* internal representation is private to the library */ +typedef struct _XRRScreenConfiguration XRRScreenConfiguration; + +Bool XRRQueryExtension (Display *dpy, + int *event_base_return, + int *error_base_return); +Status XRRQueryVersion (Display *dpy, + int *major_version_return, + int *minor_version_return); + +XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, + Window window); + +void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config); + +/* + * Note that screen configuration changes are only permitted if the client can + * prove it has up to date configuration information. We are trying to + * insist that it become possible for screens to change dynamically, so + * we want to ensure the client knows what it is talking about when requesting + * changes. + */ +Status XRRSetScreenConfig (Display *dpy, + XRRScreenConfiguration *config, + Drawable draw, + int size_index, + Rotation rotation, + Time timestamp); + +/* added in v1.1, sorry for the lame name */ +Status XRRSetScreenConfigAndRate (Display *dpy, + XRRScreenConfiguration *config, + Drawable draw, + int size_index, + Rotation rotation, + short rate, + Time timestamp); + + +Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation); + +Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp); + +XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes); + +short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates); + +SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, + Rotation *rotation); + +short XRRConfigCurrentRate (XRRScreenConfiguration *config); + +int XRRRootToScreen(Display *dpy, Window root); + +/* + * returns the screen configuration for the specified screen; does a lazy + * evalution to delay getting the information, and caches the result. + * These routines should be used in preference to XRRGetScreenInfo + * to avoid unneeded round trips to the X server. These are new + * in protocol version 0.1. + */ + + +void XRRSelectInput(Display *dpy, Window window, int mask); + +/* + * the following are always safe to call, even if RandR is not implemented + * on a screen + */ + + +Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation); +XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes); +short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates); +Time XRRTimes (Display *dpy, int screen, Time *config_timestamp); + + +/* Version 1.2 additions */ + +/* despite returning a Status, this returns 1 for success */ +Status +XRRGetScreenSizeRange (Display *dpy, Window window, + int *minWidth, int *minHeight, + int *maxWidth, int *maxHeight); + +void +XRRSetScreenSize (Display *dpy, Window window, + int width, int height, + int mmWidth, int mmHeight); + +typedef unsigned long XRRModeFlags; + +typedef struct _XRRModeInfo { + RRMode id; + unsigned int width; + unsigned int height; + unsigned long dotClock; + unsigned int hSyncStart; + unsigned int hSyncEnd; + unsigned int hTotal; + unsigned int hSkew; + unsigned int vSyncStart; + unsigned int vSyncEnd; + unsigned int vTotal; + char *name; + unsigned int nameLength; + XRRModeFlags modeFlags; +} XRRModeInfo; + +typedef struct _XRRScreenResources { + Time timestamp; + Time configTimestamp; + int ncrtc; + RRCrtc *crtcs; + int noutput; + RROutput *outputs; + int nmode; + XRRModeInfo *modes; +} XRRScreenResources; + +XRRScreenResources * +XRRGetScreenResources (Display *dpy, Window window); + +void +XRRFreeScreenResources (XRRScreenResources *resources); + +typedef struct _XRROutputInfo { + Time timestamp; + RRCrtc crtc; + char *name; + int nameLen; + unsigned long mm_width; + unsigned long mm_height; + Connection connection; + SubpixelOrder subpixel_order; + int ncrtc; + RRCrtc *crtcs; + int nclone; + RROutput *clones; + int nmode; + int npreferred; + RRMode *modes; +} XRROutputInfo; + +XRROutputInfo * +XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output); + +void +XRRFreeOutputInfo (XRROutputInfo *outputInfo); + +Atom * +XRRListOutputProperties (Display *dpy, RROutput output, int *nprop); + +typedef struct { + Bool pending; + Bool range; + Bool immutable; + int num_values; + long *values; +} XRRPropertyInfo; + +XRRPropertyInfo * +XRRQueryOutputProperty (Display *dpy, RROutput output, Atom property); + +void +XRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property, + Bool pending, Bool range, int num_values, + long *values); + +void +XRRChangeOutputProperty (Display *dpy, RROutput output, + Atom property, Atom type, + int format, int mode, + _Xconst unsigned char *data, int nelements); + +void +XRRDeleteOutputProperty (Display *dpy, RROutput output, Atom property); + +int +XRRGetOutputProperty (Display *dpy, RROutput output, + Atom property, long offset, long length, + Bool _delete, Bool pending, Atom req_type, + Atom *actual_type, int *actual_format, + unsigned long *nitems, unsigned long *bytes_after, + unsigned char **prop); + +XRRModeInfo * +XRRAllocModeInfo (_Xconst char *name, int nameLength); + +RRMode +XRRCreateMode (Display *dpy, Window window, XRRModeInfo *modeInfo); + +void +XRRDestroyMode (Display *dpy, RRMode mode); + +void +XRRAddOutputMode (Display *dpy, RROutput output, RRMode mode); + +void +XRRDeleteOutputMode (Display *dpy, RROutput output, RRMode mode); + +void +XRRFreeModeInfo (XRRModeInfo *modeInfo); + +typedef struct _XRRCrtcInfo { + Time timestamp; + int x, y; + unsigned int width, height; + RRMode mode; + Rotation rotation; + int noutput; + RROutput *outputs; + Rotation rotations; + int npossible; + RROutput *possible; +} XRRCrtcInfo; + +XRRCrtcInfo * +XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc); + +void +XRRFreeCrtcInfo (XRRCrtcInfo *crtcInfo); + +Status +XRRSetCrtcConfig (Display *dpy, + XRRScreenResources *resources, + RRCrtc crtc, + Time timestamp, + int x, int y, + RRMode mode, + Rotation rotation, + RROutput *outputs, + int noutputs); + +int +XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc); + +typedef struct _XRRCrtcGamma { + int size; + unsigned short *red; + unsigned short *green; + unsigned short *blue; +} XRRCrtcGamma; + +XRRCrtcGamma * +XRRGetCrtcGamma (Display *dpy, RRCrtc crtc); + +XRRCrtcGamma * +XRRAllocGamma (int size); + +void +XRRSetCrtcGamma (Display *dpy, RRCrtc crtc, XRRCrtcGamma *gamma); + +void +XRRFreeGamma (XRRCrtcGamma *gamma); + +/* Version 1.3 additions */ + +XRRScreenResources * +XRRGetScreenResourcesCurrent (Display *dpy, Window window); + +void +XRRSetCrtcTransform (Display *dpy, + RRCrtc crtc, + XTransform *transform, + _Xconst char *filter, + XFixed *params, + int nparams); + +typedef struct _XRRCrtcTransformAttributes { + XTransform pendingTransform; + char *pendingFilter; + int pendingNparams; + XFixed *pendingParams; + XTransform currentTransform; + char *currentFilter; + int currentNparams; + XFixed *currentParams; +} XRRCrtcTransformAttributes; + +/* + * Get current crtc transforms and filters. + * Pass *attributes to XFree to free + */ +Status +XRRGetCrtcTransform (Display *dpy, + RRCrtc crtc, + XRRCrtcTransformAttributes **attributes); + +/* + * intended to take RRScreenChangeNotify, or + * ConfigureNotify (on the root window) + * returns 1 if it is an event type it understands, 0 if not + */ +int XRRUpdateConfiguration(XEvent *event); + +typedef struct _XRRPanning { + Time timestamp; + unsigned int left; + unsigned int top; + unsigned int width; + unsigned int height; + unsigned int track_left; + unsigned int track_top; + unsigned int track_width; + unsigned int track_height; + int border_left; + int border_top; + int border_right; + int border_bottom; +} XRRPanning; + +XRRPanning * +XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc); + +void +XRRFreePanning (XRRPanning *panning); + +Status +XRRSetPanning (Display *dpy, + XRRScreenResources *resources, + RRCrtc crtc, + XRRPanning *panning); + +void +XRRSetOutputPrimary(Display *dpy, + Window window, + RROutput output); + +RROutput +XRRGetOutputPrimary(Display *dpy, + Window window); + +typedef struct _XRRProviderResources { + Time timestamp; + int nproviders; + RRProvider *providers; +} XRRProviderResources; + +XRRProviderResources * +XRRGetProviderResources(Display *dpy, Window window); + +void +XRRFreeProviderResources(XRRProviderResources *resources); + +typedef struct _XRRProviderInfo { + unsigned int capabilities; + int ncrtcs; + RRCrtc *crtcs; + int noutputs; + RROutput *outputs; + char *name; + int nassociatedproviders; + RRProvider *associated_providers; + unsigned int *associated_capability; + int nameLen; +} XRRProviderInfo; + +XRRProviderInfo * +XRRGetProviderInfo(Display *dpy, XRRScreenResources *resources, RRProvider provider); + +void +XRRFreeProviderInfo(XRRProviderInfo *provider); + +int +XRRSetProviderOutputSource(Display *dpy, XID provider, XID source_provider); + +int +XRRSetProviderOffloadSink(Display *dpy, XID provider, XID sink_provider); + +Atom * +XRRListProviderProperties (Display *dpy, RRProvider provider, int *nprop); + +XRRPropertyInfo * +XRRQueryProviderProperty (Display *dpy, RRProvider provider, Atom property); + +void +XRRConfigureProviderProperty (Display *dpy, RRProvider provider, Atom property, + Bool pending, Bool range, int num_values, + long *values); + +void +XRRChangeProviderProperty (Display *dpy, RRProvider provider, + Atom property, Atom type, + int format, int mode, + _Xconst unsigned char *data, int nelements); + +void +XRRDeleteProviderProperty (Display *dpy, RRProvider provider, Atom property); + +int +XRRGetProviderProperty (Display *dpy, RRProvider provider, + Atom property, long offset, long length, + Bool _delete, Bool pending, Atom req_type, + Atom *actual_type, int *actual_format, + unsigned long *nitems, unsigned long *bytes_after, + unsigned char **prop); + + +typedef struct _XRRMonitorInfo { + Atom name; + Bool primary; + Bool automatic; + int noutput; + int x; + int y; + int width; + int height; + int mwidth; + int mheight; + RROutput *outputs; +} XRRMonitorInfo; + +XRRMonitorInfo * +XRRAllocateMonitor(Display *dpy, int noutput); + +XRRMonitorInfo * +XRRGetMonitors(Display *dpy, Window window, Bool get_active, int *nmonitors); + +void +XRRSetMonitor(Display *dpy, Window window, XRRMonitorInfo *monitor); + +void +XRRDeleteMonitor(Display *dpy, Window window, Atom name); + +void +XRRFreeMonitors(XRRMonitorInfo *monitors); + +_XFUNCPROTOEND + +#endif /* _XRANDR_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/Xrender.h b/thirdparty/linuxbsd_headers/X11/extensions/Xrender.h new file mode 100644 index 0000000000..1d1cd086ec --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/Xrender.h @@ -0,0 +1,528 @@ +/* + * + * Copyright © 2000 SuSE, 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 SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * 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. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifndef _XRENDER_H_ +#define _XRENDER_H_ + +#include <X11/Xlib.h> +#include <X11/Xfuncproto.h> +#include <X11/Xosdefs.h> +#include <X11/Xutil.h> + +#include <X11/extensions/render.h> + +typedef struct { + short red; + short redMask; + short green; + short greenMask; + short blue; + short blueMask; + short alpha; + short alphaMask; +} XRenderDirectFormat; + +typedef struct { + PictFormat id; + int type; + int depth; + XRenderDirectFormat direct; + Colormap colormap; +} XRenderPictFormat; + +#define PictFormatID (1 << 0) +#define PictFormatType (1 << 1) +#define PictFormatDepth (1 << 2) +#define PictFormatRed (1 << 3) +#define PictFormatRedMask (1 << 4) +#define PictFormatGreen (1 << 5) +#define PictFormatGreenMask (1 << 6) +#define PictFormatBlue (1 << 7) +#define PictFormatBlueMask (1 << 8) +#define PictFormatAlpha (1 << 9) +#define PictFormatAlphaMask (1 << 10) +#define PictFormatColormap (1 << 11) + +typedef struct _XRenderPictureAttributes { + int repeat; + Picture alpha_map; + int alpha_x_origin; + int alpha_y_origin; + int clip_x_origin; + int clip_y_origin; + Pixmap clip_mask; + Bool graphics_exposures; + int subwindow_mode; + int poly_edge; + int poly_mode; + Atom dither; + Bool component_alpha; +} XRenderPictureAttributes; + +typedef struct { + unsigned short red; + unsigned short green; + unsigned short blue; + unsigned short alpha; +} XRenderColor; + +typedef struct _XGlyphInfo { + unsigned short width; + unsigned short height; + short x; + short y; + short xOff; + short yOff; +} XGlyphInfo; + +typedef struct _XGlyphElt8 { + GlyphSet glyphset; + _Xconst char *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt8; + +typedef struct _XGlyphElt16 { + GlyphSet glyphset; + _Xconst unsigned short *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt16; + +typedef struct _XGlyphElt32 { + GlyphSet glyphset; + _Xconst unsigned int *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt32; + +typedef double XDouble; + +typedef struct _XPointDouble { + XDouble x, y; +} XPointDouble; + +#define XDoubleToFixed(f) ((XFixed) ((f) * 65536)) +#define XFixedToDouble(f) (((XDouble) (f)) / 65536) + +typedef int XFixed; + +typedef struct _XPointFixed { + XFixed x, y; +} XPointFixed; + +typedef struct _XLineFixed { + XPointFixed p1, p2; +} XLineFixed; + +typedef struct _XTriangle { + XPointFixed p1, p2, p3; +} XTriangle; + +typedef struct _XCircle { + XFixed x; + XFixed y; + XFixed radius; +} XCircle; + +typedef struct _XTrapezoid { + XFixed top, bottom; + XLineFixed left, right; +} XTrapezoid; + +typedef struct _XTransform { + XFixed matrix[3][3]; +} XTransform; + +typedef struct _XFilters { + int nfilter; + char **filter; + int nalias; + short *alias; +} XFilters; + +typedef struct _XIndexValue { + unsigned long pixel; + unsigned short red, green, blue, alpha; +} XIndexValue; + +typedef struct _XAnimCursor { + Cursor cursor; + unsigned long delay; +} XAnimCursor; + +typedef struct _XSpanFix { + XFixed left, right, y; +} XSpanFix; + +typedef struct _XTrap { + XSpanFix top, bottom; +} XTrap; + +typedef struct _XLinearGradient { + XPointFixed p1; + XPointFixed p2; +} XLinearGradient; + +typedef struct _XRadialGradient { + XCircle inner; + XCircle outer; +} XRadialGradient; + +typedef struct _XConicalGradient { + XPointFixed center; + XFixed angle; /* in degrees */ +} XConicalGradient; + +_XFUNCPROTOBEGIN + +Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep); + +Status XRenderQueryVersion (Display *dpy, + int *major_versionp, + int *minor_versionp); + +Status XRenderQueryFormats (Display *dpy); + +int XRenderQuerySubpixelOrder (Display *dpy, int screen); + +Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel); + +XRenderPictFormat * +XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual); + +XRenderPictFormat * +XRenderFindFormat (Display *dpy, + unsigned long mask, + _Xconst XRenderPictFormat *templ, + int count); + +#define PictStandardARGB32 0 +#define PictStandardRGB24 1 +#define PictStandardA8 2 +#define PictStandardA4 3 +#define PictStandardA1 4 +#define PictStandardNUM 5 + +XRenderPictFormat * +XRenderFindStandardFormat (Display *dpy, + int format); + +XIndexValue * +XRenderQueryPictIndexValues(Display *dpy, + _Xconst XRenderPictFormat *format, + int *num); + +Picture +XRenderCreatePicture (Display *dpy, + Drawable drawable, + _Xconst XRenderPictFormat *format, + unsigned long valuemask, + _Xconst XRenderPictureAttributes *attributes); + +void +XRenderChangePicture (Display *dpy, + Picture picture, + unsigned long valuemask, + _Xconst XRenderPictureAttributes *attributes); + +void +XRenderSetPictureClipRectangles (Display *dpy, + Picture picture, + int xOrigin, + int yOrigin, + _Xconst XRectangle *rects, + int n); + +void +XRenderSetPictureClipRegion (Display *dpy, + Picture picture, + Region r); + +void +XRenderSetPictureTransform (Display *dpy, + Picture picture, + XTransform *transform); + +void +XRenderFreePicture (Display *dpy, + Picture picture); + +void +XRenderComposite (Display *dpy, + int op, + Picture src, + Picture mask, + Picture dst, + int src_x, + int src_y, + int mask_x, + int mask_y, + int dst_x, + int dst_y, + unsigned int width, + unsigned int height); + +GlyphSet +XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format); + +GlyphSet +XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing); + +void +XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset); + +void +XRenderAddGlyphs (Display *dpy, + GlyphSet glyphset, + _Xconst Glyph *gids, + _Xconst XGlyphInfo *glyphs, + int nglyphs, + _Xconst char *images, + int nbyte_images); + +void +XRenderFreeGlyphs (Display *dpy, + GlyphSet glyphset, + _Xconst Glyph *gids, + int nglyphs); + +void +XRenderCompositeString8 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst char *string, + int nchar); + +void +XRenderCompositeString16 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst unsigned short *string, + int nchar); + +void +XRenderCompositeString32 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst unsigned int *string, + int nchar); + +void +XRenderCompositeText8 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt8 *elts, + int nelt); + +void +XRenderCompositeText16 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt16 *elts, + int nelt); + +void +XRenderCompositeText32 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt32 *elts, + int nelt); + +void +XRenderFillRectangle (Display *dpy, + int op, + Picture dst, + _Xconst XRenderColor *color, + int x, + int y, + unsigned int width, + unsigned int height); + +void +XRenderFillRectangles (Display *dpy, + int op, + Picture dst, + _Xconst XRenderColor *color, + _Xconst XRectangle *rectangles, + int n_rects); + +void +XRenderCompositeTrapezoids (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTrapezoid *traps, + int ntrap); + +void +XRenderCompositeTriangles (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTriangle *triangles, + int ntriangle); + +void +XRenderCompositeTriStrip (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint); + +void +XRenderCompositeTriFan (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint); + +void +XRenderCompositeDoublePoly (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XPointDouble *fpoints, + int npoints, + int winding); +Status +XRenderParseColor(Display *dpy, + char *spec, + XRenderColor *def); + +Cursor +XRenderCreateCursor (Display *dpy, + Picture source, + unsigned int x, + unsigned int y); + +XFilters * +XRenderQueryFilters (Display *dpy, Drawable drawable); + +void +XRenderSetPictureFilter (Display *dpy, + Picture picture, + const char *filter, + XFixed *params, + int nparams); + +Cursor +XRenderCreateAnimCursor (Display *dpy, + int ncursor, + XAnimCursor *cursors); + + +void +XRenderAddTraps (Display *dpy, + Picture picture, + int xOff, + int yOff, + _Xconst XTrap *traps, + int ntrap); + +Picture XRenderCreateSolidFill (Display *dpy, + const XRenderColor *color); + +Picture XRenderCreateLinearGradient (Display *dpy, + const XLinearGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +Picture XRenderCreateRadialGradient (Display *dpy, + const XRadialGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +Picture XRenderCreateConicalGradient (Display *dpy, + const XConicalGradient *gradient, + const XFixed *stops, + const XRenderColor *colors, + int nstops); + +_XFUNCPROTOEND + +#endif /* _XRENDER_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/randr.h b/thirdparty/linuxbsd_headers/X11/extensions/randr.h new file mode 100644 index 0000000000..e7caab1725 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/randr.h @@ -0,0 +1,208 @@ +/* + * 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 + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + * + * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. + * Keith Packard, Intel Corporation + */ + +#ifndef _RANDR_H_ +#define _RANDR_H_ + +typedef unsigned short Rotation; +typedef unsigned short SizeID; +typedef unsigned short SubpixelOrder; +typedef unsigned short Connection; +typedef unsigned short XRandrRotation; +typedef unsigned short XRandrSizeID; +typedef unsigned short XRandrSubpixelOrder; +typedef unsigned long XRandrModeFlags; + +#define RANDR_NAME "RANDR" +#define RANDR_MAJOR 1 +#define RANDR_MINOR 6 + +#define RRNumberErrors 5 +#define RRNumberEvents 2 +#define RRNumberRequests 47 + +#define X_RRQueryVersion 0 +/* we skip 1 to make old clients fail pretty immediately */ +#define X_RROldGetScreenInfo 1 +#define X_RR1_0SetScreenConfig 2 +/* V1.0 apps share the same set screen config request id */ +#define X_RRSetScreenConfig 2 +#define X_RROldScreenChangeSelectInput 3 +/* 3 used to be ScreenChangeSelectInput; deprecated */ +#define X_RRSelectInput 4 +#define X_RRGetScreenInfo 5 + +/* V1.2 additions */ +#define X_RRGetScreenSizeRange 6 +#define X_RRSetScreenSize 7 +#define X_RRGetScreenResources 8 +#define X_RRGetOutputInfo 9 +#define X_RRListOutputProperties 10 +#define X_RRQueryOutputProperty 11 +#define X_RRConfigureOutputProperty 12 +#define X_RRChangeOutputProperty 13 +#define X_RRDeleteOutputProperty 14 +#define X_RRGetOutputProperty 15 +#define X_RRCreateMode 16 +#define X_RRDestroyMode 17 +#define X_RRAddOutputMode 18 +#define X_RRDeleteOutputMode 19 +#define X_RRGetCrtcInfo 20 +#define X_RRSetCrtcConfig 21 +#define X_RRGetCrtcGammaSize 22 +#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) + +/* v1.4 */ +#define X_RRGetProviders 32 +#define X_RRGetProviderInfo 33 +#define X_RRSetProviderOffloadSink 34 +#define X_RRSetProviderOutputSource 35 +#define X_RRListProviderProperties 36 +#define X_RRQueryProviderProperty 37 +#define X_RRConfigureProviderProperty 38 +#define X_RRChangeProviderProperty 39 +#define X_RRDeleteProviderProperty 40 +#define X_RRGetProviderProperty 41 + +/* v1.5 */ +#define X_RRGetMonitors 42 +#define X_RRSetMonitor 43 +#define X_RRDeleteMonitor 44 + +/* v1.6 */ +#define X_RRCreateLease 45 +#define X_RRFreeLease 46 + +/* Event selection bits */ +#define RRScreenChangeNotifyMask (1L << 0) +/* V1.2 additions */ +#define RRCrtcChangeNotifyMask (1L << 1) +#define RROutputChangeNotifyMask (1L << 2) +#define RROutputPropertyNotifyMask (1L << 3) +/* V1.4 additions */ +#define RRProviderChangeNotifyMask (1L << 4) +#define RRProviderPropertyNotifyMask (1L << 5) +#define RRResourceChangeNotifyMask (1L << 6) +/* V1.6 additions */ +#define RRLeaseNotifyMask (1L << 7) + +/* Event codes */ +#define RRScreenChangeNotify 0 +/* V1.2 additions */ +#define RRNotify 1 +/* RRNotify Subcodes */ +#define RRNotify_CrtcChange 0 +#define RRNotify_OutputChange 1 +#define RRNotify_OutputProperty 2 +#define RRNotify_ProviderChange 3 +#define RRNotify_ProviderProperty 4 +#define RRNotify_ResourceChange 5 +/* V1.6 additions */ +#define RRNotify_Lease 6 +/* used in the rotation field; rotation and reflection in 0.1 proto. */ +#define RR_Rotate_0 1 +#define RR_Rotate_90 2 +#define RR_Rotate_180 4 +#define RR_Rotate_270 8 + +/* new in 1.0 protocol, to allow reflection of screen */ + +#define RR_Reflect_X 16 +#define RR_Reflect_Y 32 + +#define RRSetConfigSuccess 0 +#define RRSetConfigInvalidConfigTime 1 +#define RRSetConfigInvalidTime 2 +#define RRSetConfigFailed 3 + +/* new in 1.2 protocol */ + +#define RR_HSyncPositive 0x00000001 +#define RR_HSyncNegative 0x00000002 +#define RR_VSyncPositive 0x00000004 +#define RR_VSyncNegative 0x00000008 +#define RR_Interlace 0x00000010 +#define RR_DoubleScan 0x00000020 +#define RR_CSync 0x00000040 +#define RR_CSyncPositive 0x00000080 +#define RR_CSyncNegative 0x00000100 +#define RR_HSkewPresent 0x00000200 +#define RR_BCast 0x00000400 +#define RR_PixelMultiplex 0x00000800 +#define RR_DoubleClock 0x00001000 +#define RR_ClockDivideBy2 0x00002000 + +#define RR_Connected 0 +#define RR_Disconnected 1 +#define RR_UnknownConnection 2 + +#define BadRROutput 0 +#define BadRRCrtc 1 +#define BadRRMode 2 +#define BadRRProvider 3 +#define BadRRLease 4 + +/* Conventional RandR output properties */ + +#define RR_PROPERTY_BACKLIGHT "Backlight" +#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" +#define RR_PROPERTY_BORDER "Border" +#define RR_PROPERTY_BORDER_DIMENSIONS "BorderDimensions" +#define RR_PROPERTY_GUID "GUID" +#define RR_PROPERTY_RANDR_TILE "TILE" +#define RR_PROPERTY_NON_DESKTOP "non-desktop" + +/* roles this device can carry out */ +#define RR_Capability_None 0 +#define RR_Capability_SourceOutput 1 +#define RR_Capability_SinkOutput 2 +#define RR_Capability_SourceOffload 4 +#define RR_Capability_SinkOffload 8 + +#endif /* _RANDR_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/randrproto.h b/thirdparty/linuxbsd_headers/X11/extensions/randrproto.h new file mode 100644 index 0000000000..624c2544c9 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/randrproto.h @@ -0,0 +1,1152 @@ +/* + * 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 + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + * + * Author: Jim Gettys, Hewlett-Packard Company, Inc. + * Keith Packard, Intel Corporation + */ + +/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */ +/* V1.0 removes depth switching from the protocol */ +#ifndef _XRANDRP_H_ +#define _XRANDRP_H_ + +#include <X11/extensions/randr.h> +#include <X11/extensions/renderproto.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 Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define RROutput CARD32 +#define RRMode CARD32 +#define RRCrtc CARD32 +#define RRProvider CARD32 +#define RRModeFlags CARD32 +#define RRLease CARD32 + +#define Rotation CARD16 +#define SizeID CARD16 +#define SubpixelOrder CARD16 + +/* + * data structures + */ + +typedef struct { + CARD16 widthInPixels; + CARD16 heightInPixels; + CARD16 widthInMillimeters; + CARD16 heightInMillimeters; +} xScreenSizes; +#define sz_xScreenSizes 8 + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + CARD32 majorVersion; + CARD32 minorVersion; +} xRRQueryVersionReq; +#define sz_xRRQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 majorVersion; + CARD32 minorVersion; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRRQueryVersionReply; +#define sz_xRRQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; +} xRRGetScreenInfoReq; +#define sz_xRRGetScreenInfoReq 8 + +/* + * the xRRScreenInfoReply structure is followed by: + * + * the size information + */ + + +typedef struct { + BYTE type; /* X_Reply */ + BYTE setOfRotations; + CARD16 sequenceNumber; + CARD32 length; + Window root; + Time timestamp; + Time configTimestamp; + CARD16 nSizes; + SizeID sizeID; + Rotation rotation; + CARD16 rate; + CARD16 nrateEnts; + CARD16 pad; +} xRRGetScreenInfoReply; +#define sz_xRRGetScreenInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Drawable drawable; + Time timestamp; + Time configTimestamp; + SizeID sizeID; + Rotation rotation; +} xRR1_0SetScreenConfigReq; +#define sz_xRR1_0SetScreenConfigReq 20 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Drawable drawable; + Time timestamp; + Time configTimestamp; + SizeID sizeID; + Rotation rotation; + CARD16 rate; + CARD16 pad; +} xRRSetScreenConfigReq; +#define sz_xRRSetScreenConfigReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time newTimestamp; + Time newConfigTimestamp; + Window root; + CARD16 subpixelOrder; + CARD16 pad4; + CARD32 pad5; + CARD32 pad6; +} xRRSetScreenConfigReply; +#define sz_xRRSetScreenConfigReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + CARD16 enable; + CARD16 pad2; +} xRRSelectInputReq; +#define sz_xRRSelectInputReq 12 + +/* + * Additions for version 1.2 + */ + +typedef struct _xRRModeInfo { + RRMode id; + CARD16 width; + CARD16 height; + CARD32 dotClock; + CARD16 hSyncStart; + CARD16 hSyncEnd; + CARD16 hTotal; + CARD16 hSkew; + CARD16 vSyncStart; + CARD16 vSyncEnd; + CARD16 vTotal; + CARD16 nameLength; + RRModeFlags modeFlags; +} xRRModeInfo; +#define sz_xRRModeInfo 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; +} xRRGetScreenSizeRangeReq; +#define sz_xRRGetScreenSizeRangeReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad; + CARD16 sequenceNumber; + CARD32 length; + CARD16 minWidth; + CARD16 minHeight; + CARD16 maxWidth; + CARD16 maxHeight; + CARD32 pad0; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; +} xRRGetScreenSizeRangeReply; +#define sz_xRRGetScreenSizeRangeReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + CARD16 width; + CARD16 height; + CARD32 widthInMillimeters; + CARD32 heightInMillimeters; +} xRRSetScreenSizeReq; +#define sz_xRRSetScreenSizeReq 20 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; +} xRRGetScreenResourcesReq; +#define sz_xRRGetScreenResourcesReq 8 + +typedef struct { + BYTE type; + CARD8 pad; + CARD16 sequenceNumber; + CARD32 length; + Time timestamp; + Time configTimestamp; + CARD16 nCrtcs; + CARD16 nOutputs; + CARD16 nModes; + CARD16 nbytesNames; + CARD32 pad1; + CARD32 pad2; +} xRRGetScreenResourcesReply; +#define sz_xRRGetScreenResourcesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + Time configTimestamp; +} xRRGetOutputInfoReq; +#define sz_xRRGetOutputInfoReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time timestamp; + RRCrtc crtc; + CARD32 mmWidth; + CARD32 mmHeight; + CARD8 connection; + CARD8 subpixelOrder; + CARD16 nCrtcs; + CARD16 nModes; + CARD16 nPreferred; + CARD16 nClones; + CARD16 nameLength; +} xRRGetOutputInfoReply; +#define sz_xRRGetOutputInfoReply 36 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; +} xRRListOutputPropertiesReq; +#define sz_xRRListOutputPropertiesReq 8 + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber; + CARD32 length; + CARD16 nAtoms; + CARD16 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} xRRListOutputPropertiesReply; +#define sz_xRRListOutputPropertiesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + Atom property; +} xRRQueryOutputPropertyReq; +#define sz_xRRQueryOutputPropertyReq 12 + +typedef struct { + BYTE type; + BYTE pad0; + CARD16 sequenceNumber; + CARD32 length; + BOOL pending; + BOOL range; + BOOL immutable; + BYTE pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} xRRQueryOutputPropertyReply; +#define sz_xRRQueryOutputPropertyReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + Atom property; + BOOL pending; + BOOL range; + CARD16 pad; +} xRRConfigureOutputPropertyReq; +#define sz_xRRConfigureOutputPropertyReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + Atom property; + Atom type; + CARD8 format; + CARD8 mode; + CARD16 pad; + CARD32 nUnits; +} xRRChangeOutputPropertyReq; +#define sz_xRRChangeOutputPropertyReq 24 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + Atom property; +} xRRDeleteOutputPropertyReq; +#define sz_xRRDeleteOutputPropertyReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + Atom property; + Atom type; + CARD32 longOffset; + CARD32 longLength; +#ifdef __cplusplus + BOOL _delete; +#else + BOOL delete; +#endif + BOOL pending; + CARD16 pad1; +} xRRGetOutputPropertyReq; +#define sz_xRRGetOutputPropertyReq 28 + +typedef struct { + BYTE type; + CARD8 format; + CARD16 sequenceNumber; + CARD32 length; + Atom propertyType; + CARD32 bytesAfter; + CARD32 nItems; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; +} xRRGetOutputPropertyReply; +#define sz_xRRGetOutputPropertyReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + xRRModeInfo modeInfo; +} xRRCreateModeReq; +#define sz_xRRCreateModeReq 40 + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber; + CARD32 length; + RRMode mode; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRRCreateModeReply; +#define sz_xRRCreateModeReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRMode mode; +} xRRDestroyModeReq; +#define sz_xRRDestroyModeReq 8 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + RRMode mode; +} xRRAddOutputModeReq; +#define sz_xRRAddOutputModeReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RROutput output; + RRMode mode; +} xRRDeleteOutputModeReq; +#define sz_xRRDeleteOutputModeReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; + Time configTimestamp; +} xRRGetCrtcInfoReq; +#define sz_xRRGetCrtcInfoReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time timestamp; + INT16 x; + INT16 y; + CARD16 width; + CARD16 height; + RRMode mode; + Rotation rotation; + Rotation rotations; + CARD16 nOutput; + CARD16 nPossibleOutput; +} xRRGetCrtcInfoReply; +#define sz_xRRGetCrtcInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; + Time timestamp; + Time configTimestamp; + INT16 x; + INT16 y; + RRMode mode; + Rotation rotation; + CARD16 pad; +} xRRSetCrtcConfigReq; +#define sz_xRRSetCrtcConfigReq 28 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time newTimestamp; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRRSetCrtcConfigReply; +#define sz_xRRSetCrtcConfigReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; +} xRRGetCrtcGammaSizeReq; +#define sz_xRRGetCrtcGammaSizeReq 8 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + CARD16 size; + CARD16 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} xRRGetCrtcGammaSizeReply; +#define sz_xRRGetCrtcGammaSizeReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; +} xRRGetCrtcGammaReq; +#define sz_xRRGetCrtcGammaReq 8 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + CARD16 size; + CARD16 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} xRRGetCrtcGammaReply; +#define sz_xRRGetCrtcGammaReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; + CARD16 size; + CARD16 pad1; +} xRRSetCrtcGammaReq; +#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; + RRCrtc crtc; + xRenderTransform transform; + CARD16 nbytesFilter; /* number of bytes in filter name */ + CARD16 pad; +} xRRSetCrtcTransformReq; + +#define sz_xRRSetCrtcTransformReq 48 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; +} xRRGetCrtcTransformReq; + +#define sz_xRRGetCrtcTransformReq 8 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + xRenderTransform pendingTransform; + BYTE hasTransforms; + CARD8 pad0; + CARD16 pad1; + xRenderTransform currentTransform; + CARD32 pad2; + CARD16 pendingNbytesFilter; /* number of bytes in filter name */ + CARD16 pendingNparamsFilter; /* number of filter params */ + CARD16 currentNbytesFilter; /* number of bytes in filter name */ + CARD16 currentNparamsFilter; /* number of filter params */ +} xRRGetCrtcTransformReply; + +#define sz_xRRGetCrtcTransformReply 96 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + RROutput output; +} xRRSetOutputPrimaryReq; +#define sz_xRRSetOutputPrimaryReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; +} xRRGetOutputPrimaryReq; +#define sz_xRRGetOutputPrimaryReq 8 + +typedef struct { + BYTE type; + CARD8 pad; + CARD16 sequenceNumber; + CARD32 length; + RROutput output; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRRGetOutputPrimaryReply; +#define sz_xRRGetOutputPrimaryReply 32 + +/* + * Additions for V1.4 + */ + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; +} xRRGetProvidersReq; +#define sz_xRRGetProvidersReq 8 + +typedef struct { + BYTE type; + CARD8 pad; + CARD16 sequenceNumber; + CARD32 length; + Time timestamp; + CARD16 nProviders; + CARD16 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRRGetProvidersReply; +#define sz_xRRGetProvidersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + Time configTimestamp; +} xRRGetProviderInfoReq; +#define sz_xRRGetProviderInfoReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time timestamp; + CARD32 capabilities; + CARD16 nCrtcs; + CARD16 nOutputs; + CARD16 nAssociatedProviders; + CARD16 nameLength; + CARD32 pad1; + CARD32 pad2; +} xRRGetProviderInfoReply; +#define sz_xRRGetProviderInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + RRProvider source_provider; + Time configTimestamp; +} xRRSetProviderOutputSourceReq; +#define sz_xRRSetProviderOutputSourceReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + RRProvider sink_provider; + Time configTimestamp; +} xRRSetProviderOffloadSinkReq; +#define sz_xRRSetProviderOffloadSinkReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; +} xRRListProviderPropertiesReq; +#define sz_xRRListProviderPropertiesReq 8 + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber; + CARD32 length; + CARD16 nAtoms; + CARD16 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} xRRListProviderPropertiesReply; +#define sz_xRRListProviderPropertiesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + Atom property; +} xRRQueryProviderPropertyReq; +#define sz_xRRQueryProviderPropertyReq 12 + +typedef struct { + BYTE type; + BYTE pad0; + CARD16 sequenceNumber; + CARD32 length; + BOOL pending; + BOOL range; + BOOL immutable; + BYTE pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} xRRQueryProviderPropertyReply; +#define sz_xRRQueryProviderPropertyReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + Atom property; + BOOL pending; + BOOL range; + CARD16 pad; +} xRRConfigureProviderPropertyReq; +#define sz_xRRConfigureProviderPropertyReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + Atom property; + Atom type; + CARD8 format; + CARD8 mode; + CARD16 pad; + CARD32 nUnits; +} xRRChangeProviderPropertyReq; +#define sz_xRRChangeProviderPropertyReq 24 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + Atom property; +} xRRDeleteProviderPropertyReq; +#define sz_xRRDeleteProviderPropertyReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRProvider provider; + Atom property; + Atom type; + CARD32 longOffset; + CARD32 longLength; +#ifdef __cplusplus + BOOL _delete; +#else + BOOL delete; +#endif + BOOL pending; + CARD16 pad1; +} xRRGetProviderPropertyReq; +#define sz_xRRGetProviderPropertyReq 28 + +typedef struct { + BYTE type; + CARD8 format; + CARD16 sequenceNumber; + CARD32 length; + Atom propertyType; + CARD32 bytesAfter; + CARD32 nItems; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; +} xRRGetProviderPropertyReply; +#define sz_xRRGetProviderPropertyReply 32 + +/* + * Additions for V1.6 + */ + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + RRLease lid; + CARD16 nCrtcs; + CARD16 nOutputs; +} xRRCreateLeaseReq; +#define sz_xRRCreateLeaseReq 16 + +typedef struct { + BYTE type; + CARD8 nfd; + CARD16 sequenceNumber; + CARD32 length; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; + CARD32 pad7; +} xRRCreateLeaseReply; +#define sz_xRRCreateLeaseReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRLease lid; + BYTE terminate; + CARD8 pad1; + CARD16 pad2; +} xRRFreeLeaseReq; +#define sz_xRRFreeLeaseReq 12 + +/* + * event + */ +typedef struct { + CARD8 type; /* always evBase + ScreenChangeNotify */ + CARD8 rotation; /* new rotation */ + CARD16 sequenceNumber; + Time timestamp; /* time screen was changed */ + Time configTimestamp; /* time config data was changed */ + Window root; /* root window */ + Window window; /* window requesting notification */ + SizeID sizeID; /* new size ID */ + CARD16 subpixelOrder; /* subpixel order */ + CARD16 widthInPixels; /* new size */ + CARD16 heightInPixels; + CARD16 widthInMillimeters; + CARD16 heightInMillimeters; +} xRRScreenChangeNotifyEvent; +#define sz_xRRScreenChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_CrtcChange */ + CARD16 sequenceNumber; + Time timestamp; /* time crtc was changed */ + Window window; /* window requesting notification */ + RRCrtc crtc; /* affected CRTC */ + RRMode mode; /* current mode */ + CARD16 rotation; /* rotation and reflection */ + CARD16 pad1; /* unused */ + INT16 x; /* new location */ + INT16 y; + CARD16 width; /* new size */ + CARD16 height; +} xRRCrtcChangeNotifyEvent; +#define sz_xRRCrtcChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_OutputChange */ + CARD16 sequenceNumber; + Time timestamp; /* time output was changed */ + Time configTimestamp; /* time config was changed */ + Window window; /* window requesting notification */ + RROutput output; /* affected output */ + RRCrtc crtc; /* current crtc */ + RRMode mode; /* current mode */ + CARD16 rotation; /* rotation and reflection */ + CARD8 connection; /* connection status */ + CARD8 subpixelOrder; /* subpixel order */ +} xRROutputChangeNotifyEvent; +#define sz_xRROutputChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_OutputProperty */ + CARD16 sequenceNumber; + Window window; /* window requesting notification */ + RROutput output; /* affected output */ + Atom atom; /* property name */ + Time timestamp; /* time crtc was changed */ + CARD8 state; /* NewValue or Deleted */ + CARD8 pad1; + CARD16 pad2; + CARD32 pad3; + CARD32 pad4; +} xRROutputPropertyNotifyEvent; +#define sz_xRROutputPropertyNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_ProviderChange */ + CARD16 sequenceNumber; + Time timestamp; /* time provider was changed */ + Window window; /* window requesting notification */ + RRProvider provider; /* affected provider */ + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; +} xRRProviderChangeNotifyEvent; +#define sz_xRRProviderChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_ProviderProperty */ + CARD16 sequenceNumber; + Window window; /* window requesting notification */ + RRProvider provider; /* affected provider */ + Atom atom; /* property name */ + Time timestamp; /* time provider was changed */ + CARD8 state; /* NewValue or Deleted */ + CARD8 pad1; + CARD16 pad2; + CARD32 pad3; + CARD32 pad4; +} xRRProviderPropertyNotifyEvent; +#define sz_xRRProviderPropertyNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_ResourceChange */ + CARD16 sequenceNumber; + Time timestamp; /* time resource was changed */ + Window window; /* window requesting notification */ + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRRResourceChangeNotifyEvent; +#define sz_xRRResourceChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_Lease */ + CARD16 sequenceNumber; + Time timestamp; /* time resource was changed */ + Window window; /* window requesting notification */ + RRLease lease; + CARD8 created; /* created/deleted */ + CARD8 pad0; + CARD16 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; +} xRRLeaseNotifyEvent; +#define sz_xRRLeaseNotifyEvent 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; +} xRRGetPanningReq; +#define sz_xRRGetPanningReq 8 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time timestamp; + CARD16 left; + CARD16 top; + CARD16 width; + CARD16 height; + CARD16 track_left; + CARD16 track_top; + CARD16 track_width; + CARD16 track_height; + INT16 border_left; + INT16 border_top; + INT16 border_right; + INT16 border_bottom; +} xRRGetPanningReply; +#define sz_xRRGetPanningReply 36 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + RRCrtc crtc; + Time timestamp; + CARD16 left; + CARD16 top; + CARD16 width; + CARD16 height; + CARD16 track_left; + CARD16 track_top; + CARD16 track_width; + CARD16 track_height; + INT16 border_left; + INT16 border_top; + INT16 border_right; + INT16 border_bottom; +} xRRSetPanningReq; +#define sz_xRRSetPanningReq 36 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time newTimestamp; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRRSetPanningReply; +#define sz_xRRSetPanningReply 32 + +typedef struct { + Atom name; + BOOL primary; + BOOL automatic; + CARD16 noutput; + INT16 x; + INT16 y; + CARD16 width; + CARD16 height; + CARD32 widthInMillimeters; + CARD32 heightInMillimeters; +} xRRMonitorInfo; +#define sz_xRRMonitorInfo 24 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + BOOL get_active; + CARD8 pad; + CARD16 pad2; +} xRRGetMonitorsReq; +#define sz_xRRGetMonitorsReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber; + CARD32 length; + Time timestamp; + CARD32 nmonitors; + CARD32 noutputs; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; +} xRRGetMonitorsReply; +#define sz_xRRGetMonitorsReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + xRRMonitorInfo monitor; +} xRRSetMonitorReq; +#define sz_xRRSetMonitorReq 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length; + Window window; + Atom name; +} xRRDeleteMonitorReq; +#define sz_xRRDeleteMonitorReq 12 + +#undef RRLease +#undef RRModeFlags +#undef RRCrtc +#undef RRMode +#undef RROutput +#undef RRMode +#undef RRCrtc +#undef RRProvider +#undef Drawable +#undef Window +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef Time +#undef KeyCode +#undef KeySym +#undef Rotation +#undef SizeID +#undef SubpixelOrder + +#endif /* _XRANDRP_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/render.h b/thirdparty/linuxbsd_headers/X11/extensions/render.h new file mode 100644 index 0000000000..7ecde3f59e --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/render.h @@ -0,0 +1,210 @@ +/* + * Copyright © 2000 SuSE, 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 SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * 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. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifndef _RENDER_H_ +#define _RENDER_H_ + +#include <X11/Xdefs.h> + +typedef XID Glyph; +typedef XID GlyphSet; +typedef XID Picture; +typedef XID PictFormat; + +#define RENDER_NAME "RENDER" +#define RENDER_MAJOR 0 +#define RENDER_MINOR 11 + +#define X_RenderQueryVersion 0 +#define X_RenderQueryPictFormats 1 +#define X_RenderQueryPictIndexValues 2 /* 0.7 */ +#define X_RenderQueryDithers 3 +#define X_RenderCreatePicture 4 +#define X_RenderChangePicture 5 +#define X_RenderSetPictureClipRectangles 6 +#define X_RenderFreePicture 7 +#define X_RenderComposite 8 +#define X_RenderScale 9 +#define X_RenderTrapezoids 10 +#define X_RenderTriangles 11 +#define X_RenderTriStrip 12 +#define X_RenderTriFan 13 +#define X_RenderColorTrapezoids 14 +#define X_RenderColorTriangles 15 +/* #define X_RenderTransform 16 */ +#define X_RenderCreateGlyphSet 17 +#define X_RenderReferenceGlyphSet 18 +#define X_RenderFreeGlyphSet 19 +#define X_RenderAddGlyphs 20 +#define X_RenderAddGlyphsFromPicture 21 +#define X_RenderFreeGlyphs 22 +#define X_RenderCompositeGlyphs8 23 +#define X_RenderCompositeGlyphs16 24 +#define X_RenderCompositeGlyphs32 25 +#define X_RenderFillRectangles 26 +/* 0.5 */ +#define X_RenderCreateCursor 27 +/* 0.6 */ +#define X_RenderSetPictureTransform 28 +#define X_RenderQueryFilters 29 +#define X_RenderSetPictureFilter 30 +/* 0.8 */ +#define X_RenderCreateAnimCursor 31 +/* 0.9 */ +#define X_RenderAddTraps 32 +/* 0.10 */ +#define X_RenderCreateSolidFill 33 +#define X_RenderCreateLinearGradient 34 +#define X_RenderCreateRadialGradient 35 +#define X_RenderCreateConicalGradient 36 +#define RenderNumberRequests (X_RenderCreateConicalGradient+1) + +#define BadPictFormat 0 +#define BadPicture 1 +#define BadPictOp 2 +#define BadGlyphSet 3 +#define BadGlyph 4 +#define RenderNumberErrors (BadGlyph+1) + +#define PictTypeIndexed 0 +#define PictTypeDirect 1 + +#define PictOpMinimum 0 +#define PictOpClear 0 +#define PictOpSrc 1 +#define PictOpDst 2 +#define PictOpOver 3 +#define PictOpOverReverse 4 +#define PictOpIn 5 +#define PictOpInReverse 6 +#define PictOpOut 7 +#define PictOpOutReverse 8 +#define PictOpAtop 9 +#define PictOpAtopReverse 10 +#define PictOpXor 11 +#define PictOpAdd 12 +#define PictOpSaturate 13 +#define PictOpMaximum 13 + +/* + * Operators only available in version 0.2 + */ +#define PictOpDisjointMinimum 0x10 +#define PictOpDisjointClear 0x10 +#define PictOpDisjointSrc 0x11 +#define PictOpDisjointDst 0x12 +#define PictOpDisjointOver 0x13 +#define PictOpDisjointOverReverse 0x14 +#define PictOpDisjointIn 0x15 +#define PictOpDisjointInReverse 0x16 +#define PictOpDisjointOut 0x17 +#define PictOpDisjointOutReverse 0x18 +#define PictOpDisjointAtop 0x19 +#define PictOpDisjointAtopReverse 0x1a +#define PictOpDisjointXor 0x1b +#define PictOpDisjointMaximum 0x1b + +#define PictOpConjointMinimum 0x20 +#define PictOpConjointClear 0x20 +#define PictOpConjointSrc 0x21 +#define PictOpConjointDst 0x22 +#define PictOpConjointOver 0x23 +#define PictOpConjointOverReverse 0x24 +#define PictOpConjointIn 0x25 +#define PictOpConjointInReverse 0x26 +#define PictOpConjointOut 0x27 +#define PictOpConjointOutReverse 0x28 +#define PictOpConjointAtop 0x29 +#define PictOpConjointAtopReverse 0x2a +#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 + +#define PolyModePrecise 0 +#define PolyModeImprecise 1 + +#define CPRepeat (1 << 0) +#define CPAlphaMap (1 << 1) +#define CPAlphaXOrigin (1 << 2) +#define CPAlphaYOrigin (1 << 3) +#define CPClipXOrigin (1 << 4) +#define CPClipYOrigin (1 << 5) +#define CPClipMask (1 << 6) +#define CPGraphicsExposure (1 << 7) +#define CPSubwindowMode (1 << 8) +#define CPPolyEdge (1 << 9) +#define CPPolyMode (1 << 10) +#define CPDither (1 << 11) +#define CPComponentAlpha (1 << 12) +#define CPLastBit 12 + +/* Filters included in 0.6 */ +#define FilterNearest "nearest" +#define FilterBilinear "bilinear" +/* Filters included in 0.10 */ +#define FilterConvolution "convolution" + +#define FilterFast "fast" +#define FilterGood "good" +#define FilterBest "best" + +#define FilterAliasNone -1 + +/* Subpixel orders included in 0.6 */ +#define SubPixelUnknown 0 +#define SubPixelHorizontalRGB 1 +#define SubPixelHorizontalBGR 2 +#define SubPixelVerticalRGB 3 +#define SubPixelVerticalBGR 4 +#define SubPixelNone 5 + +/* Extended repeat attributes included in 0.10 */ +#define RepeatNone 0 +#define RepeatNormal 1 +#define RepeatPad 2 +#define RepeatReflect 3 + +#endif /* _RENDER_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/renderproto.h b/thirdparty/linuxbsd_headers/X11/extensions/renderproto.h new file mode 100644 index 0000000000..2cd06af5d2 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/renderproto.h @@ -0,0 +1,661 @@ +/* + * Copyright © 2000 SuSE, 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 SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * 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. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifndef _XRENDERP_H_ +#define _XRENDERP_H_ + +#include <X11/Xmd.h> +#include <X11/extensions/render.h> + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + +#define Picture CARD32 +#define PictFormat CARD32 +#define Fixed INT32 +#define Glyphset CARD32 + +/* + * data structures + */ + +typedef struct { + CARD16 red; + CARD16 redMask; + CARD16 green; + CARD16 greenMask; + CARD16 blue; + CARD16 blueMask; + CARD16 alpha; + CARD16 alphaMask; +} xDirectFormat; + +#define sz_xDirectFormat 16 + +typedef struct { + PictFormat id; + CARD8 type; + CARD8 depth; + CARD16 pad1; + xDirectFormat direct; + Colormap colormap; +} xPictFormInfo; + +#define sz_xPictFormInfo 28 + +typedef struct { + VisualID visual; + PictFormat format; +} xPictVisual; + +#define sz_xPictVisual 8 + +typedef struct { + CARD8 depth; + CARD8 pad1; + CARD16 nPictVisuals; + CARD32 pad2; +} xPictDepth; + +#define sz_xPictDepth 8 + +typedef struct { + CARD32 nDepth; + PictFormat fallback; +} xPictScreen; + +#define sz_xPictScreen 8 + +typedef struct { + CARD32 pixel; + CARD16 red; + CARD16 green; + CARD16 blue; + CARD16 alpha; +} xIndexValue; + +#define sz_xIndexValue 12 + +typedef struct { + CARD16 red; + CARD16 green; + CARD16 blue; + CARD16 alpha; +} xRenderColor; + +#define sz_xRenderColor 8 + +typedef struct { + Fixed x; + Fixed y; +} xPointFixed; + +#define sz_xPointFixed 8 + +typedef struct { + xPointFixed p1; + xPointFixed p2; +} xLineFixed; + +#define sz_xLineFixed 16 + +typedef struct { + xPointFixed p1, p2, p3; +} xTriangle; + +#define sz_xTriangle 24 + +typedef struct { + Fixed top; + Fixed bottom; + xLineFixed left; + xLineFixed right; +} xTrapezoid; + +#define sz_xTrapezoid 40 + +typedef struct { + CARD16 width; + CARD16 height; + INT16 x; + INT16 y; + INT16 xOff; + INT16 yOff; +} xGlyphInfo; + +#define sz_xGlyphInfo 12 + +typedef struct { + CARD8 len; + CARD8 pad1; + CARD16 pad2; + INT16 deltax; + INT16 deltay; +} xGlyphElt; + +#define sz_xGlyphElt 8 + +typedef struct { + Fixed l, r, y; +} xSpanFix; + +#define sz_xSpanFix 12 + +typedef struct { + xSpanFix top, bot; +} xTrap; + +#define sz_xTrap 24 + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD32 majorVersion; + CARD32 minorVersion; +} xRenderQueryVersionReq; + +#define sz_xRenderQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 majorVersion; + CARD32 minorVersion; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRenderQueryVersionReply; + +#define sz_xRenderQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; +} xRenderQueryPictFormatsReq; + +#define sz_xRenderQueryPictFormatsReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 numFormats; + CARD32 numScreens; + CARD32 numDepths; + CARD32 numVisuals; + CARD32 numSubpixel; /* Version 0.6 */ + CARD32 pad5; +} xRenderQueryPictFormatsReply; + +#define sz_xRenderQueryPictFormatsReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + PictFormat format; +} xRenderQueryPictIndexValuesReq; + +#define sz_xRenderQueryPictIndexValuesReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 numIndexValues; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} xRenderQueryPictIndexValuesReply; + +#define sz_xRenderQueryPictIndexValuesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture pid; + Drawable drawable; + PictFormat format; + CARD32 mask; +} xRenderCreatePictureReq; + +#define sz_xRenderCreatePictureReq 20 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture picture; + CARD32 mask; +} xRenderChangePictureReq; + +#define sz_xRenderChangePictureReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture picture; + INT16 xOrigin; + INT16 yOrigin; +} xRenderSetPictureClipRectanglesReq; + +#define sz_xRenderSetPictureClipRectanglesReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture picture; +} xRenderFreePictureReq; + +#define sz_xRenderFreePictureReq 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD8 op; + CARD8 pad1; + CARD16 pad2; + Picture src; + Picture mask; + Picture dst; + INT16 xSrc; + INT16 ySrc; + INT16 xMask; + INT16 yMask; + INT16 xDst; + INT16 yDst; + CARD16 width; + CARD16 height; +} xRenderCompositeReq; + +#define sz_xRenderCompositeReq 36 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture src; + Picture dst; + CARD32 colorScale; + CARD32 alphaScale; + INT16 xSrc; + INT16 ySrc; + INT16 xDst; + INT16 yDst; + CARD16 width; + CARD16 height; +} xRenderScaleReq; + +#define sz_xRenderScaleReq 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD8 op; + CARD8 pad1; + CARD16 pad2; + Picture src; + Picture dst; + PictFormat maskFormat; + INT16 xSrc; + INT16 ySrc; +} xRenderTrapezoidsReq; + +#define sz_xRenderTrapezoidsReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD8 op; + CARD8 pad1; + CARD16 pad2; + Picture src; + Picture dst; + PictFormat maskFormat; + INT16 xSrc; + INT16 ySrc; +} xRenderTrianglesReq; + +#define sz_xRenderTrianglesReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD8 op; + CARD8 pad1; + CARD16 pad2; + Picture src; + Picture dst; + PictFormat maskFormat; + INT16 xSrc; + INT16 ySrc; +} xRenderTriStripReq; + +#define sz_xRenderTriStripReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD8 op; + CARD8 pad1; + CARD16 pad2; + Picture src; + Picture dst; + PictFormat maskFormat; + INT16 xSrc; + INT16 ySrc; +} xRenderTriFanReq; + +#define sz_xRenderTriFanReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Glyphset gsid; + PictFormat format; +} xRenderCreateGlyphSetReq; + +#define sz_xRenderCreateGlyphSetReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Glyphset gsid; + Glyphset existing; +} xRenderReferenceGlyphSetReq; + +#define sz_xRenderReferenceGlyphSetReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Glyphset glyphset; +} xRenderFreeGlyphSetReq; + +#define sz_xRenderFreeGlyphSetReq 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Glyphset glyphset; + CARD32 nglyphs; +} xRenderAddGlyphsReq; + +#define sz_xRenderAddGlyphsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Glyphset glyphset; +} xRenderFreeGlyphsReq; + +#define sz_xRenderFreeGlyphsReq 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD8 op; + CARD8 pad1; + CARD16 pad2; + Picture src; + Picture dst; + PictFormat maskFormat; + Glyphset glyphset; + INT16 xSrc; + INT16 ySrc; +} xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req, +xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req; + +#define sz_xRenderCompositeGlyphs8Req 28 +#define sz_xRenderCompositeGlyphs16Req 28 +#define sz_xRenderCompositeGlyphs32Req 28 + +/* 0.1 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + CARD8 op; + CARD8 pad1; + CARD16 pad2; + Picture dst; + xRenderColor color; +} xRenderFillRectanglesReq; + +#define sz_xRenderFillRectanglesReq 20 + +/* 0.5 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Cursor cid; + Picture src; + CARD16 x; + CARD16 y; +} xRenderCreateCursorReq; + +#define sz_xRenderCreateCursorReq 16 + +/* 0.6 and higher */ + +/* + * This can't use an array because 32-bit values may be in bitfields + */ +typedef struct { + Fixed matrix11; + Fixed matrix12; + Fixed matrix13; + Fixed matrix21; + Fixed matrix22; + Fixed matrix23; + Fixed matrix31; + Fixed matrix32; + Fixed matrix33; +} xRenderTransform; + +#define sz_xRenderTransform 36 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture picture; + xRenderTransform transform; +} xRenderSetPictureTransformReq; + +#define sz_xRenderSetPictureTransformReq 44 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Drawable drawable; +} xRenderQueryFiltersReq; + +#define sz_xRenderQueryFiltersReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 numAliases; /* LISTofCARD16 */ + CARD32 numFilters; /* LISTofSTRING8 */ + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; +} xRenderQueryFiltersReply; + +#define sz_xRenderQueryFiltersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture picture; + CARD16 nbytes; /* number of bytes in name */ + CARD16 pad; +} xRenderSetPictureFilterReq; + +#define sz_xRenderSetPictureFilterReq 12 + +/* 0.8 and higher */ + +typedef struct { + Cursor cursor; + CARD32 delay; +} xAnimCursorElt; + +#define sz_xAnimCursorElt 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Cursor cid; +} xRenderCreateAnimCursorReq; + +#define sz_xRenderCreateAnimCursorReq 8 + +/* 0.9 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture picture; + INT16 xOff; + INT16 yOff; +} xRenderAddTrapsReq; + +#define sz_xRenderAddTrapsReq 12 + +/* 0.10 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture pid; + xRenderColor color; +} xRenderCreateSolidFillReq; + +#define sz_xRenderCreateSolidFillReq 16 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture pid; + xPointFixed p1; + xPointFixed p2; + CARD32 nStops; +} xRenderCreateLinearGradientReq; + +#define sz_xRenderCreateLinearGradientReq 28 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture pid; + xPointFixed inner; + xPointFixed outer; + Fixed inner_radius; + Fixed outer_radius; + CARD32 nStops; +} xRenderCreateRadialGradientReq; + +#define sz_xRenderCreateRadialGradientReq 36 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length; + Picture pid; + xPointFixed center; + Fixed angle; /* in degrees */ + CARD32 nStops; +} xRenderCreateConicalGradientReq; + +#define sz_xRenderCreateConicalGradientReq 24 + +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#undef Picture +#undef PictFormat +#undef Fixed +#undef Glyphset + +#endif /* _XRENDERP_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/shape.h b/thirdparty/linuxbsd_headers/X11/extensions/shape.h new file mode 100644 index 0000000000..66af5b1b44 --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/shape.h @@ -0,0 +1,152 @@ +/************************************************************ + +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 _SHAPE_H_ +#define _SHAPE_H_ + +#include <X11/Xfuncproto.h> +#include <X11/extensions/shapeconst.h> + +#ifndef _SHAPE_SERVER_ +#include <X11/Xutil.h> + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came frome a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window of event */ + int kind; /* ShapeBounding or ShapeClip */ + int x, y; /* extents of new region */ + unsigned width, height; + Time time; /* server timestamp when region changed */ + Bool shaped; /* true if the region exists */ +} XShapeEvent; + +_XFUNCPROTOBEGIN + +extern Bool XShapeQueryExtension ( + Display* /* display */, + int* /* event_base */, + int* /* error_base */ +); + +extern Status XShapeQueryVersion ( + Display* /* display */, + int* /* major_version */, + int* /* minor_version */ +); + +extern void XShapeCombineRegion ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + Region /* region */, + int /* op */ +); + +extern void XShapeCombineRectangles ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + XRectangle* /* rectangles */, + int /* n_rects */, + int /* op */, + int /* ordering */ +); + +extern void XShapeCombineMask ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + Pixmap /* src */, + int /* op */ +); + +extern void XShapeCombineShape ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + Window /* src */, + int /* src_kind */, + int /* op */ +); + +extern void XShapeOffsetShape ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */ +); + +extern Status XShapeQueryExtents ( + Display* /* display */, + Window /* window */, + Bool* /* bounding_shaped */, + int* /* x_bounding */, + int* /* y_bounding */, + unsigned int* /* w_bounding */, + unsigned int* /* h_bounding */, + Bool* /* clip_shaped */, + int* /* x_clip */, + int* /* y_clip */, + unsigned int* /* w_clip */, + unsigned int* /* h_clip */ +); + +extern void XShapeSelectInput ( + Display* /* display */, + Window /* window */, + unsigned long /* mask */ +); + +extern unsigned long XShapeInputSelected ( + Display* /* display */, + Window /* window */ +); + +extern XRectangle *XShapeGetRectangles ( + Display* /* display */, + Window /* window */, + int /* kind */, + int* /* count */, + int* /* ordering */ +); + +_XFUNCPROTOEND + +#endif /* !_SHAPE_SERVER_ */ + +#endif /* _SHAPE_H_ */ diff --git a/thirdparty/linuxbsd_headers/X11/extensions/shapeconst.h b/thirdparty/linuxbsd_headers/X11/extensions/shapeconst.h new file mode 100644 index 0000000000..9088956f1b --- /dev/null +++ b/thirdparty/linuxbsd_headers/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/thirdparty/linuxbsd_headers/X11/extensions/xfixeswire.h b/thirdparty/linuxbsd_headers/X11/extensions/xfixeswire.h new file mode 100644 index 0000000000..f6953e5c6d --- /dev/null +++ b/thirdparty/linuxbsd_headers/X11/extensions/xfixeswire.h @@ -0,0 +1,149 @@ +/* + * 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 6 +#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 +/*************** Version 6 ******************/ +#define X_XFixesSetClientDisconnectMode 33 +#define X_XFixesGetClientDisconnectMode 34 + +#define XFixesNumberRequests (X_XFixesGetClientDisconnectMode+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) + +/*************** Version 6 ******************/ + +/* The default server behaviour */ +#define XFixesClientDisconnectFlagDefault 0 +/* The server may disconnect this client to shut down */ +#define XFixesClientDisconnectFlagTerminate (1L << 0) + +#endif /* _XFIXESWIRE_H_ */ |