NetSurf
|
Progress bar (interface). More...
#include <stdbool.h>
#include "oslib/osspriteop.h"
#include "oslib/wimp.h"
Go to the source code of this file.
Functions | |
void | ro_gui_progress_bar_init (osspriteop_area *icons) |
Initialise the progress bar. More... | |
struct progress_bar * | ro_gui_progress_bar_create (void) |
Create a new progress bar. More... | |
void | ro_gui_progress_bar_destroy (struct progress_bar *pb) |
Destroy a progress bar and free all associated resources. More... | |
void | ro_gui_progress_bar_update (struct progress_bar *pb, int width, int height) |
Update the progress bar to a new dimension. More... | |
wimp_w | ro_gui_progress_bar_get_window (struct progress_bar *pb) |
Get the handle of the window that represents a progress bar. More... | |
void | ro_gui_progress_bar_set_icon (struct progress_bar *pb, const char *icon) |
Set the icon for a progress bar. More... | |
void | ro_gui_progress_bar_set_value (struct progress_bar *pb, unsigned int value) |
Set the value of a progress bar. More... | |
unsigned int | ro_gui_progress_bar_get_value (struct progress_bar *pb) |
Get the value of a progress bar. More... | |
void | ro_gui_progress_bar_set_range (struct progress_bar *pb, unsigned int range) |
Set the range of a progress bar. More... | |
unsigned int | ro_gui_progress_bar_get_range (struct progress_bar *pb) |
Get the range of a progress bar. More... | |
Progress bar (interface).
Definition in file progress_bar.h.
struct progress_bar * ro_gui_progress_bar_create | ( | void | ) |
Create a new progress bar.
Definition at line 128 of file progress_bar.c.
References NSLOG, progress_bar_definition, ro_gui_progress_bar_redraw(), ro_gui_wimp_event_register_redraw_window(), ro_gui_wimp_event_set_user_data(), and progress_bar::w.
Referenced by ro_gui_status_bar_create().
void ro_gui_progress_bar_destroy | ( | struct progress_bar * | pb | ) |
Destroy a progress bar and free all associated resources.
pb | the progress bar to destroy |
Definition at line 158 of file progress_bar.c.
References progress_bar::animating, NSLOG, riscos_schedule(), ro_gui_progress_bar_animate(), ro_gui_wimp_event_finalise(), and progress_bar::w.
Referenced by ro_gui_status_bar_destroy().
unsigned int ro_gui_progress_bar_get_range | ( | struct progress_bar * | pb | ) |
Get the range of a progress bar.
pb | the progress bar to get the range of |
Definition at line 269 of file progress_bar.c.
References progress_bar::range.
Referenced by ro_gui_status_bar_set_progress_range(), ro_gui_status_bar_set_progress_value(), and ro_gui_status_position_progress_bar().
unsigned int ro_gui_progress_bar_get_value | ( | struct progress_bar * | pb | ) |
Get the value of a progress bar.
pb | the progress bar to get the value of |
Definition at line 238 of file progress_bar.c.
References progress_bar::value.
wimp_w ro_gui_progress_bar_get_window | ( | struct progress_bar * | pb | ) |
Get the handle of the window that represents a progress bar.
pb | the progress bar to get the window handle of |
Definition at line 183 of file progress_bar.c.
References progress_bar::w.
Referenced by ro_gui_status_bar_set_progress_range(), and ro_gui_status_position_progress_bar().
void ro_gui_progress_bar_init | ( | osspriteop_area * | icons | ) |
Initialise the progress bar.
icons | the sprite area to use for icons |
Definition at line 104 of file progress_bar.c.
References progress_animation_sprite, progress_bar_definition, progress_height, progress_icon, and progress_width.
void ro_gui_progress_bar_set_icon | ( | struct progress_bar * | pb, |
const char * | icon | ||
) |
Set the icon for a progress bar.
pb | the progress bar to set the icon for |
icon | the icon to use, or NULL for no icon |
Definition at line 197 of file progress_bar.c.
References progress_bar::cur_height, progress_bar::cur_width, progress_bar::icon, progress_bar::recalculate, ro_gui_progress_bar_update(), and progress_bar::w.
Referenced by ro_gui_status_bar_set_progress_icon().
void ro_gui_progress_bar_set_range | ( | struct progress_bar * | pb, |
unsigned int | range | ||
) |
Set the range of a progress bar.
pb | the progress bar to set the range for |
range | the range to use |
Definition at line 252 of file progress_bar.c.
References progress_bar::cur_height, progress_bar::cur_width, progress_bar::range, ro_gui_progress_bar_update(), and progress_bar::value.
Referenced by ro_gui_status_bar_set_progress_range().
void ro_gui_progress_bar_set_value | ( | struct progress_bar * | pb, |
unsigned int | value | ||
) |
Set the value of a progress bar.
pb | the progress bar to set the value for |
value | the value to use |
Definition at line 221 of file progress_bar.c.
References progress_bar::cur_height, progress_bar::cur_width, progress_bar::range, ro_gui_progress_bar_update(), and progress_bar::value.
Referenced by ro_gui_status_bar_set_progress_value().
void ro_gui_progress_bar_update | ( | struct progress_bar * | pb, |
int | width, | ||
int | height | ||
) |
Update the progress bar to a new dimension.
pb | the progress bar to update |
width | the new progress bar width |
height | the new progress bar height |
Definition at line 284 of file progress_bar.c.
References progress_bar::animating, height, max, NSLOG, progress_bar::range, progress_bar::recalculate, riscos_schedule(), ro_gui_progress_bar_animate(), ro_gui_progress_bar_calculate(), ro_gui_progress_bar_redraw_window(), progress_bar::value, progress_bar::visible, progress_bar::w, and width.
Referenced by ro_gui_progress_bar_set_icon(), ro_gui_progress_bar_set_range(), ro_gui_progress_bar_set_value(), and ro_gui_status_position_progress_bar().