aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/dialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/lxdialog/dialog.h')
-rw-r--r--scripts/kconfig/lxdialog/dialog.h52
1 files changed, 47 insertions, 5 deletions
diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h
index 2f4c19d710b2..065ded0a449f 100644
--- a/scripts/kconfig/lxdialog/dialog.h
+++ b/scripts/kconfig/lxdialog/dialog.h
@@ -133,11 +133,55 @@ struct dialog_info {
133 * Global variables 133 * Global variables
134 */ 134 */
135extern struct dialog_info dlg; 135extern struct dialog_info dlg;
136extern char dialog_input_result[];
136 137
137/* 138/*
138 * Function prototypes 139 * Function prototypes
139 */ 140 */
140void init_dialog(void); 141
142/* item list as used by checklist and menubox */
143void item_reset(void);
144void item_make(const char *fmt, ...);
145void item_add_str(const char *fmt, ...);
146void item_set_tag(char tag);
147void item_set_data(void *p);
148void item_set_selected(int val);
149int item_activate_selected(void);
150void *item_data(void);
151char item_tag(void);
152
153/* item list manipulation for lxdialog use */
154#define MAXITEMSTR 200
155struct dialog_item {
156 char str[MAXITEMSTR]; /* promtp displayed */
157 char tag;
158 void *data; /* pointer to menu item - used by menubox+checklist */
159 int selected; /* Set to 1 by dialog_*() function if selected. */
160};
161
162/* list of lialog_items */
163struct dialog_list {
164 struct dialog_item node;
165 struct dialog_list *next;
166};
167
168extern struct dialog_list *item_cur;
169extern struct dialog_list item_nil;
170extern struct dialog_list *item_head;
171
172int item_count(void);
173void item_set(int n);
174int item_n(void);
175const char *item_str(void);
176int item_is_selected(void);
177int item_is_tag(char tag);
178#define item_foreach() \
179 for (item_cur = item_head ? item_head: item_cur; \
180 item_cur && (item_cur != &item_nil); item_cur = item_cur->next)
181
182
183void init_dialog(const char *backtitle);
184void reset_dialog(void);
141void end_dialog(void); 185void end_dialog(void);
142void attr_clear(WINDOW * win, int height, int width, chtype attr); 186void attr_clear(WINDOW * win, int height, int width, chtype attr);
143void dialog_clear(void); 187void dialog_clear(void);
@@ -154,11 +198,9 @@ int dialog_msgbox(const char *title, const char *prompt, int height,
154 int width, int pause); 198 int width, int pause);
155int dialog_textbox(const char *title, const char *file, int height, int width); 199int dialog_textbox(const char *title, const char *file, int height, int width);
156int dialog_menu(const char *title, const char *prompt, int height, int width, 200int dialog_menu(const char *title, const char *prompt, int height, int width,
157 int menu_height, const char *choice, int item_no, 201 int menu_height, const void *selected, int *s_scroll);
158 const char *const *items);
159int dialog_checklist(const char *title, const char *prompt, int height, 202int dialog_checklist(const char *title, const char *prompt, int height,
160 int width, int list_height, int item_no, 203 int width, int list_height);
161 const char *const *items);
162extern char dialog_input_result[]; 204extern char dialog_input_result[];
163int dialog_inputbox(const char *title, const char *prompt, int height, 205int dialog_inputbox(const char *title, const char *prompt, int height,
164 int width, const char *init); 206 int width, const char *init);