diff options
Diffstat (limited to 'scripts/kconfig/lxdialog/dialog.h')
-rw-r--r-- | scripts/kconfig/lxdialog/dialog.h | 52 |
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 | */ |
135 | extern struct dialog_info dlg; | 135 | extern struct dialog_info dlg; |
136 | extern char dialog_input_result[]; | ||
136 | 137 | ||
137 | /* | 138 | /* |
138 | * Function prototypes | 139 | * Function prototypes |
139 | */ | 140 | */ |
140 | void init_dialog(void); | 141 | |
142 | /* item list as used by checklist and menubox */ | ||
143 | void item_reset(void); | ||
144 | void item_make(const char *fmt, ...); | ||
145 | void item_add_str(const char *fmt, ...); | ||
146 | void item_set_tag(char tag); | ||
147 | void item_set_data(void *p); | ||
148 | void item_set_selected(int val); | ||
149 | int item_activate_selected(void); | ||
150 | void *item_data(void); | ||
151 | char item_tag(void); | ||
152 | |||
153 | /* item list manipulation for lxdialog use */ | ||
154 | #define MAXITEMSTR 200 | ||
155 | struct 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 */ | ||
163 | struct dialog_list { | ||
164 | struct dialog_item node; | ||
165 | struct dialog_list *next; | ||
166 | }; | ||
167 | |||
168 | extern struct dialog_list *item_cur; | ||
169 | extern struct dialog_list item_nil; | ||
170 | extern struct dialog_list *item_head; | ||
171 | |||
172 | int item_count(void); | ||
173 | void item_set(int n); | ||
174 | int item_n(void); | ||
175 | const char *item_str(void); | ||
176 | int item_is_selected(void); | ||
177 | int 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 | |||
183 | void init_dialog(const char *backtitle); | ||
184 | void reset_dialog(void); | ||
141 | void end_dialog(void); | 185 | void end_dialog(void); |
142 | void attr_clear(WINDOW * win, int height, int width, chtype attr); | 186 | void attr_clear(WINDOW * win, int height, int width, chtype attr); |
143 | void dialog_clear(void); | 187 | void 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); |
155 | int dialog_textbox(const char *title, const char *file, int height, int width); | 199 | int dialog_textbox(const char *title, const char *file, int height, int width); |
156 | int dialog_menu(const char *title, const char *prompt, int height, int width, | 200 | int 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); | ||
159 | int dialog_checklist(const char *title, const char *prompt, int height, | 202 | int 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); | ||
162 | extern char dialog_input_result[]; | 204 | extern char dialog_input_result[]; |
163 | int dialog_inputbox(const char *title, const char *prompt, int height, | 205 | int dialog_inputbox(const char *title, const char *prompt, int height, |
164 | int width, const char *init); | 206 | int width, const char *init); |