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

✨ XmClipboardUndoCopy ✨

okay so bestie, we're in the XmClipboardUndoCopy part of the Motif library call docs πŸ’… this one's a clipboard function, and it's literally the "oops undo that" button for your last paste-to-clipboard moment 🫢


🌸 NAME 🌸

XmClipboardUndoCopy β€” a clipboard function that deletes the last item placed on the clipboard πŸŽ€


✨ SYNOPSIS ✨

#include <Xm/CutPaste.h>
int XmClipboardUndoCopy (display, window)
        Display * display;
        Window  window;
(void)

πŸ’– DESCRIPTION πŸ’–

XmClipboardUndoCopy deletes the last item placed on the clipboard, but only if that item was placed there by an application with the passed display and window arguments. Like, consent matters, okay? 🫢 Any data item that got deleted from the clipboard by the original call to XmClipboardCopy gets restored. Iconic behavior honestly.

But β€” and this is the important part β€” if the display or window IDs do not match the last copied item, no action is taken, and this function has no effect. It's giving "not your clipboard, not your business" πŸ’€

  • display β€” Specifies a pointer to the Display structure that was returned in a previous call to XOpenDisplay or XtDisplay. You know, the whole vibe of which screen we're even talking about 🌈
  • window β€” Specifies the window ID of a widget that relates the application window to the clipboard. The widget's window ID can be obtained through XtWindow. The same application instance should pass the same window ID to each clipboard function it calls. Consistency queen πŸ‘‘

πŸ”₯ RETURN πŸ”₯

  • XmClipboardSuccess β€” The function was successful. Slay ✨ we ate, no crumbs.
  • XmClipboardLocked β€” The function failed because the clipboard was locked by another application. Rude, honestly 😭 but listen β€” the application can continue to call the function again with the same parameters until the lock goes away. This gives the application the opportunity to ask if the user wants to keep trying or to give up on the operation. So like, you can keep refreshing, but also you can just walk away. Both are valid πŸ¦‹

XmClipboardLock(3) and XmClipboardStartCopy(3).


bestie reminder: if the display/window don't match, nothing happens. no drama, no deletion, just vibes πŸ™ˆ

and that's the whole page, fr fr β€” this was XmClipboardUndoCopy(library call), out here living its best life in the Motif library docs πŸ’œ thanks for reading, mwah πŸŽ€