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

A widget that shows the progress in the form of a spinning counter. More...

#include <gui/widget.h>

Go to the source code of this file.

Typedefs

typedef struct ProgressCounter ProgressCounter
 ProgressCounter opaque structure.
 

Functions

ProgressCounter * progress_counter_alloc (Widget *parent)
 Create a new ProgressCounter instance.
 
void progress_counter_free (ProgressCounter *instance)
 Delete a ProgressCounter instance.
 
Widget * progress_counter_get_base (ProgressCounter *instance)
 Get a pointer to the base class instance.
 
void progress_counter_set_values (ProgressCounter *instance, uint32_t done, uint32_t total)
 Set the progress values and play a rollover animation.
 

Detailed Description

A widget that shows the progress in the form of a spinning counter.

Can be used only on the front display.

Function Documentation

◆ progress_counter_alloc()

ProgressCounter * progress_counter_alloc ( Widget * parent)

Create a new ProgressCounter instance.

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

◆ progress_counter_free()

void progress_counter_free ( ProgressCounter * instance)

Delete a ProgressCounter instance.

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

◆ progress_counter_get_base()

Widget * progress_counter_get_base ( ProgressCounter * 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 ProgressCounter instance to be queried
Returns
pointer to the base class instance

◆ progress_counter_set_values()

void progress_counter_set_values ( ProgressCounter * instance,
uint32_t done,
uint32_t total )

Set the progress values and play a rollover animation.

Parameters
[in,out]instancepointer to the ProgressCounter instance to be modified
[in]donethe number of done cycles (cannot be 0)
[in]totalthe total number of cycles