19#define __STDBOOL_H__ 1
32#include <TranslationUtils.h>
49 bool errors_when_loading =
false;
54 "Insufficent number of frames in throbber animation!");
56 "(called with %d frames, where 2 is a minimum.)",
63 NSLOG(netsurf, INFO,
"Can't find resources for throbber!");
71 va_start(filenames, frames);
73 for (
int i = 0; i < frames; i++) {
74 const char *fn = va_arg(filenames,
const char *);
77 data = res->LoadResource(
'data', fn, &size);
80 NSLOG(netsurf, INFO,
"Error when loading resource %s",
82 errors_when_loading =
true;
85 BMemoryIO mem(data, size);
86 throb->
framedata[i] = BTranslationUtils::GetBitmap(&mem);
89 "Error when loading %s: GetBitmap() returned NULL",
91 errors_when_loading =
true;
97 if (errors_when_loading ==
true) {
98 for (
int i = 0; i < frames; i++) {
BResources * get_app_resources()
#define NSLOG(catname, level, logmsg, args...)
Interface to utility string handling.
int nframes
Number of frames in the throbber.
bool nsbeos_throbber_initialise_from_png(const int frames,...)
Creates the throbber using a PNG for each frame.
void nsbeos_throbber_finalise(void)