XkbFreeDeviceInfo(3)
π NAME π
okay so this is XkbFreeDeviceInfo(3) from the XKB FUNCTIONS manual, bestie β¨
XkbFreeDeviceInfo β Free an XkbDeviceInfoRec structure π«Ά
π SYNOPSIS π
void XkbFreeDeviceInfo (XkbDeviceInfoPtr device_info, unsigned int
which, Bool free_all);
π ARGUMENTS π
device_infoβ pointer toXkbDeviceInfoRecin which to free itemswhichβ mask of components ofdevice_infoto freefree_allβTrue=> free everything, includingdevice_info
π DESCRIPTION π
okay so here's the tea β: if free_all is True, XkbFreeDeviceInfo frees all components of device_info and the XkbDeviceInfoRec structure pointed to by device_info itself. like, everything goes π
If free_all is False, the value of which determines which subcomponents are freed. which is an inclusive OR of one or more of the values from Table 1. π«Ά
- If
whichcontainsXkbXI_ButtonActionsMask, all button actions associated withdevice_infoare freed,device_info->btn_actsis set toNULL, anddevice_info->num_btnsis set to zero. - If
whichcontains all bits inXkbXI_IndicatorsMask, allXkbDeviceLedInfoRecstructures associated withdevice_infoare freed,device_info->ledsis set toNULL, anddevice_info->sz_ledsanddevice_info->num_ledsare set to zero. - If
whichcontainsXkbXI_IndicatorMapsMask, all indicator maps associated withdevice_infoare cleared, but the number of LEDs and the leds structures themselves is preserved. - If
whichcontainsXkbXI_IndicatorNamesMask, all indicator names associated withdevice_infoare cleared, but the number of LEDs and the leds structures themselves is preserved. - If
whichcontainsXkbXI_IndicatorStateMask, the indicator state associated with thedevice_infoleds are set to zeros but the number of LEDs and the leds structures themselves is preserved.
π Table 1 XkbDeviceInfoRec Mask Bits
the columns in the original table are Name, XkbDeviceInfoRec Fields Effected, Value, and Capability If Set β and every single row is right here, no cap π
XkbXI_KeyboardsMaskβ fields effected: (blank in Table 1); value:(1L <<0); capability if set: Clients can use all Xkb requests and events with KeyClass devices supported by the input device extension.XkbXI_ButtonActionsMaskβ fields effected:num_btns,btn_acts; value:(1L <<1); capability if set: Clients can assign key actions to buttons non-KeyClass input extension devices.XkbXI_IndicatorNamesMaskβ fields effected:leds->names; value:(1L <<2); capability if set: Clients can assign names to indicators on non-KeyClass input extension devices.XkbXI_IndicatorMapsMaskβ fields effected:leds->maps; value:(1L <<3); capability if set: Clients can assign indicator maps to indicators on non-KeyClass input extension devices.XkbXI_IndicatorStateMaskβ fields effected:leds->state; value:(1L <<4); capability if set: Clients can request the status of indicators on non-KeyClass input extension devices.XkbXI_IndicatorsMaskβ fields effected:sz_leds,num_leds,leds->*; value:(0x1c); capability if set:XkbXI_IndicatorNamesMask | XkbXI_IndicatorMapsMask | XkbXI_IndicatorStateMaskXkbXI_UnsupportedFeaturesMaskβ fields effected:unsupported; value:(1L <<15); capability if set: (none shown in Table 1)XkbXI_AllDeviceFeaturesMaskβ fields effected: Those selected by Value Column masks; value:(0x1e); capability if set:XkbXI_IndicatorsMask | XkbSI_ButtonActionsMaskXkbXI_AllFeaturesMaskβ fields effected: Those selected by Value Column masks; value:(0x1f); capability if set:XkbSI_AllDeviceFeaturesMask | XkbSI_KeyboardsMaskXkbXI_AllDetailsMaskβ fields effected: Those selected by Value column masks; value:(0x801f); capability if set:XkbXI_AllFeaturesMask | XkbXI_UnsupportedFeaturesMask
lowkey important: the XkbSI_... bits in those last rows are exactly what the table says π no autocorrect from me, bestie.
π¦ 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 device_spec; /* device of interest */
Bool has_own_state; /* True=>this device has its own state */
unsigned short supported; /* bits indicating supported capabilities */
unsigned short unsupported; /* bits indicating unsupported capabilities */
unsigned short num_btns; /* number of entries in btn_acts */
XkbAction * btn_acts; /* button actions */
unsigned short sz_leds; /* total number of entries in LEDs vector */
unsigned short num_leds; /* number of valid entries in LEDs vector */
unsigned short dflt_kbd_fb; /* input extension ID of default (core kbd) indicator */
unsigned short dflt_led_fb; /* input extension ID of default indicator feedback */
XkbDeviceLedInfoPtr leds; /* LED descriptions */
} XkbDeviceInfoRec, *XkbDeviceInfoPtr;
typedef struct {
unsigned short led_class; /* class for this LED device*/
unsigned short led_id; /* ID for this LED device */
unsigned int phys_indicators; /* bits for which LEDs physically present */
unsigned int maps_present; /* bits for which LEDs have maps in maps */
unsigned int names_present; /* 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;
mwah π β signed off with X Version 11, libX11 1.8.14, and this very XkbFreeDeviceInfo(3) page. that's the footer, bestie, and we're done π«Άβ¨
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms