-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvkwc.h
99 lines (85 loc) · 2.87 KB
/
vkwc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#ifndef vkwc_h_INCLUDED
#define vkwc_h_INCLUDED
#include <wlr/backend.h>
#include <wlr/render/allocator.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_keyboard.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_pointer.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/types/wlr_presentation_time.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/render/interface.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/xwayland.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_xdg_output_v1.h>
#include <wlr/types/wlr_subcompositor.h>
#define COLORSCHEME_COUNT 4
enum CursorMode {
VKWC_CURSOR_PASSTHROUGH,
VKWC_CURSOR_XY_ROTATE,
VKWC_CURSOR_Z_ROTATE,
VKWC_CURSOR_X_ROTATE_SPEED,
VKWC_CURSOR_Y_ROTATE_SPEED,
VKWC_CURSOR_Z_ROTATE_SPEED,
VKWC_CURSOR_X_MOVE,
VKWC_CURSOR_Y_MOVE,
VKWC_CURSOR_Z_MOVE,
};
struct Server {
struct wl_display *wl_display;
struct wlr_backend *backend;
struct wlr_renderer *renderer;
struct wlr_allocator *allocator;
struct wlr_xdg_shell *xdg_shell;
struct wl_listener new_xdg_surface;
struct wl_listener handle_new_subsurface;
struct wl_listener handle_subsurface_map;
struct wlr_cursor *cursor;
struct wlr_xcursor_manager *cursor_mgr;
struct wl_listener cursor_motion;
struct wl_listener cursor_motion_absolute;
struct wl_listener cursor_button;
struct wl_listener cursor_axis;
struct wl_listener cursor_frame;
struct wl_listener xdg_new_toplevel_decoration;
struct wlr_seat *seat;
struct wl_listener new_input;
struct wl_listener request_cursor;
struct wl_listener request_set_selection;
struct wl_list keyboards;
enum CursorMode cursor_mode;
double grab_x, grab_y;
struct wlr_box grab_geobox;
uint32_t resize_edges;
struct Surface *grabbed_surface;
struct Surface *last_mouse_surface;
struct wlr_output *output;
struct wlr_output_layout *output_layout; // Even though we only support one output,
// the screencopy API requires this
struct wl_listener output_frame;
struct wl_listener new_output;
struct wl_listener new_xwayland_surface;
struct wl_list windows;
struct wl_listener new_surface;
struct wl_list surfaces;
// We want to animate to the target colorscheme ratio, so that's why
// there's two variables here - one for the current state and one for
// where we want to end up.
float colorscheme_ratio;
float target_colorscheme_ratio;
int src_colorscheme_idx;
int dst_colorscheme_idx;
};
#endif // vkwc_h_INCLUDED