diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2016-07-05 01:21:56 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2016-07-05 01:21:56 -0500 |
| commit | 2c7610f051d7f7d2797cbb7ae983eb7f53fbf064 (patch) | |
| tree | eadad88c75e6cb6e252e1e807e11e9178680ff94 /include/client | |
| parent | 81ad87e3a3514f886e10d4a51bd4a63e5fbca117 (diff) | |
Enable windows to register to get notified of pointer button events
Diffstat (limited to 'include/client')
| -rw-r--r-- | include/client/window.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/client/window.h b/include/client/window.h index e48ec4f3..b5cc1880 100644 --- a/include/client/window.h +++ b/include/client/window.h @@ -9,6 +9,8 @@ #include "list.h" #include "client/registry.h" +struct window; + struct buffer { struct wl_buffer *buffer; cairo_surface_t *surface; @@ -25,6 +27,13 @@ struct cursor { struct wl_poitner *pointer; }; +struct pointer_input { + wl_fixed_t last_x; + wl_fixed_t last_y; + + void (*notify)(struct window *window, wl_fixed_t x, wl_fixed_t y, uint32_t button); +}; + struct window { struct registry *registry; struct buffer buffers[2]; @@ -36,6 +45,7 @@ struct window { uint32_t width, height; char *font; cairo_t *cairo; + struct pointer_input pointer_input; }; struct window *window_setup(struct registry *registry, uint32_t width, uint32_t height, bool shell_surface); |
