xcb_query_extension(3)
π xcb_query_extension β bestie, is that extension even here? π
okay so this is the manual page for xcb_query_extension(3) and it's literally just "hey X server, do you have this extension??" energy. no cap. let's get into it π«Ά
β¨ NAME β¨
xcb_query_extension β check if extension is present
πΈ SYNOPSIS πΈ
#include <xcb/xproto.h>
π Request function
xcb_query_extension_cookie_t xcb_query_extension(xcb_connection_t *conn,
uint16_t name_len, const char *name);
π Reply datastructure
typedef struct xcb_query_extension_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint8_t present;
uint8_t major_opcode;
uint8_t first_event;
uint8_t first_error;
} xcb_query_extension_reply_t;
π Reply function
xcb_query_extension_reply_t
*xcb_query_extension_reply(xcb_connection_t *conn,
xcb_query_extension_cookie_t cookie, xcb_generic_error_t **e);
π REQUEST ARGUMENTS π
connβ your XCB connection to X11. the whole vibe check happens through this.name_lenβ how longnameis, in bytes. yes, bytes. count carefully bestie πnameβ the name of the extension you're asking about, like"RANDR". and listen: this is case sensitive!"randr"is NOT"RANDR". she's picky. π
π¦ REPLY FIELDS π¦
response_typeβ the type of this reply, and in this case it'sXCB_QUERY_EXTENSION. this field is also chillin' in thexcb_generic_reply_tand you can use it to tell replies apart from each other. it's giving β¨name tagβ¨sequenceβ the sequence number of the last request the X11 server processed.lengthβ the length of the reply, in words (and a word is 4 bytes, so do the math π₯).presentβ whether the extension is actually present on this X11 server. the moment of truth πmajor_opcodeβ the major opcode for requests.first_eventβ the first event code, if any.first_errorβ the first error code, if any.
π DESCRIPTION π
Determines if the specified extension is present on this X11 server. that's the whole plot. π¬
Every extension has a unique major_opcode to identify requests, and the minor opcodes plus request formats are extension-specific. if the extension provides events and errors, the first_event and first_error fields in the reply get set accordingly. iconic behavior honestly.
real talk: there should rarely be a need to use this request directly β XCB provides the xcb_get_extension_data function instead. use that one bestie, she's the shortcut π«Ά
β RETURN VALUE β
Returns an xcb_query_extension_cookie_t. errors have to be handled when you call the reply function xcb_query_extension_reply.
If you want to handle errors in the event loop instead, use xcb_query_extension_unchecked. see xcb-requests(3) for details. two paths, pick your fighter β¨
π ERRORS π
This request does never generate any errors. not one. zero. she's flawless, she's unbothered, she does not miss π
π SEE ALSO π
xcb-requests(3)xcb_get_extension_data(3)xdpyinfo(1)
π AUTHOR π
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. they really said "made by the machine, fixed by the people" fr fr π
okay that's the whole page, mwah π this one came out of X Version 11, libxcb 1.17.0, and it's the xcb_query_extension(3) era of your life now. go query something. go be the main character. periodt. π§β¨
π¦ 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