Exemplo n.º 1
0
static void
view_start_animation (view_t *view)
{
  ply_boot_splash_plugin_t *plugin;
  ply_terminal_t *terminal;

  assert (view != NULL);

  plugin = view->plugin;

  terminal = ply_text_display_get_terminal (view->display);

  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_BLACK,
                                    0x2c001e); 
  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_WHITE,
                                    0xffffff);
  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_BROWN,
                                    0xff4012);
  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_BLUE,
                                    0x988592);

  ply_text_display_set_background_color (view->display,
                                         PLY_TERMINAL_COLOR_BLACK);
  ply_text_display_clear_screen (view->display);
  ply_text_display_hide_cursor (view->display);
}
Exemplo n.º 2
0
static void
view_hide (view_t *view)
{
        if (view->display != NULL) {
                ply_terminal_t *terminal;

                terminal = ply_text_display_get_terminal (view->display);

                ply_text_display_set_background_color (view->display, PLY_TERMINAL_COLOR_DEFAULT);
                ply_text_display_clear_screen (view->display);
                ply_text_display_show_cursor (view->display);

                ply_terminal_reset_colors (terminal);
        }
}
Exemplo n.º 3
0
static void
add_text_display (ply_boot_splash_plugin_t *plugin,
                  ply_text_display_t       *display)
{
        view_t *view;
        ply_terminal_t *terminal;

        view = view_new (plugin, display);

        terminal = ply_text_display_get_terminal (view->display);
        if (ply_terminal_open (terminal))
                ply_terminal_activate_vt (terminal);

        ply_text_display_set_draw_handler (view->display,
                                           (ply_text_display_draw_handler_t)
                                           on_draw, view);

        ply_list_append_data (plugin->views, view);
}
Exemplo n.º 4
0
static void
view_start_animation (view_t *view)
{
  ply_boot_splash_plugin_t *plugin;
  ply_terminal_t *terminal;

  assert (view != NULL);

  plugin = view->plugin;

  terminal = ply_text_display_get_terminal (view->display);

  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_BLACK,
                                    0x000000);
  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_WHITE,
                                    0xffffff);
  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_BLUE,
                                    0x0073B3);
  ply_terminal_set_color_hex_value (terminal,
                                    PLY_TERMINAL_COLOR_BROWN,
                                    0x00457E);

  ply_text_display_set_background_color (view->display,
                                         PLY_TERMINAL_COLOR_BLACK);
  ply_text_display_clear_screen (view->display);
  ply_text_display_hide_cursor (view->display);

  if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN)
    {
      ply_text_progress_bar_hide (view->progress_bar);
      return;
    }

  ply_text_progress_bar_show (view->progress_bar,
                              view->display);
}