2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_CONSOLE_MACHINE_HEADER
20 #define GRUB_CONSOLE_MACHINE_HEADER 1
22 /* Define scan codes. */
23 #define GRUB_CONSOLE_KEY_LEFT 0x4B00
24 #define GRUB_CONSOLE_KEY_RIGHT 0x4D00
25 #define GRUB_CONSOLE_KEY_UP 0x4800
26 #define GRUB_CONSOLE_KEY_DOWN 0x5000
27 #define GRUB_CONSOLE_KEY_IC 0x5200
28 #define GRUB_CONSOLE_KEY_DC 0x5300
29 #define GRUB_CONSOLE_KEY_BACKSPACE 0x0008
30 #define GRUB_CONSOLE_KEY_HOME 0x4700
31 #define GRUB_CONSOLE_KEY_END 0x4F00
32 #define GRUB_CONSOLE_KEY_NPAGE 0x5100
33 #define GRUB_CONSOLE_KEY_PPAGE 0x4900
37 #include <grub/types.h>
38 #include <grub/symbol.h>
40 /* These are global to share code between C and asm. */
41 extern grub_uint8_t grub_console_cur_color
;
42 void grub_console_real_putchar (int c
);
43 int EXPORT_FUNC(grub_console_checkkey
) (void);
44 int EXPORT_FUNC(grub_console_getkey
) (void);
45 grub_uint16_t
grub_console_getxy (void);
46 void grub_console_gotoxy (grub_uint8_t x
, grub_uint8_t y
);
47 void grub_console_cls (void);
48 void grub_console_setcursor (int on
);
50 /* Initialize the console system. */
51 void grub_console_init (void);
53 /* Finish the console system. */
54 void grub_console_fini (void);
58 #endif /* ! GRUB_CONSOLE_MACHINE_HEADER */