sway/include/sway/input/input-manager.h

47 lines
1.1 KiB
C
Raw Normal View History

2017-12-07 14:58:32 +00:00
#ifndef _SWAY_INPUT_MANAGER_H
#define _SWAY_INPUT_MANAGER_H
2017-12-06 13:28:46 +00:00
#include <libinput.h>
#include "sway/server.h"
2017-12-08 13:07:47 +00:00
#include "sway/config.h"
2017-12-06 13:28:46 +00:00
#include "list.h"
2017-12-11 09:17:14 +00:00
extern struct input_config *current_input_config;
2017-12-12 13:29:37 +00:00
/**
* 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 sway_keyboard *keyboard; // managed by the seat
struct wl_list link;
};
2017-12-07 12:31:49 +00:00
struct sway_input_manager {
2017-12-07 14:58:32 +00:00
struct wl_listener input_add;
struct wl_listener input_remove;
struct sway_server *server;
2017-12-12 13:29:37 +00:00
struct wl_list devices;
struct wl_list seats;
2017-12-06 13:28:46 +00:00
};
2017-12-07 12:31:49 +00:00
struct sway_input_manager *sway_input_manager_create(
struct sway_server *server);
2017-12-06 13:28:46 +00:00
2017-12-12 13:29:37 +00:00
bool sway_input_manager_has_focus(struct sway_input_manager *input,
2017-12-10 16:11:47 +00:00
swayc_t *container);
2017-12-12 13:29:37 +00:00
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_config(struct sway_input_manager *input,
struct input_config *config);
2017-12-06 13:28:46 +00:00
#endif