xcb_dbe_query_version(3)

πŸ’… xcb_dbe_query_version β€” the vibe check for your extension

okay bestie, so this is xcb_dbe_query_version, from the <xcb/dbe.h> header β€” it's the little function that asks the X server hey, what version of the DBE extension are you even running? and honestly? it's giving responsible coder energy. πŸŽ€


✨ SYNOPSIS ✨

first, the include, because we don't gatekeep:

#include <xcb/dbe.h>

🌸 Request function

xcb_dbe_query_version_cookie_t
       xcb_dbe_query_version(xcb_connection_t *conn,
       uint8_t major_version, uint8_t minor_version);

πŸ¦‹ Reply datastructure

typedef struct xcb_dbe_query_version_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint8_t  major_version;
    uint8_t  minor_version;
    uint8_t  pad1[22];
} xcb_dbe_query_version_reply_t;

🧚 Reply function

xcb_dbe_query_version_reply_t
       *xcb_dbe_query_version_reply(xcb_connection_t *conn,
       xcb_dbe_query_version_cookie_t cookie, xcb_generic_error_t **e);

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” your XCB connection to X11, the whole reason we're here. πŸ’«
  • major_version β€” the major version of the extension you're asking about. Bestie, pls check that it's compatible with the XCB_DBE_MAJOR_VERSION your code was compiled with. like, actually check it. πŸ™ˆ
  • minor_version β€” same deal but minor. Check it plays nice with the XCB_DBE_MINOR_VERSION that your code is compiled with. βœ…

πŸ‘‘ REPLY FIELDS πŸ‘‘

  • response_type β€” the type of this reply, which in this case is XCB_DBE_QUERY_VERSION. It's also chillin' in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. no confusion, periodt. πŸ’…
  • sequence β€” the sequence number of the last request the X11 server actually processed. ⏱️
  • length β€” how long the reply is, in words. and yes, a word is 4 bytes, that's just the lore. πŸ”₯
  • major_version β€” TODO: NOT YET DOCUMENTED. (not me leaving it as-is, it's literally what the page says 😭)
  • minor_version β€” TODO: NOT YET DOCUMENTED. (same energy, same honesty πŸ’€)

🌈 DESCRIPTION 🌈

Queries the version of this extension. That's it, that's the function.

But here's the important bit, and I mean it: you must do this before using any functionality it provides. Like, this is the pre-req, the entry ticket, the vibe check before the main event. skip it and you're on your own. 🫢


⭐ RETURN VALUE ⭐

It hands you back an xcb_dbe_query_version_cookie_t. Cookies are cute but they're not the whole answer β€” errors have to be handled when you call the reply function, xcb_dbe_query_version_reply.

If you'd rather handle errors in the event loop instead, use xcb_dbe_query_version_unchecked. See xcb-requests(3) for the deets. πŸ“š


πŸ’€ ERRORS πŸ’€

This request does never generate any errors. iconic behaviour honestly, zero drama. ✨


πŸŽ€ SEE ALSO πŸŽ€


πŸ’œ AUTHOR πŸ’œ

Generated from dbe.xml. Contact xcb@lists.freedesktop.org for corrections and improvements β€” they're literally taking suggestions, bestie. 🫢


and that's the whole page!! this came to you from X Version 11, libxcb 1.17.0, and the manual page known as xcb_dbe_query_version(3). tysm for reading, go query that version, slay, and remember: check your versions before you ship πŸ’–βœ¨