xcb_shm_query_version(3)
π xcb_shm_query_version β bestie, what version of MIT-SHM are we even working with?? π
okay so this is a page from the XCB Requests manual (section 3, we're fancy like that β¨), and it's all about xcb_shm_query_version. It's giving "hi X server, pls tell me what flavor of the MIT-SHM extension you're running" and honestly? iconic behavior. π
πΈ NAME πΈ
xcb_shm_query_version β Query the version of the MIT-SHM extension.
Like, that's it. That's the whole job. Go find out the version. π
β¨ SYNOPSIS β¨
#include <xcb/shm.h>
π¦ Request function π¦
xcb_shm_query_version_cookie_t
xcb_shm_query_version(xcb_connection_t *conn,
π Reply datastructure π
typedef struct xcb_shm_query_version_reply_t {
uint8_t response_type;
uint8_t shared_pixmaps;
uint16_t sequence;
uint32_t length;
uint16_t major_version;
uint16_t minor_version;
uint16_t uid;
uint16_t gid;
uint8_t pixmap_format;
uint8_t pad0[15];
} xcb_shm_query_version_reply_t;
π§ Reply function π§
xcb_shm_query_version_reply_t
*xcb_shm_query_version_reply(xcb_connection_t *conn,
xcb_shm_query_version_cookie_t cookie, xcb_generic_error_t **e);
π REQUEST ARGUMENTS π
connβ The XCB connection to X11. literally just your connection to the server, your little chat thread with X. π
π REPLY FIELDS π
okay bestie here's the tea the server sends back, field by field, no cap:
response_typeβ The type of this reply, in this caseXCB_SHM_QUERY_VERSION. This field is also present in thexcb_generic_reply_tand can be used to tell replies apart from each other. it's the little name tag so you know which reply just walked in the room. πsequenceβ The sequence number of the last request processed by the X11 server. like a receipt number fr fr.lengthβ The length of the reply, in words (a word is 4 bytes). yes, words. not vibes. 4 bytes each. πshared_pixmapsβ True if the server supports shared pixmaps, otherwise false. a simple yes/no, we love a boolean that commits. π«Άmajor_versionβ The major version of the extension supported. the big number energy. π₯minor_versionβ The minor version of the extension supported. the little number that tags along. πuidβ The UID of the server.gidβ The GID of the server.pixmap_formatβ TODO: NOT YET DOCUMENTED. (the docs said "we'll get to it" and then never got to it. we've all been there π)
β DESCRIPTION β
This is used to determine the version of the MIT-SHM extension supported by the X server.
π¨ BIG IMPORTANT ONE, NO SKIPPING: Clients MUST NOT make other requests in this extension until a reply to this request indicates the X server supports them. like, do NOT run ahead. wait for the server to text back first. patience is a whole personality trait and here it's a requirement. π
π RETURN VALUE π
Returns an xcb_shm_query_version_cookie_t. Errors have to be handled when calling the reply function xcb_shm_query_version_reply. so you get the cookie now, and the actual answer later when you come back for it. very "order at the counter, pick it up when they call your name." π
If you want to handle errors in the event loop instead, use xcb_shm_query_version_unchecked. See xcb-requests(3) for details. iykyk. β¨
π ERRORS π
This request does never generate any errors. zero drama. not a single error to its name. we love a low-maintenance request. πΈ
π₯ SEE ALSO π₯
π AUTHOR π
Generated from shm.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
like, if something's wrong, don't just side-eye it β email them. they're literally asking. π«Ά
okay that's the whole page bestie, go query those versions responsibly β¨
signing off with the receipts: this one came out of X Version 11, libxcb 1.17.0, and it's filed under xcb_shm_query_version(3). mwah. π
πππ¦
π¦ 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