blob: c6c73dbab5b816b0048b419cd9a46c5a30afd848 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#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"
/**
* 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 wl_listener device_destroy;
};
struct sway_input_manager {
struct sway_server *server;
struct wl_list devices;
struct wl_list seats;
struct wl_listener new_input;
};
struct sway_input_manager *sway_input_manager_create(
struct sway_server *server);
bool sway_input_manager_has_focus(struct sway_input_manager *input,
struct sway_container *container);
void sway_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 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);
struct sway_seat *sway_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 */
struct sway_seat *input_manager_current_seat(struct sway_input_manager *input);
#endif
|