xcb_shape_get_rectangles(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

✨ NAME ✨

xcb_shape_get_rectangles β€” bestie, this is the XCB request that goes and asks the X server for the rectangles of a shape, and honestly? iconic behavior. πŸŽ€

(it's a libxcb man page, third section, so it's xcb_shape_get_rectangles(3) if you're keeping score πŸ’…)


🌸 SYNOPSIS 🌸

First things first, you gotta bring in the header:

#include <xcb/shape.h>

πŸ’– Request function

xcb_shape_get_rectangles_cookie_t
       xcb_shape_get_rectangles(xcb_connection_t *conn,
       xcb_window_t window, xcb_shape_kind_t source_kind);

πŸ¦‹ Reply datastructure

typedef struct xcb_shape_get_rectangles_reply_t {
    uint8_t  response_type;
    uint8_t  ordering;
    uint16_t sequence;
    uint32_t length;
    uint32_t rectangles_len;
    uint8_t  pad0[20];
} xcb_shape_get_rectangles_reply_t;

✨ Reply function

xcb_shape_get_rectangles_reply_t
       *xcb_shape_get_rectangles_reply(xcb_connection_t *conn,
       xcb_shape_get_rectangles_cookie_t cookie,
       xcb_generic_error_t **e);

🫢 Reply accessors

xcb_rectangle_t *xcb_shape_get_rectangles_rectangles(const
       xcb_shape_get_rectangles_request_t *reply);

int xcb_shape_get_rectangles_rectangles_length(const
       xcb_shape_get_rectangles_reply_t *reply);

xcb_rectangle_iterator_t
       xcb_shape_get_rectangles_rectangles_iterator(const
       xcb_shape_get_rectangles_reply_t *reply);

πŸ“ REQUEST ARGUMENTS πŸ“

  • conn β€” your XCB connection to X11. the link between you and the server, no cap. πŸ’«
  • window β€” TODO: NOT YET DOCUMENTED. like, the docs literally just left this one on read. 😭
  • source_kind β€” TODO: NOT YET DOCUMENTED. same situation, bestie. nobody wrote it up. πŸ™ˆ

πŸ’… REPLY FIELDS πŸ’…

  • response_type β€” the type of this reply, and in this case it's XCB_SHAPE_GET_RECTANGLES. this field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. v handy, fr fr. πŸ”₯
  • sequence β€” the sequence number of the last request the X11 server processed. it's giving "receipt number for your order". 🧾
  • length β€” how long the reply is, in words. and a word is 4 bytes, just so we're clear. ✨
  • ordering β€” TODO: NOT YET DOCUMENTED. πŸ’€
  • rectangles_len β€” TODO: NOT YET DOCUMENTED. πŸ’€

🌈 DESCRIPTION 🌈

...so this section is literally empty in the original. nothing. a void. the silence is deafening. πŸ•³οΈβœ¨

We move.


⭐ RETURN VALUE ⭐

You get back an xcb_shape_get_rectangles_cookie_t. and here's the thing, bestie β€” errors have to be handled when you call the reply function xcb_shape_get_rectangles_reply. that's the moment of truth. πŸ‘‘

If you'd rather handle errors in the event loop instead, use xcb_shape_get_rectangles_unchecked. see xcb-requests(3) for the deets. 🫢


πŸ’€ ERRORS πŸ’€

This request does never generate any errors. not a single one. zero drama, zero chaos, we love a low-maintenance request. πŸ’–

πŸŽ€ SEE ALSO πŸŽ€

...also empty in the original, bestie. we're just out here vibing with no cross-references. πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

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


and that's the whole page, bestie!! this one came from X Version 11, libxcb 1.17.0 β€” go forth and get those rectangles, you absolute main character. πŸ’…βœ¨πŸŒΈ