xcb_get_selection_owner(3)
π xcb_get_selection_owner β XCB Requests, bestie edition
okay so this is xcb_get_selection_owner(3), a lil XCB request page, and we're gonna learn her together π«Ά she lives in libxcb and she answers exactly one question: who owns this selection rn π
β¨ NAME β¨
xcb_get_selection_owner β gets the owner of a selection πΈ
π¦ SYNOPSIS π¦
#include <xcb/xproto.h>
Request function π
xcb_get_selection_owner_cookie_t
xcb_get_selection_owner(xcb_connection_t *conn,
xcb_atom_t selection);
Reply datastructure π
typedef struct xcb_get_selection_owner_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
xcb_window_t owner;
} xcb_get_selection_owner_reply_t;
Reply function β¨
xcb_get_selection_owner_reply_t
*xcb_get_selection_owner_reply(xcb_connection_t *conn,
xcb_get_selection_owner_cookie_t cookie,
xcb_generic_error_t **e);
π REQUEST ARGUMENTS π
connβ the XCB connection to X11, aka your lil hotline to the server πselectionβ the selection. that's it, that's the argument, she's just The Selection π
π REPLY FIELDS π
response_typeβ the type of this reply, and in this case it'sXCB_GET_SELECTION_OWNER. this field also lives in thexcb_generic_reply_t, and you can use it to tell replies apart from each other, no cap πsequenceβ the sequence number of the last request processed by the X11 server π’lengthβ the length of the reply, in words. and yes, a word is 4 bytes, periodt πownerβ the current selection owner window πͺβ¨
π DESCRIPTION π
Gets the owner of the specified selection. simple. iconic. does exactly what it says on the tin π«Ά
TODO: briefly explain what a selection is. β yeah bestie, the manpage literally says this, we're not gonna pretend otherwise π iykyk
π₯ RETURN VALUE π₯
Returns an xcb_get_selection_owner_cookie_t πͺ errors have to be handled when you call the reply function xcb_get_selection_owner_reply.
If you'd rather handle errors in the event loop instead, use xcb_get_selection_owner_unchecked. See xcb-requests(3) for details π
π ERRORS π
xcb_atom_error_tβselectiondoes not refer to a valid atom. not a valid atom, not a vibe, request denied π
π SEE ALSO π
π§ AUTHOR π§
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements π¬ (yes, actual humans, go be helpful π)
mwah, that's the whole page bestie, you ate π
β¨ this lil number ships as part of X Version 11, libxcb 1.17.0, and the page is xcb_get_selection_owner(3) β go forth and query some owners, you've got this πΈπ¦π
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms