X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-boot-editor.h;h=5c22598ba7f544f94736458bb804854f7e1d9dd9;hp=bdcc5609736c2e9944e365171d10e3a906b5b017;hb=37bff93c8b0a71432613f41f2319dc073ca64619;hpb=6b842bb2559116a949c6a569ac39f5c56ebc1be1 diff --git a/ui/ncurses/nc-boot-editor.h b/ui/ncurses/nc-boot-editor.h index bdcc560..5c22598 100644 --- a/ui/ncurses/nc-boot-editor.h +++ b/ui/ncurses/nc-boot-editor.h @@ -19,53 +19,24 @@ #if !defined(_PB_NC_KED_H) #define _PB_NC_KED_H -#include -#include /* This must be included before ncurses.h */ -#include +#include "ui/common/discover-client.h" #include "types/types.h" -#include "ui/common/ui-system.h" -#include "nc-scr.h" +#include "nc-cui.h" -enum boot_editor_attr_field { - boot_editor_attr_field_normal = A_NORMAL, - boot_editor_attr_field_selected = A_REVERSE, -}; +struct boot_editor; -enum boot_editor_attr_cursor { - boot_editor_attr_cursor_ins = A_NORMAL, - boot_editor_attr_cursor_ovl = A_NORMAL | A_UNDERLINE, -}; +struct boot_editor *boot_editor_init(struct cui *cui, + struct pmenu_item *item, + const struct system_info *sysinfo, + void (*on_exit)(struct cui *cui, + struct pmenu_item *item, + struct pb_boot_data *bd)); -/** - * enum boot_editor_result - Result code for boot_editor:on_exit(). - * @boot_editor_cancel: The user canceled the operation. - * @boot_editor_update: The args were updated. - */ - -enum boot_editor_result { - boot_editor_cancel, - boot_editor_update, -}; - -/** - * struct boot_editor - kexec args editor. - */ +struct nc_scr *boot_editor_scr(struct boot_editor *boot_editor); -struct boot_editor { - struct nc_scr scr; - FORM *ncf; - FIELD **fields; - enum boot_editor_attr_cursor attr_cursor; - void (*on_exit)(struct boot_editor *boot_editor, - enum boot_editor_result result, - struct pb_boot_data *bd); -}; +void boot_editor_update(struct boot_editor *boot_editor, + const struct system_info *info); -struct boot_editor *boot_editor_init(void *ui_ctx, - const struct pb_boot_data *bd, - void (*on_exit)(struct boot_editor *, - enum boot_editor_result, - struct pb_boot_data *)); #endif