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

okay bestie, so this one is XmContainerCopyLink from the library call manual, and it lives in the Container widget family πŸŽ€ it's a little function whose whole job is copying links to the primary selected items onto the clipboard, and honestly? it's giving middle-manager energy, because it doesn't even do the copying itself. more on that in a sec, i promise 🌸


✨ NAME ✨

XmContainerCopyLink β€” Container widget function to copy links to the clipboard πŸ¦‹


✨ SYNOPSIS ✨

#include <Xm/Container.h>
Boolean XmContainerCopyLink(
        Widget container,
        Time timestamp);

✨ DESCRIPTION ✨

okay so here's the tea β˜• XmContainerCopyLink copies links to the primary selected items over to the clipboard. that's the whole vibe.

but here's the plot twist: this routine calls the XmNconvertCallback procedures β€” and it might call them multiple times, not just once, so don't be surprised bestie πŸ™ˆ β€” and when it does, it sets the selection member of the XmConvertCallbackStruct to CLIPBOARD, and it sets the parm member to XmLINK.

and now the part that's lowkey the most important thing on this whole page:

🚨 the Container widget itself does not copy any links. like, zero. none. it is NOT doing it. the XmNconvertCallback procedures are the ones responsible for copying the link to the clipboard and for taking any related actions. the widget just makes the call, the callbacks do the work. periodt πŸ’…

now, the args, because we always read the args:

  • container β€” specifies the Container widget ID. that's your Container, bestie, hand it over 🫢
  • timestamp β€” specifies the server time at which to modify the selection value ⏰

and if you want the complete definition of Container and all its associated resources, go read XmContainer(3). it's all in there, iykyk πŸ’œ


✨ RETURN ✨

this function returns False in the following cases 😭:

  • if the primary selection is NULL
  • if the widget does not own the primary selection
  • if the function is unable to gain ownership of the clipboard selection

otherwise? it returns True πŸ‘‘ and we love that for it.



and that's the whole page, no cap πŸ’–βœ¨ this iconic little slice of the library call manual is XmContainerCopyLink(3) β€” go forth, copy your links, and let the callbacks handle the actual work, because that is literally their job and not yours πŸ¦‹πŸŽ€πŸ’