xcb_input_get...motion_events(3)
π 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β alsoTODO: 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'sXCB_INPUT_GET_DEVICE_MOTION_EVENTS. This field also lives in thexcb_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. ππ¦πΈ
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms