2 * XIint.h - Header definition and support file for the internal
3 * support routines used by the Xi library.
8 #include <X11/extensions/XI.h>
10 /* inputproto 2.0 still shipped with these defined in the proto headers */
11 #ifndef XInput_Initial_Release
12 /* Indices into the versions[] array (XExtInt.c). Used as a index to
13 * retrieve the minimum version of XI from _XiCheckExtInit */
15 #define XInput_Initial_Release 1
16 #define XInput_Add_XDeviceBell 2
17 #define XInput_Add_XSetDeviceValuators 3
18 #define XInput_Add_XChangeDeviceControl 4
19 #define XInput_Add_DevicePresenceNotify 5
20 #define XInput_Add_DeviceProperties 6
26 extern XExtDisplayInfo *XInput_find_display(Display *);
28 extern int _XiCheckExtInit(Display *, int, XExtDisplayInfo *);
29 extern int _XiCheckVersion(XExtDisplayInfo *info, int version_index);
31 extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *, XExtDisplayInfo *);
32 extern XExtensionVersion* _XiGetExtensionVersionRequest(Display *dpy, _Xconst char *name, int xi_opcode);
33 extern Status _xiQueryVersion(Display *dpy, int*, int*, XExtDisplayInfo *);
35 extern Status _XiEventToWire(
36 register Display * /* dpy */,
37 register XEvent * /* re */,
38 register xEvent ** /* event */,
39 register int * /* count */
42 typedef struct _XInputData
45 XExtensionVersion *vers;
50 * Returns the next valid memory block of the given size within the block
51 * previously allocated.
52 * Use letting pointers inside a struct point to bytes after the same
53 * struct, e.g. during protocol parsing etc.
55 * Caller is responsible for allocating enough memory.
66 * ptr = malloc(large_enough);
67 * bar = next_block(&ptr, sizeof(struct foo));
70 * bar->a = next_block(&ptr, bar->num_a);
71 * bar->b = next_block(&ptr, bar->num_b);
74 next_block(void **ptr, int size) {
80 *(unsigned char**)ptr += size;