*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: XCloseDevice | Section: 3 | Source: Digital UNIX | File: XCloseDevice.3X11.gz
XOpenDevice(3X11) XOpenDevice(3X11) NAME XOpenDevice, XCloseDevice - open or close an extension input device SYNOPSIS XDevice *XOpenDevice(display, device_id) Display *display; XID device_id; XCloseDevice(display, device) Display *display; XDevice *device; ARGUMENTS Specifies the connection to the X server. Specifies the id of the de- vice to be opened Specifies the device to be closed DESCRIPTION The XOpenDevice request makes an input device accessible to a client through input extension protocol requests. If successful, it returns a pointer to an XDevice structure. The XCloseDevice request makes an input device inaccessible to a client through input extension protocol requests. Before terminating, and client that has opened input devices through the input extension should close them via CloseDevice. When a client makes an XCloseDevice request, any active grabs that the client has on the device are released. Any event selections that the client has are deleted, as well as any passive grabs. If the request- ing client is the last client accessing the device, the server may dis- able all access by X to the device. XOpenDevice and XCloseDevice can generate a BadDevice error. STRUCTURES The XDevice structure returned by XOpenDevice contains: typedef struct { XID device_id; int num_classes; XInputClassInfo *classes; } XDevice; The classes field is a pointer to an array of XInputClassInfo struc- tures. Each element of this array contains an event type base for a class of input supported by the specified device. The num_classes field indicates the number of elements in the classes array. The XInputClassInfo structure contains: typedef struct { unsigned char input_class; unsigned char event_type_base; } XInputClassInfo; The input_class field identifies one class of input supported by the device. Defined types include KeyClass, ButtonClass, ValuatorClass, ProximityClass, FeedbackClass, FocusClass, and OtherClass. The event_type_base identifies the event type of the first event in that class. The information contained in the XInputClassInfo structure is used by macros to obtain the event classes that clients use in making XSe- lectExtensionEvent requests. Currently defined macros include De- viceKeyPress, DeviceKeyRelease, DeviceButtonPress, DeviceButtonRelese, DeviceMotionNotify, DeviceFocusIn, DeviceFocusOut, ProximityIn, Proxim- ityOut, DeviceStateNotify, DeviceMappiingNotify, ChangeDeviceNotify, DevicePointerMotionHint, DeviceButton1Motion, DeviceButton2Motion, De- viceButton3Motion, DeviceButton4Motion, DeviceButton5Motion, DeviceBut- tonMotion, DeviceOwnerGrabButton, DeviceButtonPressGrab, and NoExten- sionEvent. To obtain the proper event class for a particular device, one of the above macros is invoked using the XDevice structure for that device. For example, DeviceKeyPress (*device, type, eventclass); returns the DeviceKeyPress event type and the eventclass for DeviceKey- Press events from the specified device. This eventclass can then be used in an XSelectExtensionEvent request to ask the server to send DeviceKeyPress events from this device. When a selected event is received via XNextEvent, the type can be used for comparison with the type in the event. DIAGNOSTICS An invalid device was specified. The specified device does not exist, or is the X keyboard or X pointer. This error may also occur if some other client has caused the specified device to become the X keyboard or X pointer device via the XChangeKeyboardDevice or XChangePointerDe- vice requests. SEE ALSO Programming with Xlib XOpenDevice(3X11)

Navigation Options