1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| static void pointer_handle_enter(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t sx, wl_fixed_t sy) { fprintf(stderr, "Pointer entered surface %p at %d %d\n", surface, sx, sy); }
static void pointer_handle_leave(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface) { fprintf(stderr, "Pointer left surface %p\n", surface); }
static void pointer_handle_motion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t sx, wl_fixed_t sy) { printf("Pointer moved at %d %d\n", sx, sy); }
static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button, uint32_t state) { printf("Pointer button\n"); if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) wl_shell_surface_move(shell_surface, seat, serial); }
static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
|