XMCLIPBOARDCOPY(3)
π XmClipboardCopy π
okay so bestie, welcome to the XmClipboardCopy page from the library call section of the manual β she's a Motif clipboard function and she's lowkey iconic. sit down, grab a strawberry π, and let's get you clipboard-literate fr fr.
β¨ NAME β¨
XmClipboardCopy β a clipboard function that copies a data item to temporary storage for later copying to clipboard π
β¨ SYNOPSIS β¨
#include <Xm/CutPaste.h>
int XmClipboardCopy (display, window, item_id, format_name,
buffer, length, private_id, data_id)
Display * display;
Window window;
long item_id;
char * format_name;
XtPointer buffer;
unsigned long length;
long private_id;
long * data_id;
(void)
β¨ DESCRIPTION β¨
XmClipboardCopy copies a data item to temporary storage. the data item gets moved from temporary storage to the clipboard data structure when a call to XmClipboardEndCopy is made. and here's the slay part β additional calls to XmClipboardCopy before a call to XmClipboardEndCopy add additional data item formats to the same data item, or append data to an existing format. formats are described in the Inter-Client Communication Conventions Manual (ICCCM) as targets. iykyk π
π¨ NOTE, and this one is important bestie: do NOT callXmClipboardCopybefore a call toXmClipboardStartCopyhas been made. the latter function allocates the temporary storage thatXmClipboardCopyliterally needs. no setup, no vibes. periodt.
if the buffer argument is NULL, the data is considered to be passed by name. when data that has been passed by name is later requested by another application, the application that owns the data receives a callback with a request for the data. the application that owns the data must then transfer the data to the clipboard with the XmClipboardCopyByName function. and when a data item that was passed by name is deleted from the clipboard, the application that owns the data receives a callback stating that the data is no longer needed. π¦
for information on the callback function, see the callback argument description for XmClipboardStartCopy.
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. the widget's window ID can be obtained throughXtWindow. the same application instance should pass the same window ID to each of the clipboard functions that it calls. consistency is the main character energy here πitem_idβ specifies the number assigned to this data item. this number was returned by a previous call toXmClipboardStartCopy.format_nameβ specifies the name of the format in which the data item is stored on the clipboard. the format was known as target in the ICCCM.bufferβ specifies the buffer from which the clipboard copies the data.lengthβ specifies the length, in bytes, of the data being copied to the clipboard.private_idβ specifies the private data that the application wants to store with the data item.data_idβ specifies an identifying number assigned to the data item that uniquely identifies the data item and the format. this argument is required only for data that is passed by name. π
β¨ RETURN β¨
here's the vibe check on what she hands back to you:
XmClipboardSuccessβ the function was successful. we ate. π₯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. (patience is a virtue bestie π)XmClipboardFailβ the function failed becauseXmClipboardStartCopywas not called or because the data item contains too many formats. π
β¨ RELATED β¨
go read these next, they're the besties in the same group chat:
okay that's the whole page, no notes, you understood all of it πβ¨. this was XmClipboardCopy from the library call section β the manual doesn't hand us a version number or a date on this one, so just take the title, the source, and the date as whatever your system's manual stamps on it, mwah π«Ά. now go copy something to a clipboard and be iconic about it. bye bestie! πππΈ
π¦ 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