summaryrefslogtreecommitdiffstats
path: root/include/swaylock/swaylock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaylock/swaylock.h')
-rw-r--r--include/swaylock/swaylock.h62
1 files changed, 41 insertions, 21 deletions
diff --git a/include/swaylock/swaylock.h b/include/swaylock/swaylock.h
index 1cf66e89..6e0ae288 100644
--- a/include/swaylock/swaylock.h
+++ b/include/swaylock/swaylock.h
@@ -4,34 +4,54 @@
4#include "client/cairo.h" 4#include "client/cairo.h"
5 5
6enum scaling_mode { 6enum scaling_mode {
7 SCALING_MODE_STRETCH, 7 SCALING_MODE_STRETCH,
8 SCALING_MODE_FILL, 8 SCALING_MODE_FILL,
9 SCALING_MODE_FIT, 9 SCALING_MODE_FIT,
10 SCALING_MODE_CENTER, 10 SCALING_MODE_CENTER,
11 SCALING_MODE_TILE, 11 SCALING_MODE_TILE,
12}; 12};
13 13
14enum auth_state { 14enum auth_state {
15 AUTH_STATE_IDLE, 15 AUTH_STATE_IDLE,
16 AUTH_STATE_INPUT, 16 AUTH_STATE_INPUT,
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
22struct render_data { 22struct render_data {
23 list_t *surfaces; 23 list_t *surfaces;
24 // Output specific images 24 // Output specific images
25 cairo_surface_t **images; 25 cairo_surface_t **images;
26 // OR one image for all outputs: 26 // OR one image for all outputs:
27 cairo_surface_t *image; 27 cairo_surface_t *image;
28 int num_images; 28 int num_images;
29 int color_set; 29 int color_set;
30 uint32_t color; 30 uint32_t color;
31 enum scaling_mode scaling_mode; 31 enum scaling_mode scaling_mode;
32 enum auth_state auth_state; 32 enum auth_state auth_state;
33}; 33};
34 34
35void render(struct render_data* render_data); 35struct lock_colors {
36 uint32_t inner_ring;
37 uint32_t outer_ring;
38};
39
40struct lock_config {
41 char *font;
42
43 struct {
44 uint32_t text;
45 uint32_t line;
46 uint32_t separator;
47 uint32_t input_cursor;
48 uint32_t backspace_cursor;
49 struct lock_colors normal;
50 struct lock_colors validating;
51 struct lock_colors invalid;
52 } colors;
53};
54
55void render(struct render_data* render_data, struct lock_config *config);
36 56
37#endif 57#endif