]> git.ozlabs.org Git - petitboot/blobdiff - ui/ncurses/nc-boot-editor.h
ui/ncurses: Use nc-widgets for boot editor
[petitboot] / ui / ncurses / nc-boot-editor.h
index a509f7598f5ef1cd03472a05e96aaee68b116b6d..7aa715e86f7a71780663970d1bfb6ed8e9e94e9e 100644 (file)
@@ -60,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,