summaryrefslogtreecommitdiff
path: root/adk/config/lxdialog/dialog.h
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-12-19 01:42:49 -0600
committerWaldemar Brodkorb <wbx@openadk.org>2014-12-19 01:49:30 -0600
commit949d8663f2f12c986ef2983b7b307f5ecddf060e (patch)
tree258f4f1f62c469b54e0f342fcf36847333c68bda /adk/config/lxdialog/dialog.h
parent7c89a2bc80d4d3c33a5345fd673cd2fe424c1fae (diff)
use the new concept of appliances
- Sync with Kernel upstream Kconfig - use new feature visible - add a patch for select on choices https://lkml.org/lkml/2011/2/17/379 - rename ADK_LINUX -> ADK_TARGET_ARCH - remove package collection feature - add appliance feature to define a appliance more complete
Diffstat (limited to 'adk/config/lxdialog/dialog.h')
-rw-r--r--adk/config/lxdialog/dialog.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/adk/config/lxdialog/dialog.h b/adk/config/lxdialog/dialog.h
index b5211fce0..b4343d384 100644
--- a/adk/config/lxdialog/dialog.h
+++ b/adk/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;
@@ -144,6 +150,7 @@ struct dialog_info {
*/
extern struct dialog_info dlg;
extern char dialog_input_result[];
+extern int saved_x, saved_y; /* Needed in signal handler in mconf.c */
/*
* Function prototypes
@@ -193,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);
@@ -209,12 +231,17 @@ int first_alpha(const char *string, const char *exempt);
int dialog_yesno(const char *title, const char *prompt, int height, int width);
int dialog_msgbox(const char *title, const char *prompt, int height,
int width, int pause);
-int dialog_textbox(const char *title, const char *file, int height, int width);
+
+
+typedef void (*update_text_fn)(char *buf, size_t start, size_t end, void
+ *_data);
+int dialog_textbox(const char *title, char *tbuf, int initial_height,
+ int initial_width, int *keys, int *_vscroll, int *_hscroll,
+ update_text_fn update_text, void *data);
int dialog_menu(const char *title, const char *prompt,
const void *selected, int *s_scroll);
int dialog_checklist(const char *title, const char *prompt, int height,
int width, int list_height);
-extern char dialog_input_result[];
int dialog_inputbox(const char *title, const char *prompt, int height,
int width, const char *init);