XCloseDevice man page on BSDi

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDi logo
[printable version]



XOpenDevice(3X11)	  X FUNCTIONS		XOpenDevice(3X11)

NAME
       XOpenDevice,  XCloseDevice  -  open  or close an extension
       input device

SYNTAX
       XDevice *XOpenDevice(display, device_id)
	     Display *display;
	     XID device_id;

       XCloseDevice(display, device)
	     Display *display;
	     XDevice *device;

ARGUMENTS
       display	Specifies the connection to the X server.

       device_id   Specifies the id of the device to be opened

       device	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 inaccessi-
       ble 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  requesting  client  is  the
       last  client  accessing the device, the server may disable
       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 XInputClass-
       Info structures. 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

X Version 11		Release 6.4				1

XOpenDevice(3X11)	  X FUNCTIONS		XOpenDevice(3X11)

       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 sup-
       ported by the device.   Defined	types  include	KeyClass,
       ButtonClass, ValuatorClass, ProximityClass, FeedbackClass,
       FocusClass, and OtherClass.  The event_type_base	 identi-
       fies 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 XSelectExtensionEvent requests.	Currently
       defined macros include  DeviceKeyPress,	DeviceKeyRelease,
       DeviceButtonPress, DeviceButtonRelese, DeviceMotionNotify,
       DeviceFocusIn, DeviceFocusOut, ProximityIn,  ProximityOut,
       DeviceStateNotify,  DeviceMappiingNotify,  ChangeDeviceNo-
       tify,	DevicePointerMotionHint,     DeviceButton1Motion,
       DeviceButton2Motion,    DeviceButton3Motion,    DeviceBut-
       ton4Motion,    DeviceButton5Motion,    DeviceButtonMotion,
       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 DeviceKeyPress events from the specified device.

       This  eventclass can then be used in an XSelectExtension-
       Event 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 compari-
       son with the type in the event.

DIAGNOSTICS
       BadDevice   An  invalid	device was specified.  The speci-
		   fied device does not exist, or is the  X  key-
		   board 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
		   XChangePointerDevice requests.

SEE ALSO
       Programming with Xlib

X Version 11		Release 6.4				2

[top]

List of man pages available for BSDi

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net