NAME
XkbAllocDeviceInfo - Obtain an XkbDeviceInfoRec structure SYNOPSIS XkbDeviceInfoPtr XkbAllocDeviceInfo (unsigned int devicespec, unsigned int nbuttons, unsigned int szleds); ARGUMENTS
- devicespec device ID with which structure will be used
- nbuttons number of button actions to allocate space for
- szleds number of LED feedbacks to allocate space for DESCRIPTION XkbAllocDeviceInfo allocates space for an XkbDeviceInfoRec structure and initializes that structure's devicespec field with the device ID specified by devicespec. If nbuttons is nonzero, nbuttons XkbAc‐ tions are linked into the XkbDeviceInfoRec structure and initialized to zero. If szleds is nonzero, szleds XkbDeviceLedInfoRec structures are also allocated and linked into the XkbDeviceInfoRec structure. If you request XkbDeviceLedInfoRec structures be allocated using this request, you must initialize them explicitly. To obtain an XkbDeviceLedInfoRec structure, use XkbAllocDeviceLedInfo. STRUCTURES Information about X Input Extension devices is transferred between a client program and the Xkb extension in an XkbDeviceInfoRec structure: typedef struct { char * name; /∗ name for device */ Atom type; /∗ name for class of devices */ unsigned short devicespec; /∗ device of interest */ Bool hasownstate; /∗ True=>this device has its own state */ unsigned short supported; /∗ bits indicating supported capabilities */ unsigned short unsupported; /∗ bits indicating unsupported capabilities */ unsigned short numbtns; /∗ number of entries in btnacts */ XkbAction * btnacts; /∗ button actions */ unsigned short szleds; /∗ total number of entries in LEDs vector */ unsigned short numleds; /∗ number of valid entries in LEDs vector */ unsigned short dfltkbdfb; /∗ input extension ID of default (core kbd) indicator */ unsigned short dfltledfb; /∗ input extension ID of default indicator feedback */ XkbDeviceLedInfoPtr leds; /∗ LED descriptions */ } XkbDeviceInfoRec, *XkbDeviceInfoPtr; typedef struct { unsigned short ledclass; /∗ class for this LED device*/ unsigned short ledid; /∗ ID for this LED device */ unsigned int physindicators; /∗ bits for which LEDs physically present */ unsigned int mapspresent; /∗ bits for which LEDs have maps in maps */ unsigned int namespresent; /∗ bits for which LEDs are in names */ unsigned int state; /∗ 1 bit => corresponding LED is on */ Atom names[XkbNumIndicators]; /∗ names for LEDs */ XkbIndicatorMapRec maps; /∗ indicator maps for each LED */ } XkbDeviceLedInfoRec, *XkbDeviceLedInfoPtr; SEE ALSO XkbAllocDeviceLedInfo(3) X Version 11 libX11 1.6.5 XkbAllocDeviceInfo(3)