XkbFreeNames(3)

πŸ’– NAME πŸ’–

ok so XkbFreeNames β€” it frees your symbolic names structures, bestie. that's the whole vibe ✨

this is the XkbFreeNames(3) page from the XKB FUNCTIONS corner of the manual, and yes we're gonna get through it together 🫢


✨ SYNOPSIS ✨

void XkbFreeNames (XkbDescPtr xkb, unsigned int which, Bool free_map);

three little args, one big cleanup, no cap πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • xkb β€” the keyboard description whose names you're about to free. it's giving "the thing we're cleaning up" 🧹
  • which β€” a mask saying which names components to free. bitwise OR energy, iykyk πŸ’…
  • free_map β€” True => the XkbNamesRec structure itself should be freed too. False and the struct itself stays put. periodt.

🌸 DESCRIPTION 🌸

⚠️ ok this is the important one: do NOT free symbolic names structures directly using free or XFree. like, don't. use XkbFreeNames instead. this is the icon, the main character, the only correct path πŸ’€

the which parameter is the bitwise inclusive OR of the valid names mask bits that are defined in Table 1. (yes, that Table 1. she's coming up next. πŸ‘‘)

Xkb provides several functions that work with symbolic names β€” and each of these functions uses a mask to specify individual fields of the structures described above. those masks, and their relationships to the fields in a keyboard description, are shown in Table 1. literally all the receipts are right there 🧾

⭐ Table 1: Symbolic Names Masks ⭐

  • XkbKeycodesNameMask β€” value (1<<0), keyboard component Xkb->names, field keycodes
  • XkbGeometryNameMask β€” value (1<<1), keyboard component Xkb->names, field geometry
  • XkbSymbolsNameMask β€” value (1<<2), keyboard component Xkb->names, field symbols
  • XkbPhysSymbolsNameMask β€” value (1<<3), keyboard component Xkb->names, field phys_symbols
  • XkbTypesNameMask β€” value (1<<4), keyboard component Xkb->names, field type
  • XkbCompatNameMask β€” value (1<<5), keyboard component Xkb->names, field compat
  • XkbKeyTypeNamesMask β€” value (1<<6), keyboard component Xkb->map, field type[*].name
  • XkbKTLevelNamesMask β€” value (1<<7), keyboard component Xkb->map, field type[*].lvl_names[*]
  • XkbIndicatorNamesMask β€” value (1<<8), keyboard component Xkb->names, field indicators[*]
  • XkbKeyNamesMask β€” value (1<<9), keyboard component Xkb->names, field keys[*], num_keys
  • XkbKeyAliasesMask β€” value (1<<10), keyboard component Xkb->names, field key_aliases[*], num_key_aliases
  • XkbVirtualModNamesMask β€” value (1<<11), keyboard component Xkb->names, field vmods[*]
  • XkbGroupNamesMask β€” value (1<<12), keyboard component Xkb->names, field groups[*]
  • XkbRGNamesMask β€” value (1<<13), keyboard component Xkb->names, field radio_groups[*], num_rg
  • XkbComponentNamesMask β€” value 0x3f, keyboard component Xkb->names, fields keycodes, geometry, symbols, physical symbols, types, and compatibility map β€” yeah, all of those bestie, it's a whole bundle 🎁
  • XkbAllNamesMask β€” value 0x3fff, keyboard component Xkb->names, field: all name components. every single one. the full set. slay πŸ’…

and that's the whole page, no crumbs left behind 🌈

cute little sign-off so you know where this came from: it's X Version 11, from libX11 1.8.14, and this page is XkbFreeNames(3) β€” go free those names responsibly, bestie πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from