diff options
Diffstat (limited to 'com32/elflink/modules/background.c')
-rw-r--r-- | com32/elflink/modules/background.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/com32/elflink/modules/background.c b/com32/elflink/modules/background.c new file mode 100644 index 00000000..61d8c609 --- /dev/null +++ b/com32/elflink/modules/background.c @@ -0,0 +1,54 @@ +/* ----------------------------------------------------------------------- * + * + * Copyright 2008 H. Peter Anvin - All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston MA 02110-1301, USA; either version 2 of the License, or + * (at your option) any later version; incorporated herein by reference. + * + * ----------------------------------------------------------------------- */ + +#include <consoles.h> +#include <string.h> +#include <syslinux/vesacon.h> +#include <sys/module.h> +#include "menu.h" + +static int background_init(void) +{ + return 0; // Nothing to do; return success +} + +const char *current_background = NULL; + +int draw_background(const char *what) +{ +#if 0 + if (!what) + return vesacon_default_background(); + else if (what[0] == '#') + return vesacon_set_background(parse_argb((char **)&what)); + else + return vesacon_load_background(what); +#endif +} + +void set_background(const char *new_background) +{ + if (!current_background || !new_background || + strcmp(current_background, new_background)) { + draw_background(new_background); + current_background = new_background; + } +} + +static void background_exit(void) +{ + // Nothing to do +} + +// Define entry and exit points. +MODULE_INIT(background_init); +MODULE_EXIT(background_exit); |