diff options
author | Kevin Hamacher <kevin.hamacher@rub.de> | 2016-03-25 14:06:27 +0100 |
---|---|---|
committer | Kevin Hamacher <kevin.hamacher@rub.de> | 2016-03-25 15:24:41 +0100 |
commit | fb6dcce2adb16c302f637978d8c0b80df123802a (patch) | |
tree | 552fb9c745d8c5a851c774ef48e3fa685a13bef6 /include | |
parent | Merge pull request #538 from nuew/display-images (diff) | |
download | sway-fb6dcce2adb16c302f637978d8c0b80df123802a.tar.gz sway-fb6dcce2adb16c302f637978d8c0b80df123802a.tar.zst sway-fb6dcce2adb16c302f637978d8c0b80df123802a.zip |
Add graphical feedback to swaylock (#526)
Diffstat (limited to 'include')
-rw-r--r-- | include/lock/lock.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/lock/lock.h b/include/lock/lock.h new file mode 100644 index 00000000..1cf66e89 --- /dev/null +++ b/include/lock/lock.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef _SWAYLOCK_H | ||
2 | #define _SWAYLOCK_H | ||
3 | |||
4 | #include "client/cairo.h" | ||
5 | |||
6 | enum scaling_mode { | ||
7 | SCALING_MODE_STRETCH, | ||
8 | SCALING_MODE_FILL, | ||
9 | SCALING_MODE_FIT, | ||
10 | SCALING_MODE_CENTER, | ||
11 | SCALING_MODE_TILE, | ||
12 | }; | ||
13 | |||
14 | enum auth_state { | ||
15 | AUTH_STATE_IDLE, | ||
16 | AUTH_STATE_INPUT, | ||
17 | AUTH_STATE_BACKSPACE, | ||
18 | AUTH_STATE_VALIDATING, | ||
19 | AUTH_STATE_INVALID, | ||
20 | }; | ||
21 | |||
22 | struct render_data { | ||
23 | list_t *surfaces; | ||
24 | // Output specific images | ||
25 | cairo_surface_t **images; | ||
26 | // OR one image for all outputs: | ||
27 | cairo_surface_t *image; | ||
28 | int num_images; | ||
29 | int color_set; | ||
30 | uint32_t color; | ||
31 | enum scaling_mode scaling_mode; | ||
32 | enum auth_state auth_state; | ||
33 | }; | ||
34 | |||
35 | void render(struct render_data* render_data); | ||
36 | |||
37 | #endif | ||