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

Grabbing Extended Input Device Buttons

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

To passively grab a particular button on an extended input device, use XHPGrabDeviceButton.

XHPGrabDeviceButton(display, deviceid, button, modifiers,
grab_window, owner_events, event_mask, pointer_mode,
device_mode)
Display *display;
XID deviceid;
unsigned int button;
unsigned int modifiers;
Window grab_window;
Bool owner_events;
unsigned int event_mask;
int pointer_mode, device_mode;

Title not available (Grabbing Extended Input Device Buttons )

display

Specifies the connection to the X server.

deviceid

Specifies the ID of the desired device.

button

Specifies the code of the button to be grabbed. You can pass either the button or AnyButton.

modifiers

Specifies the set of keymasks. This mask is the bitwise inclusive OR of these keymask bits: ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, and Mod5Mask. You can also pass AnyModifier, which is equivalent to issuing the grab request for all possible modifier combinations (including the combination of no modifiers).

grab_window

Specifies the ID of a window associated with the device specified above.

owner_events

Specifies a boolean value of either True or False.

event_mask

Specifies which device events are to be reported to the client. They can be the bitwise inclusive OR of these device mask bits: HPDeviceButtonPressMask, HPDeviceButtonReleaseMask, HPDevicePointerMotionMask, and HPDeviceKeymapStateMask.

pointer_mode

Only the constant GrabModeAsync is currently supported.

device_mode

Only the constant GrabModeAsync is currently supported.

XHPGrabDeviceButton is provided to support the use of input devices other than the X keyboard and the X pointer device. It allows a client to establish passive grab on a button on an extended input device. That device must have previously been opened (turned on) using XHPSetInputDevice.

XHPGrabDeviceButton produces a BadAccess error if some other client has issued a XHPGrabDeviceButton with the same device and button combination on the same window. When using AnyModifier or AnyButton, if there is a conflicting grab for any combination, the request fails completely and the X server generates a BadAccess error and no grabs are established.

This function cannot be used to grab a button on the X pointer device. The core XGrabButton function should be used for that purpose.

XHPGrabDeviceButton can generate BadDevice, BadAccess, BadWindow, and BadValue errors.

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