xcb_glx_get_lightiv(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_lightiv πŸ’–

okay bestie, welcome to the xcb_glx_get_lightiv page from the XCB Requests family, manual section 3. it's a lil GLX request, it's giving "ask the server about a light parameter and get integers back", and we're gonna walk through it together. no gatekeeping πŸ’…


✨ NAME ✨

xcb_glx_get_lightiv β€” the description line in the original is literally empty πŸ™ˆ so that's all we got, and we're keeping it that way, fr fr.


🌸 SYNOPSIS 🌸

first up, the include, because obviously:

#include <xcb/glx.h>

πŸŽ€ Request function πŸŽ€

xcb_glx_get_lightiv_cookie_t xcb_glx_get_lightiv(xcb_connection_t *conn,
       xcb_glx_context_tag_t context_tag, uint32_t light,
       uint32_t pname);

πŸ¦‹ Reply datastructure πŸ¦‹

this is the struct the reply comes back in, look at her:

typedef struct xcb_glx_get_lightiv_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_lightiv_reply_t;

πŸ’œ Reply function πŸ’œ

xcb_glx_get_lightiv_reply_t
       *xcb_glx_get_lightiv_reply(xcb_connection_t *conn,
       xcb_glx_get_lightiv_cookie_t cookie, xcb_generic_error_t **e);

⭐ Reply accessors ⭐

these are the lil helpers that reach into the reply for you, iconic behaviour honestly:

int32_t *xcb_glx_get_lightiv_data(const xcb_glx_get_lightiv_request_t
       *reply);

int xcb_glx_get_lightiv_data_length(const xcb_glx_get_lightiv_reply_t
       *reply);

xcb_generic_iterator_t xcb_glx_get_lightiv_data_end(const
       xcb_glx_get_lightiv_reply_t *reply);

🌈 REQUEST ARGUMENTS 🌈

  • conn β€” the XCB connection to X11. she's the link to the server, your main character connection πŸ”₯
  • context_tag β€” TODO: NOT YET DOCUMENTED. yeah. the docs said "we'll get to it" and then did not get to it 😭
  • light β€” TODO: NOT YET DOCUMENTED. same energy, bestie πŸ’€
  • pname β€” TODO: NOT YET DOCUMENTED. the trio of mystery args, we love a cliffhanger πŸ™ˆ

πŸ“ REPLY FIELDS πŸ“

  • response_type β€” the type of this reply, and in this case it's XCB_GLX_GET_LIGHTIV. plot twist: this field is also chillin' in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. very "which one of y'all is this" πŸ’…
  • sequence β€” the sequence number of the last request the X11 server actually processed. receipts! 🧾
  • length β€” the length of the reply, measured in words. and just so we're clear: a word is 4 bytes. no cap πŸ“
  • n β€” TODO: NOT YET DOCUMENTED. 🫢
  • datum β€” TODO: NOT YET DOCUMENTED. the second mystery of the reply, we stay guessing 😭

🧚 DESCRIPTION 🧚

there is genuinely no description text in the original. empty. a void. the page said "description:" and then just ✨vibed✨. so we're not inventing one, that's the rules bestie 🌸


πŸ‘‘ RETURN VALUE πŸ‘‘

you get back an xcb_glx_get_lightiv_cookie_t. cute, right? but here's the thing β€” errors are not handled here. you handle them later, when you call the reply function xcb_glx_get_lightiv_reply.

and if you'd rather handle errors in the event loop instead? then use xcb_glx_get_lightiv_unchecked. see xcb-requests(3) for the details, iykyk 🫢


πŸ’€ ERRORS πŸ’€

this request does never generate any errors. periodt. zero drama, zero errors, she's unproblematic πŸ’…βœ¨

🌈 SEE ALSO 🌈

the original lists nothing here. an empty section, a blank canvas, we respect the minimalist queen πŸ™ˆ


πŸ’œ AUTHOR πŸ’œ

generated from glx.xml. got corrections or improvements? hit up xcb@lists.freedesktop.org β€” they're taking notes πŸ“


that's the whole page bestie, you ate it up πŸŽ€

X Version 11 Β· libxcb 1.17.0 Β· xcb_glx_get_lightiv(3) β€” signing off, love u, go read xcb-requests(3) πŸ’–πŸ¦‹βœ¨