xcb_input_get...motion_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

πŸ’– xcb_input_get...motion_events β€” the XCB Requests glow-up πŸ’–

okay bestie, so this is a page from the XCB Requests fam, and it lives in the libxcb manual, section 3. Her whole name is xcb_input_get...motion_events(3) and honestly? she's giving ✨niche X11 lore✨. Buckle up, we're doing the full rundown, no skips. πŸŽ€


✨ NAME ✨

xcb_input_get_device_motion_events β€” and that's literally it, that's the whole name field. The original just... trails off. Iconic of her. 🫢


✨ SYNOPSIS ✨

First things first, you gotta pull in the header:

#include <xcb/xinput.h>

🌸 Request function

xcb_input_get_device_motion_events_cookie_t
       xcb_input_get_device_motion_events(xcb_connection_t *conn,
       xcb_timestamp_t start, xcb_timestamp_t stop, uint8_t device_id);

πŸ¦‹ Reply datastructure

here's the struct, and yes we're copying every single field because that's the whole assignment:

typedef struct xcb_input_get_device_motion_events_reply_t {
    uint8_t  response_type;
    uint8_t  xi_reply_type;
    uint16_t sequence;
    uint32_t length;
    uint32_t num_events;
    uint8_t  num_axes;
    uint8_t  device_mode;
    uint8_t  pad0[18];
} xcb_input_get_device_motion_events_reply_t;
that pad0[18] is doing absolutely nothing and yet it must be respected. queen of silence. πŸ’…

🧚 Reply function

xcb_input_get_device_motion_events_reply_t
       *xcb_input_get_device_motion_events_reply(xcb_connection_t *conn,
       xcb_input_get_device_motion_events_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ’œ Reply accessors

two lil helpers, both yours:

int xcb_input_get_device_motion_events_events_length(const
       xcb_input_get_device_motion_events_reply_t *reply);
xcb_input_device_time_coord_iterator_t
       xcb_input_get_device_motion_events_events_iterator(const
       xcb_input_get_device_motion_events_reply_t *reply);

🌈 REQUEST ARGUMENTS 🌈

  • conn β€” your XCB connection to X11, aka the lil phone line to the server. πŸ“ž
  • start β€” TODO: NOT YET DOCUMENTED. bestie the docs simply did not show up. 🫠
  • stop β€” also TODO: NOT YET DOCUMENTED. same energy.
  • device_id β€” yep. TODO: NOT YET DOCUMENTED. three for three, a clean sweep. πŸ’€

⭐ REPLY FIELDS ⭐

  • response_type β€” the type of this reply, and in this case it's XCB_INPUT_GET_DEVICE_MOTION_EVENTS. This field also lives 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 it" of her. πŸ”
  • sequence β€” the sequence number of the last request the X11 server actually processed.
  • length β€” how long the reply is, in words. and a word is 4 bytes, in case anyone was wondering. πŸ“
  • xi_reply_type β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • num_events β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • num_axes β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • device_mode β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ

πŸŽ€ DESCRIPTION πŸŽ€

so... the DESCRIPTION section is empty. like, truly empty. a blank canvas. the original just moves straight on. we love a mysterious queen with no explanation. πŸ’…βœ¨


🫢 RETURN VALUE 🫢

She hands you back an xcb_input_get_device_motion_events_cookie_t. πŸͺ Now, errors? Those don't get handled here, bestie β€” you deal with them later when you call the reply function xcb_input_get_device_motion_events_reply.

But if you'd rather catch your errors in the event loop instead, go ahead and use xcb_input_get_device_motion_events_unchecked. Peep xcb-requests(3) for the full tea. β˜•


πŸ“ ERRORS πŸ“

good news fr fr: this request never generates any errors. not a single one. she's unproblematic. periodt. πŸ‘‘

πŸ‘‘ SEE ALSO πŸ‘‘

nothing here either β€” this section is empty in the original, so no cross-references to send you to. (the xcb-requests(3) mention up in RETURN VALUE is doing all the heavy lifting, iykyk. 😭)


πŸ’– AUTHOR πŸ’–

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


and that's the whole page, bestie, you ate it. 🍽️✨

X Version 11 Β· libxcb 1.17.0 Β· xcb_input_get...motion_events(3)

mwah, love u, go read the source code. πŸ’œπŸ¦‹πŸŒΈ