use automake 1.11, autoconf 2.65
[abook.git] / ui.h
blob25bc8509db2070d224f907808bf50acf1de9079d
1 #ifndef _UI_H
2 #define _UI_H
4 #include "abook_curses.h"
6 enum {
7 HELP_MAIN,
8 HELP_EDITOR
9 };
11 int is_ui_initialized();
12 void ui_init_curses();
13 int init_ui();
14 void close_ui();
15 void headerline(const char *str);
16 void refresh_screen();
17 int statusline_msg(const char *msg);
18 int statusline_askchoice(const char *msg, const char *choices,
19 short dflt);
20 char *ask_filename(const char *prompt);
21 int statusline_ask_boolean(const char *msg, int def);
22 void clear_statusline();
23 void display_help(int help);
24 void statusline_addstr(const char *str);
25 char * ui_readline(const char *prompt, char *s, size_t limit,
26 bool use_completion);
27 void refresh_statusline();
28 void get_commands();
29 void ui_remove_items();
30 void ui_clear_database();
31 void ui_find(int next);
32 void ui_print_number_of_items();
33 void ui_read_database();
34 char *get_surname(char *s);
35 void ui_print_database();
36 void ui_open_datafile();
39 #include "options.h" /* needed for options_get_bool */
41 #define UI_HLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
42 '-' : ACS_HLINE
43 #define UI_VLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
44 '|' : ACS_VLINE
45 #define UI_TEE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
46 '-' : ACS_BTEE
47 #define UI_LBOXLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
48 '/' : ACS_HLINE
49 #define UI_RBOXLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
50 '\\' : ACS_HLINE
51 #define UI_ULCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
52 ' ' : ACS_ULCORNER
53 #define UI_URCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
54 ' ' : ACS_URCORNER
55 #define UI_LLCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
56 '+' : ACS_LLCORNER
57 #define UI_LRCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
58 '+' : ACS_LRCORNER
60 #endif