4 static int dev_fd = -1; // file descriptor for /dev/psaux
6 static int pointer_x, pointer_y;
10 // TODO open /dev/psaux (see O_NONBLOCK comment below)
16 // TODO close /dev/psaux
19 void set_mouse_bounds(const Rect &rect)
29 void process_mouse_event()
32 * - read all pending events from mouse fd (use O_NONBLOCK so that
33 * read will return -1 when there are no more events instead of blocking).
34 * - process each event and update the pointer and button state
35 * - send each pointer move and button press/release to the tompost window
36 * with the pointer on it.
40 void get_pointer_pos(int *x, int *y)
46 int get_button_state(int bn)