NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
private.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_SIDEBAR_PRIVATE_H
24 #define MUTT_SIDEBAR_PRIVATE_H
25 
26 #include <stdbool.h>
27 #include "mutt/lib.h"
28 #include "config/lib.h"
29 #include "gui/lib.h"
30 
31 struct IndexSharedData;
32 struct Mailbox;
33 
34 extern struct ListHead SidebarWhitelist;
35 
39 struct SbEntry
40 {
41  char box[256];
42  char display[256];
43  int depth;
44  struct Mailbox *mailbox;
45  bool is_hidden;
46  enum ColorId color;
47 };
48 
52 enum DivType
53 {
57 };
58 
63 {
65  ARRAY_HEAD(, struct SbEntry *) entries;
66 
67  int top_index;
68  int opn_index;
69  int hil_index;
70  int bot_index;
71 
72  short previous_sort;
73  enum DivType divider_type;
74  short divider_width;
75 };
76 
77 // sidebar.c
78 void sb_add_mailbox (struct SidebarWindowData *wdata, struct Mailbox *m);
79 void sb_remove_mailbox (struct SidebarWindowData *wdata, struct Mailbox *m);
80 void sb_set_current_mailbox(struct SidebarWindowData *wdata, struct Mailbox *m);
81 
82 // functions.c
83 bool select_next(struct SidebarWindowData *wdata);
84 bool select_prev(struct SidebarWindowData *wdata);
85 
86 // observer.c
88 void sb_win_add_observers(struct MuttWindow *win);
89 
90 // sort.c
91 void sb_sort_entries(struct SidebarWindowData *wdata, enum SortType sort);
92 
93 // wdata.c
94 void sb_wdata_free(struct MuttWindow *win, void **ptr);
95 struct SidebarWindowData *sb_wdata_get(struct MuttWindow *win);
97 
98 // window.c
99 int sb_recalc(struct MuttWindow *win);
100 int sb_repaint(struct MuttWindow *win);
101 
102 #endif /* MUTT_SIDEBAR_PRIVATE_H */
int sb_repaint(struct MuttWindow *win)
Repaint the Sidebar display - Implements MuttWindow::repaint() -.
Definition: window.c:891
Convenience wrapper for the gui headers.
char display[256]
Formatted string to display.
Definition: private.h:42
int opn_index
Current (open) mailbox.
Definition: private.h:68
SortType
Methods for sorting.
Definition: sort2.h:41
Data passed to a notification function.
Definition: observer.h:39
int top_index
First mailbox visible in sidebar.
Definition: private.h:67
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
Sidebar private Window data -.
Definition: private.h:62
enum ColorId color
Colour to use.
Definition: private.h:46
Info about folders in the sidebar.
Definition: private.h:39
int hil_index
Highlighted mailbox.
Definition: private.h:69
bool is_hidden
Don&#39;t show, e.g. $sidebar_new_mail_only.
Definition: private.h:45
#define ARRAY_HEAD(name, type)
Define a named struct for arrays of elements of a certain type.
Definition: array.h:43
short previous_sort
Old $sidebar_sort_method
Definition: private.h:72
Convenience wrapper for the config headers.
struct Mailbox * mailbox
Mailbox this represents.
Definition: private.h:44
ColorId
List of all colored objects.
Definition: color.h:39
char box[256]
Mailbox path (possibly abbreviated)
Definition: private.h:41
A mailbox.
Definition: mailbox.h:81
int sb_recalc(struct MuttWindow *win)
Recalculate the Sidebar display - Implements MuttWindow::recalc() -.
Definition: window.c:695
short divider_width
Width of the divider in screen columns.
Definition: private.h:74
void sb_wdata_free(struct MuttWindow *win, void **ptr)
Free Sidebar Window data - Implements MuttWindow::wdata_free() -.
Definition: wdata.c:52
int depth
Indentation depth.
Definition: private.h:43
Convenience wrapper for the library headers.
int bot_index
Last mailbox visible in sidebar.
Definition: private.h:70
struct IndexSharedData * shared
Definition: private.h:64