NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
curs_lib.h
Go to the documentation of this file.
1
24#ifndef MUTT_GUI_CURS_LIB_H
25#define MUTT_GUI_CURS_LIB_H
26
27#include <stdbool.h>
28#include <stddef.h>
29#include "browser/lib.h"
30#include "key/lib.h"
31
32struct Buffer;
33struct Mailbox;
34struct MuttWindow;
35
40{
41 bool multiple;
42 struct Mailbox *mailbox;
43 char ***files;
44 int *numfiles;
45};
46
47int mutt_addwch(struct MuttWindow *win, wchar_t wc);
48int mutt_any_key_to_continue(const char *s);
49void mutt_beep(bool force);
50int mw_enter_fname(const char *prompt, struct Buffer *fname, bool mailbox, struct Mailbox *m, bool multiple, char ***files, int *numfiles, SelectFileFlags flags);
51void mutt_edit_file(const char *editor, const char *file);
52void mutt_endwin(void);
53void mutt_flushinp(void);
54struct KeyEvent mutt_getch(GetChFlags flags);
55void mutt_need_hard_redraw(void);
56void mutt_paddstr(struct MuttWindow *win, int n, const char *s);
57void mutt_push_macro_event(int ch, int op);
58void mutt_query_exit(void);
59void mutt_refresh(void);
60size_t mutt_strwidth(const char *s);
61size_t mutt_strnwidth(const char *s, size_t len);
62void mutt_unget_ch(int ch);
63void mutt_unget_op(int op);
64void mutt_unget_string(const char *s);
65size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width);
66
67#endif /* MUTT_GUI_CURS_LIB_H */
Select a Mailbox from a list.
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
Definition: lib.h:56
void mutt_edit_file(const char *editor, const char *file)
Let the user edit a file.
Definition: curs_lib.c:116
void mutt_flushinp(void)
Empty all the keyboard buffers.
Definition: get.c:58
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.
Definition: curs_lib.c:383
size_t mutt_strnwidth(const char *s, size_t len)
Measure a string's width in screen cells.
Definition: curs_lib.c:456
void mutt_unget_string(const char *s)
Return a string to the input buffer.
Definition: get.c:137
void mutt_push_macro_event(int ch, int op)
Add the character/operation to the macro buffer.
Definition: get.c:155
struct KeyEvent mutt_getch(GetChFlags flags)
Read a character from the input buffer.
Definition: get.c:210
void mutt_paddstr(struct MuttWindow *win, int n, const char *s)
Display a string on screen, padded if necessary.
Definition: curs_lib.c:341
void mutt_unget_op(int op)
Return an operation to the input buffer.
Definition: get.c:126
void mutt_refresh(void)
Force a refresh of the screen.
Definition: curs_lib.c:78
int mutt_addwch(struct MuttWindow *win, wchar_t wc)
Addwch would be provided by an up-to-date curses library.
Definition: curs_lib.c:318
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
Definition: curs_lib.c:173
void mutt_need_hard_redraw(void)
Force a hard refresh.
Definition: curs_lib.c:100
void mutt_query_exit(void)
Ask the user if they want to leave NeoMutt.
Definition: curs_lib.c:137
void mutt_endwin(void)
Shutdown curses.
Definition: curs_lib.c:151
void mutt_beep(bool force)
Irritate the user.
Definition: curs_lib.c:68
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
Definition: curs_lib.c:443
void mutt_unget_ch(int ch)
Return a keystroke to the input buffer.
Definition: get.c:115
int mw_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 -.
Definition: curs_lib.c:236
Manage keymappings.
uint8_t GetChFlags
Flags for mutt_getch(), e.g. GETCH_NO_FLAGS.
Definition: lib.h:50
String manipulation buffer.
Definition: buffer.h:36
Input for the file completion function.
Definition: curs_lib.h:40
char *** files
List of files selected.
Definition: curs_lib.h:43
struct Mailbox * mailbox
Mailbox.
Definition: curs_lib.h:42
bool multiple
Allow multiple selections.
Definition: curs_lib.h:41
int * numfiles
Number of files selected.
Definition: curs_lib.h:44
An event such as a keypress.
Definition: lib.h:81
int op
Function opcode, e.g. OP_HELP.
Definition: lib.h:83
int ch
Raw key pressed.
Definition: lib.h:82
A mailbox.
Definition: mailbox.h:79