]> git.deb.at Git - pkg/abook.git/blob - ui.h
- mbswidth change to avoid empty translation unit warnings
[pkg/abook.git] / ui.h
1 #ifndef _UI_H
2 #define _UI_H
3
4 #include "abook_curses.h"
5
6 enum {
7         HELP_MAIN,
8         HELP_EDITOR
9 };
10
11 int             is_ui_initialized();
12 void            ui_init_curses();
13 int             init_ui();
14 void            close_ui();
15 void            headerline(char *str);
16 void            refresh_screen();
17 int             statusline_msg(char *msg);
18 char            *ask_filename(char *prompt);
19 int             statusline_ask_boolean(char *msg, int def);
20 void            clear_statusline();
21 void            display_help(int help);
22 void            statusline_addstr(char *str);
23 char *          ui_readline(char *prompt, char *s, int limit, bool use_completion);
24 void            refresh_statusline();
25 void            get_commands();
26 void            ui_remove_items();
27 void            ui_clear_database();
28 void            ui_find(int next);
29 void            ui_print_number_of_items();
30 void            ui_read_database();
31 char            *get_surname(char *s);
32 void            ui_print_database();
33 void            ui_open_datafile();
34
35
36 #include "options.h" /* needed for options_get_bool */
37
38 #define UI_HLINE_CHAR           opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
39                                         '-' : ACS_HLINE
40 #define UI_TEE_CHAR             opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
41                                         '-' : ACS_BTEE
42 #define UI_LBOXLINE_CHAR        opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
43                                         '/' : ACS_HLINE
44 #define UI_RBOXLINE_CHAR        opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
45                                         '\\' : ACS_HLINE
46 #define UI_ULCORNER_CHAR        opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
47                                         ' ' : ACS_ULCORNER
48 #define UI_URCORNER_CHAR        opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
49                                         ' ' : ACS_URCORNER
50 #define UI_LLCORNER_CHAR        opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
51                                         '+' : ACS_LLCORNER
52 #define UI_LRCORNER_CHAR        opt_get_bool(BOOL_USE_ASCII_ONLY) ? \
53                                         '+' : ACS_LRCORNER
54
55 #endif