xcb_composite_query_version(3)

๐Ÿ“ฆ
version 1.17.0 ยท 5 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_composite_query_version โ€” bestie, let's negotiate ๐Ÿ’…

okay so this is xcb_composite_query_version(3), from the XCB Requests fam, and it's literally the vibe-check you do before you talk to the Composite extension. you show up, you say "hey what version are we on", and the server tells you. that's the whole plot. ๐ŸŽ€


โœจ NAME โœจ

xcb_composite_query_version โ€” Negotiate the version of Composite


โœจ SYNOPSIS โœจ

#include <xcb/composite.h>

๐Ÿฆ‹ Request function

xcb_composite_query_version_cookie_t
       xcb_composite_query_version(xcb_connection_t *conn,
       uint32_t client_major_version, uint32_t client_minor_version);

๐Ÿฆ‹ Reply datastructure

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

๐Ÿฆ‹ Reply function

xcb_composite_query_version_reply_t
       *xcb_composite_query_version_reply(xcb_connection_t *conn,
       xcb_composite_query_version_cookie_t cookie,
       xcb_generic_error_t **e);

๐ŸŒธ REQUEST ARGUMENTS ๐ŸŒธ

  • conn โ€” your XCB connection to X11, the group chat you're posting in. ๐Ÿ’ฌ
  • client_major_version โ€” the major version your client supports. this is you stating your terms, bestie.
  • client_minor_version โ€” the minor version your client supports. the little number riding along with the big one. โœจ

๐Ÿซถ REPLY FIELDS ๐Ÿซถ

  • response_type โ€” what kind of reply this is, and in this case it's XCB_COMPOSITE_QUERY_VERSION. this field also lives in xcb_generic_reply_t, so it's the thing that lets you tell replies apart from each other. it's giving name tag at a party. ๐Ÿท๏ธ
  • sequence โ€” the sequence number of the last request the X11 server actually got around to processing. ๐Ÿ“‹
  • length โ€” how long the reply is, measured in words. and no, not vibes-words โ€” a word here is 4 bytes. ๐Ÿงฎ
  • major_version โ€” the major version the server chose. the server has opinions and this is them.
  • minor_version โ€” the minor version the server chose. the sequel number. ๐Ÿ’–

๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

This negotiates the version of the Composite extension. that's the whole job, no notes.

โš ๏ธ no cap, this part matters: it must precede all other requests using Composite. like, all of them. Failure to do so will cause a BadRequest error. so do the handshake first or the server WILL be petty about it. ๐Ÿ’€

๐Ÿ”ฅ RETURN VALUE ๐Ÿ”ฅ

It returns an xcb_composite_query_version_cookie_t. Errors have to be handled when calling the reply function xcb_composite_query_version_reply.

If you'd rather handle errors in the event loop instead, use xcb_composite_query_version_unchecked. See xcb-requests(3) for details. pick your fighter, both are valid. โœจ


๐Ÿ˜ญ ERRORS ๐Ÿ˜ญ

This request does never generate any errors. iconic behaviour honestly, zero drama, we love a clean request. ๐Ÿ‘‘


๐Ÿ’œ SEE ALSO ๐Ÿ’œ


๐Ÿงš AUTHOR ๐Ÿงš

Generated from composite.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. so if something's off, that's the inbox, go be helpful. ๐Ÿซถ


and that's the whole page, bestie!! this one shipped with X Version 11, libxcb 1.17.0, and it answers to xcb_composite_query_version(3) โ€” go forth, negotiate your versions, and slay ๐Ÿ’…โœจ๐ŸŒˆ