MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / coords

Function coords

Service/InputDeviceXLib.cpp:152–162  ·  view source on GitHub ↗

Get mouse coordinates

Source from the content-addressed store, hash-verified

150
151// Get mouse coordinates
152void coords (Display *display, int *x, int *y)
153{
154 XEvent event;
155 XQueryPointer (display, DefaultRootWindow (display),
156 &event.xbutton.root, &event.xbutton.window,
157 &event.xbutton.x_root, &event.xbutton.y_root,
158 &event.xbutton.x, &event.xbutton.y,
159 &event.xbutton.state);
160 *x = event.xbutton.x;
161 *y = event.xbutton.y;
162}
163
164// Move mouse pointer (relative)
165void move (Display *display, int x, int y)

Callers 1

move_toFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected