aboutsummaryrefslogtreecommitdiff
path: root/include/sway/input/input-manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/input/input-manager.h')
-rw-r--r--include/sway/input/input-manager.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
new file mode 100644
index 00000000..53064eed
--- /dev/null
+++ b/include/sway/input/input-manager.h
@@ -0,0 +1,49 @@
+#ifndef _SWAY_INPUT_INPUT_MANAGER_H
+#define _SWAY_INPUT_INPUT_MANAGER_H
+#include <libinput.h>
+#include "sway/server.h"
+#include "sway/config.h"
+#include "list.h"
+
+extern struct input_config *current_input_config;
+extern struct seat_config *current_seat_config;
+
+/**
+ * The global singleton input manager
+ * TODO: make me not a global
+ */
+extern struct sway_input_manager *input_manager;
+
+struct sway_input_device {
+ char *identifier;
+ struct wlr_input_device *wlr_device;
+ struct input_config *config;
+ struct wl_list link;
+};
+
+struct sway_input_manager {
+ struct wl_listener input_add;
+ struct wl_listener input_remove;
+ struct sway_server *server;
+ struct wl_list devices;
+ struct wl_list seats;
+};
+
+struct sway_input_manager *sway_input_manager_create(
+ struct sway_server *server);
+
+bool sway_input_manager_has_focus(struct sway_input_manager *input,
+ swayc_t *container);
+
+void sway_input_manager_set_focus(struct sway_input_manager *input,
+ swayc_t *container);
+
+void sway_input_manager_configure_xcursor(struct sway_input_manager *input);
+
+void sway_input_manager_apply_input_config(struct sway_input_manager *input,
+ struct input_config *input_config);
+
+void sway_input_manager_apply_seat_config(struct sway_input_manager *input,
+ struct seat_config *seat_config);
+
+#endif