XMCLIPBOARDSTARTRETRIEVE(3)
π XmClipboardStartRetrieve π
okay bestie, so this one is from the library call girlies β it's XmClipboardStartRetrieve, and it's literally your lil' warm-up stretch before you pull data out of the clipboard π
β¨ SYNOPSIS β¨
#include <Xm/CutPaste.h>
int XmClipboardStartRetrieve (display, window, timestamp)
Display * display;
Window window;
Time timestamp;
(void)
πΈ DESCRIPTION πΈ
So XmClipboardStartRetrieve is the function that tells the clipboard routines "hey girl hey, I'm ready to start copying an item from the clipboard" π«Ά
The clipboard gets locked by this routine, and it stays locked until you call XmClipboardEndRetrieve. Periodt, that's the deal β no unlocking till then. π
And here's the cute part: between a call to XmClipboardStartRetrieve and a call to XmClipboardEndRetrieve, if you make multiple calls to XmClipboardRetrieve with the same format name, the data gets incrementally copied from the clipboard until all the data in that format has been retrieved. It's giving β¨streamingβ¨.
If a call to XmClipboardRetrieve returns XmClipboardTruncate, that's your signal that more data is still waiting to be copied in the given format π
π Bestie tip from the manpage itself: it's recommended that any calls to theInquirefunctions that your app needs to make in order to complete the copy from the clipboard happen between the call toXmClipboardStartRetrieveand the first call toXmClipboardRetrieve. That way your app does not need to callXmClipboardLockandXmClipboardUnlock. Efficiency, we love to see it. π
Now the params, bestie:
displayβ Specifies a pointer to theDisplaystructure that was returned in a previous call toXOpenDisplayorXtDisplay.windowβ Specifies the window ID of a widget that relates the application window to the clipboard. You can grab the widget's window ID throughXtWindow. The same application instance should pass the same window ID to each of the clipboard functions that it calls. Consistency is key, no cap. πtimestampβ Specifies the time of the event that triggered the copy. A valid timestamp must be supplied; it is not sufficient to useCurrentTime. Like, don't even try it. π
π¦ RETURN π¦
XmClipboardSuccessβ The function is successful. Slay! πXmClipboardLockedβ The function failed because the clipboard was locked by another application. π€ 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. Main character energy: you get to decide whether to keep fighting or walk away. πΆββοΈ
π RELATED π
the whole friend group, fr fr:
XmClipboardEndRetrieve(3)XmClipboardInquireCount(3)XmClipboardInquireFormat(3)XmClipboardInquireLength(3)XmClipboardInquirePendingItems(3)XmClipboardLock(3)XmClipboardRetrieve(3)XmClipboardStartCopy(3)XmClipboardUnlock(3)
and that's the whole vibe π« this was XmClipboardStartRetrieve(library call), brought to you by the library call section of your friendly neighborhood manual β go forth and retrieve, bestie, you got this πβ¨π
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms