From 7ff747e1e661075246b1b3661a6b54cd29b72483 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 13 Feb 2009 01:43:32 +0000 Subject: make statusbar work svn path=/trunk/netsurf/; revision=6465 --- framebuffer/fb_rootwindow.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'framebuffer/fb_rootwindow.c') diff --git a/framebuffer/fb_rootwindow.c b/framebuffer/fb_rootwindow.c index bff5c05c8..a639d988f 100644 --- a/framebuffer/fb_rootwindow.c +++ b/framebuffer/fb_rootwindow.c @@ -454,6 +454,30 @@ fb_widget_rightarrow_click(struct gui_window *g, browser_mouse_state st, int x, } +void fb_rootwindow_status(framebuffer_t *fb, const char* text) +{ + bbox_t saved_plot_ctx; + + /* enlarge the clipping rectangle to the whole screen for plotting the + * root window + */ + saved_plot_ctx = fb_plot_ctx; + + fb_plot_ctx.x0 = 0; + fb_plot_ctx.y0 = fb->height - 20; + fb_plot_ctx.x1 = fb->width; + fb_plot_ctx.y1 = fb->height; + + /* do our drawing etc. */ + plot.fill(0, fb_plot_ctx.y0, fb_plot_ctx.x1, fb_plot_ctx.y1, 0xFFFFFFFF); + plot.text(fb_plot_ctx.x0, fb_plot_ctx.y0 + 15, NULL, text, strlen(text), 0xffffffff, 0xFF000000); + + fb_os_redraw(&fb_plot_ctx); + + /* restore clipping rectangle */ + fb_plot_ctx = saved_plot_ctx; +} + void fb_rootwindow_create(framebuffer_t *fb) { bbox_t saved_plot_ctx; -- cgit v1.2.3