XkbFreeGeomSections(3)
β¨ XkbFreeGeomSections(3) β¨
okay so this is a page from the XKB FUNCTIONS corner of the libX11 universe, and it's about freeing geometry sections β yes bestie, we're doing memory management today π
π NAME π
XkbFreeGeomSections β free geometry sections π
π¦ SYNOPSIS π¦
void XkbFreeGeomSections (XkbGeometryPtr geom, int first, int count,
Bool free_all);
πΈ ARGUMENTS πΈ
geomβ the geometry where the sections you wanna free are livingfirstβ which section is first up for freeingcountβ how many sections you're freeing, periodtfree_allβTrue=> literally every section gets freed
β DESCRIPTION β
So Xkb hands you a whole lil family of functions for allocating and freeing subcomponents of a keyboard geometry β and this is one of them, bestie π«Ά. You use these functions to create or modify keyboard geometries.
β οΈ heads up, this part matters: these functions merely allocate space for the new element(s). It is completely up to you to fill in the values explicitly in your code. The function is not gonna do it for you, no cap π
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 π. And these functions return Success if they succeed, BadAlloc if they can't allocate space, or BadValue if a parameter isn't what was expected.
Now for the actual behavior, because this is the good part β¨:
- If
free_allisTrue, all sections are freed, regardless of whatfirstandcountsay. They simply don't get a vote π - Otherwise, the number of sections specified by
countget freed, beginning with the section specified byfirstin the geometry you passed in.
π RETURN VALUES π
Successβ theXkbFreeGeomSectionsfunction returnsSuccesswhen there are no allocation or argument errors. iconic behavior, honestly π
π₯ DIAGNOSTICS π₯
BadAllocβ unable to allocate storage πBadValueβ an argument is out of range π
π SEE ALSO π
(nothing else listed on this page β this one's a solo main character β)
and that's the whole page, bestie! this one comes to you from X Version 11, libX11 1.8.14 β go forth and free your sections responsibly, 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