XkbFreeCompatMap(3)
π XkbFreeCompatMap π
okay so bestie, welcome to XkbFreeCompatMap from the XKB FUNCTIONS manual π«Ά this one is literally about freeing an entire compatibility map or just the selected little pieces of one. main character energy, but make it memory management π
πΈ NAME πΈ
XkbFreeCompatMap β free a whole compatibility map or selected portions of one β¨
π¦ SYNOPSIS π¦
void XkbFreeCompatMap (XkbDescPtr xkb, unsigned int which, Bool
free_map);
π ARGUMENTS π
xkbβ the Xkb description where you want to free the compatibility map πwhichβ a mask of compatibility map components to free π§free_mapβTruemeans free theXkbCompatMapstructure itself π
π DESCRIPTION π
so which tells the function which compatibility map components to free, iykyk β see XkbGetCompatMap for the full lore π₯ which is an inclusive OR of the bits shown in Table 1, no cap.
Table 1 β Compatibility Map Component Masks
XkbSymInterpMaskβ value(1<<0)β affecting Symbol interpretations πΈXkbGroupCompatMaskβ value(1<<1)β affecting Group maps πXkbAllCompatMaskβ value(0x3)β affecting All compatibility map components π
free_map indicates whether the XkbCompatMap structure itself should be freed. If free_map is True, which is ignored, all non-NULL compatibility map components are freed, and the compat field in the XkbDescRec referenced by xkb is set to NULL π periodt.
bestie, this is the part wherewhichgets absolutely ignored iffree_mapisTrueβ the whole compatibility map situation gets cleaned up, andcompatgoes toNULLπ
π§ STRUCTURES π§
okay, struct soup time β hereβs the exact XkbCompatMapRec situation:
typedef struct _XkbCompatMapRec {
XkbSymInterpretPtr sym_interpret; /* symbol based key semantics*/
XkbModsRec groups[XkbNumKbdGroups]; /* group => modifier map */
unsigned short num_si; /* # structures used in sym_interpret */
unsigned short size_si; /* # structures allocated in sym_interpret */
} XkbCompatMapRec, *XkbCompatMapPtr;
the complete description of an Xkb keyboard is given by an XkbDescRec π¦ the component structures in the XkbDescRec represent the major Xkb components outlined in Figure 1.1 β¨
typedef struct {
struct _XDisplay * display; /* connection to X server */
unsigned short flags; /* private to Xkb, do not modify */
unsigned short device_spec; /* device of interest */
KeyCode min_key_code; /* minimum keycode for device */
KeyCode max_key_code; /* maximum keycode for device */
XkbControlsPtr ctrls; /* controls */
XkbServerMapPtr server; /* server keymap */
XkbClientMapPtr map; /* client keymap */
XkbIndicatorPtr indicators; /* indicator map */
XkbNamesPtr names; /* names for all components */
XkbCompatMapPtr compat; /* compatibility map */
XkbGeometryPtr geom; /* physical geometry of keyboard */
} XkbDescRec, *XkbDescPtr;
the display field points to an X display structure π» the flags field is private to the library: modifying flags may yield unpredictable results οΏ½οΏ½ so donβt touch, bestie.
warning:flagsis private to the library β modifyingflagsmay yield unpredictable results π¨
the device_spec field specifies the device identifier of the keyboard input device, or XkbUseCoreKeyboard, which specifies the core keyboard device πΉ the min_key_code and max_key_code fields specify the least and greatest keycode that can be returned by the keyboard π’ the other fields specify structure components of the keyboard description and are described in detail in other sections of this document π Table 2 identifies the subsequent sections of this document that discuss the individual components of the XkbDescRec π
Table 2 β XkbDescRec Component References
ctrlsβ for more info: Chapter 10 πΈserverβ for more info: Chapter 16 πmapβ for more info: Chapter 15 π¦indicatorsβ for more info: Chapter 8 βnamesβ for more info: Chapter 18 πcompatβ for more info: Chapter 17 πgeomβ for more info: Chapter 13 π
each structure component has a corresponding mask bit that is used in function calls to indicate that the structure should be manipulated in some manner, such as allocating it or freeing it π these masks and their relationships to the fields in the XkbDescRec are shown in Table 3 π«Ά
Table 3 β Mask Bits for XkbDescRec
XkbControlsMaskβXkbDescRecfieldctrlsβ value(1L<<0)β¨XkbServerMapMaskβXkbDescRecfieldserverβ value(1L<<1)πΈXkbIClientMapMaskβXkbDescRecfieldmapβ value(1L<<2)π¦XkbIndicatorMapMaskβXkbDescRecfieldindicatorsβ value(1L<<3)βXkbNamesMaskβXkbDescRecfieldnamesβ value(1L<<4)πXkbCompatMapMaskβXkbDescRecfieldcompatβ value(1L<<5)πXkbGeometryMaskβXkbDescRecfieldgeomβ value(1L<<6)πXkbAllComponentsMaskβXkbDescRecfield All Fields β value(0x7f)π
π SEE ALSO π
XkbGetCompatMap(3)β the bestie that gets the compatibility map in the first place π
okay bestie, thatβs the whole page β signing off from X Version 11, libX11 1.8.14, with no separate date line in this footer, so thatβs the vibe πβ¨π
periodt
π¦ 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