diff options
Diffstat (limited to 'framebuffer')
-rw-r--r-- | framebuffer/fb_gui.c | 4 | ||||
-rw-r--r-- | framebuffer/fb_rootwindow.c | 24 | ||||
-rw-r--r-- | framebuffer/fb_rootwindow.h | 2 |
3 files changed, 28 insertions, 2 deletions
diff --git a/framebuffer/fb_gui.c b/framebuffer/fb_gui.c index e8bd74b93..a9c3ed136 100644 --- a/framebuffer/fb_gui.c +++ b/framebuffer/fb_gui.c @@ -303,7 +303,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw, g->x = 0; g->y = 30; g->width = framebuffer->width; - g->height = framebuffer->height - 60; + g->height = framebuffer->height - 50; g->bw = bw; if (window_list == NULL) { @@ -457,7 +457,7 @@ void gui_window_update_extent(struct gui_window *g) void gui_window_set_status(struct gui_window *g, const char *text) { LOG(("g %p, text %s", g, text)); - + fb_rootwindow_status(framebuffer, text); } void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape) 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; diff --git a/framebuffer/fb_rootwindow.h b/framebuffer/fb_rootwindow.h index a0db2af33..40b47f0ec 100644 --- a/framebuffer/fb_rootwindow.h +++ b/framebuffer/fb_rootwindow.h @@ -22,3 +22,5 @@ void fb_rootwindow_click(struct gui_window *g, browser_mouse_state st , int x, i void fb_rootwindow_create(framebuffer_t *fb); struct fb_widget *fb_add_window_widget(struct gui_window *g, fb_widget_mouseclick_t click_rtn); + +void fb_rootwindow_status(framebuffer_t *fb, const char* text); |