From f479b7c8c7aa93229c46287f774a30ac8324da1e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 10 Jun 2017 11:58:25 -0400 Subject: Split keyboard code out into its own file --- include/backend/libinput.h | 38 ++++++++++++++++++++++++++++++++++++++ include/backend/libinput/backend.h | 28 ---------------------------- 2 files changed, 38 insertions(+), 28 deletions(-) create mode 100644 include/backend/libinput.h delete mode 100644 include/backend/libinput/backend.h (limited to 'include/backend') diff --git a/include/backend/libinput.h b/include/backend/libinput.h new file mode 100644 index 00000000..a59ab401 --- /dev/null +++ b/include/backend/libinput.h @@ -0,0 +1,38 @@ +#ifndef _WLR_BACKEND_LIBINPUT_INTERNAL_H +#define _WLR_BACKEND_LIBINPUT_INTERNAL_H +#include +#include +#include +#include +#include "backend/udev.h" +#include "types.h" + +struct wlr_backend_state { + struct wlr_backend *backend; + struct wlr_session *session; + struct wlr_udev *udev; + struct wl_display *display; + + struct libinput *libinput; + struct wl_event_source *input_event; + + list_t *keyboards; +}; + +void wlr_libinput_event(struct wlr_backend_state *state, + struct libinput_event *event); + +struct wlr_input_device *get_appropriate_device( + enum wlr_input_device_type desired_type, + struct libinput_device *device); + +struct wlr_keyboard_state { + struct libinput_device *handle; +}; + +void handle_keyboard_key(struct libinput_event *event, + struct libinput_device *device); +struct wlr_keyboard *wlr_libinput_keyboard_create( + struct libinput_device *device); + +#endif diff --git a/include/backend/libinput/backend.h b/include/backend/libinput/backend.h deleted file mode 100644 index 6f2fa2a0..00000000 --- a/include/backend/libinput/backend.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _WLR_BACKEND_LIBINPUT_INTERNAL_H -#define _WLR_BACKEND_LIBINPUT_INTERNAL_H -#include -#include -#include -#include -#include "backend/udev.h" - -struct wlr_backend_state { - struct wlr_backend *backend; - struct wlr_session *session; - struct wlr_udev *udev; - struct wl_display *display; - - struct libinput *libinput; - struct wl_event_source *input_event; - - list_t *keyboards; -}; - -void wlr_libinput_event(struct wlr_backend_state *state, - struct libinput_event *event); - -struct wlr_keyboard_state { - struct libinput_device *handle; -}; - -#endif -- cgit v1.2.3