* updated X11's XI unit with the latest XI.h changes and converted it to use ctypes

git-svn-id: trunk@33601 -
This commit is contained in:
nickysn 2016-05-01 16:09:10 +00:00
parent 1e53d7ad76
commit 15313016c0

View File

@ -63,6 +63,9 @@ Histroy:
unit xi;
interface
uses
ctypes;
const
sz_xGetExtensionVersionReq = 8;
sz_xGetExtensionVersionReply = 32;
@ -121,6 +124,12 @@ const
sz_xGetDeviceControlReply = 32;
sz_xChangeDeviceControlReq = 8;
sz_xChangeDeviceControlReply = 32;
sz_xListDevicePropertiesReq = 8;
sz_xListDevicePropertiesReply = 32;
sz_xChangeDevicePropertyReq = 20;
sz_xDeleteDevicePropertyReq = 12;
sz_xGetDevicePropertyReq = 24;
sz_xGetDevicePropertyReply = 32;
const
INAME = 'XInputExtension';
@ -144,6 +153,7 @@ const
XI_EYETRACKER = 'EYETRACKER';
XI_CURSORKEYS = 'CURSORKEYS';
XI_FOOTMOUSE = 'FOOTMOUSE';
XI_JOYSTICK = 'JOYSTICK';
const
Dont_Check = 0;
@ -151,6 +161,8 @@ const
XInput_Add_XDeviceBell = 2;
XInput_Add_XSetDeviceValuators = 3;
XInput_Add_XChangeDeviceControl = 4;
XInput_Add_DevicePresenceNotify = 5;
XInput_Add_DeviceProperties = 6;
const
XI_Absent = 0;
@ -172,8 +184,20 @@ const
XI_Add_XChangeDeviceControl_Major = 1;
XI_Add_XChangeDeviceControl_Minor = 3;
const
XI_Add_DevicePresenceNotify_Major = 1;
XI_Add_DevicePresenceNotify_Minor = 4;
const
XI_Add_DeviceProperties_Major = 1;
XI_Add_DeviceProperties_Minor = 5;
const
DEVICE_RESOLUTION = 1;
DEVICE_ABS_CALIB = 2;
DEVICE_CORE = 3;
DEVICE_ENABLE = 4;
DEVICE_ABS_AREA = 5;
const
NoSuchExtension = 1;
@ -197,6 +221,8 @@ const
IsXPointer = 0;
IsXKeyboard = 1;
IsXExtensionDevice = 2;
IsXExtensionKeyboard = 3;
IsXExtensionPointer = 4;
const
AsyncThisDevice = 0;
@ -265,6 +291,7 @@ const
ProximityClass = 4;
FocusClass = 5;
OtherClass = 6;
AttachClass = 7;
const
KbdFeedbackClass = 0;
@ -289,6 +316,18 @@ const
const
_devicePresence = 0;
const
_deviceEnter = 0;
_deviceLeave = 1;
const
DeviceAdded = 0;
DeviceRemoved = 1;
DeviceEnabled = 2;
DeviceDisabled = 3;
DeviceUnrecoverable = 4;
DeviceControlChanged = 5;
const
XI_BadDevice = 0;
XI_BadEvent = 1;
@ -316,9 +355,9 @@ type
type
PXExtensionVersion = ^TXExtensionVersion;
TXExtensionVersion = record
present : Smallint;
major_version : Smallint;
minor_version : Smallint;
present : cint;
major_version : cshort;
minor_version : cshort;
end;
implementation