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

✨ XmTextCut ✨

okay bestie, so this one is a library call and honestly? it's giving "copy + delete in one glow-up." πŸ’…


🌸 NAME 🌸

XmTextCut β€” a Text function that copies the primary selection to the clipboard and deletes the selected text πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

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

πŸ’– DESCRIPTION πŸ’–

So XmTextCut takes the primary selected text, copies it to the clipboard, and then deletes the primary selected text. yes, both. it's an overachiever, we love that for it. πŸ‘‘

This routine calls the widget's XmNvalueChangedCallback and verification callbacks, either XmNmodifyVerifyCallback or XmNmodifyVerifyCallbackWcs, or both. and here's the little order-of-operations tea: if both verification callback lists are registered, the procedures of the XmNmodifyVerifyCallback list are executed first, and the resulting data is passed to the XmNmodifyVerifyCallbackWcs callbacks. so Wcs gets the hand-me-down data, no cap.

This routine also calls the XmNconvertCallback procedures β€” possibly multiple times β€” with the selection member of the XmConvertCallbackStruct set to CLIPBOARD and with the parm member set to XmMOVE. then, if the transfer is successful, this routine calls the XmNconvertCallback procedures for the CLIPBOARD selection and the DELETE target. iconic chain reaction, fr fr. πŸ”₯

  • widget β€” Specifies the Text widget ID. like, which Text widget are we doing this to, bestie? that one. πŸ’«
  • time β€” Specifies the server time at which the selection value is to be modified. this should be the time of the event that triggered this request. one source of a valid time stamp is the function XtLastTimestampProcessed(). πŸ•βœ¨

For a complete definition of Text and its associated resources, see XmText(3).


🫢 RETURN 🫢

This function returns False if:

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

Otherwise, it returns True. slay. βœ…



and that's the whole page, bestie β€” it's from the XmTextCut(library call) manual, mwah πŸ’‹