* Implement support for user input of additional safe mode options that

aren't otherwise exposed via the safe mode menus. The option can be 
found under the debug options menu, where additional settings can be 
added one at a time with the same syntax used in kernel settings files 
(i.e. disable_acpi on). 

Scrolling of the input buffer is not yet supported (will implement that 
soon), so currently the input is clamped to the size of one line. This 
shouldn't be a problem for our current set of options though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2011-05-19 01:38:02 +00:00
parent 13fd92e6a0
commit d2b49a0031
9 changed files with 214 additions and 35 deletions
+2
View File
@@ -68,6 +68,8 @@ class MenuItem;
extern void platform_add_menus(Menu *menu);
extern void platform_update_menu_item(Menu *menu, MenuItem *item);
extern void platform_run_menu(Menu *menu);
extern size_t platform_get_user_input_text(Menu *menu, const char *prompt,
char *buffer, size_t bufferSize);
#endif
@@ -36,6 +36,7 @@ enum {
// ASCII
TEXT_CONSOLE_NO_KEY = '\0',
TEXT_CONSOLE_KEY_RETURN = '\r',
TEXT_CONSOLE_KEY_BACKSPACE = '\b',
TEXT_CONSOLE_KEY_ESCAPE = 0x1b,
TEXT_CONSOLE_KEY_SPACE = ' ',
@@ -64,6 +65,8 @@ extern void console_clear_screen(void);
extern int32 console_width(void);
extern int32 console_height(void);
extern void console_set_cursor(int32 x, int32 y);
extern void console_show_cursor(void);
extern void console_hide_cursor(void);
extern void console_set_color(int32 foreground, int32 background);
extern int console_wait_for_key(void);
@@ -1,15 +1,18 @@
/*
* Copyright 2005, Ingo Weinhold <[email protected]>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef GENERIC_TEXT_MENU_H
#define GENERIC_TEXT_MENU_H
class Menu;
class MenuItem;
void platform_generic_update_text_menu_item(Menu *menu, MenuItem *item);
void platform_generic_run_text_menu(Menu *menu);
#endif /* GENERIC_TEXT_MENU_H */
/*
* Copyright 2011, Rene Gollent <[email protected]>.
* Copyright 2005, Ingo Weinhold <[email protected]>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef GENERIC_TEXT_MENU_H
#define GENERIC_TEXT_MENU_H
class Menu;
class MenuItem;
void platform_generic_update_text_menu_item(Menu* menu, MenuItem* item);
void platform_generic_run_text_menu(Menu* menu);
size_t platform_generic_get_user_input_text(Menu* menu, const char* prompt,
char* buffer, size_t bufferSize);
#endif /* GENERIC_TEXT_MENU_H */