1XkbAddDeviceLedInfo(3) XKB FUNCTIONS XkbAddDeviceLedInfo(3)
2
3
4
6 XkbAddDeviceLedInfo - Initialize an XkbDeviceLedInfoRec structure
7
9 XkbDeviceLedInfoPtr XkbAddDeviceLedInfo (XkbDeviceInfoPtr device_info,
10 unsigned int led_class, unsigned int led_id);
11
13 - device_info
14 structure in which to add LED info
15
16 - led_class
17 input extension class for LED device of interest
18
19 - led_id
20 input extension ID for LED device of interest
21
23 XkbAddDeviceLedInfo first checks to see whether an entry matching
24 led_class and led_id already exists in the device_info->leds array. If
25 it finds a matching entry, it returns a pointer to that entry. Other‐
26 wise, it checks to be sure there is at least one empty entry in de‐
27 vice_info->leds and extends it if there is not enough room. It then in‐
28 crements device_info->num_leds and fills in the next available entry in
29 device_info->leds with led_class and led_id.
30
31 If successful, XkbAddDeviceLedInfo returns a pointer to the XkbDe‐
32 viceLedInfoRec structure that was initialized. If unable to allocate
33 sufficient storage, or if device_info points to an invalid XkbDeviceIn‐
34 foRec structure, or if led_class or led_id are inappropriate, XkbAddDe‐
35 viceLedInfo returns NULL.
36
37 To allocate additional space for button actions in an XkbDeviceInfoRec
38 structure, use XkbResizeDeviceButtonActions.
39
40
42 Information about X Input Extension devices is transferred between a
43 client program and the Xkb extension in an XkbDeviceInfoRec structure:
44
45 typedef struct {
46 char * name; /* name for device */
47 Atom type; /* name for class of devices */
48 unsigned short device_spec; /* device of interest */
49 Bool has_own_state; /* True=>this device has its own state */
50 unsigned short supported; /* bits indicating supported capabilities */
51 unsigned short unsupported; /* bits indicating unsupported capabilities */
52 unsigned short num_btns; /* number of entries in btn_acts */
53 XkbAction * btn_acts; /* button actions */
54 unsigned short sz_leds; /* total number of entries in LEDs vector */
55 unsigned short num_leds; /* number of valid entries in LEDs vector */
56 unsigned short dflt_kbd_fb; /* input extension ID of default (core kbd) indicator */
57 unsigned short dflt_led_fb; /* input extension ID of default indicator feedback */
58 XkbDeviceLedInfoPtr leds; /* LED descriptions */
59 } XkbDeviceInfoRec, *XkbDeviceInfoPtr;
60
61
62 typedef struct {
63 unsigned short led_class; /* class for this LED device*/
64 unsigned short led_id; /* ID for this LED device */
65 unsigned int phys_indicators; /* bits for which LEDs physically present */
66 unsigned int maps_present; /* bits for which LEDs have maps in maps */
67 unsigned int names_present; /* bits for which LEDs are in names */
68 unsigned int state; /* 1 bit => corresponding LED is on */
69 Atom names[XkbNumIndicators]; /* names for LEDs */
70 XkbIndicatorMapRec maps; /* indicator maps for each LED */
71 } XkbDeviceLedInfoRec, *XkbDeviceLedInfoPtr;
72
73
75 XkbResizeDeviceButtonActions(3)
76
77
78
79X Version 11 libX11 1.7.3.1 XkbAddDeviceLedInfo(3)