XMSTRING(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– XmString β€” bestie edition πŸ’–

okay so this is XmString, from the library call manual (section 3, the C library girlies 🫢). Buckle up, we're doing compound strings.


✨ NAME ✨

XmString β€” the data type for a compound string. that's it, that's the name, and honestly? iconic.


🌸 SYNOPSIS 🌸

#include <Xm/Xm.h>

that's the whole vibe check. one include and you're in. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so XmString is literally THE data type for a compound string. and a compound string is a sequence of components β€” like a little playlist of stuff, lowkey. the components include, but are not limited to, these baddies:

  • XmSTRING_COMPONENT_SEPARATOR
  • XmSTRING_COMPONENT_TAB
  • XmSTRING_COMPONENT_LAYOUT_POP
  • XmSTRING_COMPONENT_DIRECTION
  • XmSTRING_COMPONENT_LAYOUT_PUSH
  • XmSTRING_COMPONENT_CHARSET
  • XmSTRING_COMPONENT_FONTLIST_ELEMENT_TAG
  • XmSTRING_COMPONENT_LOCALE
  • XmSTRING_COMPONENT_LOCALE_TEXT
  • XmSTRING_COMPONENT_TAG
  • XmSTRING_COMPONENT_TEXT
  • XmSTRING_COMPONENT_END
  • XmSTRING_COMPONENT_RENDITION_BEGIN
  • XmSTRING_COMPONENT_RENDITION_END
  • XmSTRING_COMPONENT_UNKNOWN
  • XmSTRING_COMPONENT_WIDECHAR_TEXT

and also a rendition tags table, text, and text component. so it's not just a list of components, bestie, it's a whole situation. πŸ’€

when a compound string gets displayed, the rendition tags and the direction are what decide how that text shows up. like, they're the main characters of the render, no cap. πŸ‘‘

not me about to tell you the most important thing: when you call XtGetValues for a resource whose type is XmString, you get back a copy of the compound string resource value. and you, yes YOU, are responsible for calling XmStringFree to free the memory allocated for that copy. don't ghost it, it will leak. 😭

if you want the full lore on compound string components β€” and honestly the order the components are supposed to appear in β€” go read the XmStringComponentType reference page. and if you wanna know the algorithm that matches up the rendition tags used to display a compound string text component with a rendition in a render table, the XmRenderTable reference page has you. fr fr. πŸ“š


the whole friend group, in order, so you can go hang out with all of them:


okay that's the whole page, you ate that. πŸ’…βœ¨

this was XmString from the library call manual β€” that's the source and the version vibe, straight off the XmString(library call) footer, no extra dates or numbers attached because the page didn't give me any, and I would never make one up. πŸŽ€ bye bestie, go free your strings. πŸ¦‹πŸ’œ