BSB Developer Docs
Loading...
Searching...
No Matches
timer_bar.h File Reference

A widget that shows the remaining time. More...

#include <gui/widget.h>
#include <color.h>

Go to the source code of this file.

Data Structures

struct  TimerBarPreset
 

Typedefs

typedef struct TimerBar TimerBar
 TimerBar opaque structure.
 

Functions

TimerBar * timer_bar_alloc (Widget *parent)
 Create a new TimerBar instance.
 
void timer_bar_free (TimerBar *instance)
 Delete a TimerBar instance.
 
Widget * timer_bar_get_base (TimerBar *instance)
 Get a pointer to the base class instance.
 
void timer_bar_set_preset (TimerBar *instance, const TimerBarPreset *preset)
 
void timer_bar_set_value (TimerBar *instance, float value)
 Set the displayed value.
 

Detailed Description

A widget that shows the remaining time.

Can be used only on the front display.

Function Documentation

◆ timer_bar_alloc()

TimerBar * timer_bar_alloc ( Widget * parent)

Create a new TimerBar instance.

Parameters
[in,out]parentpointer to the parent Widget instance
Returns
pointer to the newly created TimerBar instance

◆ timer_bar_free()

void timer_bar_free ( TimerBar * instance)

Delete a TimerBar instance.

Parameters
[in,out]instancepointer to the TimerBar instance to be deleted

◆ timer_bar_get_base()

Widget * timer_bar_get_base ( TimerBar * instance)

Get a pointer to the base class instance.

The return value can be used in all Widget methods.

Parameters
[in,out]instancepointer to the TimerBar instance to be queried
Returns
pointer to the base class instance

◆ timer_bar_set_value()

void timer_bar_set_value ( TimerBar * instance,
float value )

Set the displayed value.

Parameters
[in,out]instancepointer to the TimerBar instance to be modified
[in]valueprogress value (0.0 - no fill, 1.0 - fully filled)