• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ----------------------------------------------------------------------- *
2  *
3  *   Copyright 2004-2008 H. Peter Anvin - All Rights Reserved
4  *   Copyright 2009 Intel Corporation; author: H. Peter Anvin
5  *
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.
11  *
12  * ----------------------------------------------------------------------- */
13 
14 /*
15  * vesamenu.c
16  *
17  * Simple menu system which displays a list and allows the user to select
18  * a command line and/or edit it.
19  *
20  * VESA graphics version.
21  */
22 
23 #include <stdio.h>
24 #include <console.h>
25 #include <syslinux/vesacon.h>
26 
27 #include "menu.h"
28 
draw_background(const char * what)29 int draw_background(const char *what)
30 {
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);
37 }
38 
set_resolution(int x,int y)39 void set_resolution(int x, int y)
40 {
41     vesacon_set_resolution(x, y);
42 }
43 
local_cursor_enable(bool enabled)44 void local_cursor_enable(bool enabled)
45 {
46     vesacon_cursor_enable(enabled);
47 }
48 
start_console(void)49 void start_console(void)
50 {
51     openconsole(&dev_rawcon_r, &dev_vesaserial_w);
52 }
53