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

✨ XmTextCopy β€” the library-call girlie from the XmText manual πŸ’–

okay bestie, so this is XmTextCopy, straight out of the library call manual, and she has ONE job: take whatever you've got highlighted (the primary selection) and yeet it onto the clipboard. that's it. that's the whole vibe. πŸŽ€


🌸 NAME 🌸

XmTextCopy β€” a Text function that copies the primary selection to the clipboard πŸ¦‹


✨ SYNOPSIS ✨

#include <Xm/Text.h>
Boolean XmTextCopy(
Widget widget,
Time time);

πŸ’… DESCRIPTION πŸ’…

okay so, real talk: XmTextCopy copies the primary selected text to the clipboard. that's the whole plot. no cap. ✨

this routine calls the XmNconvertCallback procedures, and it might do that multiple times (not me calling your callbacks over and over 😭), with the selection member of the XmConvertCallbackStruct set to CLIPBOARD and with the parm member set to XmCOPY. yes, exactly those values, don't improvise bestie πŸ’…

  • widget β€” specifies the Text widget ID 🫢
  • time β€” specifies the server time at which the selection value is to be modified. this should be the time of the event which triggered this request. one source of a valid time stamp is the function XtLastTimestampProcessed(). (yes, that's a real function name, i didn't make it up, i would never πŸ™ˆ)

for a complete definition of Text and its associated resources, see XmText(3). πŸ’œ


πŸ”₯ RETURN πŸ”₯

so like… this function returns False in a whole bunch of situations, and honestly it's giving "situationship":

  • the primary selection is NULL πŸ’€
  • the widget does not own the primary selection
  • the function is unable to gain ownership of the clipboard selection
  • no data is placed on the clipboard

otherwise? it returns True. slay. πŸ‘‘



that's the whole page babes πŸŽ€ courtesy of the XmTextCopy(library call) manual β€” library call energy, living her best life, no date on the tin but she's iconic anyway. mwah πŸ’–βœ¨πŸ¦‹