forked from project-repo/cagebreak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.h
67 lines (56 loc) · 1.69 KB
/
output.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
// Copyright 2020 - 2023, project-repo and the cagebreak contributors
// SPDX -License-Identifier: MIT
#ifndef CG_OUTPUT_H
#define CG_OUTPUT_H
#include <wayland-server-core.h>
#include <wlr/util/box.h>
struct cg_server;
struct cg_view;
struct wlr_output;
struct wlr_surface;
struct cg_output {
struct cg_server *server;
struct wlr_output *wlr_output;
struct wlr_scene_rect *bg;
struct wl_listener mode;
struct wl_listener commit;
struct wl_listener destroy;
struct wl_listener frame;
struct cg_workspace **workspaces;
struct wl_list messages;
int curr_workspace;
int priority;
struct cg_view *last_scanned_out_view;
struct wl_list link; // cg_server::outputs
};
struct cg_output_priorities {
char *ident;
int priority;
struct wl_list link;
};
enum output_status { OUTPUT_ENABLE, OUTPUT_DISABLE, OUTPUT_DEFAULT };
struct cg_output_config {
enum output_status status;
struct wlr_box pos;
char *output_name;
float refresh_rate;
float scale;
int priority;
int angle; // enum wl_output_transform, -1 signifies "unspecified"
struct wl_list link; // cg_server::output_config
};
typedef void (*cg_surface_iterator_func_t)(struct cg_output *output,
struct wlr_surface *surface,
struct wlr_box *box,
void *user_data);
void
handle_new_output(struct wl_listener *listener, void *data);
void
output_configure(struct cg_server *server, struct cg_output *output);
void
output_set_window_title(struct cg_output *output, const char *title);
void
output_make_workspace_fullscreen(struct cg_output *output, int ws);
int
output_get_num(const struct cg_output *output);
#endif