HPlogo HP Xlib Extensions: > Chapter 6 HP Input Device Extension Functions

Grabbing Extended Input Devices

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

To actively grab an extended input device, use XHPGrabDevice.

int XHPGrabDevice(display, deviceid, grab_window, owner_events,
pointer_mode, device_mode, time)
Display *display;
XID deviceid;
Window grab_window;
Bool owner_events;
int pointer_mode;
int device_mode;
Time time;

Title not available (Grabbing Extended Input Devices )

display

Specifies the connection to the X server.

device_id

Specifies the ID of the device to grab.

grab_window

Specifies the window ID of the window associated with the extended input device being grabbed.

owner_events

Specifies a boolean value of True or False.

pointer_mode

Specifies the pointer mode. Only the constant GrabModeAsync is currently supported.

device_mode

Specifies the device mode. Only the constant GrabModeAsync is currently supported.

time

Specifies the time. You can pass either a timestamp, expressed in milliseconds, or CurrentTime.

The XHPGrabDevice function actively grabs control of the device and generates HPDeviceFocusIn and HPDeviceFocusOut events. Further device events are reported only to the grabbing client. This function overrides any active input device grab by this client. If owner_events is False, all generated key events are reported with respect to grab_window. If owner_events is True, then if a generated device event would normally be reported to this client, it is reported normally; otherwise the event is reported with respect to the grab_window. Regardless of any event selection by the client, both HPDeviceKeyPress and HPDeviceKeyRelease events are always reported.

XHPGrabDevice cannot be used to grab the X pointer device or the X keyboard device. The standard XGrabKeyboard and XGrabPointer functions should be used for that purpose.

XHPGrabDevice can generate BadValue and BadWindow errors.

© 1995 Hewlett-Packard Development Company, L.P.