X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=ui.h;h=e811431e0701acdf6b7b13b261fd0cd1f1352966;hb=e79a445f83989ef1f8ae564dd7c3be7e5d134d00;hp=fdb4dcaeb1d8f9eb5ec0ab554a7bcca393fe580f;hpb=9d82930091c8cce4fc56c6f9e3cf46e68ca0bcb3;p=pkg%2Fabook.git diff --git a/ui.h b/ui.h index fdb4dca..e811431 100644 --- a/ui.h +++ b/ui.h @@ -12,15 +12,18 @@ int is_ui_initialized(); void ui_init_curses(); 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(); @@ -33,7 +36,7 @@ void ui_print_database(); void ui_open_datafile(); -#include "options.h" /* needed for options_get_int */ +#include "options.h" /* needed for options_get_bool */ #define UI_HLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ '-' : ACS_HLINE