summaryrefslogtreecommitdiff
path: root/frontends/riscos/gui/progress_bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/riscos/gui/progress_bar.c')
-rw-r--r--frontends/riscos/gui/progress_bar.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/frontends/riscos/gui/progress_bar.c b/frontends/riscos/gui/progress_bar.c
index c26b46c84..06d89dbf4 100644
--- a/frontends/riscos/gui/progress_bar.c
+++ b/frontends/riscos/gui/progress_bar.c
@@ -30,9 +30,9 @@
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
-#include "netsurf/plotters.h"
#include "utils/log.h"
#include "utils/utils.h"
+#include "netsurf/plotters.h"
#include "riscos/gui.h"
#include "riscos/tinct.h"
@@ -137,7 +137,8 @@ struct progress_bar *ro_gui_progress_bar_create(void)
error = xwimp_create_window((wimp_window *)&progress_bar_definition,
&pb->w);
if (error) {
- LOG("xwimp_create_window: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
+ error->errnum, error->errmess);
free(pb);
return NULL;
}
@@ -165,7 +166,8 @@ void ro_gui_progress_bar_destroy(struct progress_bar *pb)
ro_gui_wimp_event_finalise(pb->w);
error = xwimp_delete_window(pb->w);
if (error) {
- LOG("xwimp_delete_window: 0x%x:%s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "xwimp_delete_window: 0x%x:%s",
+ error->errnum, error->errmess);
}
free(pb);
@@ -327,7 +329,8 @@ void ro_gui_progress_bar_update(struct progress_bar *pb, int width, int height)
redraw.box.x0 = cur.x1;
error = xwimp_update_window(&redraw, &more);
if (error) {
- LOG("Error getting update window: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "Error getting update window: 0x%x: %s",
+ error->errnum, error->errmess);
return;
}
if (more)
@@ -351,7 +354,8 @@ void ro_gui_progress_bar_redraw(wimp_draw *redraw)
error = xwimp_redraw_window(redraw, &more);
if (error) {
- LOG("xwimp_redraw_window: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "xwimp_redraw_window: 0x%x: %s",
+ error->errnum, error->errmess);
return;
}
if (more)
@@ -385,7 +389,8 @@ void ro_gui_progress_bar_animate(void *p)
redraw.box = pb->visible;
error = xwimp_update_window(&redraw, &more);
if (error != NULL) {
- LOG("Error getting update window: '%s'", error->errmess);
+ NSLOG(netsurf, INFO, "Error getting update window: '%s'",
+ error->errmess);
return;
}
if (more)
@@ -482,6 +487,11 @@ void ro_gui_progress_bar_redraw_window(wimp_draw *redraw,
osbool more = true;
struct rect clip;
int progress_ymid;
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &ro_plotters
+ };
/* initialise the plotters */
ro_plot_origin_x = 0;
@@ -513,22 +523,23 @@ void ro_gui_progress_bar_redraw_window(wimp_draw *redraw,
redraw->box.y0 + pb->visible.y0) >> 1;
if ((clip.x0 < clip.x1) && (clip.y0 < clip.y1)) {
if (progress_icon) {
- ro_plotters.clip(&clip);
+ ctx.plot->clip(&ctx, &clip);
_swix(Tinct_Plot, _IN(2) | _IN(3) | _IN(4) | _IN(7),
progress_icon,
redraw->box.x0 - pb->offset,
progress_ymid - progress_height,
tinct_FILL_HORIZONTALLY);
} else {
- ro_plotters.rectangle(clip.x0, clip.y0,
- clip.x1, clip.y1,
- plot_style_fill_red);
+ ctx.plot->rectangle(&ctx,
+ plot_style_fill_red,
+ &clip);
}
}
}
error = xwimp_get_rectangle(redraw, &more);
if (error) {
- LOG("xwimp_get_rectangle: 0x%x: %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "xwimp_get_rectangle: 0x%x: %s",
+ error->errnum, error->errmess);
return;
}
}