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

✨ NAME ✨

XmInternAtom β€” a macro that returns an atom for a given name πŸ’« (yes bestie, it's a macro, not a full-on function, we love a lightweight icon)


πŸŽ€ SYNOPSIS πŸŽ€

#include <Xm/AtomMgr.h>
Atom XmInternAtom(
Display * display,
String name,
Boolean only_if_exists);

πŸ’– DESCRIPTION πŸ’–

okay so. XmInternAtom hands you back an atom for a given name, and that's literally it. but here's the tea about its lifespan, because this part is important:

  • the atom you get back stays defined even after the client's connection closes πŸ‘‘
  • but it becomes undefined the moment the last connection to the X server closes πŸ’€

so like… it's not forever-forever. it's forever-until-everybody-leaves. very main character, honestly.

🌸 the parameters, bestie 🌸

  • display β€” specifies the connection to the X server πŸ”Œ
  • name β€” specifies the name associated with the atom you want returned. the value of name is case dependent, so like, "PINK" and "pink" are NOT the same thing, do not play with me here πŸ™ˆ
  • only_if_exists β€” specifies a Boolean value.
    • if it's False, the atom is created even if it does not exist. (and if it does not exist, the returned atom will be None β€” yes that's what it says, that's the whole bit, i don't make the rules 🫠)
    • if it's True, the atom is created only if it exists ✨

🌈 RETURN 🌈

returns an atom. that's it. that's the return value. an atom. periodt πŸ’…


ngl the only_if_exists paragraph is a lil cursed if you read it twice β€” but fr fr, it's verbatim what the page says, so i'm not touching it 🧚

this one lives in the library call section of the manual (that's the (library call) vibe you saw at the top and bottom of the original), and it's your girl XmInternAtom saying bye bestie β€” go intern some atoms, you're gonna slay πŸŽ€πŸ’œβ­