X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-boot-editor.h;h=ee6d0469eb2f9f49d58837c0b6b1bf91038977ba;hp=650c316b6960e90c918f7678d68d6861e759368d;hb=03d135e3d7528184062cc16949febd76c393c30d;hpb=6eb39a03bf66d91c37ca5d14dd61a90850a921d3 diff --git a/ui/ncurses/nc-boot-editor.h b/ui/ncurses/nc-boot-editor.h index 650c316..ee6d046 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,19 +60,21 @@ enum boot_editor_result { */ struct boot_editor { - struct nc_scr scr; - FORM *ncf; - FIELD **fields; + struct nc_scr scr; + FORM *ncf; + FIELD **fields; + 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_kexec_data *kd); }; -struct boot_editor *boot_editor_init(void *ui_ctx, - const struct pb_kexec_data *kd, +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, - struct pb_kexec_data *)); + struct pb_boot_data *)); #endif