aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/modules/background.c
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-06-03 11:00:22 +0800
committerFeng Tang <feng.tang@intel.com>2010-07-20 11:10:03 +0800
commit70aa5968a72030aff10fbdb1cb2c1c6c08de5fec (patch)
tree7d1344bd23b7019393156856ccb135847e313ede /com32/elflink/modules/background.c
parent0cb6490fa96f752c01bbb9add2c9ca6dbf99ece2 (diff)
downloadsyslinux-70aa5968a72030aff10fbdb1cb2c1c6c08de5fec.tar.gz
syslinux-70aa5968a72030aff10fbdb1cb2c1c6c08de5fec.tar.xz
syslinux-70aa5968a72030aff10fbdb1cb2c1c6c08de5fec.zip
elflink: copy some elflink related files over
also make sure the compiling passed
Diffstat (limited to 'com32/elflink/modules/background.c')
-rw-r--r--com32/elflink/modules/background.c54
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);