NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
gui.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_ALIAS_GUI_H
24 #define MUTT_ALIAS_GUI_H
25 
26 #include <stdbool.h>
27 #include "sort.h"
28 #include "core/neomutt.h"
29 #include "mutt/array.h"
30 
31 struct Alias;
32 
36 struct AliasView
37 {
38  int num;
39  int orig_seq;
40  bool is_searched : 1;
41  bool is_matched : 1;
42  bool is_tagged : 1;
43  bool is_deleted : 1;
44  bool is_visible : 1;
45  struct Alias *alias;
46 };
47 
48 ARRAY_HEAD(AliasViewArray, struct AliasView);
49 
54 {
55  char *str;
56  struct Pattern *pat;
57  struct AliasViewArray ava;
58  struct ConfigSubset *sub;
59 };
60 
62 int alias_color_observer (struct NotifyCallback *nc);
63 
64 int alias_array_alias_add (struct AliasViewArray *ava, struct Alias *alias);
65 int alias_array_alias_delete (struct AliasViewArray *ava, struct Alias *alias);
66 int alias_array_count_visible(struct AliasViewArray *ava);
67 
68 char *menu_create_alias_title(char *menu_name, char *limit);
69 
70 #endif /* MUTT_ALIAS_GUI_H */
NotifyCallback
Data passed to a notification function.
Definition: observer.h:39
AliasView::is_matched
bool is_matched
Search matches this Alias.
Definition: gui.h:41
AliasMenuData::str
char * str
String representing the limit being used.
Definition: gui.h:55
AliasView::is_visible
bool is_visible
Is visible?
Definition: gui.h:44
AliasView::alias
struct Alias * alias
Alias.
Definition: gui.h:45
alias_array_alias_delete
int alias_array_alias_delete(struct AliasViewArray *ava, struct Alias *alias)
Delete an Alias from the AliasViewArray.
Definition: array.c:69
AliasView::num
int num
Index number in list.
Definition: gui.h:38
array.h
alias_array_alias_add
int alias_array_alias_add(struct AliasViewArray *ava, struct Alias *alias)
Add an Alias to the AliasViewArray.
Definition: array.c:45
AliasView
GUI data wrapping an Alias.
Definition: gui.h:36
alias_config_observer
int alias_config_observer(struct NotifyCallback *nc)
Listen for sort_alias configuration changes and reorders menu items accordingly.
Definition: gui.c:44
AliasMenuData::ava
struct AliasViewArray ava
Array of AliasView.
Definition: gui.h:57
AliasView::is_tagged
bool is_tagged
Is it tagged?
Definition: gui.h:42
AliasView::is_searched
bool is_searched
Alias has been searched.
Definition: gui.h:40
neomutt.h
alias_array_count_visible
int alias_array_count_visible(struct AliasViewArray *ava)
Count number of visible Aliases.
Definition: array.c:91
menu_create_alias_title
char * menu_create_alias_title(char *menu_name, char *limit)
Create a title string for the Menu.
Definition: gui.c:84
AliasMenuData::sub
struct ConfigSubset * sub
Config items.
Definition: gui.h:58
ARRAY_HEAD
ARRAY_HEAD(AliasViewArray, struct AliasView)
sort.h
AliasView::orig_seq
int orig_seq
Sequence in alias config file.
Definition: gui.h:39
AliasMenuData
AliasMenuData - AliasView array wrapper with Pattern information.
Definition: gui.h:53
Alias
A shortcut for an email address or addresses.
Definition: alias.h:33
AliasMenuData::pat
struct Pattern * pat
Pattern object.
Definition: gui.h:56
alias_color_observer
int alias_color_observer(struct NotifyCallback *nc)
Listen for color configuration changes and refreshes the menu.
Definition: gui.c:66
ConfigSubset
A set of inherited config items.
Definition: subset.h:46
AliasView::is_deleted
bool is_deleted
Is it deleted?
Definition: gui.h:43
Pattern
A simple (non-regex) pattern.
Definition: lib.h:72