BSB Developer Docs
Loading...
Searching...
No Matches
timer_indicator.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <gui/widget.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
17
18typedef enum {
19 TimerIndicatorProgressDirectionHorizontal,
20 TimerIndicatorProgressDirectionVertical,
21 TimerIndicatorProgressDirectionMax,
22} TimerIndicatorProgressDirection;
23
24typedef struct {
25 const char* anim_path;
27
28typedef struct {
29 const char* anim_path;
30 const char* mask_path;
31 TimerIndicatorProgressDirection direction;
32 int8_t start_offset_px;
33 int8_t end_offset_px;
35
36typedef struct {
37 const char* image_path;
39
40typedef struct {
41 TimerIndicatorBgConfig background_config;
42 TimerIndicatorProgressConfig progress_config;
43 TimerIndicatorFgConfig foreground_config;
45
46typedef struct {
47 const char* anim_path;
48 uint32_t duration_ms;
50
59
66
76
94 TimerIndicator* instance,
95 const TimerIndicatorPreset* preset,
96 const TimerIndicatorTransition* transition);
97
107void timer_indicator_set_progress(TimerIndicator* instance, float progress);
108
115void timer_indicator_enable_animations(TimerIndicator* instance, bool enable);
116
117#ifdef __cplusplus
118}
119#endif
Definition timer_indicator.h:24
Definition timer_indicator.h:36
Definition timer_indicator.c:9
Definition timer_indicator.h:40
Definition timer_indicator.h:28
Definition timer_indicator.h:46
Definition widget_i.h:35
Widget * timer_indicator_get_base(TimerIndicator *instance)
Get a pointer to the base class instance.
Definition timer_indicator.c:141
void timer_indicator_set_progress(TimerIndicator *instance, float progress)
Set the progress value for the progress animation.
Definition timer_indicator.c:162
void timer_indicator_enable_animations(TimerIndicator *instance, bool enable)
Enable or disable animations shown by a TimerIndicator instance.
Definition timer_indicator.c:184
TimerIndicator * timer_indicator_alloc(Widget *parent)
Create a new TimerIndicator instance.
Definition timer_indicator.c:126
void timer_indicator_set_preset(TimerIndicator *instance, const TimerIndicatorPreset *preset, const TimerIndicatorTransition *transition)
Set the active preset for a TimerIndicator instance.
Definition timer_indicator.c:146
void timer_indicator_free(TimerIndicator *instance)
Delete a TimerIndicator instance.
Definition timer_indicator.c:136
Base widget class.