Adding upstream version 4.00~pre61+dfsg.
[syslinux-debian/hramrach.git] / com32 / menu / vesamenu.c
blob62e29bd0de59e987d90d9e90ffdbc15d8656e661
1 /* ----------------------------------------------------------------------- *
3 * Copyright 2004-2008 H. Peter Anvin - All Rights Reserved
4 * Copyright 2009 Intel Corporation; author: H. Peter Anvin
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
9 * Boston MA 02110-1301, USA; either version 2 of the License, or
10 * (at your option) any later version; incorporated herein by reference.
12 * ----------------------------------------------------------------------- */
15 * vesamenu.c
17 * Simple menu system which displays a list and allows the user to select
18 * a command line and/or edit it.
20 * VESA graphics version.
23 #include <stdio.h>
24 #include <console.h>
25 #include <syslinux/vesacon.h>
27 #include "menu.h"
29 int draw_background(const char *what)
31 if (!what)
32 return vesacon_default_background();
33 else if (what[0] == '#')
34 return vesacon_set_background(parse_argb((char **)&what));
35 else
36 return vesacon_load_background(what);
39 void set_resolution(int x, int y)
41 vesacon_set_resolution(x, y);
44 void local_cursor_enable(bool enabled)
46 vesacon_cursor_enable(enabled);
49 void start_console(void)
51 openconsole(&dev_rawcon_r, &dev_vesaserial_w);