1XkbFreeDeviceInfo(3) XKB FUNCTIONS XkbFreeDeviceInfo(3)
2
3
4
6 XkbFreeDeviceInfo - Free an XkbDeviceInfoRec structure
7
9 void XkbFreeDeviceInfo (XkbDeviceInfoPtr device_info, unsigned int
10 which, Bool free_all);
11
13 device_info
14 pointer to XkbDeviceInfoRec in which to free items
15
16 which mask of components of device_info to free
17
18 free_all
19 True => free everything, including device_info
20
22 If free_all is True, the XkbFreeDeviceInfo frees all components of de‐
23 vice_info and the XkbDeviceInfoRec structure pointed to by device_info
24 itself. If free_all is False, the value of which determines which sub‐
25 components are freed. which is an inclusive OR of one or more of the
26 values from Table 1. If which contains XkbXI_ButtonActionsMask, all
27 button actions associated with device_info are freed, de‐
28 vice_info->btn_acts is set to NULL, and device_info->num_btns is set to
29 zero. If which contains all bits in XkbXI_IndicatorsMask, all XkbDe‐
30 viceLedInfoRec structures associated with device_info are freed, de‐
31 vice_info->leds is set to NULL, and device_info->sz_leds and de‐
32 vice_info->num_leds are set to zero. If which contains XkbXI_Indica‐
33 torMapsMask, all indicator maps associated with device_info are
34 cleared, but the number of LEDs and the leds structures themselves is
35 preserved. If which contains XkbXI_IndicatorNamesMask, all indicator
36 names associated with device_info are cleared, but the number of LEDs
37 and the leds structures themselves is preserved. If which contains Xk‐
38 bXI_IndicatorStateMask, the indicator state associated with the de‐
39 vice_info leds are set to zeros but the number of LEDs and the leds
40 structures themselves is preserved.
41 Table 1 XkbDeviceInfoRec Mask Bits
42 ____________________________________________________________________________________
43 Name XkbDeviceInfoRec Value Capability If Set
44 Fields Effected
45 ____________________________________________________________________________________
46 XkbXI_KeyboardsMask (1L <<0) Clients can use all
47 Xkb requests and events
48 with KeyClass devices
49 supported by the input
50 device extension.
51
52 XkbXI_ButtonActionsMask num_btns (1L <<1) Clients can assign key
53 btn_acts actions to buttons
54 non-KeyClass input
55 extension devices.
56
57 XkbXI_IndicatorNamesMask leds->names (1L <<2) Clients can assign
58 names to indicators on
59 non-KeyClass input
60 extension devices.
61
62 XkbXI_IndicatorMapsMask leds->maps (1L <<3) Clients can assign
63 indicator maps to
64 indicators on
65 non-KeyClass input
66 extension devices.
67
68 XkbXI_IndicatorStateMask leds->state (1L <<4) Clients can request
69 the status of indicators
70 on non-KeyClass input
71 extension devices.
72
73 XkbXI_IndicatorsMask sz_leds (0x1c) XkbXI_IndicatorNamesMask |
74 num_leds XkbXI_IndicatorMapsMask |
75 leds->* XkbXI_IndicatorStateMask
76
77 XkbXI_UnsupportedFeaturesMask unsupported (1L <<15)
78
79 XkbXI_AllDeviceFeaturesMask Those selected (0x1e) XkbXI_IndicatorsMask |
80 by Value Column XkbSI_ButtonActionsMask
81 masks
82
83 XkbXI_AllFeaturesMask Those selected (0x1f) XkbSI_AllDeviceFeaturesMask |
84 by Value Column XkbSI_KeyboardsMask
85 masks
86
87 XkbXI_AllDetailsMask Those selected (0x801f) XkbXI_AllFeaturesMask |
88 by Value column XkbXI_UnsupportedFeaturesMask
89 masks
90
92 Information about X Input Extension devices is transferred between a
93 client program and the Xkb extension in an XkbDeviceInfoRec structure:
94
95 typedef struct {
96 char * name; /* name for device */
97 Atom type; /* name for class of devices */
98 unsigned short device_spec; /* device of interest */
99 Bool has_own_state; /* True=>this device has its own state */
100 unsigned short supported; /* bits indicating supported capabilities */
101 unsigned short unsupported; /* bits indicating unsupported capabilities */
102 unsigned short num_btns; /* number of entries in btn_acts */
103 XkbAction * btn_acts; /* button actions */
104 unsigned short sz_leds; /* total number of entries in LEDs vector */
105 unsigned short num_leds; /* number of valid entries in LEDs vector */
106 unsigned short dflt_kbd_fb; /* input extension ID of default (core kbd) indicator */
107 unsigned short dflt_led_fb; /* input extension ID of default indicator feedback */
108 XkbDeviceLedInfoPtr leds; /* LED descriptions */
109 } XkbDeviceInfoRec, *XkbDeviceInfoPtr;
110
111 typedef struct {
112 unsigned short led_class; /* class for this LED device*/
113 unsigned short led_id; /* ID for this LED device */
114 unsigned int phys_indicators; /* bits for which LEDs physically present */
115 unsigned int maps_present; /* bits for which LEDs have maps in maps */
116 unsigned int names_present; /* bits for which LEDs are in names */
117 unsigned int state; /* 1 bit => corresponding LED is on */
118 Atom names[XkbNumIndicators]; /* names for LEDs */
119 XkbIndicatorMapRec maps; /* indicator maps for each LED */
120 } XkbDeviceLedInfoRec, *XkbDeviceLedInfoPtr;
121
122
123
124
125X Version 11 libX11 1.8.7 XkbFreeDeviceInfo(3)