diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-01-08 14:33:53 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-01-08 14:33:53 +0000 |
commit | 648b9ba08bd610b866b18a39de7a4572c2196cf3 (patch) | |
tree | ae40ed05ad376533dd6005724b9d3925e46a77d1 /scripts/config/lxdialog/dialog.h | |
parent | 074a033f4e45691e7b220eab76778aba5bc9b9f6 (diff) | |
download | master-187ad058-648b9ba08bd610b866b18a39de7a4572c2196cf3.tar.gz master-187ad058-648b9ba08bd610b866b18a39de7a4572c2196cf3.tar.bz2 master-187ad058-648b9ba08bd610b866b18a39de7a4572c2196cf3.zip |
scripts/config: sync with linux upstream
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43873 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/config/lxdialog/dialog.h')
-rw-r--r-- | scripts/config/lxdialog/dialog.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/scripts/config/lxdialog/dialog.h b/scripts/config/lxdialog/dialog.h index 307022a8be..fcffd5b41f 100644 --- a/scripts/config/lxdialog/dialog.h +++ b/scripts/config/lxdialog/dialog.h @@ -106,8 +106,14 @@ struct dialog_color { int hl; /* highlight this item */ }; +struct subtitle_list { + struct subtitle_list *next; + const char *text; +}; + struct dialog_info { const char *backtitle; + struct subtitle_list *subtitles; struct dialog_color screen; struct dialog_color shadow; struct dialog_color dialog; @@ -164,7 +170,7 @@ char item_tag(void); /* item list manipulation for lxdialog use */ #define MAXITEMSTR 200 struct dialog_item { - char str[MAXITEMSTR]; /* promtp displayed */ + char str[MAXITEMSTR]; /* prompt displayed */ char tag; void *data; /* pointer to menu item - used by menubox+checklist */ int selected; /* Set to 1 by dialog_*() function if selected. */ @@ -194,8 +200,23 @@ int item_is_tag(char tag); int on_key_esc(WINDOW *win); int on_key_resize(void); +/* minimum (re)size values */ +#define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */ +#define CHECKLIST_WIDTH_MIN 6 +#define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */ +#define INPUTBOX_WIDTH_MIN 2 +#define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */ +#define MENUBOX_WIDTH_MIN 65 +#define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */ +#define TEXTBOX_WIDTH_MIN 8 +#define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */ +#define YESNO_WIDTH_MIN 4 +#define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */ +#define WINDOW_WIDTH_MIN 80 + int init_dialog(const char *backtitle); void set_dialog_backtitle(const char *backtitle); +void set_dialog_subtitles(struct subtitle_list *subtitles); void end_dialog(int x, int y); void attr_clear(WINDOW * win, int height, int width, chtype attr); void dialog_clear(void); |