XkbFreeGeomColors(3)
π XkbFreeGeomColors(3) β the libX11 glow-up
okay so bestie, welcome to the XKB functions corner of the manual, and today's main character is XkbFreeGeomColors β the little cleanup queen that frees geometry colors. she's giving "declutter era" and honestly? iconic. β¨
πΈ NAME πΈ
XkbFreeGeomColors β Free geometry colors π¨β¨
π¦ SYNOPSIS π¦
void XkbFreeGeomColors (XkbGeometryPtr geom, int first, int count, Bool
free_all);
like, that's the whole vibe. void return, no drama, no return value to obsess over. periodt. π
π ARGUMENTS π
geomβ the geometry where the colors should be freed. this is the spot we're cleaning out, bestie πfirstβ the first color to be freed. the starting point of the little goodbye tour π«Άcountβ how many colors we're freeing. the headcount, if you will πfree_allβ if it'sTrue, then all the colors are freed. everybody out, no cap πβ¨
π DESCRIPTION π
okay so here's the lore. Xkb hands you a bunch of functions to allocate and free subcomponents of a keyboard geometry, and you use these functions to create or modify keyboard geometries. main character energy for geometry builders, honestly. π§
but listen β and this is the important part, bestie β 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 don't do the filling-in for you, they just reserve the spot. think of it like booking the venue and then you still have to actually plan the party. π
the allocation functions increase sz_* but never touch num_* β with one little plot twist: unless there is an allocation failure, in which case they reset both sz_* and num_* to zero. so yeah, sometimes the universe says no and everything goes back 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. simple as that, iykyk. β¨
now, the actual tea on this function: if free_all is True, all colors are freed regardless of the value of first or count. so don't be out here passing first and count like they matter in that case β they literally do not, it's a full sweep, no survivors. π₯
otherwise β meaning free_all is not True β count colors are freed beginning with the one specified by first. a cute little targeted cleanup, starting at first and going for count. πΈ
ngl bestie, keep the free_all logic straight in your head or you'll be freeing way more colors than you planned, and that's a whole vibe killer. π
π DIAGNOSTICS π
BadAllocβ Unable to allocate storage. the memory said no πBadValueβ An argument is out of range. you gave it something it can't work with, bestie, check your values π«Ά
π SEE ALSO π
coming soon to a manpage near you β but for reals, the rest of the Xkb geometry allocation and free functions are your besties here. go read those too, fr fr π
and that's the whole page, slay! π
this one comes to you courtesy of X Version 11, libX11 1.8.14, dated XkbFreeGeomColors(3) β so go forth, free those colors responsibly, and remember: allocate space, fill in the values yourself, and never let num_* catch you slipping. bye bestie, mwah! πβ¨π¦
π¦ 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