Go to the documentation of this file.
23 #ifndef MUTT_CURS_LIB_H
24 #define MUTT_CURS_LIB_H
64 void mutt_format_s(
char *buf,
size_t buflen,
const char *prec,
const char *s);
66 void mutt_format_s_x(
char *buf,
size_t buflen,
const char *prec,
const char *s,
bool arboreal);
79 void mutt_simple_format(
char *buf,
size_t buflen,
int min_width,
int max_width,
enum FormatJustify justify,
char pad_char,
const char *s,
size_t n,
bool arboreal);
84 size_t mutt_wstr_trunc(
const char *src,
size_t maxlen,
size_t maxwid,
size_t *width);
int mutt_strwidth(const char *s)
Measure a string's width in screen cells.
int MuttGetchTimeout
Timeout in ms for mutt_getch()
void mutt_simple_format(char *buf, size_t buflen, int min_width, int max_width, enum FormatJustify justify, char pad_char, const char *s, size_t n, bool arboreal)
Format a string, like snprintf()
QuadOption
Possible values for a quad-option.
void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string with tree characters.
void mutt_perror_debug(const char *s)
Show the user an 'errno' message.
size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width)
Work out how to truncate a widechar string.
String manipulation buffer.
void mutt_query_exit(void)
Ask the user if they want to leave NeoMutt.
void mutt_need_hard_redraw(void)
Force a hard refresh.
int mutt_buffer_get_field(const char *field, struct Buffer *buf, CompletionFlags complete, bool multiple, struct Mailbox *m, char ***files, int *numfiles)
Ask the user for a string.
FormatJustify
Alignment for mutt_simple_format()
void mutt_paddstr(int n, const char *s)
Display a string on screen, padded if necessary.
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string.
uint8_t flags
e.g. MB_NORMAL
int mutt_get_field(const char *field, char *buf, size_t buflen, CompletionFlags complete, bool multiple, char ***files, int *numfiles)
Ask the user for a string.
void mutt_flush_unget_to_endcond(void)
Clear entries from UngetKeyEvents.
void mutt_beep(bool force)
Irritate the user.
void mutt_flush_macro_to_endcond(void)
Drop a macro from the input buffer.
enum QuadOption mutt_yesorno(const char *msg, enum QuadOption def)
Ask the user a Yes/No question.
void mutt_getch_timeout(int delay)
Set the getch() timeout.
bool C_MetaKey
interpret ALT-x as ESC-x
@ JUSTIFY_LEFT
Left justify the text.
@ JUSTIFY_RIGHT
Right justify the text.
void mutt_format_s_x(char *buf, size_t buflen, const char *prec, const char *s, bool arboreal)
Format a string like snprintf()
void mutt_unget_event(int ch, int op)
Return a keystroke to the input buffer.
int mutt_addwch(wchar_t wc)
addwch would be provided by an up-to-date curses library
An event such as a keypress.
void mutt_refresh(void)
Force a refresh of the screen.
int mutt_multi_choice(const char *prompt, const char *letters)
Offer the user a multiple choice question.
void mutt_endwin(void)
Shutdown curses/slang.
int mutt_buffer_enter_fname(const char *prompt, struct Buffer *fname, bool mailbox, struct Mailbox *m, bool multiple, char ***files, int *numfiles, SelectFileFlags flags)
Ask the user to select a file.
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
enum QuadOption query_quadoption(enum QuadOption opt, const char *prompt)
Ask the user a quad-question.
@ JUSTIFY_CENTER
Centre the text.
void mutt_show_error(void)
Show the user an error message.
int mutt_strnwidth(const char *s, size_t len)
Measure a string's width in screen cells.
int mutt_get_field_unbuffered(const char *msg, char *buf, size_t buflen, CompletionFlags flags)
Ask the user for a string (ignoring macro buffer)
void mutt_edit_file(const char *editor, const char *file)
Let the user edit a file.
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
void mutt_push_macro_event(int ch, int op)
Add the character/operation to the macro buffer.
int mutt_do_pager(const char *banner, const char *tempfile, PagerFlags do_color, struct Pager *info)
Display some page-able text to the user.
void mutt_flushinp(void)
Empty all the keyboard buffers.
void mutt_unget_string(const char *s)
Return a string to the input buffer.
uint16_t CompletionFlags
Flags for mutt_enter_string_full(), e.g. MUTT_ALIAS.
struct KeyEvent mutt_getch(void)
Read a character from the input buffer.