xcb_sync_query_counter(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_sync_query_counter β€” the XCB Requests girlies' guide πŸ’–

okay so bestie, welcome to xcb_sync_query_counter from libxcb β€” it lives in section 3 of the manual (that's the XCB Requests chapter, iykyk) and it's literally just here to go ask the X server what a counter is up to. no cap. πŸ¦‹


✨ NAME ✨

xcb_sync_query_counter β€” (the original page leaves this blank, so we're keeping it blank, periodt πŸ’…)


🌸 SYNOPSIS 🌸

#include <xcb/sync.h>

πŸŽ€ Request function

xcb_sync_query_counter_cookie_t
       xcb_sync_query_counter(xcb_connection_t *conn,
       xcb_sync_counter_t counter);

πŸŽ€ Reply datastructure

typedef struct xcb_sync_query_counter_reply_t {
    uint8_t          response_type;
    uint8_t          pad0;
    uint16_t         sequence;
    uint32_t         length;
    xcb_sync_int64_t counter_value;
} xcb_sync_query_counter_reply_t;

πŸŽ€ Reply function

xcb_sync_query_counter_reply_t
       *xcb_sync_query_counter_reply(xcb_connection_t *conn,
       xcb_sync_query_counter_cookie_t cookie, xcb_generic_error_t **e);

🫢 REQUEST ARGUMENTS 🫢

  • conn β€” the XCB connection to X11, aka your lil hotline to the server. πŸ“ž
  • counter β€” TODO: NOT YET DOCUMENTED. (not me documenting the undocumented... the original literally says this, so we're saying it too πŸ™ˆ)

⭐ REPLY FIELDS ⭐

  • response_type β€” the type of this reply, and in this case it's XCB_SYNC_QUERY_COUNTER. plot twist: this field is also chilling inside xcb_generic_reply_t, so you can use it to tell your replies apart from each other. very main character of it. πŸ‘‘
  • sequence β€” the sequence number of the last request the X11 server processed. the receipts, basically. 🧾
  • length β€” how long the reply is, in words. and a word is 4 bytes, bestie, don't forget. πŸ“
  • counter_value β€” TODO: NOT YET DOCUMENTED. again fr fr 😭

🌈 DESCRIPTION 🌈

(yeah... the original page has nothing here either. iconic of it, honestly. nothing to see, move along πŸ’œ)


πŸ”₯ RETURN VALUE πŸ”₯

It returns an xcb_sync_query_counter_cookie_t. and here's the thing β€” errors have to be handled when you call the reply function xcb_sync_query_counter_reply.

If you'd rather handle errors in the event loop instead, use xcb_sync_query_counter_unchecked. see xcb-requests(3) for the deets. ✨


πŸ’€ ERRORS πŸ’€

This request does never generate any errors. zero. none. a whole clean slate, slay. πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

(the original page lists absolutely nothing here β€” no references, no friends, nothing. it's giving solitary confinement πŸ’…)


🌸 AUTHOR 🌸

Generated from sync.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. 🫢


and that's the whole page, bestie!! mwah πŸ’– okay so the tiny print at the bottom of the original said X Version 11, libxcb 1.17.0, and the page name xcb_sync_query_counter(3) β€” consider this your cute lil sign-off, go forth and query those counters, you absolute icon πŸ‘‘βœ¨πŸ’œ