NeoMutt  2019-12-07-168-gc45f47
Teaching an old dog new tricks
DOXYGEN
browser.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_BROWSER_H
24 #define MUTT_BROWSER_H
25 
26 #include "config.h"
27 #include <stdbool.h>
28 #include <stdint.h>
29 #include <sys/types.h>
30 #include <time.h>
31 
32 struct Buffer;
33 
34 /* These Config Variables are only used in browser.c */
36 extern char *C_FolderFormat;
37 extern char *C_GroupIndexFormat;
38 extern char *C_NewsgroupsCharset;
39 extern bool C_ShowOnlyUnread;
40 extern short C_SortBrowser;
41 extern char *C_VfolderFormat;
42 
43 typedef uint8_t SelectFileFlags;
44 #define MUTT_SEL_NO_FLAGS 0
45 #define MUTT_SEL_MAILBOX (1 << 0)
46 #define MUTT_SEL_MULTI (1 << 1)
47 #define MUTT_SEL_FOLDER (1 << 2)
48 
49 
52 struct Folder
53 {
54  struct FolderFile *ff;
55  int num;
56 };
57 
61 struct FolderFile
62 {
63  mode_t mode;
64  off_t size;
65  time_t mtime;
66  uid_t uid;
67  gid_t gid;
68  nlink_t nlink;
69 
70  char *name;
71  char *desc;
72 
73  bool has_new_mail;
74  int msg_count;
75  int msg_unread;
76 
77 #ifdef USE_IMAP
78  char delim;
79 
80  bool imap : 1;
81  bool selectable : 1;
82  bool inferiors : 1;
83 #endif
84  bool has_mailbox : 1;
85  bool local : 1;
86  bool tagged : 1;
87 #ifdef USE_NNTP
88  struct NntpMboxData *nd;
89 #endif
90 };
91 
96 {
97  struct FolderFile *entry;
98  size_t entrylen;
99  unsigned int entrymax;
100 #ifdef USE_IMAP
102  char *folder;
103 #endif
104 };
105 
106 void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, char ***files, int *numfiles);
107 void mutt_buffer_select_file(struct Buffer *f, SelectFileFlags flags, char ***files, int *numfiles);
108 void mutt_browser_select_dir(const char *f);
109 void mutt_browser_cleanup(void);
110 
111 #endif /* MUTT_BROWSER_H */
int msg_unread
number of unread messages
Definition: browser.h:75
mode_t mode
Definition: browser.h:63
time_t mtime
Definition: browser.h:65
bool has_mailbox
Definition: browser.h:84
char * desc
Definition: browser.h:71
void mutt_select_file(char *file, size_t filelen, SelectFileFlags flags, char ***files, int *numfiles)
Let the user select a file.
Definition: browser.c:2262
gid_t gid
Definition: browser.h:67
State of the file/mailbox browser.
Definition: browser.h:95
String manipulation buffer.
Definition: buffer.h:33
char * C_VfolderFormat
Config: (notmuch) printf-like format string for the browser&#39;s display of virtual folders.
Definition: browser.c:76
char * C_GroupIndexFormat
Config: (nntp) printf-like format string for the browser&#39;s display of newsgroups. ...
Definition: browser.c:72
struct FolderFile * ff
Definition: browser.h:54
off_t size
Definition: browser.h:64
char * folder
Definition: browser.h:102
bool selectable
Definition: browser.h:81
void mutt_browser_select_dir(const char *f)
Remember the last directory selected.
Definition: browser.c:1136
uid_t uid
Definition: browser.h:66
bool C_ShowOnlyUnread
Config: (nntp) Only show subscribed newsgroups with unread articles.
Definition: browser.c:74
nlink_t nlink
Definition: browser.h:68
void mutt_buffer_select_file(struct Buffer *f, SelectFileFlags flags, char ***files, int *numfiles)
Let the user select a file.
Definition: browser.c:1185
char * name
Definition: browser.h:70
int num
Definition: browser.h:55
unsigned int entrymax
max entry
Definition: browser.h:99
bool imap
Definition: browser.h:80
void mutt_browser_cleanup(void)
Clean up working Buffers.
Definition: browser.c:122
A folder/dir in the browser.
Definition: browser.h:52
Browser entry representing a folder/dir.
Definition: browser.h:61
int msg_count
total number of messages
Definition: browser.h:74
short C_SortBrowser
Config: Sort method for the browser.
Definition: browser.c:75
NNTP-specific Mailbox data -.
Definition: lib.h:140
size_t entrylen
number of real entries
Definition: browser.h:98
char * C_FolderFormat
Config: printf-like format string for the browser&#39;s display of folders.
Definition: browser.c:71
bool tagged
Definition: browser.h:86
struct NntpMboxData * nd
Definition: browser.h:88
bool local
folder is on local filesystem
Definition: browser.h:85
bool inferiors
Definition: browser.h:82
char * C_NewsgroupsCharset
Config: (nntp) Character set of newsgroups&#39; descriptions.
Definition: browser.c:73
bool imap_browse
Definition: browser.h:101
char delim
Definition: browser.h:78
struct FolderFile * entry
Definition: browser.h:97
bool has_new_mail
true if mailbox has "new mail"
Definition: browser.h:73
bool C_BrowserAbbreviateMailboxes
Config: Abbreviate mailboxes using &#39;~&#39; and &#39;=&#39; in the browser.
Definition: browser.c:70
uint8_t SelectFileFlags
Flags for mutt_select_file(), e.g. MUTT_SEL_MAILBOX.
Definition: browser.h:43