plugin->stars = NULL;
}
+static void add_handlers (ply_boot_splash_plugin_t *plugin);
+static void remove_handlers (ply_boot_splash_plugin_t *plugin);
+
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
void
PLYMOUTH_BACKGROUND_END_COLOR);
}
+static void
+add_handlers (ply_boot_splash_plugin_t *plugin)
+{
+ ply_window_add_keyboard_input_handler (plugin->window,
+ (ply_window_keyboard_input_handler_t)
+ on_keyboard_input, plugin);
+ ply_window_add_backspace_handler (plugin->window,
+ (ply_window_backspace_handler_t)
+ on_backspace, plugin);
+ ply_window_add_enter_handler (plugin->window,
+ (ply_window_enter_handler_t)
+ on_enter, plugin);
+
+ ply_window_set_draw_handler (plugin->window,
+ (ply_window_draw_handler_t)
+ on_draw, plugin);
+
+ ply_window_set_erase_handler (plugin->window,
+ (ply_window_erase_handler_t)
+ on_erase, plugin);
+}
+
+static void
+remove_handlers (ply_boot_splash_plugin_t *plugin)
+{
+
+ ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
+ ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
+ ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
+ ply_window_set_draw_handler (plugin->window, NULL, NULL);
+ ply_window_set_erase_handler (plugin->window, NULL, NULL);
+}
+
void
add_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
assert (plugin != NULL);
assert (plugin->logo_image != NULL);
- ply_window_add_keyboard_input_handler (plugin->window,
- (ply_window_keyboard_input_handler_t)
- on_keyboard_input, plugin);
- ply_window_add_backspace_handler (plugin->window,
- (ply_window_backspace_handler_t)
- on_backspace, plugin);
- ply_window_add_enter_handler (plugin->window,
- (ply_window_enter_handler_t)
- on_enter, plugin);
-
- ply_window_set_draw_handler (plugin->window,
- (ply_window_draw_handler_t)
- on_draw, plugin);
-
- ply_window_set_erase_handler (plugin->window,
- (ply_window_erase_handler_t)
- on_erase, plugin);
+ add_handlers (plugin);
plugin->loop = loop;
{
assert (plugin != NULL);
- ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
- ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
- ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
- ply_window_set_draw_handler (plugin->window, NULL, NULL);
- ply_window_set_erase_handler (plugin->window, NULL, NULL);
+ remove_handlers (plugin);
if (plugin->loop != NULL)
{
uint32_t is_animating : 1;
};
+static void add_handlers (ply_boot_splash_plugin_t *plugin);
+static void remove_handlers (ply_boot_splash_plugin_t *plugin);
+
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
ply_boot_splash_plugin_t *
create_plugin (void)
PLYMOUTH_BACKGROUND_END_COLOR);
}
+static void
+add_handlers (ply_boot_splash_plugin_t *plugin)
+{
+ ply_window_add_keyboard_input_handler (plugin->window,
+ (ply_window_keyboard_input_handler_t)
+ on_keyboard_input, plugin);
+ ply_window_add_backspace_handler (plugin->window,
+ (ply_window_backspace_handler_t)
+ on_backspace, plugin);
+ ply_window_add_enter_handler (plugin->window,
+ (ply_window_enter_handler_t)
+ on_enter, plugin);
+
+ ply_window_set_draw_handler (plugin->window,
+ (ply_window_draw_handler_t)
+ on_draw, plugin);
+
+ ply_window_set_erase_handler (plugin->window,
+ (ply_window_erase_handler_t)
+ on_erase, plugin);
+}
+
+static void
+remove_handlers (ply_boot_splash_plugin_t *plugin)
+{
+
+ ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
+ ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
+ ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
+ ply_window_set_draw_handler (plugin->window, NULL, NULL);
+ ply_window_set_erase_handler (plugin->window, NULL, NULL);
+}
+
void
add_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
{
assert (plugin != NULL);
- ply_window_add_keyboard_input_handler (plugin->window,
- (ply_window_keyboard_input_handler_t)
- on_keyboard_input, plugin);
- ply_window_add_backspace_handler (plugin->window,
- (ply_window_backspace_handler_t)
- on_backspace, plugin);
- ply_window_add_enter_handler (plugin->window,
- (ply_window_enter_handler_t)
- on_enter, plugin);
-
- ply_window_set_draw_handler (plugin->window,
- (ply_window_draw_handler_t)
- on_draw, plugin);
-
- ply_window_set_erase_handler (plugin->window,
- (ply_window_erase_handler_t)
- on_erase, plugin);
+ add_handlers (plugin);
plugin->loop = loop;
{
assert (plugin != NULL);
-
- ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
- ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
- ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
- ply_window_set_draw_handler (plugin->window, NULL, NULL);
- ply_window_set_erase_handler (plugin->window, NULL, NULL);
+ remove_handlers (plugin);
if (plugin->loop != NULL)
{
};
void hide_splash_screen (ply_boot_splash_plugin_t *plugin,
ply_event_loop_t *loop);
+static void add_handlers (ply_boot_splash_plugin_t *plugin);
+static void remove_handlers (ply_boot_splash_plugin_t *plugin);
ply_boot_splash_plugin_t *
create_plugin (void)
ply_window_clear_screen (plugin->window);
}
+static void
+add_handlers (ply_boot_splash_plugin_t *plugin)
+{
+ ply_window_add_keyboard_input_handler (plugin->window,
+ (ply_window_keyboard_input_handler_t)
+ on_keyboard_input, plugin);
+ ply_window_add_backspace_handler (plugin->window,
+ (ply_window_backspace_handler_t)
+ on_backspace, plugin);
+ ply_window_add_enter_handler (plugin->window,
+ (ply_window_enter_handler_t)
+ on_enter, plugin);
+ ply_window_set_draw_handler (plugin->window,
+ (ply_window_draw_handler_t)
+ on_draw, plugin);
+ ply_window_set_erase_handler (plugin->window,
+ (ply_window_erase_handler_t)
+ on_erase, plugin);
+}
+
+static void
+remove_handlers (ply_boot_splash_plugin_t *plugin)
+{
+
+ ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
+ ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
+ ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
+ ply_window_set_draw_handler (plugin->window, NULL, NULL);
+ ply_window_set_erase_handler (plugin->window, NULL, NULL);
+}
+
void
add_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
{
assert (plugin != NULL);
+ add_handlers (plugin);
ply_show_new_kernel_messages (false);
- ply_window_add_keyboard_input_handler (plugin->window,
- (ply_window_keyboard_input_handler_t)
- on_keyboard_input, plugin);
- ply_window_add_backspace_handler (plugin->window,
- (ply_window_backspace_handler_t)
- on_backspace, plugin);
- ply_window_add_enter_handler (plugin->window,
- (ply_window_enter_handler_t)
- on_enter, plugin);
- ply_window_set_draw_handler (plugin->window,
- (ply_window_draw_handler_t)
- on_draw, plugin);
- ply_window_set_erase_handler (plugin->window,
- (ply_window_erase_handler_t)
- on_erase, plugin);
-
plugin->loop = loop;
ply_event_loop_watch_for_exit (loop, (ply_event_loop_exit_handler_t)
detach_from_event_loop,
if (plugin->window != NULL)
{
- ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
- ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
- ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
- ply_window_set_draw_handler (plugin->window, NULL, NULL);
- ply_window_set_erase_handler (plugin->window, NULL, NULL);
+ remove_handlers (plugin);
ply_window_set_background_color (plugin->window, PLY_WINDOW_COLOR_DEFAULT);
ply_window_clear_screen (plugin->window);
uint32_t is_animating : 1;
};
+static void add_handlers (ply_boot_splash_plugin_t *plugin);
+static void remove_handlers (ply_boot_splash_plugin_t *plugin);
+
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
ply_image_get_data (plugin->logo_image));
}
+static void
+add_handlers (ply_boot_splash_plugin_t *plugin)
+{
+ ply_window_add_keyboard_input_handler (plugin->window,
+ (ply_window_keyboard_input_handler_t)
+ on_keyboard_input, plugin);
+ ply_window_add_backspace_handler (plugin->window,
+ (ply_window_backspace_handler_t)
+ on_backspace, plugin);
+ ply_window_add_enter_handler (plugin->window,
+ (ply_window_enter_handler_t)
+ on_enter, plugin);
+
+ ply_window_set_draw_handler (plugin->window,
+ (ply_window_draw_handler_t)
+ on_draw, plugin);
+
+ ply_window_set_erase_handler (plugin->window,
+ (ply_window_erase_handler_t)
+ on_erase, plugin);
+}
+
+static void
+remove_handlers (ply_boot_splash_plugin_t *plugin)
+{
+
+ ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
+ ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
+ ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
+ ply_window_set_draw_handler (plugin->window, NULL, NULL);
+ ply_window_set_erase_handler (plugin->window, NULL, NULL);
+}
+
void
add_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
assert (plugin != NULL);
assert (plugin->logo_image != NULL);
- ply_window_add_keyboard_input_handler (plugin->window,
- (ply_window_keyboard_input_handler_t)
- on_keyboard_input, plugin);
- ply_window_add_backspace_handler (plugin->window,
- (ply_window_backspace_handler_t)
- on_backspace, plugin);
- ply_window_add_enter_handler (plugin->window,
- (ply_window_enter_handler_t)
- on_enter, plugin);
-
- ply_window_set_draw_handler (plugin->window,
- (ply_window_draw_handler_t)
- on_draw, plugin);
-
- ply_window_set_erase_handler (plugin->window,
- (ply_window_erase_handler_t)
- on_erase, plugin);
+ add_handlers (plugin);
plugin->loop = loop;
{
assert (plugin != NULL);
- ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
- ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
- ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
- ply_window_set_draw_handler (plugin->window, NULL, NULL);
- ply_window_set_erase_handler (plugin->window, NULL, NULL);
+ remove_handlers (plugin);
if (plugin->loop != NULL)
{
uint32_t is_animating : 1;
};
+static void add_handlers (ply_boot_splash_plugin_t *plugin);
+static void remove_handlers (ply_boot_splash_plugin_t *plugin);
+
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
ply_boot_splash_plugin_t *
create_plugin (void)
PLYMOUTH_BACKGROUND_END_COLOR);
}
+static void
+add_handlers (ply_boot_splash_plugin_t *plugin)
+{
+ ply_window_add_keyboard_input_handler (plugin->window,
+ (ply_window_keyboard_input_handler_t)
+ on_keyboard_input, plugin);
+ ply_window_add_backspace_handler (plugin->window,
+ (ply_window_backspace_handler_t)
+ on_backspace, plugin);
+ ply_window_add_enter_handler (plugin->window,
+ (ply_window_enter_handler_t)
+ on_enter, plugin);
+
+ ply_window_set_draw_handler (plugin->window,
+ (ply_window_draw_handler_t)
+ on_draw, plugin);
+
+ ply_window_set_erase_handler (plugin->window,
+ (ply_window_erase_handler_t)
+ on_erase, plugin);
+}
+
+static void
+remove_handlers (ply_boot_splash_plugin_t *plugin)
+{
+
+ ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
+ ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
+ ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
+ ply_window_set_draw_handler (plugin->window, NULL, NULL);
+ ply_window_set_erase_handler (plugin->window, NULL, NULL);
+}
+
void
add_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
assert (plugin != NULL);
assert (plugin->logo_image != NULL);
- ply_window_add_keyboard_input_handler (plugin->window,
- (ply_window_keyboard_input_handler_t)
- on_keyboard_input, plugin);
- ply_window_add_backspace_handler (plugin->window,
- (ply_window_backspace_handler_t)
- on_backspace, plugin);
- ply_window_add_enter_handler (plugin->window,
- (ply_window_enter_handler_t)
- on_enter, plugin);
-
- ply_window_set_draw_handler (plugin->window,
- (ply_window_draw_handler_t)
- on_draw, plugin);
-
- ply_window_set_erase_handler (plugin->window,
- (ply_window_erase_handler_t)
- on_erase, plugin);
+ add_handlers (plugin);
plugin->loop = loop;
{
assert (plugin != NULL);
-
- ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
- ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
- ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
- ply_window_set_draw_handler (plugin->window, NULL, NULL);
- ply_window_set_erase_handler (plugin->window, NULL, NULL);
+ remove_handlers (plugin);
if (plugin->loop != NULL)
{
void hide_splash_screen (ply_boot_splash_plugin_t *plugin,
ply_event_loop_t *loop);
+static void add_handlers (ply_boot_splash_plugin_t *plugin);
+static void remove_handlers (ply_boot_splash_plugin_t *plugin);
+
ply_boot_splash_plugin_t *
create_plugin (void)
{
ply_window_clear_screen (plugin->window);
}
+static void
+add_handlers (ply_boot_splash_plugin_t *plugin)
+{
+ ply_window_add_keyboard_input_handler (plugin->window,
+ (ply_window_keyboard_input_handler_t)
+ on_keyboard_input, plugin);
+ ply_window_add_backspace_handler (plugin->window,
+ (ply_window_backspace_handler_t)
+ on_backspace, plugin);
+ ply_window_add_enter_handler (plugin->window,
+ (ply_window_enter_handler_t)
+ on_enter, plugin);
+ ply_window_set_draw_handler (plugin->window,
+ (ply_window_draw_handler_t)
+ on_draw, plugin);
+ ply_window_set_erase_handler (plugin->window,
+ (ply_window_erase_handler_t)
+ on_erase, plugin);
+}
+
+static void
+remove_handlers (ply_boot_splash_plugin_t *plugin)
+{
+
+ ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
+ ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
+ ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
+ ply_window_set_draw_handler (plugin->window, NULL, NULL);
+ ply_window_set_erase_handler (plugin->window, NULL, NULL);
+
+}
+
void
add_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
{
assert (plugin != NULL);
- ply_window_add_keyboard_input_handler (plugin->window,
- (ply_window_keyboard_input_handler_t)
- on_keyboard_input, plugin);
- ply_window_add_backspace_handler (plugin->window,
- (ply_window_backspace_handler_t)
- on_backspace, plugin);
- ply_window_add_enter_handler (plugin->window,
- (ply_window_enter_handler_t)
- on_enter, plugin);
- ply_window_set_draw_handler (plugin->window,
- (ply_window_draw_handler_t)
- on_draw, plugin);
- ply_window_set_erase_handler (plugin->window,
- (ply_window_erase_handler_t)
- on_erase, plugin);
+ add_handlers (plugin);
ply_window_hide_text_cursor (plugin->window);
ply_window_set_text_cursor_position (plugin->window, 0, 0);
if (plugin->window != NULL)
{
- ply_window_remove_keyboard_input_handler (plugin->window, (ply_window_keyboard_input_handler_t) on_keyboard_input);
- ply_window_remove_backspace_handler (plugin->window, (ply_window_backspace_handler_t) on_backspace);
- ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
- ply_window_set_draw_handler (plugin->window, NULL, NULL);
- ply_window_set_erase_handler (plugin->window, NULL, NULL);
+ remove_handlers (plugin);
ply_window_set_background_color (plugin->window, PLY_WINDOW_COLOR_DEFAULT);
ply_window_clear_screen (plugin->window);