X-Git-Url: https://git.deb.at/?p=pkg%2Fabook.git;a=blobdiff_plain;f=ui.h;h=b94bffea4189973e3e5229fb6d8a51fe02c3c975;hp=f7fd48dde2ae835759be230e46ab75b49ec87c15;hb=HEAD;hpb=0dd1d38a222a5e2e95879ab2397a83d4108d3379 diff --git a/ui.h b/ui.h index f7fd48d..b94bffe 100644 --- a/ui.h +++ b/ui.h @@ -10,20 +10,27 @@ enum { int is_ui_initialized(); void ui_init_curses(); +void ui_init_color_pairs_user(); +void ui_enable_mouse(bool enabled); int init_ui(); void close_ui(); -void headerline(char *str); +void headerline(const char *str); void refresh_screen(); -int statusline_msg(char *msg); -char *ask_filename(char *prompt); -int statusline_ask_boolean(char *msg, int def); +int statusline_msg(const char *msg); +int statusline_askchoice(const char *msg, const char *choices, + short dflt); +char *ask_filename(const char *prompt); +int statusline_ask_boolean(const char *msg, int def); void clear_statusline(); void display_help(int help); -void statusline_addstr(char *str); -char * ui_readline(char *prompt, char *s, int limit, bool use_completion); +void statusline_addstr(const char *str); +char * ui_readline(const char *prompt, char *s, size_t limit, + bool use_completion); void refresh_statusline(); void get_commands(); void ui_remove_items(); +void ui_merge_items(); +void ui_remove_duplicates(); void ui_clear_database(); void ui_find(int next); void ui_print_number_of_items(); @@ -32,11 +39,16 @@ char *get_surname(char *s); void ui_print_database(); void ui_open_datafile(); +#if NCURSES_MOUSE_VERSION != 2 +#define BUTTON5_PRESSED (0x80 | 0x8000000) +#endif #include "options.h" /* needed for options_get_bool */ #define UI_HLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ '-' : ACS_HLINE +#define UI_VLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + '|' : ACS_VLINE #define UI_TEE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ '-' : ACS_BTEE #define UI_LBOXLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \