XkbAllocGeomProps(3)
π
XkbAllocGeomProps(3) β the XKB FUNCTIONS corner of the universe β¨
okay bestie, buckle up π this one lives in XKB FUNCTIONS and it's literally called XkbAllocGeomProps β yes it's a mouthful, yes it slays, no we're not renaming it π
πΈ NAME πΈ
XkbAllocGeomProps β allocate geometry properties π«Ά
β¨ SYNOPSIS β¨
Status XkbAllocGeomProps (XkbGeometryPtr geom, int num_needed);
that's the whole vibe check right there π
π¦ ARGUMENTS π¦
geomβ the geometry that the properties should get allocated for, iykyk πnum_neededβ how many new properties you're asking for, aka the count of fresh properties required π
π DESCRIPTION π
so. Xkb hands you a whole lil collection of functions for allocating and freeing subcomponents of a keyboard geometry β think of it as the group chat of geometry-building tools π§ and you use these functions to create or modify keyboard geometries. periodt.
β οΈ important caveat, bestie, do NOT skip this: these functions merely allocate space for the new element(s). Actually filling in the values? That's on you, explicitly, in your own code. no cap. the allocator does not do it for you π
here's the sz_*/num_* lore, and it's giving main character energy:
- these allocation functions increase
sz_*but never touchnum_* - unless there's an allocation failure β in which case they reset both
sz_*andnum_*to zero π - they return
Successif they succeed π₯ - they return
BadAllocif they can't allocate space π - they return
BadValueif a parameter isn't as expected β
now for the star of the show: XkbAllocGeomProps allocates space for num_needed properties and adds them to the specified geometry geom π and ngl, no initialization of the properties is done β zero, none, nada.
so what even is a geometry property? a geometry property associates an arbitrary string with an equally arbitrary name π highkey iconic. geometry properties can be used to provide hints to programs that display images of keyboards π but plot twist: they are not interpreted by Xkb. and no other geometry structures refer to geometry properties. it's giving independent queen energy, fr fr πΈ
π₯ DIAGNOSTICS π₯
BadAllocβ unable to allocate storage πBadValueβ an argument is out of range π
and that's the whole page, bestie π«Ά mwah π
made with love fromX Version 11,libX11 1.8.14β¨ bye slay π
π¦ 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