xcb_input_xi_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_xi_grab_device(3) β€” XCB Requests

okay so bestie, welcome to the libxcb corner of the X11 universe ✨ this one is xcb_input_xi_grab_device, straight out of the XCB request gang. she grabs devices, she's mysterious, and half her docs are literally just TODO: NOT YET DOCUMENTED. we love an unfinished icon πŸ’€


🌸 NAME 🌸

xcb_input_xi_grab_device β€”

bestie the description here is literally blank in the original. not me leaving it empty. it's giving "author said no thoughts head empty" πŸ™ˆ

✨ SYNOPSIS ✨

#include <xcb/xinput.h>

πŸŽ€ Request function

xcb_input_xi_grab_device_cookie_t
       xcb_input_xi_grab_device(xcb_connection_t *conn,
       xcb_window_t window, xcb_timestamp_t time, xcb_cursor_t cursor,
       xcb_input_device_id_t deviceid, uint8_t mode,
       uint8_t paired_device_mode, uint8_t owner_events,
       uint16_t mask_len, const uint32_t *mask);

πŸ¦‹ Reply datastructure

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

🌈 Reply function

xcb_input_xi_grab_device_reply_t
       *xcb_input_xi_grab_device_reply(xcb_connection_t *conn,
       xcb_input_xi_grab_device_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” the XCB connection to X11. she's the whole reason you're here, the main character, the plug πŸ”Œ
  • window β€” TODO: NOT YET DOCUMENTED. yep. that's it. that's the whole description 😭
  • time β€” TODO: NOT YET DOCUMENTED.
  • cursor β€” TODO: NOT YET DOCUMENTED.
  • deviceid β€” TODO: NOT YET DOCUMENTED.
  • mode β€” TODO: NOT YET DOCUMENTED.
  • paired_device_mode β€” TODO: NOT YET DOCUMENTED.
  • owner_events β€” TODO: NOT YET DOCUMENTED.
  • mask_len β€” TODO: NOT YET DOCUMENTED.
  • mask β€” TODO: NOT YET DOCUMENTED.
not the entire argument list being one big "we'll get to it" 🫠 no cap, that's genuinely all the original says. respect the honesty I guess.

πŸ‘‘ REPLY FIELDS πŸ‘‘

  • response_type β€” the type of this reply, and in this case it's XCB_INPUT_XI_GRAB_DEVICE. this field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other like a lil name tag 🏷️
  • sequence β€” the sequence number of the last request the X11 server processed. her receipts, basically 🧾
  • length β€” how long the reply is, measured in words. and reminder: a word is 4 bytes, bestie, don't forget πŸ’…
  • status β€” TODO: NOT YET DOCUMENTED.

🧚 DESCRIPTION 🧚

okay so this section is empty in the original. nothing. void. silence. the vibe check came back blank πŸ•³οΈβœ¨

πŸ“ RETURN VALUE πŸ“

she hands you back an xcb_input_xi_grab_device_cookie_t πŸͺ and listen β€” errors have to be handled when you call the reply function xcb_input_xi_grab_device_reply.

but if you'd rather catch those errors in the event loop instead, use xcb_input_xi_grab_device_unchecked. see xcb-requests(3) for the deets πŸ‘€


πŸ’€ ERRORS πŸ’€

this request does never generate any errors. not one. zero. flawless behaviour, she simply doesn't miss πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

literally nothing listed here in the original. the section exists, the contents said "no thoughts" πŸ™ˆ

⭐ AUTHOR ⭐

generated from xinput.xml. contact xcb@lists.freedesktop.org for corrections and improvements πŸ’Œ


and that's the whole page, bestie 🫢 go forth and grab those devices, and remember β€” when the docs say TODO: NOT YET DOCUMENTED, you're not confused, the docs are just under construction πŸš§πŸ’–

X Version 11 Β· libxcb 1.17.0 Β· xcb_input_xi_grab_device(3) β€” mwah, that's a wrap, ily, bye πŸ‘‹βœ¨