diff options
author | James Magahern <james@magahern.com> | 2019-01-20 16:32:34 -0800 |
---|---|---|
committer | James Magahern <james@magahern.com> | 2019-01-20 16:33:42 -0800 |
commit | 2f4561cb78c1f53ace26f56f28050d7b75c6414d (patch) | |
tree | da4b6a15b0eeb6e518652dd3fb5c23ec80a1e911 /src/render.h | |
parent | Also don't allow input in xsecurelock path (TODO: unify these) (diff) |
Animation support. Logo animates in and out now
Diffstat (limited to 'src/render.h')
-rw-r--r-- | src/render.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/render.h b/src/render.h index 902763d..7fc315d 100644 --- a/src/render.h +++ b/src/render.h @@ -6,6 +6,7 @@ #pragma once +#include "animation.h" #include "auth.h" #include <cairo/cairo.h> @@ -14,6 +15,8 @@ #include <pango/pangocairo.h> #include <stdbool.h> +#define kMaxAnimations 32 + typedef struct { cairo_t *ctx; cairo_surface_t *surface; @@ -22,24 +25,34 @@ typedef struct { PangoFontDescription *status_font; RsvgHandle *logo_svg_handle; + double logo_fill_progress; + RsvgHandle *asterisk_svg_handle; int canvas_width; int canvas_height; bool input_allowed; - bool cursor_animating; double cursor_opacity; - double cursor_fade_direction; + bool is_processing; bool is_authenticated; const char *password_prompt; char *password_buffer; size_t password_buffer_len; + animation_t animations[kMaxAnimations]; + unsigned num_animations; + struct auth_handle_t *auth_handle; } saver_state_t; +// Start an animation +void schedule_animation(saver_state_t *state, animation_t anim); + +// Update all running animations +void update_animations(saver_state_t *state); + // The purple sidebar void draw_logo(saver_state_t *state); |