diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-25 15:32:53 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-03 16:09:38 +1000 |
commit | 60b2d114d06617ca60c2905373829299dc051c7f (patch) | |
tree | 26528ebb8a59e74556755d99dd0d80d57bad7168 /include/X11 | |
parent | c0e3fef8cc7f1953377f61b80d9b8a5ce2fcf2b7 (diff) |
Move current XI2 stuff out of XInput.h, into XInput2.h
This means XInput2.h is rather messy, but it also means we can leave XInput.h
untouched for the XI2 rework.
Diffstat (limited to 'include/X11')
-rw-r--r-- | include/X11/extensions/XInput.h | 130 | ||||
-rw-r--r-- | include/X11/extensions/XInput2.h | 177 |
2 files changed, 177 insertions, 130 deletions
diff --git a/include/X11/extensions/XInput.h b/include/X11/extensions/XInput.h index 8c00122..561465c 100644 --- a/include/X11/extensions/XInput.h +++ b/include/X11/extensions/XInput.h @@ -51,7 +51,6 @@ SOFTWARE. #include <X11/Xlib.h> #include <X11/extensions/XI.h> -#include <X11/extensions/Xge.h> #define _deviceKeyPress 0 #define _deviceKeyRelease 1 @@ -481,39 +480,6 @@ typedef struct { int state; /* PropertyNewValue or PropertyDeleted */ } XDevicePropertyNotifyEvent; -/* - * 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_DeviceHierarchyChangedNotify */ - Time time; -} XDeviceHierarchyChangedEvent; - -/* - * 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_DeviceHierarchyChangedNotify */ - Time time; - XID deviceid; /* id of the device that changed */ - XID slaveid; /* id of the slave device that caused the - change */ - int num_classes; - XAnyClassPtr inputclassinfo; /* same as in XDeviceInfo */ -} XDeviceClassesChangedEvent; - /******************************************************************* * @@ -964,38 +930,6 @@ typedef struct { } XButtonState; -/******************************************************************* - * - */ -typedef struct { - int type; - char* name; - Bool sendCore; - Bool enable; -} XCreateMasterInfo; - -typedef struct { - int type; - XDevice* device; - int returnMode; /* AttachToMaster, Floating */ - XDevice* returnPointer; - XDevice* returnKeyboard; -} XRemoveMasterInfo; - -typedef struct { - int type; - XDevice* device; - int changeMode; /* AttachToMaster, Floating */ - XDevice* newMaster; -} XChangeAttachmentInfo; - -typedef union { - int type; /* must be first element */ - XCreateMasterInfo create; - XRemoveMasterInfo remove; - XChangeAttachmentInfo change; -} XAnyHierarchyChangeInfo; - /******************************************************************* * @@ -1293,70 +1227,6 @@ extern void XFreeDeviceControl( XDeviceControl* /* control */ ); -extern Bool XQueryDevicePointer( - Display* /* display */, - XDevice* /* device */, - Window /* win */, - Window* /* root */, - Window* /* child */, - int* /* root_x */, - int* /* root_y */, - int* /* win_x */, - int* /* win_y */, - unsigned int* /* mask */ -); - -extern Bool XWarpDevicePointer( - Display* /* display */, - XDevice* /* device */, - Window /* src_win */, - Window /* dst_win */, - int /* src_x */, - int /* src_y */, - unsigned int /* src_width */, - unsigned int /* src_height */, - int /* dst_x */, - int /* dst_y */ -); - -extern Status XDefineDeviceCursor( - Display* /* display */, - XDevice* /* device */, - Window /* win */, - Cursor /* cursor */ -); - -extern Status XUndefineDeviceCursor( - Display* /* display */, - XDevice* /* device */, - Window /* win */ -); - -extern Status XChangeDeviceHierarchy( - Display* /* display */, - XAnyHierarchyChangeInfo* /* changes*/, - int /* num_changes */ -); - -extern Status XSetClientPointer( - Display* /* dpy */, - Window /* win */, - XDevice* /* device */ -); - -extern Bool XGetClientPointer( - Display* /* dpy */, - Window /* win */, - XID* /* deviceid */ -); - -extern Status XiSelectEvent( - Display* /* dpy */, - Window /* win */, - XDevice* /* dev */, - Mask /* mask */ -); - extern Atom* XListDeviceProperties( Display* /* dpy */, XDevice* /* dev */, diff --git a/include/X11/extensions/XInput2.h b/include/X11/extensions/XInput2.h new file mode 100644 index 0000000..70d40b3 --- /dev/null +++ b/include/X11/extensions/XInput2.h @@ -0,0 +1,177 @@ +/* + * 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> + +/******************************************************************* + * + */ +typedef struct { + int type; + char* name; + Bool sendCore; + Bool enable; +} XCreateMasterInfo; + +typedef struct { + int type; + XDevice* device; + int returnMode; /* AttachToMaster, Floating */ + XDevice* returnPointer; + XDevice* returnKeyboard; +} XRemoveMasterInfo; + +typedef struct { + int type; + XDevice* device; + int changeMode; /* AttachToMaster, Floating */ + XDevice* newMaster; +} XChangeAttachmentInfo; + +typedef union { + int type; /* must be first element */ + XCreateMasterInfo create; + XRemoveMasterInfo remove; + XChangeAttachmentInfo change; +} XAnyHierarchyChangeInfo; + +_XFUNCPROTOBEGIN + +extern Bool XQueryDevicePointer( + Display* /* display */, + XDevice* /* device */, + Window /* win */, + Window* /* root */, + Window* /* child */, + int* /* root_x */, + int* /* root_y */, + int* /* win_x */, + int* /* win_y */, + unsigned int* /* mask */ +); + +extern Bool XWarpDevicePointer( + Display* /* display */, + XDevice* /* device */, + Window /* src_win */, + Window /* dst_win */, + int /* src_x */, + int /* src_y */, + unsigned int /* src_width */, + unsigned int /* src_height */, + int /* dst_x */, + int /* dst_y */ +); + +extern Status XDefineDeviceCursor( + Display* /* display */, + XDevice* /* device */, + Window /* win */, + Cursor /* cursor */ +); + +extern Status XUndefineDeviceCursor( + Display* /* display */, + XDevice* /* device */, + Window /* win */ +); + +extern Status XChangeDeviceHierarchy( + Display* /* display */, + XAnyHierarchyChangeInfo* /* changes*/, + int /* num_changes */ +); + +extern Status XSetClientPointer( + Display* /* dpy */, + Window /* win */, + XDevice* /* device */ +); + +extern Bool XGetClientPointer( + Display* /* dpy */, + Window /* win */, + XID* /* deviceid */ +); + +typedef CARD16 XIEventType; + +typedef struct +{ + int deviceid; + int num_types; + XIEventType *types; +} XIDeviceEventMask; + +extern int +XISelectEvent( + Display* /* dpy */, + Window /* win */, + XIDeviceEventMask** /* masks*/, + int /* nmasks */ +); + +_XFUNCPROTOEND + +/* + * 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_DeviceHierarchyChangedNotify */ + Time time; +} XDeviceHierarchyChangedEvent; + +/* + * 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_DeviceHierarchyChangedNotify */ + Time time; + XID deviceid; /* id of the device that changed */ + XID slaveid; /* id of the slave device that caused the + change */ + int num_classes; + XIAnyClassInfo *inputclassinfo; /* same as in XDeviceInfo */ +} XDeviceClassesChangedEvent; + +#endif /* XINPUT2_H */ |