XMTRANSFERVALUE(3)
π« XmTransferValue π«
okay bestie, welcome to XmTransferValue(library call) β yes that's the whole manual page name, we're in the Xm library call section, and this function is literally the moment data goes from here to there. main character energy fr fr.
β¨ NAME β¨
XmTransferValue β a toolkit function that transfers data to a destination π
πΈ SYNOPSIS πΈ
#include <Xm/Xm.h>
void XmTransferValue(
XtPointer transfer_id,
Atom target,
XtCallbackProc proc,
XtPointer client_data,
Time time);
π DESCRIPTION π
so basically, XmTransferValue converts a selection, transferring any data from the selection owner, and it does all that in the context of a data transfer operation that's already been initiated. like, the party already started, you're just bringing the snacks. π
an application can call this routine from an XmNdestinationCallback procedure, or honestly from any function that gets called as a result of one. no cap.
the caller of XmTransferValue supplies the target that the selection gets converted to. the caller ALSO supplies a callback procedure to handle the data that results from that conversion. you're handing over the keys, bestie. π
transfer_id
- specifies a unique indentifier for the data transfer operation. this value must be the same as the value of the
transfer_idmember of theXmDestinationCallbackStructpassed to theXmNdestinationCallbackprocedure. like, it has to match, or it's giving chaos.
target
- specifies the target to which the selection is to be converted.
proc
- specifies a callback procedure to be invoked when the selection has been converted and the data, if any, is available. this procedure is the one responsible for inserting or otherwise handling any data transferred. it can also terminate the data transfer by calling
XmTransferDone. so much power in one little callback. π - the
procreceives three arguments:- the widget that requested the conversion
- the value of the
client_dataargument - a pointer to an
XmSelectionCallbackStruct
- > heads up: this procedure can be called before or after
XmTransferValuereturns. so don't go assuming an order, okay? π
client_data
- specifies data to be passed to the callback procedure (the value of the
procargument) when the selection has been converted.
time
- specifies the time of the
XEventthat triggered the data transfer. you should typically set this field toXtLastTimestampProcessed. that's the vibe. β°
π¦ the callback struct π¦
the callback procedure (the value of the proc argument) receives a pointer to an XmSelectionCallbackStruct, which has the following definition:
typedef struct
{
int reason;
XEvent *event;
Atom selection;
Atom target;
Atom type;
XtPointer transfer_id;
int flags;
int remaining;
XtPointer value;
unsigned long length;
int format;
} XmSelectionCallbackStruct;
reason
- indicates why the callback was invoked.
event
- points to the
XEventthat triggered the callback. it can beNULL. (yes bestie, sometimes it's just not there, and that's valid π)
selection
- specifies the selection that has been converted.
target
- specifies the target to which
XmTransferValuerequested conversion. the value is the same as the value of thetargetargument toXmTransferValue.
type
- specifies the type of the selection value. this is not the target, but the type used to represent the target. the value
XT_CONVERT_FAILmeans that the selection owner did not respond to the conversion request within the Intrinsics selection timeout interval. π ghosted, fr.
transfer_id
- specifies a unique indentifier for the data transfer operation. the value is the same as the value of the
transfer_idargument toXmTransferValue.
flags
- this member is currently unused. the value is always
XmSELECTION_DEFAULT. it's just sitting there, existing, not doing much. π§
remaining
- indicates the number of transfers remaining for the operation specified by
transfer_id.
value
- represents the data transferred by this request. the application is responsible for freeing the value by calling
XtFree. yes you free it, don't leave it hanging. π
length
- indicates the number of elements of data in
value, where each element has the size symbolized byformat. ifvalueisNULL,lengthis0.
format
- indicates whether the data in
valueshould be viewed as a list ofchar,short, orlongquantities. possible values are8(for a list ofchar),16(for a list ofshort), or32(for a list oflong).
π₯ RELATED π₯
XmTransferSetParameters(3), XmTransferSendRequest(3), and XmTransferStartRequest(3). go read those next, bestie, they're the whole friend group. π«Ά
and that's the page!! this was XmTransferValue(library call), straight out of the library call section, dated and versioned exactly as the manual says β no cap, that's the source and the date, and it's iconic. bye babes πβ¨
π¦ 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