xcb_input_xi_...lected_events(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_input_xi_get_selected_events β€” bestie this is a page from the XCB Requests manual, and it's giving "I select events and I want to know which ones, actually" πŸ’…


🌸 SYNOPSIS 🌸

First up, the include, because we always start with the include, periodt:

#include <xcb/xinput.h>

πŸŽ€ Request function

xcb_input_xi_get_selected_events_cookie_t
       xcb_input_xi_get_selected_events(xcb_connection_t *conn,
       xcb_window_t window);

πŸ¦‹ Reply datastructure

typedef struct xcb_input_xi_get_selected_events_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t num_masks;
    uint8_t  pad1[22];
} xcb_input_xi_get_selected_events_reply_t;

🌈 Reply function

xcb_input_xi_get_selected_events_reply_t
       *xcb_input_xi_get_selected_events_reply(xcb_connection_t *conn,
       xcb_input_xi_get_selected_events_cookie_t cookie,
       xcb_generic_error_t **e);

⭐ Reply accessors

These lil cuties get you at the masks inside the reply, no cap:

int xcb_input_xi_get_selected_events_masks_length(const
       xcb_input_xi_get_selected_events_reply_t *reply);

xcb_input_event_mask_iterator_t
       xcb_input_xi_get_selected_events_masks_iterator(const
       xcb_input_xi_get_selected_events_reply_t *reply);

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” the XCB connection to X11. Your lil phone line to the server, basically 🫢
  • window β€” TODO: NOT YET DOCUMENTED. Yeah bestie, they literally just left it blank, I'm as shook as you are 😭

πŸ”₯ REPLY FIELDS πŸ”₯

  • response_type β€” the type of this reply, and in this case it's XCB_INPUT_XI_GET_SELECTED_EVENTS. Plot twist: this field is also chilling in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. Very main character of it honestly πŸ‘‘
  • sequence β€” the sequence number of the last request the X11 server actually processed. It's the receipts, fr fr 🧾
  • length β€” how long the reply is, measured in words. And before you ask: a word is 4 bytes. That's the whole lore πŸ’€
  • num_masks β€” TODO: NOT YET DOCUMENTED. Again!! Two of them!! The documentation said "not me" and left πŸ™ˆ

🌸 DESCRIPTION 🌸

...and that's it. That's the description. An absolute void. No thoughts, head empty, nothing here. The section exists purely to vibe ✨


πŸ“ RETURN VALUE πŸ“

It hands you back an xcb_input_xi_get_selected_events_cookie_t. Errors? Those don't get handled here, babe β€” you handle them when you call the reply function xcb_input_xi_get_selected_events_reply.

If you'd rather catch your errors in the event loop instead, use xcb_input_xi_get_selected_events_unchecked. Full deets live in xcb-requests(3) 🫢

πŸ’€ ERRORS πŸ’€

The best news on this entire page: this request never generates any errors. Not a single one. Zero. Iconic behaviour, we love a low-drama request πŸ’…


🧚 SEE ALSO 🧚

Nothing. Nada. Empty. It's giving "we forgor" 😭


πŸ‘‘ AUTHOR πŸ‘‘

Generated from xinput.xml. Got corrections or improvements? Hit up xcb@lists.freedesktop.org β€” they're literally asking, so slide into their inbox πŸ“¬


And that's a wrap on this lil page from libxcb 1.17.0, brought to you by X Version 11. Stay slay, go read your replies, and don't forget to free your cookies bestie πŸ’–βœ¨πŸŽ€