summaryrefslogtreecommitdiff
path: root/frontends/riscos/gui/status_bar.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-02-12 20:01:05 +0000
committerVincent Sanders <vince@kyllikki.org>2017-02-12 20:01:05 +0000
commit1666944c7e5c7a300ad0658b9654464ff2c11495 (patch)
tree8b40a9c13e28cc67135cb75ded1f3477390039cc /frontends/riscos/gui/status_bar.c
parent703fd10400f83bd136acf46162fe109f87d5e538 (diff)
parent513366a7a22dfeafc6a79814701ba62210ad5040 (diff)
downloadnetsurf-1666944c7e5c7a300ad0658b9654464ff2c11495.tar.gz
netsurf-1666944c7e5c7a300ad0658b9654464ff2c11495.tar.bz2
Merge branch 'vince/plotctx'
Diffstat (limited to 'frontends/riscos/gui/status_bar.c')
-rw-r--r--frontends/riscos/gui/status_bar.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/frontends/riscos/gui/status_bar.c b/frontends/riscos/gui/status_bar.c
index 9d1bada91..bcaf3baf9 100644
--- a/frontends/riscos/gui/status_bar.c
+++ b/frontends/riscos/gui/status_bar.c
@@ -28,9 +28,10 @@
#include "oslib/os.h"
#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/wimp.h"
@@ -436,6 +437,12 @@ void ro_gui_status_bar_redraw(wimp_draw *redraw)
os_error *error;
osbool more;
rufl_code code;
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &ro_plotters
+ };
+ struct rect rect;
sb = (struct status_bar *)ro_gui_wimp_event_get_user_data(redraw->w);
assert(sb);
@@ -467,18 +474,22 @@ void ro_gui_status_bar_redraw(wimp_draw *redraw)
rufl_BLEND_FONT);
if (code != rufl_OK) {
if (code == rufl_FONT_MANAGER_ERROR)
- LOG("rufl_FONT_MANAGER_ERROR: 0x%x: %s", rufl_fm_error->errnum, rufl_fm_error->errmess);
+ LOG("rufl_FONT_MANAGER_ERROR: 0x%x: %s",
+ rufl_fm_error->errnum, rufl_fm_error->errmess);
else
LOG("rufl_paint: 0x%x", code);
}
}
+ rect.x0 = (redraw->box.x0 + sb->width - WIDGET_WIDTH - 2) >> 1;
+ rect.y0 = -redraw->box.y0 >> 1;
+ rect.x1 = (redraw->box.x0 + sb->width - WIDGET_WIDTH) >> 1;
+ rect.y1 = -redraw->box.y1 >> 1;
+
/* separate the widget from the text with a line */
- ro_plotters.rectangle((redraw->box.x0 + sb->width - WIDGET_WIDTH - 2) >> 1,
- -redraw->box.y0 >> 1,
- (redraw->box.x0 + sb->width - WIDGET_WIDTH) >> 1,
- -redraw->box.y1 >> 1,
- plot_style_fill_black);
+ ctx.plot->rectangle(&ctx,
+ plot_style_fill_black,
+ &rect);
error = xwimp_get_rectangle(redraw, &more);
if (error) {