#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>
XIAddMasterInfo;
XIRemoveMasterInfo;
XIAttachSlaveInfo;
XIDetachSlaveInfo;
XIAnyHierarchyChangeInfo;
XIModifierState;
XIGroupState;
XIButtonState;
XIValuatorState;
XIEventMask;
XIAnyClassInfo;
XIButtonClassInfo;
XIKeyClassInfo;
XIValuatorClassInfo;
XIScrollClassInfo;
XITouchClassInfo;
XIDeviceInfo;
XIGrabModifiers;
BarrierEventID;
XIBarrierReleasePointerInfo;
XIEvent;
XIHierarchyInfo;
XIHierarchyEvent;
XIDeviceChangedEvent;
XIDeviceEvent;
XIRawEvent;
XIEnterEvent;
XILeaveEvent;
XIFocusInEvent;
XIFocusOutEvent;
XIPropertyEvent;
XITouchOwnershipEvent;
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