ply_event_loop_t *loop);
char * (* ask_for_password) (ply_boot_splash_plugin_t *plugin);
+ void (* on_keyboard_input) (ply_boot_splash_plugin_t *plugin,
+ const char *keyboard_input);
} ply_boot_splash_plugin_interface_t;
splash->module_handle = NULL;
}
+static void
+on_keyboard_input (ply_boot_splash_t *splash,
+ const char *key)
+{
+ if (splash->plugin_interface->on_keyboard_input != NULL)
+ splash->plugin_interface->on_keyboard_input (splash->plugin, key);
+}
+
static bool
ply_boot_splash_create_window (ply_boot_splash_t *splash)
{
splash->window = ply_window_new ("/dev/tty1",
- NULL, NULL);
+ (ply_window_keyboard_input_handler_t)
+ on_keyboard_input, splash);
if (!ply_window_open (splash->window))
{
plugin);
}
+void
+on_keyboard_input (ply_boot_splash_plugin_t *plugin,
+ const char *keyboard_input)
+{
+}
+
ply_boot_splash_plugin_interface_t *
ply_boot_splash_plugin_get_interface (void)
{
.show_splash_screen = show_splash_screen,
.update_status = update_status,
.hide_splash_screen = hide_splash_screen,
- .attach_to_event_loop = attach_to_event_loop
+ .attach_to_event_loop = attach_to_event_loop,
+ .on_keyboard_input = on_keyboard_input
};
return &plugin_interface;
return strdup (answer);
}
+void
+on_keyboard_input (ply_boot_splash_plugin_t *plugin,
+ const char *keyboard_input)
+{
+}
+
ply_boot_splash_plugin_interface_t *
ply_boot_splash_plugin_get_interface (void)
{
.hide_splash_screen = hide_splash_screen,
.attach_to_event_loop = attach_to_event_loop,
.ask_for_password = ask_for_password,
+ .on_keyboard_input = on_keyboard_input
};
return &plugin_interface;