XkbAllocGeometry(3)

πŸŽ€ NAME πŸŽ€

XkbAllocGeometry β€” allocate an entire geometry πŸ’…

okay so bestie, you’re in the XKB FUNCTIONS manual and this page is XkbAllocGeometry(3). We’re allocating a whole keyboard geometry, no cap ✨

✨ SYNOPSIS ✨

Status XkbAllocGeometry (XkbDescPtr xkb, XkbGeometrySizesPtr sizes);

🧚 ARGUMENTS 🧚

  • xkb β€” the keyboard description for which geometry is to be allocated 🫢
  • sizes β€” initial sizes for all geometry components πŸŽ€

🌸 DESCRIPTION 🌸

Xkb provides a number of functions to allocate and free subcomponents of a keyboard geometry. Use these functions to create or modify keyboard geometries. And lowkey important: these functions merely allocate space for the new element(s) β€” it is up to you to fill in the values explicitly in your code. They’re not gonna do it for you, bestie 😭

These allocation functions increase sz_* but never touch num_* (unless there is an allocation failure, in which case they reset both sz_* and num_* to zero). These functions return Success if they succeed, BadAlloc if they are not able to allocate space, or BadValue if a parameter is not as expected. periodt πŸ’…

XkbAllocGeometry allocates a keyboard geometry and adds it to the keyboard description specified by xkb. The keyboard description should be obtained via the XkbGetKeyboard or XkbAllocKeyboard functions. The sizes parameter specifies the number of elements to be reserved for the subcomponents of the keyboard geometry and can be zero or more. These subcomponents include the properties, colors, shapes, sections, and doodads β€” yes, doodads πŸ’€βœ¨

To free an entire geometry, use XkbFreeGeometry.

πŸ’… DIAGNOSTICS πŸ’…

  • BadAlloc β€” unable to allocate storage 😭
  • BadValue β€” an argument is out of range πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

xoxo, this page is from X Version 11, libX11 1.8.14, and it’s literally the XkbAllocGeometry(3) page β€” byeee bestie πŸ’œ

πŸ“¦ where this page comes from