kiwmi/include/input/seat.h

39 lines
1.1 KiB
C
Raw Normal View History

2020-01-18 15:14:19 +00:00
/* Copyright (c), Charlotte Meyer <dev@buffet.sh>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#ifndef KIWMI_INPUT_SEAT_H
#define KIWMI_INPUT_SEAT_H
#include <wayland-server.h>
2020-01-18 19:38:47 +00:00
#include <wlr/types/wlr_surface.h>
2020-01-18 15:14:19 +00:00
2020-01-18 19:38:47 +00:00
#include "desktop/layer_shell.h"
#include "desktop/view.h"
2020-01-18 15:14:19 +00:00
#include "input/input.h"
struct kiwmi_seat {
struct kiwmi_input *input;
struct wlr_seat *seat;
2020-01-18 19:38:47 +00:00
struct kiwmi_view *focused_view;
struct kiwmi_layer *focused_layer;
2020-01-18 15:14:19 +00:00
struct wl_listener request_set_cursor;
struct wl_listener request_set_selection;
struct wl_listener request_set_primary_selection;
2020-01-18 15:14:19 +00:00
};
2020-01-18 19:38:47 +00:00
void
seat_focus_surface(struct kiwmi_seat *seat, struct wlr_surface *wlr_surface);
void seat_focus_layer(struct kiwmi_seat *seat, struct kiwmi_layer *layer);
void seat_focus_view(struct kiwmi_seat *seat, struct kiwmi_view *view);
2020-01-18 15:14:19 +00:00
struct kiwmi_seat *seat_create(struct kiwmi_input *input);
void seat_destroy(struct kiwmi_seat *seat);
#endif /* KIWMI_INPUT_SEAT_H */