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

okay so bestie, we're in the xcb_input_grab_device(3) zone today, part of the XCB Requests family, and honestly? it's giving "grab that device" and we're obsessed. no cap.


✨ NAME ✨

xcb_input_grab_device β€” bestie the docs literally left this one blank, it's just vibes and a dash. we move. πŸ’…


🌸 SYNOPSIS 🌸

first up, the include, as always:

#include <xcb/xinput.h>

πŸŽ€ Request function πŸŽ€

xcb_input_grab_device_cookie_t
       xcb_input_grab_device(xcb_connection_t *conn,
       xcb_window_t grab_window, xcb_timestamp_t time,
       uint16_t num_classes, uint8_t this_device_mode,
       uint8_t other_device_mode, uint8_t owner_events,
       uint8_t device_id, const xcb_input_event_class_t *classes);

πŸ¦‹ Reply datastructure πŸ¦‹

typedef struct xcb_input_grab_device_reply_t {
    uint8_t  response_type;
    uint8_t  xi_reply_type;
    uint16_t sequence;
    uint32_t length;
    uint8_t  status;
    uint8_t  pad0[23];
} xcb_input_grab_device_reply_t;

⭐ Reply function ⭐

xcb_input_grab_device_reply_t
       *xcb_input_grab_device_reply(xcb_connection_t *conn,
       xcb_input_grab_device_cookie_t cookie, xcb_generic_error_t **e);

πŸ’œ REQUEST ARGUMENTS πŸ’œ

  • conn β€” your XCB connection to X11. the whole link-up, the main character of the connection-verse fr fr.
  • grab_window β€” TODO: NOT YET DOCUMENTED. yeah. the manpage said nothing. we're all just sitting here. 😭
  • time β€” TODO: NOT YET DOCUMENTED. still nothing bestie, not a single crumb.
  • num_classes β€” TODO: NOT YET DOCUMENTED. the silence is loud.
  • this_device_mode β€” TODO: NOT YET DOCUMENTED. undoc'd and unbothered.
  • other_device_mode β€” TODO: NOT YET DOCUMENTED. also no thoughts, just a placeholder.
  • owner_events β€” TODO: NOT YET DOCUMENTED. we know nothing, and honestly that's iconic of the maintainers.
  • device_id β€” TODO: NOT YET DOCUMENTED. yeah, the one you'd most wanna know about. nope. πŸ™ˆ
  • classes β€” TODO: NOT YET DOCUMENTED. same energy, same emptiness.

🌈 REPLY FIELDS 🌈

  • response_type β€” the type of this reply, and in this case it's XCB_INPUT_GRAB_DEVICE. lowkey the most useful thing here: this field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. vibe check your replies, basically. ✨
  • sequence β€” the sequence number of the last request that got processed by the X11 server. the receipts, if you will.
  • length β€” the length of the reply, counted in words. and btw a word here is 4 bytes, in case anyone was about to do math wrong. 🧚
  • xi_reply_type β€” TODO: NOT YET DOCUMENTED. no crumbs. πŸ’€
  • status β€” TODO: NOT YET DOCUMENTED. also blank, also tragic.

🫢 DESCRIPTION 🫢

...and that's it. that's the section. literally empty. the DESCRIPTION section has left the chat. 😭


πŸ‘‘ RETURN VALUE πŸ‘‘

Returns an xcb_input_grab_device_cookie_t. slay. but listen β€” errors? you have to handle those yourself when you call the reply function xcb_input_grab_device_reply.

If you'd rather handle errors in the event loop instead (valid, honestly), use xcb_input_grab_device_unchecked. and for the full tea on how requests work, go read xcb-requests(3). iykyk.


πŸ’€ ERRORS πŸ’€

This request does never generate any errors. periodt. zero errors, zero drama.

πŸ”₯ SEE ALSO πŸ”₯

...nothing. the SEE ALSO section is a ghost town. bestie. πŸ’€


πŸ’… AUTHOR πŸ’…

Generated from xinput.xml. if you've got corrections and improvements, contact xcb@lists.freedesktop.org β€” they want your notes, fr fr.


and that's the whole page bestie!! this one shipped with X Version 11, libxcb 1.17.0, and that sweet xcb_input_grab_device(3) energy. mwah. go grab that device. πŸŽ€βœ¨πŸ¦‹πŸ’–