- pboot_rpane->focus_curindex = -1;
- pboot_rpane->focus_box.left = PBOOT_RIGHT_FOCUS_XOFF;
- pboot_rpane->focus_box.top = -2*PBOOT_RIGHT_FOCUS_HEIGHT;
- pboot_rpane->focus_box.right = pboot_rpane->window->pixmap->width -
- 2 * PBOOT_RIGHT_FOCUS_XOFF;
- pboot_rpane->focus_box.bottom = pboot_rpane->focus_box.top +
- PBOOT_RIGHT_FOCUS_HEIGHT;
- pboot_rpane->mouse_target = -1;
- twin_window_show(pboot_rpane->window);
+ twin_path_set_font_size(path, PBOOT_STATUS_TEXT_SIZE);
+ twin_path_set_font_style(path, TWIN_TEXT_UNHINTED);
+ tx = twin_int_to_fixed(PBOOT_STATUS_TEXT_MARGIN);
+ ty = twin_int_to_fixed(PBOOT_STATUS_PANE_HEIGHT - 2);
+ twin_path_move (path, tx, ty);
+ twin_path_utf8 (path, spane->text);
+ twin_paint_path (px, PBOOT_STATUS_TEXT_COLOR, path);
+
+ twin_path_destroy(path);
+}
+
+void pboot_message(const char *message)
+{
+ if (pboot_spane->text)
+ free(pboot_spane->text);
+ pboot_spane->text = strdup(message);
+ twin_window_damage(pboot_spane->window,
+ 0, 0,
+ pboot_spane->window->pixmap->width,
+ pboot_spane->window->pixmap->height);
+ twin_window_queue_paint(pboot_spane->window);
+}
+
+static void pboot_create_spane(void)
+{
+ pboot_spane = calloc(1, sizeof(pboot_spane_t));
+ assert(pboot_spane);
+
+ pboot_spane->window = twin_window_create(pboot_screen, TWIN_ARGB32,
+ TwinWindowPlain,
+ PBOOT_LEFT_PANE_SIZE +
+ PBOOT_STATUS_PANE_XYMARGIN,
+ pboot_screen->height -
+ PBOOT_STATUS_PANE_HEIGHT,
+ pboot_screen->width -
+ PBOOT_LEFT_PANE_SIZE -
+ 2*PBOOT_STATUS_PANE_XYMARGIN,
+ PBOOT_STATUS_PANE_HEIGHT);
+ assert(pboot_spane->window);
+
+ pboot_spane->window->draw = pboot_spane_draw;
+ pboot_spane->window->client_data = pboot_spane;
+ pboot_spane->text = strdup(PBOOT_INITIAL_MESSAGE);
+ twin_window_show(pboot_spane->window);
+ twin_window_queue_paint(pboot_spane->window);