2017-09-23 02:24:32 +02:00
|
|
|
#ifndef _ROOTSTON_INPUT_H
|
|
|
|
#define _ROOTSTON_INPUT_H
|
|
|
|
#include <wayland-server.h>
|
|
|
|
#include <wlr/types/wlr_input_device.h>
|
|
|
|
#include <wlr/types/wlr_cursor.h>
|
|
|
|
#include <wlr/types/wlr_seat.h>
|
|
|
|
#include <wlr/xcursor.h>
|
2017-11-07 21:56:11 +01:00
|
|
|
#include "rootston/cursor.h"
|
2017-09-23 16:13:05 +02:00
|
|
|
#include "rootston/config.h"
|
2017-09-23 02:24:32 +02:00
|
|
|
#include "rootston/view.h"
|
2017-09-23 16:36:32 +02:00
|
|
|
#include "rootston/server.h"
|
2017-09-23 02:24:32 +02:00
|
|
|
|
|
|
|
struct roots_input {
|
2017-09-23 16:13:05 +02:00
|
|
|
struct roots_config *config;
|
2017-09-23 20:53:15 +02:00
|
|
|
struct roots_server *server;
|
2017-09-23 16:13:05 +02:00
|
|
|
|
2017-09-23 02:24:32 +02:00
|
|
|
struct wl_list keyboards;
|
|
|
|
struct wl_list pointers;
|
|
|
|
struct wl_list touch;
|
|
|
|
struct wl_list tablet_tools;
|
2017-11-03 14:01:34 +01:00
|
|
|
struct wl_list seats;
|
2017-09-23 16:13:05 +02:00
|
|
|
|
|
|
|
struct wl_listener input_add;
|
|
|
|
struct wl_listener input_remove;
|
2017-09-23 20:53:15 +02:00
|
|
|
|
|
|
|
struct wl_listener cursor_motion;
|
|
|
|
struct wl_listener cursor_motion_absolute;
|
|
|
|
struct wl_listener cursor_button;
|
|
|
|
struct wl_listener cursor_axis;
|
2017-10-21 05:19:41 +02:00
|
|
|
|
|
|
|
struct wl_listener cursor_touch_down;
|
|
|
|
struct wl_listener cursor_touch_up;
|
|
|
|
struct wl_listener cursor_touch_motion;
|
|
|
|
|
2017-09-23 20:53:15 +02:00
|
|
|
struct wl_listener cursor_tool_axis;
|
|
|
|
struct wl_listener cursor_tool_tip;
|
2017-10-06 13:32:59 +02:00
|
|
|
|
2017-10-15 17:06:03 +02:00
|
|
|
struct wl_listener pointer_grab_begin;
|
2017-10-21 05:19:41 +02:00
|
|
|
struct wl_list touch_points;
|
|
|
|
|
2017-10-06 13:32:59 +02:00
|
|
|
struct wl_listener pointer_grab_end;
|
2017-10-07 10:55:17 +02:00
|
|
|
|
|
|
|
struct wl_listener request_set_cursor;
|
2017-09-23 02:24:32 +02:00
|
|
|
};
|
|
|
|
|
2017-09-23 16:13:05 +02:00
|
|
|
struct roots_input *input_create(struct roots_server *server,
|
|
|
|
struct roots_config *config);
|
|
|
|
void input_destroy(struct roots_input *input);
|
|
|
|
|
2017-09-23 20:53:15 +02:00
|
|
|
void cursor_initialize(struct roots_input *input);
|
|
|
|
void cursor_load_config(struct roots_config *config,
|
|
|
|
struct wlr_cursor *cursor,
|
|
|
|
struct roots_input *input,
|
|
|
|
struct roots_desktop *desktop);
|
2017-09-29 01:48:55 +02:00
|
|
|
const struct roots_input_event *get_input_event(struct roots_input *input,
|
|
|
|
uint32_t serial);
|
|
|
|
void view_begin_move(struct roots_input *input, struct wlr_cursor *cursor,
|
|
|
|
struct roots_view *view);
|
2017-09-30 10:39:06 +02:00
|
|
|
void view_begin_resize(struct roots_input *input, struct wlr_cursor *cursor,
|
2017-09-30 11:57:39 +02:00
|
|
|
struct roots_view *view, uint32_t edges);
|
2017-09-23 20:53:15 +02:00
|
|
|
|
2017-10-27 19:09:38 +02:00
|
|
|
struct wlr_xcursor *get_default_xcursor(struct wlr_xcursor_theme *theme);
|
|
|
|
struct wlr_xcursor *get_move_xcursor(struct wlr_xcursor_theme *theme);
|
|
|
|
struct wlr_xcursor *get_resize_xcursor(struct wlr_xcursor_theme *theme,
|
|
|
|
uint32_t edges);
|
|
|
|
struct wlr_xcursor *get_rotate_xcursor(struct wlr_xcursor_theme *theme);
|
|
|
|
|
2017-10-08 18:19:05 +02:00
|
|
|
void set_view_focus(struct roots_input *input, struct roots_desktop *desktop,
|
|
|
|
struct roots_view *view);
|
|
|
|
|
2017-11-07 21:56:11 +01:00
|
|
|
struct roots_seat *input_seat_from_wlr_seat(struct roots_input *input,
|
|
|
|
struct wlr_seat *seat);
|
|
|
|
|
2017-09-23 02:24:32 +02:00
|
|
|
#endif
|