2018-02-12 20:29:23 +00:00
|
|
|
#ifndef ROOTSTON_INPUT_H
|
|
|
|
#define ROOTSTON_INPUT_H
|
|
|
|
|
2019-07-27 08:53:54 +00:00
|
|
|
#include <wayland-server-core.h>
|
2017-09-23 00:24:32 +00:00
|
|
|
#include <wlr/types/wlr_cursor.h>
|
2018-02-12 20:29:23 +00:00
|
|
|
#include <wlr/types/wlr_input_device.h>
|
2017-09-23 00:24:32 +00:00
|
|
|
#include <wlr/types/wlr_seat.h>
|
2017-09-23 14:13:05 +00:00
|
|
|
#include "rootston/config.h"
|
2018-02-12 20:29:23 +00:00
|
|
|
#include "rootston/cursor.h"
|
2017-09-23 14:36:32 +00:00
|
|
|
#include "rootston/server.h"
|
2018-02-12 20:29:23 +00:00
|
|
|
#include "rootston/view.h"
|
2017-09-23 00:24:32 +00:00
|
|
|
|
|
|
|
struct roots_input {
|
2017-09-23 14:13:05 +00:00
|
|
|
struct roots_config *config;
|
2017-09-23 18:53:15 +00:00
|
|
|
struct roots_server *server;
|
2017-09-23 14:13:05 +00:00
|
|
|
|
2018-02-12 09:36:43 +00:00
|
|
|
struct wl_listener new_input;
|
2017-09-23 18:53:15 +00:00
|
|
|
|
2018-08-10 16:19:16 +00:00
|
|
|
struct wl_list seats; // roots_seat::link
|
2017-09-23 00:24:32 +00:00
|
|
|
};
|
|
|
|
|
2017-09-23 14:13:05 +00:00
|
|
|
struct roots_input *input_create(struct roots_server *server,
|
|
|
|
struct roots_config *config);
|
|
|
|
void input_destroy(struct roots_input *input);
|
|
|
|
|
2017-11-07 20:56:11 +00:00
|
|
|
struct roots_seat *input_seat_from_wlr_seat(struct roots_input *input,
|
|
|
|
struct wlr_seat *seat);
|
|
|
|
|
2017-11-10 13:27:45 +00:00
|
|
|
bool input_view_has_focus(struct roots_input *input, struct roots_view *view);
|
|
|
|
|
2017-11-22 13:10:06 +00:00
|
|
|
struct roots_seat *input_get_seat(struct roots_input *input, char *name);
|
|
|
|
|
2018-04-22 17:15:49 +00:00
|
|
|
struct roots_seat *input_last_active_seat(struct roots_input *input);
|
|
|
|
|
2018-07-29 17:02:00 +00:00
|
|
|
void input_update_cursor_focus(struct roots_input *input);
|
|
|
|
|
2017-09-23 00:24:32 +00:00
|
|
|
#endif
|