From 6f18b7cc609e521511ede61f3ce47003c751104f Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 3 May 2016 00:29:35 +0000 Subject: [PATCH] + added boolean overloads for the TBool parametered functions in the xinput unit as well git-svn-id: trunk@33628 - --- packages/x11/src/xinput.pp | 112 +++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/packages/x11/src/xinput.pp b/packages/x11/src/xinput.pp index d7bcf5f49d..463177d73d 100644 --- a/packages/x11/src/xinput.pp +++ b/packages/x11/src/xinput.pp @@ -863,6 +863,19 @@ function XGrabDevice( time: TTime ): cint; cdecl; external libXi; +{ boolean overload for the TBool parameter } +function XGrabDevice( + display: PDisplay; + device: PXDevice; + grab_window: TWindow; + ownerEvents: Boolean; + event_count: cint; + event_list: PXEventClass; + this_device_mode: cint; + other_devices_mode: cint; + time: TTime +): cint; inline; + function XUngrabDevice( display: PDisplay; device: PXDevice; @@ -883,6 +896,21 @@ function XGrabDeviceKey( other_devices_mode: cint ): cint; cdecl; external libXi; +{ boolean overload for the TBool parameter } +function XGrabDeviceKey( + display: PDisplay; + device: PXDevice; + key: cuint; + modifiers: cuint; + modifier_device: PXDevice; + grab_window: TWindow; + owner_events: Boolean; + event_count: cuint; + event_list: PXEventClass; + this_device_mode: cint; + other_devices_mode: cint +): cint; inline; + function XUngrabDeviceKey( display: PDisplay; device: PXDevice; @@ -906,6 +934,21 @@ function XGrabDeviceButton( other_devices_mode: cint ): cint; cdecl; external libXi; +{ boolean overload for the TBool parameter } +function XGrabDeviceButton( + display: PDisplay; + device: PXDevice; + button: cuint; + modifiers: cuint; + modifier_device: PXDevice; + grab_window: TWindow; + owner_events: Boolean; + event_count: cuint; + event_list: PXEventClass; + this_device_mode: cint; + other_devices_mode: cint +): cint; inline; + function XUngrabDeviceButton( display: PDisplay; device: PXDevice; @@ -1109,6 +1152,17 @@ function XSendExtensionEvent( event: PXEvent ): TStatus; cdecl; external libXi; +{ boolean overload for the TBool parameter } +function XSendExtensionEvent( + display: PDisplay; + device: PXDevice; + dest: TWindow; + prop: Boolean; + count: cint; + list: PXEventClass; + event: PXEvent +): TStatus; inline; + function XGetDeviceMotionEvents( display: PDisplay; device: PXDevice; @@ -1165,6 +1219,22 @@ function XGetDeviceProperty( prop: PPcuchar ): TStatus; cdecl; external libXi; +{ boolean overload for the TBool parameter } +function XGetDeviceProperty( + dpy: PDisplay; + dev: PXDevice; + _property: TAtom; + offset: clong; + length: clong; + delete: Boolean; + req_type: TAtom; + actual_type: PAtom; + actual_format: Pcint; + nitems: Pculong; + bytes_after: Pculong; + prop: PPcuchar +): TStatus; inline; + //_XFUNCPROTOEND implementation @@ -1335,5 +1405,47 @@ begin event_class := (d^.device_id shl 8) or _noExtensionEvent; end; +function XGrabDevice(display: PDisplay; device: PXDevice; grab_window: TWindow; + ownerEvents: Boolean; event_count: cint; event_list: PXEventClass; + this_device_mode: cint; other_devices_mode: cint; time: TTime): cint; inline; +begin + XGrabDevice := XGrabDevice(display, device, grab_window, Ord(ownerEvents), event_count, event_list, this_device_mode, + other_devices_mode, time); +end; + +function XGrabDeviceKey(display: PDisplay; device: PXDevice; key: cuint; + modifiers: cuint; modifier_device: PXDevice; grab_window: TWindow; + owner_events: Boolean; event_count: cuint; event_list: PXEventClass; + this_device_mode: cint; other_devices_mode: cint): cint; inline; +begin + XGrabDeviceKey := XGrabDeviceKey(display, device, key, modifiers, modifier_device, grab_window, + Ord(owner_events), event_count, event_list, this_device_mode, other_devices_mode); +end; + +function XGrabDeviceButton(display: PDisplay; device: PXDevice; button: cuint; + modifiers: cuint; modifier_device: PXDevice; grab_window: TWindow; + owner_events: Boolean; event_count: cuint; event_list: PXEventClass; + this_device_mode: cint; other_devices_mode: cint): cint; inline; +begin + XGrabDeviceButton := XGrabDeviceButton(display, device, button, modifiers, modifier_device, grab_window, Ord(owner_events), + event_count, event_list, this_device_mode, other_devices_mode); +end; + +function XSendExtensionEvent(display: PDisplay; device: PXDevice; + dest: TWindow; prop: Boolean; count: cint; list: PXEventClass; event: PXEvent + ): TStatus; inline; +begin + XSendExtensionEvent := XSendExtensionEvent(display, device, dest, Ord(prop), count, list, event); +end; + +function XGetDeviceProperty(dpy: PDisplay; dev: PXDevice; _property: TAtom; + offset: clong; length: clong; delete: Boolean; req_type: TAtom; + actual_type: PAtom; actual_format: Pcint; nitems: Pculong; + bytes_after: Pculong; prop: PPcuchar): TStatus; inline; +begin + XGetDeviceProperty := XGetDeviceProperty(dpy, dev, _property, offset, length, Ord(delete), req_type, actual_type, + actual_format, nitems, bytes_after, prop); +end; + end.