XMCVTXMSTRINGTABLETOTEXTPROPERTY(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

πŸ’– XmCvtXmStringTableToTextProperty πŸ’–

okay bestie, so this one lives in the Xm library (a library call, no cap) and it's called XmCvtXmStringTableToTextProperty β€” yes the header truncates it to XmCvtXmStri...extProperty because even the manpage system has a character limit, iconic πŸ’…

It's the glow-up function: it takes your XmStringTable and turns it into an XTextProperty structure. Obsessed.


✨ NAME ✨

XmCvtXmStringTableToTextProperty β€” a function that converts from XmStringTable to an XTextProperty Structure. periodt.


🌸 SYNOPSIS 🌸

#include <Xm/Xm.h>
int XmCvtXmStringTableToTextProperty (display, string_table, count, style, text_prop_return)
        Display *display;
        XmStringTable   string_table;
        int     count;
        XmICCEncodingStyle      style;
        XTextProperty   *text_prop_return;
(void)

(yes the (void) is just sitting there at the end. it's giving mysterious. it's in the original, so it's staying πŸ’€)


πŸ¦‹ DESCRIPTION πŸ¦‹

So XmCvtXmStringTableToTextProperty converts the XmStrings inside the XmStringTable you hand it into an XTextProperty structure. literally the whole job.

Here's the tea on what it actually does: the function sets the encoding member of text_prop_return to an Atom for the specified display, naming the encoding that got determined by the style you picked. and then it converts the first count compound strings in the specified XmStringTable to that encoding, for storage in the text_prop_return value member. slay.

Now. the possible encoding styles, bestie, get comfy 🫢:

  • XmSTYLE_COMPOUND_STRING β€” the encoding is _MOTIF_COMPOUND_STRING. the function converts each specified XmString to a compound string in Byte Stream format.
  • XmSTYLE_COMPOUND_TEXT β€” the encoding is COMPOUND_TEXT. the function converts each specified XmString to compound text.
  • XmSTYLE_LOCALE β€” the encoding is the encoding of the current locale. the function converts each specified XmString to the encoding of the current locale.
  • XmSTYLE_STRING β€” the encoding is STRING (plain C strings encoded in ISO8859-1), and the function converts each specified XmString to STRING.
  • XmSTYLE_TEXT β€” if all specified XmStrings are fully convertible to the encoding of the current locale, the encoding is the encoding of the current locale, and the function converts each specified XmString to the encoding of the current locale. otherwise, the encoding is COMPOUND_TEXT, and the function converts each specified compound string to compound text.
  • XmSTYLE_STANDARD_ICC_TEXT β€” if all specified XmStrings are fully convertible to STRING, the encoding is STRING, and the function converts each specified XmString to STRING. otherwise, the encoding is COMPOUND_TEXT, and the function converts each specified XmString to compound text.

and here are the args, one by one, because we do NOT skip πŸ’–:

  • display β€” specifies the connection to the X server. your link to the mothership fr fr.
  • string_table β€” specifies a set of XmStrings.
  • count β€” specifies the number of XmStrings to be converted in string_table. only the first count of them, bestie, don't come for the rest.
  • style β€” specifies the manner in which the property is encoded.
  • text_prop_return β€” returns the XTextProperty structure.
⚠️ psst β€” to free the storage for the value member of the XTextProperty, use XtFree. don't just leave that memory hanging, that's not the vibe πŸ™ˆ

🌈 RETURN VALUES 🌈

if conversion depends on the locale and the current locale is not supported, the function returns XLocaleNotSupported. and in both of these cases β€” listen β€” the function does not set text_prop_return. so don't go reading it, it's not ready 😭

to determine whether the function is guaranteed not to return XLocaleNotSupported, use XSupportsLocale. that's your vibe check before you commit πŸ”₯


go read those too, you're a completionist, i know you πŸ’…


and that's the whole page, bestie!! πŸŽ€ this was XmCvtXmStri...extProperty β€” the library call, from the Xm library, and the footer date/source situation is exactly as the original gave it: XmCvtXmStri...extProperty(library call). mwah, bye πŸ’–βœ¨πŸ¦‹