xcb_glx_get_mapiv(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_mapiv ✨

okay bestie so this is a page from the XCB Requests chapter of the manual, it's xcb_glx_get_mapiv(3), and it lives in the xcb/glx.h header. it's a GLX request, it's giving "ask the X server for some GL map data" energy, and ngl the docs are lowkey a work in progress. let's get into it πŸ’–


🌸 SYNOPSIS 🌸

first up, the include, always the include:

#include <xcb/glx.h>

πŸŽ€ Request function πŸŽ€

xcb_glx_get_mapiv_cookie_t xcb_glx_get_mapiv(xcb_connection_t *conn,
       xcb_glx_context_tag_t context_tag, uint32_t target,
       uint32_t query);

πŸ¦‹ Reply datastructure πŸ¦‹

here's the whole lil struct, every field exactly where it belongs, no cap:

typedef struct xcb_glx_get_mapiv_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint8_t  pad1[4];
    uint32_t n;
    int32_t  datum;
    uint8_t  pad2[12];
} xcb_glx_get_mapiv_reply_t;

πŸ’… Reply function πŸ’…

xcb_glx_get_mapiv_reply_t
       *xcb_glx_get_mapiv_reply(xcb_connection_t *conn,
       xcb_glx_get_mapiv_cookie_t cookie, xcb_generic_error_t **e);

🫢 Reply accessors 🫢

the little helpers that reach into the reply for you:

int32_t *xcb_glx_get_mapiv_data(const xcb_glx_get_mapiv_request_t
       *reply);

int xcb_glx_get_mapiv_data_length(const xcb_glx_get_mapiv_reply_t
       *reply);

xcb_generic_iterator_t xcb_glx_get_mapiv_data_end(const
       xcb_glx_get_mapiv_reply_t *reply);

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” your XCB connection to X11. the whole vibe, the lifeline, the main character connection.
  • context_tag β€” TODO: NOT YET DOCUMENTED. bestie the docs simply did not elaborate 😭
  • target β€” TODO: NOT YET DOCUMENTED. again… nothing. iconic of them tbh.
  • query β€” TODO: NOT YET DOCUMENTED. yeah same story πŸ’€

🌈 REPLY FIELDS 🌈

  • response_type β€” the type of this reply, which in this case is XCB_GLX_GET_MAPIV. this field is ALSO chilling inside xcb_generic_reply_t, so you can use it to tell your replies apart from each other. very useful, very girlboss.
  • sequence β€” the sequence number of the last request the X11 server processed.
  • length β€” how long the reply is, in words. and yes a word is 4 bytes, write that down πŸ“
  • n β€” TODO: NOT YET DOCUMENTED.
  • datum β€” TODO: NOT YET DOCUMENTED.

🌸 DESCRIPTION 🌸

literally nothing here. the section exists, the section is empty. we love a mysterious queen πŸ’…

✨ RETURN VALUE ✨

it hands you back an xcb_glx_get_mapiv_cookie_t. cookies are cute but errors? you gotta handle those yourself when you call the reply function xcb_glx_get_mapiv_reply.

and if you'd rather catch errors in the event loop instead? use xcb_glx_get_mapiv_unchecked. go read xcb-requests(3) for the full tea, fr fr.


πŸ’€ ERRORS πŸ’€

this request does never generate any errors. zero. none. not a single one. slay πŸŽ€


πŸ¦‹ SEE ALSO πŸ¦‹

(the original page lists no references here β€” just an empty little section, and honestly? relatable.)

πŸ‘‘ AUTHOR πŸ‘‘

Generated from glx.xml. Contact xcb@lists.freedesktop.org for corrections and improvements β€” they said it, not me, so if you spot something off that's the address to hit up πŸ’Œ


and that's the whole page bestie!! stay hydrated, handle your cookies, and remember: the source is X Version 11, the version is libxcb 1.17.0, and this little icon lives at xcb_glx_get_mapiv(3). mwah πŸ’–βœ¨πŸŽ€