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

A widget that prompts the user to press the Start button. More...

#include <gui/widget.h>

Go to the source code of this file.

Typedefs

typedef struct PromptOverlay PromptOverlay
 PromptOverlay opaque structure.
 
typedef void(* PromptOverlayCallback) (void *context)
 Animation completion callback function type.
 

Functions

PromptOverlay * prompt_overlay_alloc (Widget *parent)
 Create a new PromptOverlay instance.
 
void prompt_overlay_free (PromptOverlay *instance)
 Delete a PromptOverlay instance.
 
Widget * prompt_overlay_get_base (PromptOverlay *instance)
 Get a pointer to the base class instance.
 
void prompt_overlay_set_animation_target (PromptOverlay *instance, Widget *widget)
 Set a widget that will be moved according to the overlay animation.
 
void prompt_overlay_set_callback (PromptOverlay *instance, PromptOverlayCallback callback, void *context)
 Set the function to be called each time upon the animation completion.
 

Detailed Description

A widget that prompts the user to press the Start button.

If set, can drive the position of the target widget in accordance to the internally set animation.

Can be used only on the front display.

Typedef Documentation

◆ PromptOverlayCallback

typedef void(* PromptOverlayCallback) (void *context)

Animation completion callback function type.

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

Function Documentation

◆ prompt_overlay_alloc()

PromptOverlay * prompt_overlay_alloc ( Widget * parent)

Create a new PromptOverlay instance.

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

◆ prompt_overlay_free()

void prompt_overlay_free ( PromptOverlay * instance)

Delete a PromptOverlay instance.

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

◆ prompt_overlay_get_base()

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

◆ prompt_overlay_set_animation_target()

void prompt_overlay_set_animation_target ( PromptOverlay * instance,
Widget * widget )

Set a widget that will be moved according to the overlay animation.

Parameters
[in,out]instancepointer to the PromptOverlay instance to be modified
[in,out]widgetpointer to the Widget instance to be animated

◆ prompt_overlay_set_callback()

void prompt_overlay_set_callback ( PromptOverlay * instance,
PromptOverlayCallback callback,
void * context )

Set the function to be called each time upon the animation completion.

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