xcb_query_best_size(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_query_best_size β€” the XCB Requests girlies' guide πŸ’–

okay so bestie, we're in xcb_query_best_size(3) territory, from the XCB Requests fam. buckle up πŸŽ€


✨ NAME ✨

xcb_query_best_size β€” literally the name, that's it, no description in the source, not me being lazy, that's just what the page says πŸ™ˆ


🌸 SYNOPSIS 🌸

first things first, you gotta include the header:

#include <xcb/xproto.h>

πŸ’… Request function

xcb_query_best_size_cookie_t xcb_query_best_size(xcb_connection_t *conn,
       uint8_t _class, xcb_drawable_t drawable, uint16_t width,
       uint16_t height);

πŸ¦‹ Reply datastructure

typedef struct xcb_query_best_size_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t width;
    uint16_t height;
} xcb_query_best_size_reply_t;

⭐ Reply function

xcb_query_best_size_reply_t
       *xcb_query_best_size_reply(xcb_connection_t *conn,
       xcb_query_best_size_cookie_t cookie, xcb_generic_error_t **e);

πŸ‘‘ REQUEST ARGUMENTS πŸ‘‘

  • conn β€” your XCB connection to X11, the whole reason we're here 🫢
  • _class β€” one of these values, pick your fighter:
    • XCB_QUERY_SHAPE_OF_LARGEST_CURSOR β€” TODO: NOT YET DOCUMENTED. (yes bestie, the docs really said "figure it out" 😭)
    • XCB_QUERY_SHAPE_OF_FASTEST_TILE β€” TODO: NOT YET DOCUMENTED.
    • XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE β€” TODO: NOT YET DOCUMENTED.
    • TODO: NOT YET DOCUMENTED. (this one's just vibes, no name attached πŸ’€)
  • drawable β€” TODO: NOT YET DOCUMENTED.
  • width β€” TODO: NOT YET DOCUMENTED.
  • height β€” TODO: NOT YET DOCUMENTED.

πŸ“ REPLY FIELDS πŸ“

  • response_type β€” the type of this reply, which in this case is XCB_QUERY_BEST_SIZE. this field also lives in xcb_generic_reply_t, so you can use it to tell replies apart from each other. main character energy honestly ✨
  • sequence β€” the sequence number of the last request the X11 server processed πŸ”₯
  • length β€” the length of the reply, in words (and a word is 4 bytes, iykyk) πŸ“
  • width β€” TODO: NOT YET DOCUMENTED.
  • height β€” TODO: NOT YET DOCUMENTED.

🌈 DESCRIPTION 🌈

...yeah bestie, there's literally nothing here. the section exists, the words don't. iconic of them πŸ’€βœ¨


πŸ’œ RETURN VALUE πŸ’œ

it hands you back an xcb_query_best_size_cookie_t. errors? you deal with those when you call the reply function, xcb_query_best_size_reply.

if you'd rather handle errors in the event loop instead, use xcb_query_best_size_unchecked. more on that in xcb-requests(3) 🫢


πŸŽ€ ERRORS πŸŽ€

this request does never generate any errors. not one. zero. she's unproblematic πŸ’…

πŸ’€ SEE ALSO πŸ’€

empty. nothing. void. the girls said "no further reading" πŸ™ˆ


πŸ’– AUTHOR πŸ’–

Generated from xproto.xml. If you've got corrections or improvements, hit up xcb@lists.freedesktop.org πŸ“§


and that's the whole thing, bestie β€” X Version 11, libxcb 1.17.0, wrapping up xcb_query_best_size(3). slay, go query some best sizes, periodt πŸ‘‘πŸ’–βœ¨