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

A widget that provides an animated timer session summary. More...

#include <gui/widget.h>

Go to the source code of this file.

Typedefs

typedef struct SummaryView SummaryView
 SummaryView opaque structure.
 
typedef void(* SummaryViewCallback) (void *context)
 Animation completion callback function type.
 

Functions

SummaryView * summary_view_alloc (Widget *parent)
 Create a new SummaryView instance.
 
void summary_view_free (SummaryView *instance)
 Delete a SummaryView instance.
 
Widget * summary_view_get_base (SummaryView *instance)
 Get a pointer to the base class instance.
 
void summary_view_set_cycles_count (SummaryView *instance, uint32_t cycles_count)
 Set the cycles count to display.
 
void summary_view_set_completed_callback (SummaryView *instance, SummaryViewCallback callback, void *context)
 Set the function to be called upon the animation completion.
 

Detailed Description

A widget that provides an animated timer session summary.

Can be used only on the front display.

Typedef Documentation

◆ SummaryViewCallback

typedef void(* SummaryViewCallback) (void *context)

Animation completion callback function type.

Parameters
[in,out]contextpointer to a user-specified context object

Function Documentation

◆ summary_view_alloc()

SummaryView * summary_view_alloc ( Widget * parent)

Create a new SummaryView instance.

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

◆ summary_view_free()

void summary_view_free ( SummaryView * instance)

Delete a SummaryView instance.

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

◆ summary_view_get_base()

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

◆ summary_view_set_completed_callback()

void summary_view_set_completed_callback ( SummaryView * instance,
SummaryViewCallback callback,
void * context )

Set the function to be called upon the animation completion.

Parameters
[in,out]instancepointer to the SummaryView instance to be modified
[in]callbackpointer to the callback function
[in,out]contextpointer to the user-specified object (will be passed to the callback)

◆ summary_view_set_cycles_count()

void summary_view_set_cycles_count ( SummaryView * instance,
uint32_t cycles_count )

Set the cycles count to display.

Affects the number of blocks in the animation. Values higher than 10 will be silently clamped.

Parameters
[in,out]instancepointer to the SummaryView instance to be modified
[in]cycles_countnumber of cycles to display