XMTEXTFIELDCOPYLINK(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, welcome to XmTextFieldCopyLink(library call) β€” yes that's the manual name, we're keeping it, it's iconic ✨ this is a little library call from the Xm/TextField universe and she is specifically about link copying. sit down, grab a boba πŸ§‹, let's go.


🌸 NAME 🌸

XmTextFieldCopyLink β€” a TextField function that copies a link to the primary selection to the clipboard πŸ’…

like. she takes the link attached to your primary selection and she puts it on the clipboard. that's the whole job. slay.


✨ SYNOPSIS ✨

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

look at her. two args. one Boolean back. lowkey elegant πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” XmTextFieldCopyLink copies a link to the primary selected text to the clipboard.

and the way she does it?? she calls the XmNconvertCallback procedures, possibly multiple times 😭 (yes, more than once, that's normal, don't panic), with the selection member of the XmConvertCallbackStruct set to CLIPBOARD and with the parm member set to XmLINK.

⚠️ and this part is important bestie: the TextField widget itself does not copy any links. nope. not her job. the XmNconvertCallback procedures are responsible for copying the link to the clipboard and for taking any related actions. she just makes the call β€” you (or your callbacks) do the actual work. main character energy is shared, periodt πŸ’…

πŸ“ the arguments

  • widget β€” specifies the TextField widget ID. yeah, the one and only. the widget in question. give her the ID 🫢
  • time β€” specifies the time of the transfer. this should be the time of the event which triggered this request. one source of a valid time stamp is the function XtLastTimestampProcessed. (yes, real function, real name, no cap β€” steal your timestamp from there ⭐)

also!! for a complete definition of TextField and its associated resources, go see XmTextField(3). she's the big sister page πŸ‘‘


πŸ”₯ RETURN πŸ”₯

she returns False if any of these sad little situations happen:

  • 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?? she returns True πŸ’– and we celebrate πŸŽ‰



and that's the whole vibe!! this page was XmTextFieldCopyLink(library call), brought to you by the fine folks of the Xm library docs β€” no version number and no date on this one, she's timeless like that πŸ’œ anyway bestie, go copy some links, hydrate, and remember: callbacks do the work, the widget just says "you got this" πŸŒΈπŸ¦‹βœ¨