2
* Copyright © 2009 Red Hat, Inc.
4
* Permission is hereby granted, free of charge, to any person obtaining a
5
* copy of this software and associated documentation files (the "Software"),
6
* to deal in the Software without restriction, including without limitation
7
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
* and/or sell copies of the Software, and to permit persons to whom the
9
* Software is furnished to do so, subject to the following conditions:
11
* The above copyright notice and this permission notice (including the next
12
* paragraph) shall be included in all copies or substantial portions of the
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
* DEALINGS IN THE SOFTWARE.
25
/* Definitions used by the library and client */
31
#include <X11/extensions/XI2.h>
32
#include <X11/extensions/Xge.h>
34
/*******************************************************************
47
int return_mode; /* AttachToMaster, Floating */
64
int type; /* must be first element */
66
XIRemoveMasterInfo remove;
67
XIAttachSlaveInfo attach;
68
XIDetachSlaveInfo detach;
69
} XIAnyHierarchyChangeInfo;
79
typedef XIModifierState XIGroupState;
134
} XIValuatorClassInfo;
144
XIAnyClassInfo **classes;
154
* Generic XI2 event. All XI2 events have the same header.
157
int type; /* GenericEvent */
158
unsigned long serial; /* # of last request processed by server */
159
Bool send_event; /* true if this came from a SendEvent request */
160
Display *display; /* Display the event was read from */
161
int extension; /* XI extension offset */
176
* Notifies the client that the device hierarchy has been changed. The client
177
* is expected to re-query the server for the device hierarchy.
180
int type; /* GenericEvent */
181
unsigned long serial; /* # of last request processed by server */
182
Bool send_event; /* true if this came from a SendEvent request */
183
Display *display; /* Display the event was read from */
184
int extension; /* XI extension offset */
185
int evtype; /* XI_HierarchyChanged */
189
XIHierarchyInfo *info;
193
* Notifies the client that the classes have been changed. This happens when
194
* the slave device that sends through the master changes.
197
int type; /* GenericEvent */
198
unsigned long serial; /* # of last request processed by server */
199
Bool send_event; /* true if this came from a SendEvent request */
200
Display *display; /* Display the event was read from */
201
int extension; /* XI extension offset */
202
int evtype; /* XI_DeviceChanged */
204
int deviceid; /* id of the device that changed */
205
int sourceid; /* Source for the new classes. */
206
int reason; /* Reason for the change */
208
XIAnyClassInfo **classes; /* same as in XIDeviceInfo */
209
} XIDeviceChangedEvent;
212
int type; /* GenericEvent */
213
unsigned long serial; /* # of last request processed by server */
214
Bool send_event; /* true if this came from a SendEvent request */
215
Display *display; /* Display the event was read from */
216
int extension; /* XI extension offset */
230
XIButtonState buttons;
231
XIValuatorState valuators;
232
XIModifierState mods;
237
int type; /* GenericEvent */
238
unsigned long serial; /* # of last request processed by server */
239
Bool send_event; /* true if this came from a SendEvent request */
240
Display *display; /* Display the event was read from */
241
int extension; /* XI extension offset */
242
int evtype; /* XI_RawKeyPress, XI_RawKeyRelease, etc. */
248
XIValuatorState valuators;
253
int type; /* GenericEvent */
254
unsigned long serial; /* # of last request processed by server */
255
Bool send_event; /* true if this came from a SendEvent request */
256
Display *display; /* Display the event was read from */
257
int extension; /* XI extension offset */
273
XIButtonState buttons;
274
XIModifierState mods;
278
typedef XIEnterEvent XILeaveEvent;
279
typedef XIEnterEvent XIFocusInEvent;
280
typedef XIEnterEvent XIFocusOutEvent;
283
int type; /* GenericEvent */
284
unsigned long serial; /* # of last request processed by server */
285
Bool send_event; /* true if this came from a SendEvent request */
286
Display *display; /* Display the event was read from */
287
int extension; /* XI extension offset */
288
int evtype; /* XI_PropertyEvent */
290
int deviceid; /* id of the device that changed */
297
extern Bool XIQueryPointer(
307
XIButtonState *buttons,
308
XIModifierState *mods,
312
extern Bool XIWarpPointer(
319
unsigned int src_width,
320
unsigned int src_height,
325
extern Status XIDefineCursor(
332
extern Status XIUndefineCursor(
338
extern Status XIChangeHierarchy(
340
XIAnyHierarchyChangeInfo* changes,
344
extern Status XISetClientPointer(
350
extern Bool XIGetClientPointer(
356
extern int XISelectEvents(
363
extern XIEventMask *XIGetSelectedEvents(
366
int *num_masks_return
369
extern Status XIQueryVersion(
371
int* major_version_inout,
372
int* minor_version_inout
375
extern XIDeviceInfo* XIQueryDevice(
381
extern Status XISetFocus(
388
extern Status XIGetFocus(
391
Window *focus_return);
393
extern Status XIGrabDevice(
400
int paired_device_mode,
405
extern Status XIUngrabDevice(
411
extern Status XIAllowEvents(
418
extern int XIGrabButton(
425
int paired_device_mode,
429
XIGrabModifiers *modifiers_inout
432
extern int XIGrabKeycode(
438
int paired_device_mode,
442
XIGrabModifiers *modifiers_inout
445
extern int XIGrabEnter(
451
int paired_device_mode,
455
XIGrabModifiers *modifiers_inout
458
extern int XIGrabFocusIn(
463
int paired_device_mode,
467
XIGrabModifiers *modifiers_inout
469
extern Status XIUngrabButton(
475
XIGrabModifiers *modifiers
478
extern Status XIUngrabKeycode(
484
XIGrabModifiers *modifiers
487
extern Status XIUngrabEnter(
492
XIGrabModifiers *modifiers
495
extern Status XIUngrabFocusIn(
500
XIGrabModifiers *modifiers
504
extern Atom *XIListProperties(
507
int *num_props_return
510
extern void XIChangeProperty(
535
Bool delete_property,
539
unsigned long *num_items_return,
540
unsigned long *bytes_after_return,
544
extern void XIFreeDeviceInfo(XIDeviceInfo *info);
548
#endif /* XINPUT2_H */