NetSurf
Functions
throbber.h File Reference

Throbber (interface). More...

#include <stdbool.h>
#include "riscos/theme.h"
Include dependency graph for throbber.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct throbberro_gui_throbber_create (struct theme_descriptor *theme)
 Create a new throbber widget. More...
 
bool ro_gui_throbber_rebuild (struct throbber *throbber, struct theme_descriptor *theme, theme_style style, wimp_w window, bool shaded)
 Place a throbber into a toolbar window and initialise any theme-specific settings. More...
 
void ro_gui_throbber_destroy (struct throbber *throbber)
 Destroy a throbber widget. More...
 
bool ro_gui_throbber_get_dims (struct throbber *throbber, int *width, int *height)
 Return the MINIMUM dimensions required by the throbber, in RO units, allowing for the current theme. More...
 
bool ro_gui_throbber_set_extent (struct throbber *throbber, int x0, int y0, int x1, int y1)
 Set or update the dimensions to be used by the throbber in RO units. More...
 
bool ro_gui_throbber_hide (struct throbber *throbber, bool hide)
 Show or hide a throbber. More...
 
bool ro_gui_throbber_help_suffix (struct throbber *throbber, wimp_i i, os_coord *screenpos, wimp_window_state *state, wimp_mouse_state buttons, const char **suffix)
 Translate mouse data into an interactive help message for the throbber. More...
 
bool ro_gui_throbber_animate (struct throbber *throbber)
 Start or update the amimation of a throbber. More...
 
bool ro_gui_throbber_stop (struct throbber *throbber)
 Stop the amimation of a throbber. More...
 

Detailed Description

Throbber (interface).

Definition in file throbber.h.

Function Documentation

◆ ro_gui_throbber_animate()

bool ro_gui_throbber_animate ( struct throbber throbber)

Start or update the amimation of a throbber.

Parameters
*throbberThe throbber to amimate.

Definition at line 363 of file throbber.c.

References throbber::current_frame, throbber::force_redraw, throbber::hidden, throbber::icon, throbber::last_update, max, throbber::max_frame, min, ro_gui_force_redraw_icon(), ro_gui_set_icon_string(), throbber::sprite_name, THROBBER_ANIMATE_INTERVAL, THROBBER_SPRITE_NAME_LENGTH, and throbber::window.

Referenced by ro_toolbar_start_throbbing(), and ro_toolbar_throb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_throbber_create()

struct throbber * ro_gui_throbber_create ( struct theme_descriptor theme)

Create a new throbber widget.

Parameters
*themeThe theme to apply (or NULL for the default).
Returns
A throbber handle, or NULL on failure.

Definition at line 77 of file throbber.c.

References throbber::current_frame, throbber::extent, throbber::force_redraw, throbber::hidden, throbber::icon, throbber::last_update, throbber::max_frame, NSLOG, ro_gui_theme_get_sprites(), ro_gui_theme_get_throbber_data(), throbber::shaded, throbber::sprites, throbber::theme, throbber, throbber::window, throbber::x_min, and throbber::y_min.

Referenced by ro_toolbar_add_throbber().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_throbber_destroy()

void ro_gui_throbber_destroy ( struct throbber throbber)

Destroy a throbber widget.

Parameters
*throbberThe throbber to destroy.

Definition at line 154 of file throbber.c.

Referenced by ro_toolbar_destroy(), and ro_toolbar_rebuild().

Here is the caller graph for this function:

◆ ro_gui_throbber_get_dims()

bool ro_gui_throbber_get_dims ( struct throbber throbber,
int *  width,
int *  height 
)

Return the MINIMUM dimensions required by the throbber, in RO units, allowing for the current theme.

Parameters
*throbberThe throbber of interest.
*widthReturn the required width.
*heightReturn the required height.
Returns
true if values are returned; else false.

Definition at line 165 of file throbber.c.

References height, width, throbber::x_min, and throbber::y_min.

Referenced by ro_toolbar_refresh_widget_dimensions().

Here is the caller graph for this function:

◆ ro_gui_throbber_help_suffix()

bool ro_gui_throbber_help_suffix ( struct throbber throbber,
wimp_i  i,
os_coord *  screenpos,
wimp_window_state *  state,
wimp_mouse_state  buttons,
const char **  suffix 
)

Translate mouse data into an interactive help message for the throbber.

Parameters
throbberThe throbber to process.
iThe wimp icon under the pointer.
screenposThe screen position.
stateThe toolbar window state.
buttonsThe mouse button state.
suffixReturn a help token suffix, or "" for none.
Returns
true if handled exclusively; else false.

Definition at line 328 of file throbber.c.

References throbber::extent, throbber::hidden, and throbber::icon.

Referenced by ro_toolbar_get_help_suffix().

Here is the caller graph for this function:

◆ ro_gui_throbber_hide()

bool ro_gui_throbber_hide ( struct throbber throbber,
bool  hide 
)

Show or hide a throbber.

Parameters
*throbberThe throbber to hide.
hidetrue to hide the throbber; false to show it.
Returns
true if successful; else false.

Definition at line 315 of file throbber.c.

References throbber::hidden, and ro_gui_throbber_icon_update().

Referenced by ro_toolbar_set_display_throbber().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_throbber_rebuild()

bool ro_gui_throbber_rebuild ( struct throbber throbber,
struct theme_descriptor theme,
theme_style  style,
wimp_w  window,
bool  shaded 
)

Place a throbber into a toolbar window and initialise any theme-specific settings.

Any previous incarnation of the throbber will be forgotten: this is for use when a new toolbar is being created, or when a toolbar has been deleted and rebuilt following a theme change.

Parameters
*throbberThe throbber to rebuild.
*themeThe theme to apply (or NULL for current).
styleThe theme style to apply.
windowThe window that the throbber is in.
shadedtrue if the bar should be throbber; else false.
Returns
true on success; else false.

Definition at line 124 of file throbber.c.

References throbber::force_redraw, throbber::icon, throbber::max_frame, ro_gui_theme_get_sprites(), ro_gui_theme_get_throbber_data(), ro_gui_throbber_icon_update(), throbber::shaded, throbber::sprite_name, throbber::sprites, throbber::theme, throbber::window, throbber::x_min, and throbber::y_min.

Referenced by ro_toolbar_rebuild().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_throbber_set_extent()

bool ro_gui_throbber_set_extent ( struct throbber throbber,
int  x0,
int  y0,
int  x1,
int  y1 
)

Set or update the dimensions to be used by the throbber in RO units.

If these are greater than the minimum required, the throbber will fill the extended space; if less, the call will fail.

Parameters
throbberThe throbber to update.
x0top left of bounding box x coordinate
y0top left of bounding box y coordinate
x1bottom right of bounding box x coordinate
y1bottom right of bounding box y coordinate
Returns
true if size updated; else false.

Definition at line 186 of file throbber.c.

References throbber::extent, throbber::icon, ro_gui_throbber_icon_resize(), throbber::window, throbber::x_min, and throbber::y_min.

Referenced by ro_toolbar_reformat_widgets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_throbber_stop()

bool ro_gui_throbber_stop ( struct throbber throbber)

Stop the amimation of a throbber.

Parameters
*throbberThe throbber to amimate.

Definition at line 403 of file throbber.c.

References throbber::current_frame, throbber::force_redraw, throbber::hidden, throbber::icon, throbber::last_update, ro_gui_force_redraw_icon(), ro_gui_set_icon_string(), throbber::sprite_name, THROBBER_SPRITE_NAME_LENGTH, and throbber::window.

Referenced by ro_toolbar_stop_throbbing().

Here is the call graph for this function:
Here is the caller graph for this function: