mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-12 13:29:55 -05:00
Add crude input device support.
Just pointer motion and button clicks for now, broadcast to all clients.
This commit is contained in:
parent
362a34ed89
commit
f9bc795a7d
6 changed files with 274 additions and 12 deletions
15
wayland.h
15
wayland.h
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
|
||||
enum {
|
||||
WL_EVENT_READABLE = 0x01,
|
||||
WL_EVENT_WRITEABLE = 0x02
|
||||
|
|
@ -97,6 +99,19 @@ int wl_surface_iterator_next(struct wl_surface_iterator *iterator,
|
|||
struct wl_surface **surface);
|
||||
void wl_surface_iterator_destroy(struct wl_surface_iterator *iterator);
|
||||
|
||||
struct wl_object *
|
||||
wl_input_device_create(struct wl_display *display,
|
||||
const char *path, uint32_t id);
|
||||
void
|
||||
wl_display_post_relative_event(struct wl_display *display,
|
||||
struct wl_object *source, int dx, int dy);
|
||||
void
|
||||
wl_display_post_absolute_event(struct wl_display *display,
|
||||
struct wl_object *source, int x, int y);
|
||||
void
|
||||
wl_display_post_button_event(struct wl_display *display,
|
||||
struct wl_object *source, int button, int state);
|
||||
|
||||
struct wl_compositor {
|
||||
struct wl_compositor_interface *interface;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue