aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sway/container.h4
-rw-r--r--include/sway/input/cursor.h30
-rw-r--r--include/sway/input/input-manager.h22
-rw-r--r--include/sway/input/seat.h23
-rw-r--r--include/sway/server.h2
5 files changed, 80 insertions, 1 deletions
diff --git a/include/sway/container.h b/include/sway/container.h
index 08a98ed9..0e1cc8a3 100644
--- a/include/sway/container.h
+++ b/include/sway/container.h
@@ -3,6 +3,7 @@
3#include <stdint.h> 3#include <stdint.h>
4#include <sys/types.h> 4#include <sys/types.h>
5#include <wlr/types/wlr_box.h> 5#include <wlr/types/wlr_box.h>
6#include <wlr/types/wlr_surface.h>
6#include "list.h" 7#include "list.h"
7 8
8typedef struct sway_container swayc_t; 9typedef struct sway_container swayc_t;
@@ -136,4 +137,7 @@ swayc_t *destroy_view(swayc_t *view);
136 137
137swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); 138swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type);
138 139
140swayc_t *swayc_at(swayc_t *parent, double lx, double ly,
141 struct wlr_surface **surface, double *sx, double *sy);
142
139#endif 143#endif
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
new file mode 100644
index 00000000..cc529de6
--- /dev/null
+++ b/include/sway/input/cursor.h
@@ -0,0 +1,30 @@
1#ifndef _SWAY_CURSOR_H
2#define _SWAY_CURSOR_H
3
4#include "sway/input/seat.h"
5
6struct sway_cursor {
7 struct sway_seat *seat;
8 struct wlr_cursor *cursor;
9 struct wlr_xcursor_manager *xcursor_manager;
10
11 double x, y;
12
13 struct wl_listener motion;
14 struct wl_listener motion_absolute;
15 struct wl_listener button;
16 struct wl_listener axis;
17
18 struct wl_listener touch_down;
19 struct wl_listener touch_up;
20 struct wl_listener touch_motion;
21
22 struct wl_listener tool_axis;
23 struct wl_listener tool_tip;
24
25 struct wl_listener request_set_cursor;
26};
27
28struct sway_cursor *sway_cursor_create(struct sway_seat *seat);
29
30#endif
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
new file mode 100644
index 00000000..5dc75ba7
--- /dev/null
+++ b/include/sway/input/input-manager.h
@@ -0,0 +1,22 @@
1#ifndef _SWAY_INPUT_MANAGER_H
2#define _SWAY_INPUT_MANAGER_H
3#include <libinput.h>
4#include "sway/server.h"
5#include "sway/config.h"
6#include "list.h"
7
8struct sway_input_manager {
9 struct wl_listener input_add;
10 struct wl_listener input_remove;
11 struct sway_server *server;
12 list_t *seats;
13};
14
15struct input_config *new_input_config(const char* identifier);
16
17char* libinput_dev_unique_id(struct libinput_device *dev);
18
19struct sway_input_manager *sway_input_manager_create(
20 struct sway_server *server);
21
22#endif
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
new file mode 100644
index 00000000..f7f8a1bb
--- /dev/null
+++ b/include/sway/input/seat.h
@@ -0,0 +1,23 @@
1#ifndef _SWAY_SEAT_H
2#define _SWAY_SEAT_H
3
4#include <wlr/types/wlr_seat.h>
5#include "sway/input/input-manager.h"
6
7struct sway_seat {
8 struct wlr_seat *seat;
9 struct sway_cursor *cursor;
10};
11
12struct sway_seat *sway_seat_create(struct wl_display *display,
13 const char *seat_name);
14
15void sway_seat_add_device(struct sway_seat *seat,
16 struct wlr_input_device *device);
17
18void sway_seat_remove_device(struct sway_seat *seat,
19 struct wlr_input_device *device);
20
21void sway_seat_configure_xcursor(struct sway_seat *seat);
22
23#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index 3fa72e84..76a05476 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -22,7 +22,7 @@ struct sway_server {
22 struct wlr_compositor *compositor; 22 struct wlr_compositor *compositor;
23 struct wlr_data_device_manager *data_device_manager; 23 struct wlr_data_device_manager *data_device_manager;
24 24
25 struct sway_input *input; 25 struct sway_input_manager *input;
26 26
27 struct wl_listener output_add; 27 struct wl_listener output_add;
28 struct wl_listener output_remove; 28 struct wl_listener output_remove;