*/
static size_t MacroBufferCount = 0;
static size_t MacroBufferLen = 0;
-static struct Event *MacroEvents;
+static struct KeyEvent *MacroEvents;
/* These are used in all other "normal" situations, and are not
* ignored when setting OptIgnoreMacroEvents
*/
static size_t UngetCount = 0;
static size_t UngetLen = 0;
-static struct Event *UngetKeyEvents;
+static struct KeyEvent *UngetKeyEvents;
int MuttGetchTimeout = -1;
/**
* mutt_getch - Read a character from the input buffer
- * @retval obj Event to process
+ * @retval obj KeyEvent to process
*
* The priority for reading events is:
* 1. UngetKeyEvents buffer
* - Error `{ -1, OP_NULL }`
* - Timeout `{ -2, OP_NULL }`
*/
-struct Event mutt_getch(void)
+struct KeyEvent mutt_getch(void)
{
int ch;
- struct Event err = { -1, OP_NULL }, ret;
- struct Event timeout = { -2, OP_NULL };
+ struct KeyEvent err = { -1, OP_NULL }, ret;
+ struct KeyEvent timeout = { -2, OP_NULL };
if (UngetCount)
return UngetKeyEvents[--UngetCount];
*/
enum QuadOption mutt_yesorno(const char *msg, enum QuadOption def)
{
- struct Event ch;
+ struct KeyEvent ch;
char *yes = _("yes");
char *no = _("no");
char *answer_string = NULL;
bool mailbox, bool multiple, char ***files,
int *numfiles, SelectFileFlags flags)
{
- struct Event ch;
+ struct KeyEvent ch;
SET_COLOR(MT_COLOR_PROMPT);
mutt_window_mvaddstr(MuttMessageWindow, 0, 0, (char *) prompt);
*/
void mutt_unget_event(int ch, int op)
{
- struct Event tmp;
+ struct KeyEvent tmp;
tmp.ch = ch;
tmp.op = op;
if (UngetCount >= UngetLen)
- mutt_mem_realloc(&UngetKeyEvents, (UngetLen += 16) * sizeof(struct Event));
+ mutt_mem_realloc(&UngetKeyEvents, (UngetLen += 16) * sizeof(struct KeyEvent));
UngetKeyEvents[UngetCount++] = tmp;
}
*/
void mutt_push_macro_event(int ch, int op)
{
- struct Event tmp;
+ struct KeyEvent tmp;
tmp.ch = ch;
tmp.op = op;
if (MacroBufferCount >= MacroBufferLen)
- mutt_mem_realloc(&MacroEvents, (MacroBufferLen += 128) * sizeof(struct Event));
+ mutt_mem_realloc(&MacroEvents, (MacroBufferLen += 128) * sizeof(struct KeyEvent));
MacroEvents[MacroBufferCount++] = tmp;
}
*/
int mutt_multi_choice(const char *prompt, const char *letters)
{
- struct Event ch;
+ struct KeyEvent ch;
int choice;
bool redraw = true;
int prompt_lines = 1;
void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s);
void mutt_format_s_x(char *buf, size_t buflen, const char *prec, const char *s, bool arboreal);
void mutt_getch_timeout(int delay);
-struct Event mutt_getch(void);
+struct KeyEvent mutt_getch(void);
int mutt_get_field_full(const char *field, char *buf, size_t buflen, CompletionFlags complete, bool multiple, char ***files, int *numfiles);
int mutt_get_field_unbuffered(const char *msg, char *buf, size_t buflen, CompletionFlags flags);
int mutt_multi_choice(const char *prompt, const char *letters);