xcb_res_query_version(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ xcb_res_query_version ✨

okay bestie, so this is a lil XCB request from the res extension family β€” it's called xcb_res_query_version and it lives in the libxcb world, page 3 of the manual. it's giving "hi, what version are we on" energy, and honestly? iconic. πŸŽ€


🌸 SYNOPSIS 🌸

first things first, you gotta pull in the header:

#include <xcb/res.h>

πŸ’– Request function

xcb_res_query_version_cookie_t
       xcb_res_query_version(xcb_connection_t *conn,
       uint8_t client_major, uint8_t client_minor);

πŸ¦‹ Reply datastructure

typedef struct xcb_res_query_version_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t server_major;
    uint16_t server_minor;
} xcb_res_query_version_reply_t;

🧚 Reply function

xcb_res_query_version_reply_t
       *xcb_res_query_version_reply(xcb_connection_t *conn,
       xcb_res_query_version_cookie_t cookie, xcb_generic_error_t **e);

πŸ’… REQUEST ARGUMENTS πŸ’…

  • conn β€” the XCB connection to X11. she's the whole group chat, fr.
  • client_major β€” TODO: NOT YET DOCUMENTED. yeah bestie, even the docs are being mysterious. 😭
  • client_minor β€” TODO: NOT YET DOCUMENTED. same vibe, same mystery. πŸ™ˆ

🌈 REPLY FIELDS 🌈

  • response_type β€” the type of this reply, and in this specific case it's XCB_RES_QUERY_VERSION. this field also shows up in the xcb_generic_reply_t, so you can use it to tell replies apart from each other. so useful, so slay. πŸ‘‘
  • sequence β€” the sequence number of the last request processed by the X11 server. she's keeping receipts. πŸ’€
  • length β€” the length of the reply, in words (and a word here is 4 bytes, no cap). πŸ“
  • server_major β€” TODO: NOT YET DOCUMENTED. the mystery continues 🫢
  • server_minor β€” TODO: NOT YET DOCUMENTED. mystery level: unlocked πŸ”₯

✨ DESCRIPTION ✨

…so there's literally nothing here. like, the DESCRIPTION section is just vibes and empty space. no notes. moving on. πŸŽ€


🫢 RETURN VALUE 🫢

she returns an xcb_res_query_version_cookie_t. and listen β€” errors have to be handled when you call the reply function, xcb_res_query_version_reply. that's the moment of truth, bestie.

if you'd rather handle errors in the event loop instead, use xcb_res_query_version_unchecked. see xcb-requests(3) for the deets. iykyk. πŸ’–


πŸ’€ ERRORS πŸ’€

this request does never generate any errors. not one. zero. she's unproblematic like that. ✨

πŸ”₯ SEE ALSO πŸ”₯

…nothing listed. it's giving empty. it's giving "the see also section went to get milk". 😭


🌟 AUTHOR 🌟

generated from res.xml. contact xcb@lists.freedesktop.org for corrections and improvements β€” they're the ones to slide into, fr fr. πŸ’Œ


and that's the whole page, bestie πŸ’œ big kisses to X Version 11 and to libxcb 1.17.0 for making this lil xcb_res_query_version(3) moment possible. go query your versions, queen. πŸŽ€βœ¨πŸ¦‹