xcb_dri2_wait_sbc(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_dri2_wait_sbc ✨

okay bestie, pull up a chair 🫢 because today we're reading xcb_dri2_wait_sbc(3), straight out of the XCB Requests collection. it's a lil XCB request from the dri2 era, and honestly? the docs are giving mysterious. we're gonna walk through every single line together, no skipping, periodt. πŸ’–


🌸 NAME 🌸

xcb_dri2_wait_sbc β€” and then… nothing. literally nothing. the description is blank. the manpage just trails off into the void like my attention span during a 3-hour lecture. 😭 that's not me being lazy, that's just what's actually written. iconic honestly.


πŸŽ€ SYNOPSIS πŸŽ€

first thing you gotta do is pull in the header:

#include <xcb/dri2.h>

Request function

here's the actual request, in all its glory:

xcb_dri2_wait_sbc_cookie_t xcb_dri2_wait_sbc(xcb_connection_t *conn,
       xcb_drawable_t drawable, uint32_t target_sbc_hi,
       uint32_t target_sbc_lo);

Reply datastructure

and here's the struct that comes back at you:

typedef struct xcb_dri2_wait_sbc_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t ust_hi;
    uint32_t ust_lo;
    uint32_t msc_hi;
    uint32_t msc_lo;
    uint32_t sbc_hi;
    uint32_t sbc_lo;
} xcb_dri2_wait_sbc_reply_t;

Reply function

and the function that actually hands you that struct:

xcb_dri2_wait_sbc_reply_t
       *xcb_dri2_wait_sbc_reply(xcb_connection_t *conn,
       xcb_dri2_wait_sbc_cookie_t cookie, xcb_generic_error_t **e);

πŸ¦‹ REQUEST ARGUMENTS πŸ¦‹

okay so here's what you're passing in:

  • conn β€” your XCB connection to X11. the whole reason we're here, the main character of every XCB function tbh. πŸ‘‘
  • drawable β€” TODO: NOT YET DOCUMENTED. yeah. they said "we'll get to it" and then never did. πŸ’€
  • target_sbc_hi β€” TODO: NOT YET DOCUMENTED. same vibe. 🫠
  • target_sbc_lo β€” TODO: NOT YET DOCUMENTED. the trilogy of unfinished business, fr fr.

πŸ’œ REPLY FIELDS πŸ’œ

here's everything that comes back in the reply struct:

  • response_type β€” the type of this reply, and for this one it's XCB_DRI2_WAIT_SBC. this field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. it's like a name tag at a party but for structs. πŸŽ€
  • sequence β€” the sequence number of the last request processed by the X11 server. tracking numbers but make it ✨server✨.
  • length β€” the length of the reply, in words. and heads up, a word here is 4 bytes. not a dictionary word. computer word. iykyk. 🧠
  • ust_hi β€” TODO: NOT YET DOCUMENTED.
  • ust_lo β€” TODO: NOT YET DOCUMENTED.
  • msc_hi β€” TODO: NOT YET DOCUMENTED.
  • msc_lo β€” TODO: NOT YET DOCUMENTED.
  • sbc_hi β€” TODO: NOT YET DOCUMENTED.
  • sbc_lo β€” TODO: NOT YET DOCUMENTED.

so many hi/lo pairs and so little documentation. it's giving unsolved mystery podcast. πŸ™ˆ


🌈 DESCRIPTION 🌈

literally nothing here. the DESCRIPTION section is empty. bestie the void is voiding. 😭

⭐ RETURN VALUE ⭐

it returns an xcb_dri2_wait_sbc_cookie_t. πŸͺ and listen β€” errors have to be handled when you call the reply function xcb_dri2_wait_sbc_reply. so you don't get to just ignore them, you gotta deal with them at reply time.

but wait, there's a plot twist ✨ β€” if you'd rather handle errors in the event loop instead, use xcb_dri2_wait_sbc_unchecked. see xcb-requests(3) for all the deets on how that works.


πŸ’€ ERRORS πŸ’€

good news bestie: this request never generates any errors. not a single one. it's the low-drama friend of the group chat. no cap. πŸ•ŠοΈ


πŸ”₯ SEE ALSO πŸ”₯

this section is empty. no cross-references listed. it's giving "i have no friends" but in manpage form. 😭 (not true tho, xcb-requests(3) got mentioned up in RETURN VALUE, so go read that one πŸ’–)

πŸ‘‘ AUTHOR πŸ‘‘

generated from dri2.xml. and if you spot something wrong or wanna make it better, contact xcb@lists.freedesktop.org for corrections and improvements. they're literally asking for feedback, so if you find something, say something. 🫢


and that's the whole page, bestie! πŸ’… this one came to you from X Version 11 and libxcb 1.17.0, and the manual page itself is xcb_dri2_wait_sbc(3). now go forth and handle those errors in the event loop, mwah. πŸŒΈβœ¨πŸŽ€