XCB_GLX_GET_DRAWABLE_ATTRIBUTES(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_glx_get_drawable_attributes πŸ’–

okay so bestie, welcome to the XCB Requests corner of the libxcb cinematic universe, section 3, and today's main character is xcb_glx_get_drawable_attributes. it's giving "ask the X server about a GLX drawable's attributes" and honestly? we're obsessed. let's get into it. πŸ¦‹


🌸 NAME 🌸

xcb_glx_get_drawable_attributes -

(yeah bestie the one-liner is literally empty in the source, so we're all just living our truth here πŸ’€)


✨ SYNOPSIS ✨

First things first, you gotta pull in the header:

#include <xcb/glx.h>

πŸŽ€ Request function πŸŽ€

xcb_glx_get_drawable_attributes_cookie_t
       xcb_glx_get_drawable_attributes(xcb_connection_t *conn,
       xcb_glx_drawable_t drawable);

🧚 Reply datastructure 🧚

this is the lil struct that comes back at you:

typedef struct xcb_glx_get_drawable_attributes_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t num_attribs;
    uint8_t  pad1[20];
} xcb_glx_get_drawable_attributes_reply_t;

🫢 Reply function 🫢

xcb_glx_get_drawable_attributes_reply_t
       *xcb_glx_get_drawable_attributes_reply(xcb_connection_t *conn,
       xcb_glx_get_drawable_attributes_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ’… Reply accessors πŸ’…

these are your lil helpers for getting at the good stuff:

uint32_t *xcb_glx_get_drawable_attributes_attribs(const
       xcb_glx_get_drawable_attributes_request_t *reply);

int xcb_glx_get_drawable_attributes_attribs_length(const
       xcb_glx_get_drawable_attributes_reply_t *reply);

xcb_generic_iterator_t xcb_glx_get_drawable_attributes_attribs_end(const
       xcb_glx_get_drawable_attributes_reply_t *reply);

πŸ”₯ REQUEST ARGUMENTS πŸ”₯

  • conn β€” the XCB connection to X11. your link to the server, your main character pipeline, the whole vibe. 🌈
  • drawable β€” TODO: NOT YET DOCUMENTED. yeah bestie, the docs said "we'll get to it" and then never did. iconic behaviour honestly. πŸ™ˆ

πŸ’œ REPLY FIELDS πŸ’œ

  • response_type β€” the type of this reply, and in this case it's XCB_GLX_GET_DRAWABLE_ATTRIBUTES. this field is also chillin' inside xcb_generic_reply_t, so you can use it to tell your replies apart from each other. it's the name tag at the party. πŸŽ€
  • sequence β€” the sequence number of the last request processed by the X11 server. keeping receipts, fr fr. 🧾
  • length β€” the length of the reply, in words. and reminder: a word is 4 bytes, no cap. ⭐
  • num_attribs β€” TODO: NOT YET DOCUMENTED. once again, the void stares back. 😭

🌸 DESCRIPTION 🌸

(no description in the original, bestie β€” it's a mystery, it's an enigma, it's a blank space and we're shaking hands with it 🫢)


✨ RETURN VALUE ✨

You get back an xcb_glx_get_drawable_attributes_cookie_t. Errors? Yeah, those have to be handled when you call the reply function xcb_glx_get_drawable_attributes_reply.

if you'd rather handle your errors in the event loop instead, use xcb_glx_get_drawable_attributes_unchecked. and go read xcb-requests(3) for the deets, bestie, it's all there. πŸ’–

πŸ¦‹ ERRORS πŸ¦‹

This request does never generate any errors. periodt. zero drama, zero chaos, we love a low-maintenance request. πŸ’…βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

(nothing listed here in the original β€” so go touch some grass, or better yet, go read xcb-requests(3) like the RETURN VALUE section told you to 🌱)


πŸŽ€ AUTHOR πŸŽ€

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


and that's the whole page, bestie!! πŸ’– this came to you from X Version 11 and libxcb 1.17.0 β€” thank you for coming to my ted talk, drink some water, hydrate your skin, and may all your drawables be fully documented one day. mwah. πŸ˜˜πŸŒΈπŸ’œ