From eed3b65b4ca71562870a9cc53884bc8fc6ef9640 Mon Sep 17 00:00:00 2001 From: Charlie Brej Date: Tue, 7 Sep 2010 21:45:57 +0100 Subject: [PATCH] boot-splash: Add "hide message" splash plugin call No splashes use this yet. --- src/libply-splash-core/ply-boot-splash-plugin.h | 4 +++- src/libply-splash-core/ply-boot-splash.c | 10 ++++++++++ src/libply-splash-core/ply-boot-splash.h | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libply-splash-core/ply-boot-splash-plugin.h b/src/libply-splash-core/ply-boot-splash-plugin.h index d22eb437..4b221b06 100644 --- a/src/libply-splash-core/ply-boot-splash-plugin.h +++ b/src/libply-splash-core/ply-boot-splash-plugin.h @@ -76,9 +76,11 @@ typedef struct void (* on_root_mounted) (ply_boot_splash_plugin_t *plugin); void (* hide_splash_screen) (ply_boot_splash_plugin_t *plugin, ply_event_loop_t *loop); - void (* display_normal) (ply_boot_splash_plugin_t *plugin); void (* display_message) (ply_boot_splash_plugin_t *plugin, const char *message); + void (* hide_message) (ply_boot_splash_plugin_t *plugin, + const char *message); + void (* display_normal) (ply_boot_splash_plugin_t *plugin); void (* display_password) (ply_boot_splash_plugin_t *plugin, const char *prompt, int bullets); diff --git a/src/libply-splash-core/ply-boot-splash.c b/src/libply-splash-core/ply-boot-splash.c index 819e0baa..173062fe 100644 --- a/src/libply-splash-core/ply-boot-splash.c +++ b/src/libply-splash-core/ply-boot-splash.c @@ -645,6 +645,16 @@ void ply_boot_splash_display_message (ply_boot_splash_t *splash, splash->plugin_interface->display_message (splash->plugin, message); } +void ply_boot_splash_hide_message (ply_boot_splash_t *splash, + const char *message) +{ + assert (splash != NULL); + assert (splash->plugin_interface != NULL); + assert (splash->plugin != NULL); + if (splash->plugin_interface->hide_message != NULL) + splash->plugin_interface->hide_message (splash->plugin, message); +} + void ply_boot_splash_display_normal (ply_boot_splash_t *splash) { assert (splash != NULL); diff --git a/src/libply-splash-core/ply-boot-splash.h b/src/libply-splash-core/ply-boot-splash.h index 7865f002..1efb8b16 100644 --- a/src/libply-splash-core/ply-boot-splash.h +++ b/src/libply-splash-core/ply-boot-splash.h @@ -71,6 +71,8 @@ void ply_boot_splash_update_output (ply_boot_splash_t *splash, void ply_boot_splash_root_mounted (ply_boot_splash_t *splash); void ply_boot_splash_display_message (ply_boot_splash_t *splash, const char *message); +void ply_boot_splash_hide_message (ply_boot_splash_t *splash, + const char *message); void ply_boot_splash_hide (ply_boot_splash_t *splash); void ply_boot_splash_display_normal (ply_boot_splash_t *splash); void ply_boot_splash_display_password (ply_boot_splash_t *splash,