summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/swaylock/swaylock.h68
1 files changed, 47 insertions, 21 deletions
diff --git a/include/swaylock/swaylock.h b/include/swaylock/swaylock.h
index 1cf66e89..06533108 100644
--- a/include/swaylock/swaylock.h
+++ b/include/swaylock/swaylock.h
@@ -4,34 +4,60 @@
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};
21
22enum line_source {
23 LINE_SOURCE_DEFAULT,
24 LINE_SOURCE_RING,
25 LINE_SOURCE_INSIDE,
20}; 26};
21 27
22struct render_data { 28struct render_data {
23 list_t *surfaces; 29 list_t *surfaces;
24 // Output specific images 30 // Output specific images
25 cairo_surface_t **images; 31 cairo_surface_t **images;
26 // OR one image for all outputs: 32 // OR one image for all outputs:
27 cairo_surface_t *image; 33 cairo_surface_t *image;
28 int num_images; 34 int num_images;
29 int color_set; 35 int color_set;
30 uint32_t color; 36 uint32_t color;
31 enum scaling_mode scaling_mode; 37 enum scaling_mode scaling_mode;
32 enum auth_state auth_state; 38 enum auth_state auth_state;
39};
40
41struct lock_colors {
42 uint32_t inner_ring;
43 uint32_t outer_ring;
44};
45
46struct lock_config {
47 char *font;
48
49 struct {
50 uint32_t text;
51 uint32_t line;
52 uint32_t separator;
53 uint32_t input_cursor;
54 uint32_t backspace_cursor;
55 struct lock_colors normal;
56 struct lock_colors validating;
57 struct lock_colors invalid;
58 } colors;
33}; 59};
34 60
35void render(struct render_data* render_data); 61void render(struct render_data* render_data, struct lock_config *config);
36 62
37#endif 63#endif