31#include "oslib/osspriteop.h"
32#include "oslib/wimp.h"
42#define THROBBER_SPRITE_NAME_LENGTH 12
43#define THROBBER_ANIMATE_INTERVAL 10
85 NSLOG(netsurf, INFO,
"No memory for malloc()");
187 int x0,
int y0,
int x1,
int y1)
230 wimp_icon_create
icon;
242 icon.icon.flags = wimp_ICON_SPRITE | wimp_ICON_INDIRECTED |
243 wimp_ICON_HCENTRED | wimp_ICON_VCENTRED;
244 icon.icon.data.indirected_sprite.id =
247 icon.icon.data.indirected_sprite.size =
252 NSLOG(netsurf, INFO,
"xwimp_create_icon: 0x%x: %s",
253 error->errnum, error->errmess);
264 NSLOG(netsurf, INFO,
"xwimp_delete_icon: 0x%x: %s",
265 error->errnum, error->errmess);
301 NSLOG(netsurf, INFO,
"xwimp_resize_icon: 0x%x: %s",
302 error->errnum, error->errmess);
318 return (
throbber == NULL) ? false :
true;
329 os_coord *mouse, wimp_window_state *state,
330 wimp_mouse_state buttons,
const char **suffix)
339 pos.x = mouse->x - state->visible.x0 + state->xscroll;
340 pos.y = mouse->y - state->visible.y1 + state->yscroll;
369 return (
throbber == NULL) ? false :
true;
371 xos_read_monotonic_time(&t);
409 return (
throbber == FALSE) ? false :
true;
static struct BitMap * throbber
Window themes(interface).
theme_style
Theme styles, collecting groups of attributes for different locations.
#define NSLOG(catname, level, logmsg, args...)
bool ro_gui_throbber_stop(struct throbber *throbber)
Stop the amimation of a throbber.
static bool ro_gui_throbber_icon_update(struct throbber *throbber)
Create or delete a throbber's icon if required to bring it into sync with the current hidden setting.
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.
#define THROBBER_SPRITE_NAME_LENGTH
void ro_gui_throbber_destroy(struct throbber *throbber)
Destroy a throbber widget.
bool ro_gui_throbber_hide(struct throbber *throbber, bool hide)
Show or hide a throbber.
#define THROBBER_ANIMATE_INTERVAL
bool ro_gui_throbber_animate(struct throbber *throbber)
Start or update the amimation of a throbber.
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.
static bool ro_gui_throbber_icon_resize(struct throbber *throbber)
Position the icons in the throbber to take account of the currently configured extent.
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.
struct throbber * ro_gui_throbber_create(struct theme_descriptor *theme)
Create a new throbber widget.
bool ro_gui_throbber_help_suffix(struct throbber *throbber, wimp_i i, os_coord *mouse, wimp_window_state *state, wimp_mouse_state buttons, const char **suffix)
Translate mouse data into an interactive help message for the throbber.
nserror ro_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
osspriteop_area * ro_gui_theme_get_sprites(struct theme_descriptor *descriptor)
Returns a sprite area for use with the given theme.
bool ro_gui_theme_get_throbber_data(struct theme_descriptor *descriptor, int *frames, int *width, int *height, bool *right, bool *redraw)
Returns details of the throbber as defined in a theme.
Interface to utility string handling.
char sprite_name[THROBBER_SPRITE_NAME_LENGTH]
osspriteop_area * sprites
wimp_w window
The window and icon details.
struct theme_descriptor * theme
The applied theme (or NULL to use the default)
int max_frame
The animation details.
int x_min
The widget dimensions.
Interface to a number of general purpose functionality.
void ro_gui_set_icon_string(wimp_w w, wimp_i i, const char *text, bool is_utf8)
Set the contents of a text or sprite icon to a string.
void ro_gui_force_redraw_icon(wimp_w w, wimp_i i)
Forces an icon to be redrawn entirely (ie not just updated).
void ro_gui_set_icon_shaded_state(wimp_w w, wimp_i i, bool state)
Set the shaded state of an icon.
General RISC OS WIMP/OS library functions (interface).