You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

#ifndef _SWAY_INPUT_INPUT_MANAGER_H
#define _SWAY_INPUT_INPUT_MANAGER_H
7 years ago
#include <libinput.h>
#include "sway/server.h"
#include "sway/config.h"
7 years ago
#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 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;
7 years ago
};
struct sway_input_manager *sway_input_manager_create(
struct sway_server *server);
7 years ago
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);
7 years ago
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);
7 years ago
#endif