xcb_glx_get_color_table(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_color_table β€” a lil' manual page, bestie

okay so this is a page from the xcb_glx fam (that's the XCB bindings to GLX, iykyk) πŸ’– β€” it lives in the xcb_glx_get_color_table(3) part of the manual, and honestly? it's giving "generated from XML and we didn't write a description." no cap.


✨ NAME ✨

xcb_glx_get_color_table β€” (and that's literally all the NAME section says, bestie, there's a whole dash and then nothing. iconic minimalism. πŸ‘‘)


🌸 SYNOPSIS 🌸

First things first, you gotta include the header:

#include <xcb/glx.h>

πŸŽ€ Request function

xcb_glx_get_color_table_cookie_t
       xcb_glx_get_color_table(xcb_connection_t *conn,
       xcb_glx_context_tag_t context_tag, uint32_t target,
       uint32_t format, uint32_t type, uint8_t swap_bytes);

πŸ¦‹ Reply datastructure

typedef struct xcb_glx_get_color_table_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint8_t  pad1[8];
    int32_t  width;
    uint8_t  pad2[12];
} xcb_glx_get_color_table_reply_t;

πŸ’œ Reply function

xcb_glx_get_color_table_reply_t
       *xcb_glx_get_color_table_reply(xcb_connection_t *conn,
       xcb_glx_get_color_table_cookie_t cookie,
       xcb_generic_error_t **e);

🌈 Reply accessors

uint8_t *xcb_glx_get_color_table_data(const
       xcb_glx_get_color_table_request_t *reply);

int xcb_glx_get_color_table_data_length(const
       xcb_glx_get_color_table_reply_t *reply);

xcb_generic_iterator_t xcb_glx_get_color_table_data_end(const
       xcb_glx_get_color_table_reply_t *reply);

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” your XCB connection to X11. the whole vibe pipeline, fr fr.
  • context_tag β€” TODO: NOT YET DOCUMENTED. yeah bestie, the docs said "we'll get to it" and then never did 😭
  • target β€” TODO: NOT YET DOCUMENTED. mystery parameter, main character energy, zero backstory.
  • format β€” TODO: NOT YET DOCUMENTED. we simply do not know.
  • type β€” TODO: NOT YET DOCUMENTED. also a stranger to us.
  • swap_bytes β€” TODO: NOT YET DOCUMENTED. even the byte-swapping is a secret. πŸ’€
not me listing six args and four of them are literally TODO. the XCB docs really said "figure it out." πŸ™ˆ

⭐ REPLY FIELDS ⭐

  • response_type β€” the type of this reply, and in this case it's XCB_GLX_GET_COLOR_TABLE. this field also shows up in the xcb_generic_reply_t, so you can use it to tell replies apart from each other. it's like a little name tag at a party πŸŽ€
  • sequence β€” the sequence number of the last request processed by the X11 server. tracking numbers but for requests, obsessed.
  • length β€” how long the reply is, in words. and yes bestie, a word here is 4 bytes. write that down.
  • width β€” TODO: NOT YET DOCUMENTED. again!! the silence is loud. 😭

🫢 DESCRIPTION 🫢

...okay so the DESCRIPTION section is empty. nothing. void. a blank little space where the explanation should be. we are all just living in it. πŸ’€


πŸ”₯ RETURN VALUE πŸ”₯

You get back an xcb_glx_get_color_table_cookie_t β€” a whole cookie, slay πŸͺ. Errors? Those have to be handled when you call the reply function xcb_glx_get_color_table_reply.

If you'd rather handle errors in the event loop instead, use xcb_glx_get_color_table_unchecked. See xcb-requests(3) for details.


🌸 ERRORS 🌸

This request does never generate any errors. no drama, no chaos, just peace and quiet ✨


πŸ¦‹ SEE ALSO πŸ¦‹

(the original leaves this one blank too β€” bestie really said "you'll find your way.")


πŸ‘‘ AUTHOR πŸ‘‘

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


and that's the whole page, bestie!! πŸ’… this lil' slice of the manual is from X Version 11, shipping with libxcb 1.17.0 β€” so go forth, call your color table getter, and remember: four of those arguments are TODO and no one is coming to save us. mwah πŸ’–πŸ¦‹πŸŽ€