XkbAllocGeomRows(3)

🌸 NAME 🌸

This is XkbAllocGeomRows(3) from the XKB FUNCTIONS manual, bestie πŸ’– β€” and it does exactly one iconic thing: XkbAllocGeomRows β€” Allocate rows in a section. Like, it makes room for rows inside a section, and then you fill in the actual deets yourself. No cap.


✨ SYNOPSIS ✨

Status XkbAllocGeomRows (XkbSectionPtr section, int num_needed);

πŸŽ€ ARGUMENTS πŸŽ€

  • section β€” the section for which rows should be allocated. That's the target, the main character of this call 🫢
  • num_needed β€” number of new rows required. How many rows are we making space for? This many πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, <pink>Xkb</pink> provides a bunch of functions to allocate and free subcomponents of a keyboard geometry. Use these functions to create or modify keyboard geometries. And the important vibe check: these functions merely allocate space for the new element(s), and it is up to you to fill in the values explicitly in your code. They are not gonna do the glow-up 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. Noted, respected, lowkey dramatic but valid πŸ’€

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.

Specifically, XkbAllocGeomRows allocates num_needed rows and adds them to the section. And no initialization of the rows is done β€” none, zero, zilch β€” so don't expect any cute default values ✨

Caveat bestie: allocation only reserves the space. You still have to fill in the row values explicitly in your code, and if allocation fails, both sz_* and num_* get reset to zero. πŸ’–

πŸ”₯ DIAGNOSTICS πŸ”₯

  • BadAlloc β€” Unable to allocate storage 😭
  • BadValue β€” An argument is out of range πŸ™ˆ

footer sign-off energy: X Version 11, libX11 1.8.14, page XkbAllocGeomRows(3) β€” that's the source/version combo, and it ate πŸ’…βœ¨

πŸ“¦ where this page comes from