diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2005-04-18 15:59:49 +0000 |
---|---|---|
committer | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2005-04-18 15:59:49 +0000 |
commit | f66a762344d77b8e4a4d50e68896638a234dc631 (patch) | |
tree | 9b3bf1632a7dd59c788d998b24efa084c9f6ea0a /extra/config/lxdialog/dialog.h | |
parent | 5178925d7b23c6fd5c79d602c9e873cb9ba50ea2 (diff) |
Updated to match Linux 2.6.11.
Diffstat (limited to 'extra/config/lxdialog/dialog.h')
-rw-r--r-- | extra/config/lxdialog/dialog.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/extra/config/lxdialog/dialog.h b/extra/config/lxdialog/dialog.h index c571548da..7bab3ad0e 100644 --- a/extra/config/lxdialog/dialog.h +++ b/extra/config/lxdialog/dialog.h @@ -26,6 +26,7 @@ #include <stdlib.h> #include <string.h> +#ifdef CURSES_LOC #ifdef __sun__ #define CURS_MACROS #endif @@ -128,29 +129,35 @@ * Global variables */ extern bool use_colors; -extern bool use_shadow; extern chtype attributes[]; +#endif extern const char *backtitle; +struct dialog_list_item { + char *name; + int namelen; + char *tag; + int selected; /* Set to 1 by dialog_*() function. */ +}; + /* * Function prototypes */ -extern void create_rc (const char *filename); -extern int parse_rc (void); - void init_dialog (void); void end_dialog (void); -void attr_clear (WINDOW * win, int height, int width, chtype attr); void dialog_clear (void); +#ifdef CURSES_LOC +void attr_clear (WINDOW * win, int height, int width, chtype attr); void color_setup (void); void print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x); void print_button (WINDOW * win, const char *label, int y, int x, int selected); void draw_box (WINDOW * win, int y, int x, int height, int width, chtype box, chtype border); void draw_shadow (WINDOW * win, int y, int x, int height, int width); +#endif int first_alpha (const char *string, const char *exempt); int dialog_yesno (const char *title, const char *prompt, int height, int width); @@ -159,14 +166,17 @@ int dialog_msgbox (const char *title, const char *prompt, int height, int dialog_textbox (const char *title, const char *file, int height, int width); int dialog_menu (const char *title, const char *prompt, int height, int width, int menu_height, const char *choice, int item_no, - const char * const * items); + struct dialog_list_item ** items); int dialog_checklist (const char *title, const char *prompt, int height, int width, int list_height, int item_no, - const char * const * items, int flag); + struct dialog_list_item ** items, int flag); extern unsigned char dialog_input_result[]; int dialog_inputbox (const char *title, const char *prompt, int height, int width, const char *init); +struct dialog_list_item *first_sel_item(int item_no, + struct dialog_list_item ** items); + /* * This is the base for fictitious keys, which activate * the buttons. @@ -176,7 +186,9 @@ int dialog_inputbox (const char *title, const char *prompt, int height, * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o') * -- uppercase chars are used to invoke the button (M_EVENT + 'O') */ +#ifdef CURSES_LOC #define M_EVENT (KEY_MAX+1) +#endif /* |