XtSetSelectionParameters(3)
β¨ XtSetSelectionParameters β¨
okay bestie, so this one is from the XT FUNCTIONS corner of libXt β it's XtSetSelectionParameters, and it's literally the little pre-game ritual you do before you ask for a selection. π
π NAME π
XtSetSelectionParameters β specify target parameters for a selection request with a single target. periodt. π―
πΈ SYNTAX πΈ
#include <X11/Intrinsic.h>
void XtSetSelectionParameters(Widget requestor, Atom selection, Atom
type, XtPointer value, unsigned long length, int format);
no cap, that's the whole signature. π«Ά
π ARGUMENTS π
requestorβ the widget that's making the request. it must be of classCoreor any subclass of it, fr fr. like if it's not Core-flavored, we can't do this.selectionβ the atom that names the selection you're going after. π¦typeβ the type of the property that your parameters are gonna get passed around in.valueβ a pointer to the parameters themselves. this is your content, your moment. β¨lengthβ how many elements of data live invalue, and each element is sized according toformat.formatβ the size in bits of the data in the elements ofvalue. it's giving very specific.
π DESCRIPTION π
so here's the tea: the parameters you specified get copied and stored in a brand-new property of the specified type and format, sitting pretty on the requestor's window. π
then, to actually kick off a selection request with a target plus these parameters, you make a subsequent call to XtGetSelectionValue or XtGetSelectionValueIncremental with the same requestor widget and selection atom β that's what generates a ConvertSelection request referring referring to the property containing the parameters. (yes, "referring referring" β that's what the page says, i don't make the rules, i just report them π)
and lowkey important: if you call XtSetSelectionParameters more than once with the same widget and selection, without a call to specify a request in between, then the most recently specified parameters are the ones used in the subsequent request. newest wins, always. π
the possible values offormatmay be8,16, or32. if the format is8, the elements ofvalueare assumed to besizeof(char); if16,sizeof(short); if32,sizeof(long). those three, that's the whole menu, don't try anything else. π«
now for the MULTIPLE target situation β if you wanna generate a MULTIPLE target request with parameters for any of the multiple targets of the selection request, here's the choreography:
- precede individual calls to
XtGetSelectionValueandXtGetSelectionValueIncrementalwith corresponding individual calls toXtSetSelectionParameters - and enclose these all within
XtCreateSelectionRequestandXtSendSelectionRequest
that's the whole dance. π
β οΈ heads up bestie:XtGetSelectionValuesandXtGetSelectionValuesIncrementalcannot be used to make selection requests with parameterized targets. like, at all. not a vibe. sorry. π
π SEE ALSO π
XtGetSelectionParameters(3)- X Toolkit Intrinsics - C Language Interface
- Xlib - C Language X Interface
mwah π that's the whole page β brought to you by X Version 11, libXt 1.3.1, and the date on the original footer. go slay your selection requests, bestie, you've got this πβ¨
π¦ 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