aboutsummaryrefslogtreecommitdiff
path: root/src/animation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation.h')
-rw-r--r--src/animation.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/animation.h b/src/animation.h
index 3064d1b..a74bb60 100644
--- a/src/animation.h
+++ b/src/animation.h
@@ -14,39 +14,46 @@ struct animation_t;
typedef void(*AnimationCompletion)(struct animation_t *anim, void *context);
typedef enum {
+ IN,
+ OUT
+} AnimationDirection;
+
+typedef enum {
_EmptyAnimationType,
ACursorAnimation,
ALogoAnimation,
+ ARedFlashAnimation,
} AnimationType;
typedef struct {
- AnimationType type;
-
bool cursor_animating;
double cursor_fade_direction;
} CursorAnimation;
typedef struct {
- AnimationType type;
-
- bool direction; // false: in, true: out
+ AnimationDirection direction;
} LogoAnimation;
-typedef union {
- AnimationType type;
+typedef struct {
+ AnimationDirection direction;
+ unsigned flash_count;
+} RedFlashAnimation;
- CursorAnimation cursor_anim;
- LogoAnimation logo_anim;
+typedef union {
+ CursorAnimation cursor_anim;
+ LogoAnimation logo_anim;
+ RedFlashAnimation redflash_anim;
} Animation;
typedef struct {
+ AnimationType type;
+ Animation anim;
+
bool completed;
anim_time_interval_t start_time;
AnimationCompletion completion_func;
void *completion_func_context;
-
- Animation anim;
} animation_t;
// Convenience: returns current time as anim_time_interval_t