xcb_xf86dri_get_drawable_info(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_xf86dri_get_drawable_info β€” bestie, it's a whole XCB request

okay so real talk: this page lives in the XCB Requests section of the manual (yes, that's the manual name, we're being fancy), and it's all about xcb_xf86dri_get_drawable_info(3). it's giving "ask the X server about a drawable's info" energy. come sit with me 🫢


✨ NAME ✨

xcb_xf86dri_get_drawable_info β€” (yeah the official NAME line is just... empty bestie, the original says nothing here, so we're not gonna invent anything. iconic of them honestly. πŸ™ˆ)


🌸 SYNOPSIS 🌸

#include <xcb/xf86dri.h>

πŸŽ€ Request function

xcb_xf86dri_get_drawable_info_cookie_t
       xcb_xf86dri_get_drawable_info(xcb_connection_t *conn,
       uint32_t screen, uint32_t drawable);

πŸ¦‹ Reply datastructure

typedef struct xcb_xf86dri_get_drawable_info_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t drawable_table_index;
    uint32_t drawable_table_stamp;
    int16_t  drawable_origin_X;
    int16_t  drawable_origin_Y;
    int16_t  drawable_size_W;
    int16_t  drawable_size_H;
    uint32_t num_clip_rects;
    int16_t  back_x;
    int16_t  back_y;
    uint32_t num_back_clip_rects;
} xcb_xf86dri_get_drawable_info_reply_t;

πŸ’– Reply function

xcb_xf86dri_get_drawable_info_reply_t
       *xcb_xf86dri_get_drawable_info_reply(xcb_connection_t *conn,
       xcb_xf86dri_get_drawable_info_cookie_t cookie,
       xcb_generic_error_t **e);

⭐ Reply accessors

xcb_xf86dri_drm_clip_rect_t
       *xcb_xf86dri_get_drawable_info_clip_rects(const
       xcb_xf86dri_get_drawable_info_request_t *reply);

int xcb_xf86dri_get_drawable_info_clip_rects_length(const
       xcb_xf86dri_get_drawable_info_reply_t *reply);

xcb_xf86dri_drm_clip_rect_iterator_t
       xcb_xf86dri_get_drawable_info_clip_rects_iterator(const
       xcb_xf86dri_get_drawable_info_reply_t *reply);

xcb_xf86dri_drm_clip_rect_t
       *xcb_xf86dri_get_drawable_info_back_clip_rects(const
       xcb_xf86dri_get_drawable_info_request_t *reply);

int xcb_xf86dri_get_drawable_info_back_clip_rects_length(const
       xcb_xf86dri_get_drawable_info_reply_t *reply);

xcb_xf86dri_drm_clip_rect_iterator_t
       xcb_xf86dri_get_drawable_info_back_clip_rects_iterator(const
       xcb_xf86dri_get_drawable_info_reply_t *reply);
bestie the accessor signatures are verbatim, don't let anyone touch a single character. πŸ‘‘

πŸ”₯ REQUEST ARGUMENTS πŸ”₯

  • conn β€” the XCB connection to X11. it's the group chat you're sending the message into. πŸ“¨
  • screen β€” TODO: NOT YET DOCUMENTED. yeah. the manpage literally says that. we respect the mystery. πŸ•΅οΈ
  • drawable β€” TODO: NOT YET DOCUMENTED. same vibes. nobody wrote it down yet. 😭

πŸ’œ REPLY FIELDS πŸ’œ

  • response_type β€” the type of this reply, and in this case it's XCB_XF86DRI_GET_DRAWABLE_INFO. 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 the little name tag at the party. 🏷️
  • sequence β€” the sequence number of the last request the X11 server actually processed. the receipt, basically. 🧾
  • length β€” how long the reply is, in words (and a word is 4 bytes, no cap).
  • drawable_table_index β€” TODO: NOT YET DOCUMENTED.
  • drawable_table_stamp β€” TODO: NOT YET DOCUMENTED.
  • drawable_origin_X β€” TODO: NOT YET DOCUMENTED.
  • drawable_origin_Y β€” TODO: NOT YET DOCUMENTED.
  • drawable_size_W β€” TODO: NOT YET DOCUMENTED.
  • drawable_size_H β€” TODO: NOT YET DOCUMENTED.
  • num_clip_rects β€” TODO: NOT YET DOCUMENTED.
  • back_x β€” TODO: NOT YET DOCUMENTED.
  • back_y β€” TODO: NOT YET DOCUMENTED.
  • num_back_clip_rects β€” TODO: NOT YET DOCUMENTED.

🌈 DESCRIPTION 🌈

so, um. the DESCRIPTION section on the original page is... empty. like, genuinely nothing there. the author left us on read. πŸ’€ we are not going to make stuff up, because making up technical facts is not the move β€” that's how you get cursed. so: description = silence, and we honor the silence. πŸŽ€


🫢 RETURN VALUE 🫢

it returns an xcb_xf86dri_get_drawable_info_cookie_t. that's your little claim ticket, bestie β€” the actual tea comes later. 🍡

errors have to be handled when you call the reply function xcb_xf86dri_get_drawable_info_reply.

and if you'd rather handle errors in the event loop instead? use xcb_xf86dri_get_drawable_info_unchecked. see xcb-requests(3) for the details, they explain it way better than me. πŸ’–


πŸ’€ ERRORS πŸ’€

this request never generates any errors. zero. none. it's the chillest request at the function. πŸ§˜β€β™€οΈβœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

(the original page has nothing listed under SEE ALSO β€” so there's nothing to link, and I'm not gonna manifest references out of thin air. it's giving minimalist. πŸ’…)


πŸ¦‹ AUTHOR πŸ¦‹

generated from xf86dri.xml. contact xcb@lists.freedesktop.org for corrections and improvements β€” they're genuinely lovely about it, fr fr. 🫢


and that's the whole page, bestie!! 🌸 source/version: X Version 11, libxcb 1.17.0, and it's all filed under xcb_xf86dri_get_drawable_info(3). slay, go read the header file, ily, bye!! πŸ’–βœ¨πŸŽ€πŸ¦‹