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

πŸ’– NAME πŸ’–

XmClipboardEndCopy β€” a clipboard function that completes the copying of data to the clipboard πŸŽ€

okay so bestie, this is the finale of your clipboard-copy era. it's giving "closing credits." periodt.


✨ SYNOPSIS ✨

#include <Xm/CutPaste.h>
int XmClipboardEndCopy (display, window, item_id)
        Display * display;
        Window  window;
        long    item_id;
(void)
yes, that (void) is just sitting there at the end being mysterious. it's in the original, so it's staying. main character energy fr fr πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so, XmClipboardEndCopy locks the clipboard so nobody else can touch it, places your data in the clipboard data structure, and then unlocks the clipboard. that's the whole arc. 🫢

here's the tea though: all those data items you copied over with XmClipboardCopy? they are not actually entered into the clipboard data structure until you make this call. like, they're backstage. this is the call that walks them out on stage. 🌟

this function also frees up the temporary storage that was allocated by XmClipboardStartCopy, which must be called before XmClipboardEndCopy. no skipping steps, bestie. 😭

and like β€” do not call this function if XmClipboardCancelCopy has already been called. those two do not coexist. pick a lane. πŸ’€

  • display β€” Specifies a pointer to the Display structure that was returned in a previous call to XOpenDisplay or XtDisplay. πŸ–₯️
  • window β€” Specifies the window ID of a widget that relates the application window to the clipboard. you can get the widget's window ID through XtWindow. and listen β€” the same application instance should pass the same window ID to every clipboard function it calls. consistency is the vibe. ✨
  • item_id β€” Specifies the number assigned to this data item, which was returned by a previous call to XmClipboardStartCopy. it's your little ticket number, keep it safe 🎟️

πŸ”₯ RETURN πŸ”₯

  • XmClipboardSuccess β€” The function was successful. slay! ate! no crumbs! πŸ‘‘
  • XmClipboardLocked β€” The function failed because the clipboard was locked by another application. rude, honestly. πŸ™ˆ but here's the thing β€” the application can continue to call the function again with the same parameters until the lock goes away. that gives your application the opportunity to ask the user if they want to keep trying or just give up on the operation. so it's not a dead end, it's a "wanna keep going?" moment. πŸ’…
  • XmClipboardFail β€” The function failed because XmClipboardStartCopy was not called. yeah. you skipped the first step. it happens to the best of us. 😭

XmClipboardCancelCopy(3), XmClipboardCopy(3) and XmClipboardStartCopy(3). go read those too, they're the whole friend group 🫢✨


okay that's the whole page!! this was XmClipboardEndCopy from the library call section of the manual β€” the library call girlies stay winning πŸ’–πŸŒΈπŸŽ€ go forth and complete your copies, bestie, ily πŸ¦‹β­