BSB Developer Docs
Loading...
Searching...
No Matches
timer_label.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
16typedef struct TimerLabel TimerLabel;
17
19typedef struct {
20 struct {
23 } countdown_colors;
25
34
40void timer_label_free(TimerLabel* instance);
41
51
58void timer_label_set_time(TimerLabel* instance, uint32_t time_s);
59
66void timer_label_set_preset(TimerLabel* instance, const TimerLabelPreset* preset);
67
74void timer_label_enable_background(TimerLabel* instance, bool enable);
75
82void timer_label_show(TimerLabel* instance, bool enable_animation);
83
90void timer_label_hide(TimerLabel* instance, bool enable_animation);
91
92#ifdef __cplusplus
93}
94#endif
RGB color structure.
Definition color.h:42
Definition timer_label.c:27
TimerLabel preset type.
Definition timer_label.h:19
Color base
Countdown base colour.
Definition timer_label.h:21
Color blink
Countdown blink colour.
Definition timer_label.h:22
Definition widget_i.h:35
void timer_label_set_time(TimerLabel *instance, uint32_t time_s)
Set the displayed time.
Definition timer_label.c:241
void timer_label_enable_background(TimerLabel *instance, bool enable)
Enable or disable the dark gradient background.
Definition timer_label.c:287
void timer_label_free(TimerLabel *instance)
Delete a TimerLabel instance.
Definition timer_label.c:231
void timer_label_hide(TimerLabel *instance, bool enable_animation)
Hide the label text and background (if enabled) with animation.
Definition timer_label.c:309
void timer_label_show(TimerLabel *instance, bool enable_animation)
Show the label text and background (if enabled) with animation.
Definition timer_label.c:292
Widget * timer_label_get_base(TimerLabel *instance)
Get a pointer to the base class instance.
Definition timer_label.c:236
void timer_label_set_preset(TimerLabel *instance, const TimerLabelPreset *preset)
Set the current preset (affects countdown blinking)
Definition timer_label.c:279
TimerLabel * timer_label_alloc(Widget *parent)
Create a new TimerLabel instance.
Definition timer_label.c:221
Base widget class.