forked from neomutt/neomutt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurs_lib.h
80 lines (71 loc) · 3.53 KB
/
curs_lib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* @file
* GUI miscellaneous curses (window drawing) routines
*
* @authors
* Copyright (C) 2018 Richard Russon <rich@flatcap.org>
*
* @copyright
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MUTT_CURS_LIB_H
#define MUTT_CURS_LIB_H
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
#include "mutt.h"
#include "browser.h"
#include "pager.h"
struct Context;
struct Pager;
/* These Config Variables are only used in curs_lib.c */
extern bool C_MetaKey; /**< interpret ALT-x as ESC-x */
extern int MuttGetchTimeout; ///< Timeout in ms for mutt_getch()
/* For mutt_simple_format() justifications */
#define FMT_LEFT -1
#define FMT_CENTER 0
#define FMT_RIGHT 1
int mutt_addwch(wchar_t wc);
int mutt_any_key_to_continue(const char *s);
int mutt_do_pager(const char *banner, const char *tempfile, PagerFlags do_color, struct Pager *info);
void mutt_edit_file(const char *editor, const char *file);
void mutt_endwin(void);
int mutt_enter_fname_full(const char *prompt, char *buf, size_t buflen, bool mailbox, bool multiple, char ***files, int *numfiles, SelectFileFlags flags);
void mutt_flushinp(void);
void mutt_flush_macro_to_endcond(void);
void mutt_flush_unget_to_endcond(void);
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s);
void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s);
void mutt_getch_timeout(int delay);
struct Event 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);
void mutt_need_hard_redraw(void);
void mutt_paddstr(int n, const char *s);
void mutt_perror_debug(const char *s);
void mutt_push_macro_event(int ch, int op);
void mutt_query_exit(void);
void mutt_refresh(void);
void mutt_show_error(void);
void mutt_simple_format(char *buf, size_t buflen, int min_width, int max_width, int justify, char pad_char, const char *s, size_t n, int arboreal);
int mutt_strwidth(const char *s);
void mutt_unget_event(int ch, int op);
void mutt_unget_string(const char *s);
size_t mutt_wstr_trunc(const char *src, size_t maxlen, size_t maxwid, size_t *width);
enum QuadOption mutt_yesorno(const char *msg, enum QuadOption def);
#define mutt_enter_fname(prompt, buf, buflen, mailbox) mutt_enter_fname_full(prompt, buf, buflen, mailbox, false, NULL, NULL, 0)
#define mutt_get_field(field, buf, buflen, complete) mutt_get_field_full(field, buf, buflen, complete, false, NULL, NULL)
#define mutt_get_password(msg, buf, buflen) mutt_get_field_unbuffered(msg, buf, buflen, MUTT_PASS)
#endif /* MUTT_CURS_LIB_H */