23#ifndef MUTT_GUI_CURS_LIB_H
24#define MUTT_GUI_CURS_LIB_H
56void mutt_format_s(
char *buf,
size_t buflen,
const char *prec,
const char *s);
58void mutt_format_s_x(
char *buf,
size_t buflen,
const char *prec,
const char *s,
bool arboreal);
67void 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);
73size_t mutt_wstr_trunc(
const char *src,
size_t maxlen,
size_t maxwid,
size_t *width);
Select a Mailbox from a list.
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
void mutt_edit_file(const char *editor, const char *file)
Let the user edit a file.
struct KeyEvent mutt_getch_timeout(int delay)
Get an event with a timeout.
void mutt_flushinp(void)
Empty all the keyboard buffers.
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.
size_t mutt_strnwidth(const char *s, size_t len)
Measure a string's width in screen cells.
struct KeyEvent mutt_getch(void)
Read a character from the input buffer.
void mutt_unget_string(const char *s)
Return a string to the input buffer.
void mutt_push_macro_event(int ch, int op)
Add the character/operation to the macro buffer.
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.
void mutt_paddstr(struct MuttWindow *win, int n, const char *s)
Display a string on screen, padded if necessary.
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_op(int op)
Return an operation to the input buffer.
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_refresh(void)
Force a refresh of the screen.
void mutt_flush_unget_to_endcond(void)
Clear entries from UngetKeyEvents.
int mutt_addwch(struct MuttWindow *win, wchar_t wc)
Addwch would be provided by an up-to-date curses library.
void mutt_flush_macro_to_endcond(void)
Drop a macro from the input buffer.
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()
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
void mutt_need_hard_redraw(void)
Force a hard refresh.
void mutt_query_exit(void)
Ask the user if they want to leave NeoMutt.
FormatJustify
Alignment for mutt_simple_format()
@ JUSTIFY_RIGHT
Right justify the text.
@ JUSTIFY_LEFT
Left justify the text.
@ JUSTIFY_CENTER
Centre the text.
void mutt_endwin(void)
Shutdown curses.
void mutt_beep(bool force)
Irritate the user.
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
void mutt_perror_debug(const char *s)
Show the user an 'errno' message.
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string.
int MuttGetchTimeout
Timeout in ms for mutt_getch()
String manipulation buffer.
An event such as a keypress.
int op
Function opcode, e.g. OP_HELP.