xcb_dri2_get_param(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_get_param πŸ’–

okay bestie, welcome to the xcb_dri2_get_param(3) page β€” yes it's a section 3 manual page, yes it's from libxcb, and yes we're gonna get through it together. it's an XCB request, so it's giving "talk to the X server, get a thing back" energy. let's go πŸ¦‹


✨ NAME ✨

xcb_dri2_get_param β€” and that's literally it 😭 the upstream page just has a lil dash here, no summary, nothing. so we keep it real: name's xcb_dri2_get_param, and the description is a mystery. moving on, bestie πŸ’…


✨ SYNOPSIS ✨

first up, you gotta include the header:

#include <xcb/dri2.h>

πŸŽ€ Request function

xcb_dri2_get_param_cookie_t xcb_dri2_get_param(xcb_connection_t *conn,
       xcb_drawable_t drawable, uint32_t param);

πŸŽ€ Reply datastructure

typedef struct xcb_dri2_get_param_reply_t {
    uint8_t  response_type;
    uint8_t  is_param_recognized;
    uint16_t sequence;
    uint32_t length;
    uint32_t value_hi;
    uint32_t value_lo;
} xcb_dri2_get_param_reply_t;

πŸŽ€ Reply function

xcb_dri2_get_param_reply_t
       *xcb_dri2_get_param_reply(xcb_connection_t *conn,
       xcb_dri2_get_param_cookie_t cookie, xcb_generic_error_t **e);

so you fire off the request, you get a cookie back, and then you trade that cookie in for the actual reply. that's the whole vibe πŸ”₯


🌸 REQUEST ARGUMENTS 🌸

  • conn β€” your XCB connection to X11. the lil friendship bracelet that ties you to the server 🫢
  • drawable β€” TODO: NOT YET DOCUMENTED. yeah bestie, upstream never wrote this one up. not me making up facts, we're keeping it exactly as-is πŸ™ˆ
  • param β€” TODO: NOT YET DOCUMENTED. same situation. the docs said "later" and later never came πŸ’€

πŸ¦‹ REPLY FIELDS πŸ¦‹

  • response_type β€” the type of this reply, and in this case it's XCB_DRI2_GET_PARAM. 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 giving "name tag at the party" πŸ‘‘
  • sequence β€” the sequence number of the last request the X11 server processed. yes, the server keeps receipts ✨
  • length β€” how long the reply is, in words. and heads up: a word here is 4 bytes. not a dictionary word. a four-byte word. iykyk πŸ’…
  • is_param_recognized β€” TODO: NOT YET DOCUMENTED. blank. empty. nothing. the void stared back 😭
  • value_hi β€” TODO: NOT YET DOCUMENTED. also undocumented, also mysterious, also still in the struct so we still list it 🌈
  • value_lo β€” TODO: NOT YET DOCUMENTED. same energy, bestie. documented: nope. present in the struct: absolutely πŸ’œ

πŸ’… DESCRIPTION πŸ’…

there is no description. like, the section exists and then... nothing. the upstream authors really said "describe it? in this economy?" 😭 so we're not inventing one, because inventing facts is not the move. it's iconic in a "left on read" kind of way. periodt.


⭐ RETURN VALUE ⭐

it returns an xcb_dri2_get_param_cookie_t. so what about errors? bestie, errors get handled when you call the reply function xcb_dri2_get_param_reply. that's the moment of truth πŸ’–

but if you'd rather deal with errors in the event loop instead of right at the reply call, use xcb_dri2_get_param_unchecked. and for the full tea on how all that works, go read xcb-requests(3) β€” it explains the details 🌸


🧚 ERRORS 🧚

this request does never generate any errors.

not one. zero. clean sheet. slay πŸ”₯


πŸŽ€ SEE ALSO πŸŽ€

and the SEE ALSO section is... empty. no references listed, nothing to link out to. sometimes the void is the whole section, and we respect it πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

generated from dri2.xml. if you wanna send corrections and improvements, hit up xcb@lists.freedesktop.org. they're taking notes, bestie 🫢


and that's the page!! footer time: this beauty comes to you from X Version 11, shipped in libxcb 1.17.0, and it's filed as xcb_dri2_get_param(3). stay hydrated, read your manpages, and go get that param πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’