XkbFreeGeomDoodads(3)

πŸ’– NAME πŸ’–

Okay bestie, welcome to XkbFreeGeomDoodads(3) from the XKB FUNCTIONS manual. This page is literally β€œFree geometry doodads” β€” that’s the whole name vibe. πŸŽ€

✨ SYNOPSIS ✨

       void XkbFreeGeomDoodads (XkbDoodadPtr doodads, int count, Bool
              free_all);

πŸŽ€ ARGUMENTS πŸŽ€

  • doodads β€” the doodads to be freed, no cap.
  • count β€” number of doodads to be freed.
  • free_all β€” True => all doodads are freed.

πŸ¦‹ DESCRIPTION πŸ¦‹

Xkb has a whole lineup of functions for allocating and freeing subcomponents of a keyboard geometry. Use these cuties to create or modify keyboard geometries. πŸ’…

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’re not doing the glow-up for you β€” you have to put the values in yourself. The allocation functions increase sz_* but never touch num_* β€” unless there’s 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. That’s the whole status update, bestie.

If free_all is True, all doodads in the array are freed, regardless of the value of count. Otherwise, count doodads are freed. So free_all is the main character here; when it’s True, count is lowkey not invited to the decision. πŸ’€

🌸 RETURN VALUES 🌸

  • Success β€” The XkbFreeGeomDoodads function returns Success if there are no allocation errors. Slay. βœ…

πŸ”₯ DIAGNOSTICS πŸ”₯

  • BadAlloc β€” Unable to allocate storage. 😭
  • BadValue β€” An argument is out of range. πŸ™ˆ
🚨 Friendly reminder with full dramatic energy: if free_all is True, all the doodads in the array get freed regardless of count. That’s not a drill; that’s the documented behavior.

🌈 Cute sign-off: this page is from X Version 11 / libX11 1.8.14, and the footer source/version/date line on this copy is just that β€” X Version 11, libX11 1.8.14, with the page name XkbFreeGeomDoodads(3). Periodt. πŸ’œ
πŸ“¦ where this page comes from