1xcb_query_pointer(3) XCB Requests xcb_query_pointer(3)
2
3
4
6 xcb_query_pointer - get pointer coordinates
7
9 #include <xcb/xproto.h>
10
11 Request function
12 xcb_query_pointer_cookie_t xcb_query_pointer(xcb_connection_t *conn,
13 xcb_window_t window);
14
15 Reply datastructure
16 typedef struct xcb_query_pointer_reply_t {
17 uint8_t response_type;
18 uint8_t same_screen;
19 uint16_t sequence;
20 uint32_t length;
21 xcb_window_t root;
22 xcb_window_t child;
23 int16_t root_x;
24 int16_t root_y;
25 int16_t win_x;
26 int16_t win_y;
27 uint16_t mask;
28 uint8_t pad0[2];
29 } xcb_query_pointer_reply_t;
30
31 Reply function
32 xcb_query_pointer_reply_t
33 *xcb_query_pointer_reply(xcb_connection_t *conn,
34 xcb_query_pointer_cookie_t cookie, xcb_generic_error_t **e);
35
37 conn The XCB connection to X11.
38
39 window A window to check if the pointer is on the same screen as
40 window (see the same_screen field in the reply).
41
43 response_type
44 The type of this reply, in this case XCB_QUERY_POINTER. This
45 field is also present in the xcb_generic_reply_t and can be
46 used to tell replies apart from each other.
47
48 sequence The sequence number of the last request processed by the X11
49 server.
50
51 length The length of the reply, in words (a word is 4 bytes).
52
53 same_screen
54 If same_screen is False, then the pointer is not on the same
55 screen as the argument window, child is None, and win_x and
56 win_y are zero. If same_screen is True, then win_x and win_y
57 are the pointer coordinates relative to the argument window's
58 origin, and child is the child containing the pointer, if
59 any.
60
61 root The root window the pointer is logically on.
62
63 child The child window containing the pointer, if any, if
64 same_screen is true. If same_screen is false, XCB_NONE is re‐
65 turned.
66
67 root_x The pointer X position, relative to root.
68
69 root_y The pointer Y position, relative to root.
70
71 win_x The pointer X coordinate, relative to child, if same_screen
72 is true. Zero otherwise.
73
74 win_y The pointer Y coordinate, relative to child, if same_screen
75 is true. Zero otherwise.
76
77 mask The current logical state of the modifier keys and the but‐
78 tons. Note that the logical state of a device (as seen by
79 means of the protocol) may lag the physical state if device
80 event processing is frozen.
81
83 Gets the root window the pointer is logically on and the pointer coor‐
84 dinates relative to the root window's origin.
85
87 Returns an xcb_query_pointer_cookie_t. Errors have to be handled when
88 calling the reply function xcb_query_pointer_reply.
89
90 If you want to handle errors in the event loop instead, use
91 xcb_query_pointer_unchecked. See xcb-requests(3) for details.
92
94 xcb_window_error_t
95 The specified window does not exist.
96
98 xcb-requests(3)
99
101 Generated from xproto.xml. Contact xcb@lists.freedesktop.org for cor‐
102 rections and improvements.
103
104
105
106X Version 11 libxcb 1.13.1 xcb_query_pointer(3)