XtCreateSelectionRequest(3)
π XtCreateSelectionRequest β XT FUNCTIONS, bestie
okay so this is the page for XtCreateSelectionRequest(3), and it's the one that lets you bundle a whole lil group chat of selection conversion requests into ONE single request using the MULTIPLE target. no cap. π«Ά
β¨ NAME β¨
XtCreateSelectionRequest, XtSendSelectionRequest, XtCancelSelectionRequest β bundle multiple selection conversion requests into a single request using MULTIPLE target π
πΈ SYNTAX πΈ
#include <X11/Intrinsic.h>
void XtCreateSelectionRequest(Widget requestor, Atom selection);
void XtSendSelectionRequest(Widget requestor, Atom selection, Time
time);
void XtCancelSelectionRequest(Widget requestor, Atom selection);
π ARGUMENTS π
requestorβ the widget that's making the request. she must be of classCoreor a subclass of it, periodt. no random widgets allowed, iykyk.selectionβ the specific selection you want, bestie. like, the one.timeβ the timestamp that gets used when the request is actually made. β°
π DESCRIPTION π
So here's the vibe. When you call XtCreateSelectionRequest, everything you do after that with XtGetSelectionValue and XtGetSelectionValueIncremental β as long as they use the same requestor and selection you gave to XtCreateSelectionRequest β gets bundled up into a single selection conversion request with multiple targets. it's giving β¨organizedβ¨. but heads up: the request doesn't actually go anywhere yet, it's just queued. the real sending happens when you call XtSendSelectionRequest. π
When XtSendSelectionRequest gets called with a requestor and selection that match a previous call to XtCreateSelectionRequest, that's when a selection conversion request actually gets sent to the selection owner. the way that works:
- if only a single target request is queued, that request is made. simple. π
- if multiple targets are queued, they get bundled into one single request with the target
MULTIPLE, using the timestamp you specified. icon behavior, honestly.
and as the conversions get made, the callbacks tied to each XtGetSelectionValue and XtGetSelectionValueIncremental get invoked in turn. one after another. slay. π
multi-threaded besties, this one's for you: lock the application context before callingXtCreateSelectionRequest, and release that lock after callingXtSendSelectionRequest. that way the thread assembling the request is safe from another thread interfering while it's assembling a different request that names the same widget and selection. it's literally the whole point. don't skip this. π
And when XtCancelSelectionRequest gets called? any requests that were queued since the last call to XtCreateSelectionRequest get cleaned up. π§Ή gone. and after that, subsequent calls to XtGetSelectionValue, XtGetSelectionValues, XtGetSelectionValueIncremental, and XtGetSelectionValuesIncremental will not be deferred anymore. we're back to normal, no bundling, no queueing, just vibes. π
π¦ SEE ALSO π¦
- X Toolkit Intrinsics - C Language Interface
- Xlib - C Language Interface
π sign-off π
that's the whole page, bestie β brought to you by X Version 11, libXt 1.3.1, and the letter XtCreateSelectionRequest(3). go forth and bundle those requests responsibly, main character. πβ¨π
π¦ 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