seat.h (1142B)
1 /* Copyright (c), Niclas Meyer <niclas@countingsort.com> 2 * 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 * You can obtain one at https://mozilla.org/MPL/2.0/. 6 */ 7 8 #ifndef KIWMI_INPUT_SEAT_H 9 #define KIWMI_INPUT_SEAT_H 10 11 #include <wayland-server.h> 12 #include <wlr/types/wlr_surface.h> 13 14 #include "desktop/layer_shell.h" 15 #include "desktop/view.h" 16 #include "input/input.h" 17 18 struct kiwmi_seat { 19 struct kiwmi_input *input; 20 struct wlr_seat *seat; 21 22 struct kiwmi_view *focused_view; 23 struct kiwmi_layer *focused_layer; 24 25 struct wl_listener request_set_cursor; 26 struct wl_listener request_set_selection; 27 struct wl_listener request_set_primary_selection; 28 }; 29 30 void 31 seat_focus_surface(struct kiwmi_seat *seat, struct wlr_surface *wlr_surface); 32 void seat_focus_layer(struct kiwmi_seat *seat, struct kiwmi_layer *layer); 33 void seat_focus_view(struct kiwmi_seat *seat, struct kiwmi_view *view); 34 35 struct kiwmi_seat *seat_create(struct kiwmi_input *input); 36 void seat_destroy(struct kiwmi_seat *seat); 37 38 #endif /* KIWMI_INPUT_SEAT_H */