XtGetSelectionParameters(3)
π XtGetSelectionParameters β the X Toolkit Intrinsics tea π
okay bestie, pull up a chair, because we're about to talk about XtGetSelectionParameters, a little function from the XT FUNCTIONS corner of the X world. it grabs the target parameters for a selection request that has a single target. that's it, that's the whole vibe. π
β¨ NAME β¨
XtGetSelectionParameters β retrieve target parameters for a selection request with a single target π¦
β¨ SYNTAX β¨
first things first, you gotta invite the header in:
#include <X11/Intrinsic.h>
and here's the actual call, verbatim, no cap:
void XtGetSelectionParameters(Widget owner, Atom selection, XtRequestId
request_id, Atom *type_return, XtPointer *value_return, unsigned
long *length_return, int *format_return);
she's long, she's gorgeous, she takes seven arguments. slay. π
β¨ ARGUMENTS β¨
ownerβ the widget that owns the selection we're talking about. it's giving "this is mine, actually". πselectionβ the selection currently being processed. the one in the hot seat. π₯request_idβ the requestor id, but only when we're doing incremental selections. if it's an atomic transfer instead, this isNULL. pick your lane. πtype_returnβ a pointer to an atom, and that atom is where the property type of the parameters gets stored. β¨value_returnβ a pointer to a pointer, and the parameters land in there. if no parameters come with the request, aNULLgets stored instead. no parameters, no problem. π«Άlength_returnβ a pointer where the number of data elements invalue_returngets stored β and those elements are sized according to whateverformat_returnsays. teamwork, fr fr. πformat_returnβ a pointer where the size in bits of the parameter data inside the elements ofvalue_returngets stored. it's giving "the units matter, bestie". β
β¨ DESCRIPTION β¨
okay so here's the thing you absolutely cannot skip, and I mean it:
XtGetSelectionParametersmay only be called from inside anXtConvertSelectionProc, or from inside the last call to anXtConvertSelectionIncrProcwith a newrequest_id.
that's the rule. not "usually", not "preferably" β only. call it from anywhere else and you're on your own, bestie. π so if you're in an XtConvertSelectionProc, go off. if you're in an XtConvertSelectionIncrProc, wait until the last call, and make sure the request_id is a new one. that's the moment. that's your main character moment. π
β¨ SEE ALSO β¨
go read these next, iykyk:
XtSetSelectionParameters(3)β the sibling. the other half. πX Toolkit Intrinsics - C Language InterfaceXlib - C Language X Interface
and that's the whole page, bestie!! this one's from X Version 11, shipped in libXt 1.3.1. go forth and retrieve those parameters responsibly π β¨πΈ
π¦ where this page comes from
- alpine 3.22: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.23: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.24: libxt-doc 1.3.1-r0 Β· MIT
- arch rolling: libxt 1.3.1-1 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- Copyright (c) 1993, 1994 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms