aboutsummaryrefslogtreecommitdiff
path: root/include/sway/input
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/input')
-rw-r--r--include/sway/input/input-manager.h23
-rw-r--r--include/sway/input/seat.h37
2 files changed, 35 insertions, 25 deletions
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index c6c73dba..8e39a4a7 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -14,7 +14,6 @@ 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 wl_listener device_destroy;
};
@@ -27,30 +26,34 @@ struct sway_input_manager {
struct wl_listener new_input;
};
-struct sway_input_manager *sway_input_manager_create(
- struct sway_server *server);
+struct sway_input_manager *input_manager_create(struct sway_server *server);
-bool sway_input_manager_has_focus(struct sway_input_manager *input,
+bool input_manager_has_focus(struct sway_input_manager *input,
struct sway_container *container);
-void sway_input_manager_set_focus(struct sway_input_manager *input,
+void input_manager_set_focus(struct sway_input_manager *input,
struct sway_container *container);
-void sway_input_manager_configure_xcursor(struct sway_input_manager *input);
+void input_manager_configure_xcursor(struct sway_input_manager *input);
-void sway_input_manager_apply_input_config(struct sway_input_manager *input,
+void 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,
+void input_manager_apply_seat_config(struct sway_input_manager *input,
struct seat_config *seat_config);
-struct sway_seat *sway_input_manager_get_default_seat(
+struct sway_seat *input_manager_get_default_seat(
struct sway_input_manager *input);
struct sway_seat *input_manager_get_seat(struct sway_input_manager *input,
const char *seat_name);
-/** Gets the last seat the user interacted with */
+/**
+ * Gets the last seat the user interacted with
+ */
struct sway_seat *input_manager_current_seat(struct sway_input_manager *input);
+struct input_config *input_device_get_config(struct sway_input_device *device);
+
+
#endif
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 31210a5a..137fcd22 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -1,6 +1,7 @@
#ifndef _SWAY_INPUT_SEAT_H
#define _SWAY_INPUT_SEAT_H
+#include <wlr/types/wlr_layer_shell.h>
#include <wlr/types/wlr_seat.h>
#include "sway/input/input-manager.h"
@@ -8,7 +9,6 @@ struct sway_seat_device {
struct sway_seat *sway_seat;
struct sway_input_device *input_device;
struct sway_keyboard *keyboard;
- struct seat_attachment_config *attachment_config;
struct wl_list link; // sway_seat::devices
};
@@ -23,13 +23,15 @@ struct sway_seat_container {
struct sway_seat {
struct wlr_seat *wlr_seat;
- struct seat_config *config;
struct sway_cursor *cursor;
struct sway_input_manager *input;
bool has_focus;
struct wl_list focus_stack; // list of containers in focus order
+ // If the focused layer is set, views cannot receive keyboard focus
+ struct wlr_layer_surface *focused_layer;
+
struct wl_listener focus_destroy;
struct wl_listener new_container;
@@ -38,28 +40,31 @@ struct sway_seat {
struct wl_list link; // input_manager::seats
};
-struct sway_seat *sway_seat_create(struct sway_input_manager *input,
+struct sway_seat *seat_create(struct sway_input_manager *input,
const char *seat_name);
-void sway_seat_destroy(struct sway_seat *seat);
+void seat_destroy(struct sway_seat *seat);
-void sway_seat_add_device(struct sway_seat *seat,
+void seat_add_device(struct sway_seat *seat,
struct sway_input_device *device);
-void sway_seat_configure_device(struct sway_seat *seat,
+void seat_configure_device(struct sway_seat *seat,
struct sway_input_device *device);
-void sway_seat_remove_device(struct sway_seat *seat,
+void seat_remove_device(struct sway_seat *seat,
struct sway_input_device *device);
-void sway_seat_configure_xcursor(struct sway_seat *seat);
+void seat_configure_xcursor(struct sway_seat *seat);
-void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *container);
+void seat_set_focus(struct sway_seat *seat, struct sway_container *container);
-void sway_seat_set_focus_warp(struct sway_seat *seat,
+void seat_set_focus_warp(struct sway_seat *seat,
struct sway_container *container, bool warp);
-struct sway_container *sway_seat_get_focus(struct sway_seat *seat);
+void seat_set_focus_layer(struct sway_seat *seat,
+ struct wlr_layer_surface *layer);
+
+struct sway_container *seat_get_focus(struct sway_seat *seat);
/**
* Return the last container to be focused for the seat (or the most recently
@@ -70,12 +75,14 @@ struct sway_container *sway_seat_get_focus(struct sway_seat *seat);
* is destroyed, or focus moves to a container with children and we need to
* descend into the next leaf in focus order.
*/
-struct sway_container *sway_seat_get_focus_inactive(struct sway_seat *seat,
+struct sway_container *seat_get_focus_inactive(struct sway_seat *seat,
struct sway_container *container);
-struct sway_container *sway_seat_get_focus_by_type(struct sway_seat *seat,
- enum sway_container_type type);
+struct sway_container *seat_get_focus_by_type(struct sway_seat *seat,
+ struct sway_container *container, enum sway_container_type type);
+
+void seat_apply_config(struct sway_seat *seat, struct seat_config *seat_config);
-void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config);
+struct seat_config *seat_get_config(struct sway_seat *seat);
#endif