diff options
Diffstat (limited to 'include/swaylock/swaylock.h')
-rw-r--r-- | include/swaylock/swaylock.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/include/swaylock/swaylock.h b/include/swaylock/swaylock.h index 56ec0afb..27db67cd 100644 --- a/include/swaylock/swaylock.h +++ b/include/swaylock/swaylock.h | |||
@@ -10,13 +10,13 @@ | |||
10 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" | 10 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" |
11 | 11 | ||
12 | enum auth_state { | 12 | enum auth_state { |
13 | AUTH_STATE_IDLE, | 13 | AUTH_STATE_IDLE, |
14 | AUTH_STATE_CLEAR, | 14 | AUTH_STATE_CLEAR, |
15 | AUTH_STATE_INPUT, | 15 | AUTH_STATE_INPUT, |
16 | AUTH_STATE_INPUT_NOP, | 16 | AUTH_STATE_INPUT_NOP, |
17 | AUTH_STATE_BACKSPACE, | 17 | AUTH_STATE_BACKSPACE, |
18 | AUTH_STATE_VALIDATING, | 18 | AUTH_STATE_VALIDATING, |
19 | AUTH_STATE_INVALID, | 19 | AUTH_STATE_INVALID, |
20 | }; | 20 | }; |
21 | 21 | ||
22 | struct swaylock_args { | 22 | struct swaylock_args { |
@@ -37,12 +37,14 @@ struct swaylock_state { | |||
37 | struct zwlr_input_inhibit_manager_v1 *input_inhibit_manager; | 37 | struct zwlr_input_inhibit_manager_v1 *input_inhibit_manager; |
38 | struct wl_shm *shm; | 38 | struct wl_shm *shm; |
39 | struct wl_list surfaces; | 39 | struct wl_list surfaces; |
40 | struct wl_list images; | ||
40 | struct swaylock_args args; | 41 | struct swaylock_args args; |
41 | cairo_surface_t *background_image; | 42 | cairo_surface_t *background_image; |
42 | struct swaylock_password password; | 43 | struct swaylock_password password; |
43 | struct swaylock_xkb xkb; | 44 | struct swaylock_xkb xkb; |
44 | enum auth_state auth_state; | 45 | enum auth_state auth_state; |
45 | bool run_display; | 46 | bool run_display; |
47 | struct zxdg_output_manager_v1 *zxdg_output_manager; | ||
46 | }; | 48 | }; |
47 | 49 | ||
48 | struct swaylock_surface { | 50 | struct swaylock_surface { |
@@ -50,12 +52,22 @@ struct swaylock_surface { | |||
50 | struct swaylock_state *state; | 52 | struct swaylock_state *state; |
51 | struct wl_output *output; | 53 | struct wl_output *output; |
52 | uint32_t output_global_name; | 54 | uint32_t output_global_name; |
55 | struct zxdg_output_v1 *xdg_output; | ||
53 | struct wl_surface *surface; | 56 | struct wl_surface *surface; |
54 | struct zwlr_layer_surface_v1 *layer_surface; | 57 | struct zwlr_layer_surface_v1 *layer_surface; |
55 | struct pool_buffer buffers[2]; | 58 | struct pool_buffer buffers[2]; |
56 | struct pool_buffer *current_buffer; | 59 | struct pool_buffer *current_buffer; |
57 | uint32_t width, height; | 60 | uint32_t width, height; |
58 | int32_t scale; | 61 | int32_t scale; |
62 | char *output_name; | ||
63 | struct wl_list link; | ||
64 | }; | ||
65 | |||
66 | // There is exactly one swaylock_image for each -i argument | ||
67 | struct swaylock_image { | ||
68 | char *path; | ||
69 | char *output_name; | ||
70 | cairo_surface_t *cairo_surface; | ||
59 | struct wl_list link; | 71 | struct wl_list link; |
60 | }; | 72 | }; |
61 | 73 | ||