X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-boot-editor.h;h=7aa715e86f7a71780663970d1bfb6ed8e9e94e9e;hp=bdcc5609736c2e9944e365171d10e3a906b5b017;hb=4dd0ff12814b03f06ee0cd813d8f54aa42fc94fb;hpb=6b842bb2559116a949c6a569ac39f5c56ebc1be1 diff --git a/ui/ncurses/nc-boot-editor.h b/ui/ncurses/nc-boot-editor.h index bdcc560..7aa715e 100644 --- a/ui/ncurses/nc-boot-editor.h +++ b/ui/ncurses/nc-boot-editor.h @@ -19,9 +19,16 @@ #if !defined(_PB_NC_KED_H) #define _PB_NC_KED_H -#include #include /* This must be included before ncurses.h */ -#include +#if defined HAVE_NCURSESW_FORM_H +# include +#elif defined HAVE_NCURSES_FORM_H +# include +#elif defined HAVE_FORM_H +# include +#else +# error "Curses form.h not found." +#endif #include "types/types.h" #include "ui/common/ui-system.h" @@ -53,16 +60,30 @@ enum boot_editor_result { */ struct boot_editor { - struct nc_scr scr; - FORM *ncf; - FIELD **fields; + struct nc_scr scr; + void *data; + struct pmenu *original_pmenu; + void (*on_exit)(struct boot_editor *boot_editor, + enum boot_editor_result result, + struct pb_boot_data *bd); 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); + + struct nc_widgetset *widgetset; + struct { + struct nc_widget_label *image_l; + struct nc_widget_textbox *image_f; + struct nc_widget_label *initrd_l; + struct nc_widget_textbox *initrd_f; + struct nc_widget_label *dtb_l; + struct nc_widget_textbox *dtb_f; + struct nc_widget_label *args_l; + struct nc_widget_textbox *args_f; + struct nc_widget_button *ok_b; + struct nc_widget_button *cancel_b; + } widgets; }; -struct boot_editor *boot_editor_init(void *ui_ctx, +struct boot_editor *boot_editor_init(struct pmenu *menu, const struct pb_boot_data *bd, void (*on_exit)(struct boot_editor *, enum boot_editor_result,