NeoMutt  2020-06-26-250-g349c94
Teaching an old dog new tricks
DOXYGEN
notify.c File Reference

Dump all notifications. More...

#include "config.h"
#include "mutt/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "lib.h"
#include "context.h"
#include "mutt_globals.h"
+ Include dependency graph for notify.c:

Go to the source code of this file.

Functions

static const char * get_event_type (enum NotifyType type)
 
static const char * get_mailbox_type (enum MailboxType type)
 
static const char * get_global_event (int id)
 
static const char * get_config_type (int id)
 
static const char * get_mailbox_event (int id)
 
static const char * get_context (int id)
 
static void notify_dump_account (struct NotifyCallback *nc)
 
static void notify_dump_color (struct NotifyCallback *nc)
 
static void notify_dump_command (struct NotifyCallback *nc)
 
static void notify_dump_config (struct NotifyCallback *nc)
 
static void notify_dump_context (struct NotifyCallback *nc)
 
static void notify_dump_email (struct NotifyCallback *nc)
 
static void notify_dump_global (struct NotifyCallback *nc)
 
static void notify_dump_mailbox (struct NotifyCallback *nc)
 
static void notify_dump_window_state (struct NotifyCallback *nc)
 
static void notify_dump_window_focus (struct NotifyCallback *nc)
 
int debug_notify_observer (struct NotifyCallback *nc)
 

Variables

const struct Mapping Fields []
 
const struct Mapping ComposeFields []
 

Detailed Description

Dump all notifications.

Authors
  • Richard Russon

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/.

Definition in file notify.c.

Function Documentation

◆ get_event_type()

static const char* get_event_type ( enum NotifyType  type)
static

Definition at line 42 of file notify.c.

43 {
44  switch (type)
45  {
46  case NT_ACCOUNT:
47  return "account";
48  case NT_COLOR:
49  return "color";
50  case NT_COMMAND:
51  return "command";
52  case NT_CONFIG:
53  return "config";
54  case NT_CONTEXT:
55  return "context";
56  case NT_EMAIL:
57  return "email";
58  case NT_GLOBAL:
59  return "global";
60  case NT_MAILBOX:
61  return "mailbox";
62  case NT_WINDOW:
63  return "window";
64  default:
65  return "UNKNOWN";
66  }
67 }
A Command has been executed, Command.
Definition: notify_type.h:35
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:41
Colour has changed, ColorId, EventColor.
Definition: notify_type.h:34
Account has changed, NotifyAccount, EventAccount.
Definition: notify_type.h:33
Not object-related, NotifyGlobal.
Definition: notify_type.h:39
Email has changed, NotifyEmail, EventEmail.
Definition: notify_type.h:38
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:36
Context has changed, NotifyContext, EventContext.
Definition: notify_type.h:37
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition: notify_type.h:40
+ Here is the caller graph for this function:

◆ get_mailbox_type()

static const char* get_mailbox_type ( enum MailboxType  type)
static

Definition at line 69 of file notify.c.

70 {
71  switch (type)
72  {
73  case MUTT_COMPRESSED:
74  return "compressed";
75  case MUTT_IMAP:
76  return "imap";
77  case MUTT_MAILDIR:
78  return "maildir";
79  case MUTT_MBOX:
80  return "mbox";
81  case MUTT_MH:
82  return "mh";
83  case MUTT_MMDF:
84  return "mmdf";
85  case MUTT_NNTP:
86  return "nntp";
87  case MUTT_NOTMUCH:
88  return "notmuch";
89  case MUTT_POP:
90  return "pop";
91  default:
92  return "UNKNOWN";
93  }
94 }
'NNTP' (Usenet) Mailbox type
Definition: mailbox.h:52
'Maildir' Mailbox type
Definition: mailbox.h:51
'POP3' Mailbox type
Definition: mailbox.h:55
'mmdf' Mailbox type
Definition: mailbox.h:49
Compressed file Mailbox type.
Definition: mailbox.h:56
'MH' Mailbox type
Definition: mailbox.h:50
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:54
'mbox' Mailbox type
Definition: mailbox.h:48
'IMAP' Mailbox type
Definition: mailbox.h:53
+ Here is the caller graph for this function:

◆ get_global_event()

static const char* get_global_event ( int  id)
static

Definition at line 96 of file notify.c.

97 {
98  switch (id)
99  {
100  case NT_GLOBAL_SHUTDOWN:
101  return "shutdown";
102  case NT_GLOBAL_STARTUP:
103  return "startup";
104  case NT_GLOBAL_TIMEOUT:
105  return "timeout";
106  default:
107  return "UNKNOWN";
108  }
109 }
NeoMutt is initialised.
Definition: neomutt.h:50
NeoMutt is about to close.
Definition: neomutt.h:51
A timer has elapsed.
Definition: neomutt.h:52
+ Here is the caller graph for this function:

◆ get_config_type()

static const char* get_config_type ( int  id)
static

Definition at line 111 of file notify.c.

112 {
113  switch (id)
114  {
115  case NT_CONFIG_SET:
116  return "set";
117  case NT_CONFIG_RESET:
118  return "reset";
120  return "initial_set";
121  default:
122  return "UNKNOWN";
123  }
124 }
Config item's initial value has been set.
Definition: subset.h:64
Config item has been set.
Definition: subset.h:62
Config item has been reset to initial, or parent, value.
Definition: subset.h:63
+ Here is the caller graph for this function:

◆ get_mailbox_event()

static const char* get_mailbox_event ( int  id)
static

Definition at line 126 of file notify.c.

127 {
128  switch (id)
129  {
130  case NT_MAILBOX_ADD:
131  return "add";
132  case NT_MAILBOX_REMOVE:
133  return "remove";
134  case NT_MAILBOX_CLOSED:
135  return "closed";
136  case NT_MAILBOX_INVALID:
137  return "invalid";
138  case NT_MAILBOX_RESORT:
139  return "resort";
140  case NT_MAILBOX_UPDATE:
141  return "update";
142  case NT_MAILBOX_UNTAG:
143  return "untag";
144  default:
145  return "UNKNOWN";
146  }
147 }
Clear the 'last-tagged' pointer.
Definition: mailbox.h:175
Update internal tables.
Definition: mailbox.h:174
Email list was changed.
Definition: mailbox.h:171
Mailbox was closed.
Definition: mailbox.h:170
A new Mailbox has been created.
Definition: mailbox.h:164
Email list needs resorting.
Definition: mailbox.h:172
A Mailbox is about to be destroyed.
Definition: mailbox.h:165
+ Here is the caller graph for this function:

◆ get_context()

static const char* get_context ( int  id)
static

Definition at line 149 of file notify.c.

150 {
151  switch (id)
152  {
153  case NT_CONTEXT_CLOSE:
154  return "close";
155  case NT_CONTEXT_OPEN:
156  return "open";
157  default:
158  return "UNKNOWN";
159  }
160 }
The Context has been opened.
Definition: context.h:61
The Context is about to be destroyed.
Definition: context.h:62
+ Here is the caller graph for this function:

◆ notify_dump_account()

static void notify_dump_account ( struct NotifyCallback nc)
static

Definition at line 162 of file notify.c.

163 {
164  struct EventAccount *ev_a = nc->event_data;
165  struct Account *a = ev_a->account;
166 
167  mutt_debug(LL_DEBUG1, "\tAccount: %p (%s) %s\n", a, get_mailbox_type(a->type),
168  NONULL(a->name));
169 }
#define NONULL(x)
Definition: string2.h:37
char * name
Name of Account.
Definition: account.h:39
static const char * get_mailbox_type(enum MailboxType type)
Definition: notify.c:69
A group of associated Mailboxes.
Definition: account.h:36
enum MailboxType type
Type of Mailboxes this Account contains.
Definition: account.h:38
An Event that happened to an Account.
Definition: account.h:69
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
struct Account * account
The Account this Event relates to.
Definition: account.h:71
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notify_dump_color()

static void notify_dump_color ( struct NotifyCallback nc)
static

Definition at line 171 of file notify.c.

172 {
173  struct EventColor *ev_c = nc->event_data;
174 
175  const char *color = NULL;
176  const char *scope = "";
177 
178  if (nc->event_subtype == MT_COLOR_MAX)
179  color = "ALL";
180 
181  if (!color)
182  color = mutt_map_get_name(nc->event_subtype, Fields);
183 
184  if (!color)
185  {
187  scope = "compose ";
188  }
189 
190  if (!color)
191  color = "UNKNOWN";
192 
193  mutt_debug(LL_DEBUG1, "\tColor: %s %s%s (%d)\n", ev_c->set ? "set" : "reset",
194  scope, color, nc->event_subtype);
195 }
An Event that happened to a Colour.
Definition: color.h:158
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition: mapping.c:42
bool set
True if a colour has been set/added, false if reset/deleted.
Definition: color.h:160
const struct Mapping Fields[]
Definition: color.c:98
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
const struct Mapping ComposeFields[]
Definition: color.c:145
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notify_dump_command()

static void notify_dump_command ( struct NotifyCallback nc)
static

Definition at line 197 of file notify.c.

198 {
199  struct Command *cmd = nc->event_data;
200 
201  if (cmd->data < 4096)
202  mutt_debug(LL_DEBUG1, "\tCommand: %s, data: %ld\n", cmd->name, cmd->data);
203  else
204  mutt_debug(LL_DEBUG1, "\tCommand: %s, data: %p\n", cmd->name, (void *) cmd->data);
205 }
intptr_t data
Data or flags to pass to the command.
Definition: mutt_commands.h:58
A user-callable command.
Definition: mutt_commands.h:44
const char * name
Name of the command.
Definition: mutt_commands.h:46
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
+ Here is the caller graph for this function:

◆ notify_dump_config()

static void notify_dump_config ( struct NotifyCallback nc)
static

Definition at line 207 of file notify.c.

208 {
209  struct EventConfig *ev_c = nc->event_data;
210 
211  struct Buffer value = mutt_buffer_make(128);
212  cs_he_string_get(ev_c->sub->cs, ev_c->he, &value);
213  mutt_debug(LL_DEBUG1, "\tConfig: %s %s = %s\n",
214  get_config_type(nc->event_subtype), ev_c->name, mutt_b2s(&value));
215  mutt_buffer_dealloc(&value);
216 }
struct Buffer mutt_buffer_make(size_t size)
Make a new buffer on the stack.
Definition: buffer.c:61
A config-change event.
Definition: subset.h:70
String manipulation buffer.
Definition: buffer.h:33
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
struct ConfigSet * cs
Parent ConfigSet.
Definition: subset.h:51
struct HashElem * he
Config item that changed.
Definition: subset.h:74
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:294
#define mutt_b2s(buf)
Definition: buffer.h:41
static const char * get_config_type(int id)
Definition: notify.c:111
void * event_data
Data from notify_send()
Definition: observer.h:44
int cs_he_string_get(const struct ConfigSet *cs, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
Definition: set.c:637
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
const struct ConfigSubset * sub
Config Subset.
Definition: subset.h:72
const char * name
Name of config item that changed.
Definition: subset.h:73
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notify_dump_context()

static void notify_dump_context ( struct NotifyCallback nc)
static

Definition at line 218 of file notify.c.

219 {
220  struct EventContext *ev_c = nc->event_data;
221 
222  const char *path = "NONE";
223  if (ev_c->context && ev_c->context->mailbox)
224  path = mailbox_path(ev_c->context->mailbox);
225 
226  mutt_debug(LL_DEBUG1, "\tContext: %s %s\n", get_context(nc->event_subtype), path);
227 }
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox&#39;s path string.
Definition: mailbox.h:201
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
struct Mailbox * mailbox
Definition: context.h:50
struct Context * context
The Context this Event relates to.
Definition: context.h:70
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
static const char * get_context(int id)
Definition: notify.c:149
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
An Event that happened to an Context.
Definition: context.h:68
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notify_dump_email()

static void notify_dump_email ( struct NotifyCallback nc)
static

Definition at line 229 of file notify.c.

230 {
231  struct EventEmail *ev_e = nc->event_data;
232 
233  mutt_debug(LL_DEBUG1, "\tEmail: %d\n", ev_e->num_emails);
234  for (size_t i = 0; i < ev_e->num_emails; i++)
235  {
236  mutt_debug(LL_DEBUG1, "\t\t: %p\n", ev_e->emails[i]);
237  }
238 }
An Event that happened to an Email.
Definition: email.h:144
struct Email ** emails
Definition: email.h:147
int num_emails
Definition: email.h:146
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
+ Here is the caller graph for this function:

◆ notify_dump_global()

static void notify_dump_global ( struct NotifyCallback nc)
static

Definition at line 240 of file notify.c.

241 {
242  mutt_debug(LL_DEBUG1, "\tGlobal: %s\n", get_global_event(nc->event_subtype));
243 }
static const char * get_global_event(int id)
Definition: notify.c:96
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notify_dump_mailbox()

static void notify_dump_mailbox ( struct NotifyCallback nc)
static

Definition at line 245 of file notify.c.

246 {
247  struct EventMailbox *ev_m = nc->event_data;
248 
249  struct Mailbox *m = ev_m->mailbox;
250  const char *path = m ? mailbox_path(m) : "";
251  mutt_debug(LL_DEBUG1, "\tMailbox: %s %s\n", get_mailbox_event(nc->event_subtype), path);
252 }
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox&#39;s path string.
Definition: mailbox.h:201
struct Mailbox * mailbox
The Mailbox this Event relates to.
Definition: mailbox.h:183
static const char * get_mailbox_event(int id)
Definition: notify.c:126
An Event that happened to a Mailbox.
Definition: mailbox.h:181
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
A mailbox.
Definition: mailbox.h:81
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notify_dump_window_state()

static void notify_dump_window_state ( struct NotifyCallback nc)
static

Definition at line 254 of file notify.c.

255 {
256  struct EventWindow *ev_w = nc->event_data;
257  const struct MuttWindow *win = ev_w->win;
258  WindowNotifyFlags flags = ev_w->flags;
259 
260  struct Buffer buf = mutt_buffer_make(128);
261 
262  mutt_buffer_add_printf(&buf, "[%s] ", win_name(win));
263 
264  if (flags & WN_VISIBLE)
265  mutt_buffer_addstr(&buf, "visible ");
266  if (flags & WN_HIDDEN)
267  mutt_buffer_addstr(&buf, "hidden ");
268 
269  if (flags & WN_MOVED)
270  {
271  mutt_buffer_add_printf(&buf, "moved (C%d,R%d)->(C%d,R%d) ",
272  win->old.col_offset, win->old.row_offset,
273  win->state.col_offset, win->state.row_offset);
274  }
275 
276  if (flags & WN_TALLER)
277  mutt_buffer_add_printf(&buf, "taller [%d->%d] ", win->old.rows, win->state.rows);
278  if (flags & WN_SHORTER)
279  mutt_buffer_add_printf(&buf, "shorter [%d->%d] ", win->old.rows, win->state.rows);
280  if (flags & WN_WIDER)
281  mutt_buffer_add_printf(&buf, "wider [%d->%d] ", win->old.cols, win->state.cols);
282  if (flags & WN_NARROWER)
283  mutt_buffer_add_printf(&buf, "narrower [%d->%d] ", win->old.cols, win->state.cols);
284 
285  mutt_debug(LL_DEBUG1, "\tWindow: %s\n", mutt_b2s(&buf));
286 
287  mutt_buffer_dealloc(&buf);
288 }
#define WN_NARROWER
Window became narrower.
Definition: mutt_window.h:169
struct MuttWindow * win
Window that changed.
Definition: mutt_window.h:193
An Event that happened to a Window.
Definition: mutt_window.h:191
struct Buffer mutt_buffer_make(size_t size)
Make a new buffer on the stack.
Definition: buffer.c:61
String manipulation buffer.
Definition: buffer.h:33
#define WN_WIDER
Window became wider.
Definition: mutt_window.h:168
#define WN_HIDDEN
Window became hidden.
Definition: mutt_window.h:172
A division of the screen.
Definition: mutt_window.h:115
short col_offset
Absolute on-screen column.
Definition: mutt_window.h:59
WindowNotifyFlags flags
Attributes of Window that changed.
Definition: mutt_window.h:194
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:294
int mutt_buffer_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
Definition: buffer.c:203
size_t mutt_buffer_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:225
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:57
#define mutt_b2s(buf)
Definition: buffer.h:41
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:120
#define WN_TALLER
Window became taller.
Definition: mutt_window.h:166
short row_offset
Absolute on-screen row.
Definition: mutt_window.h:60
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:58
uint8_t WindowNotifyFlags
Changes to a MuttWindow.
Definition: mutt_window.h:164
#define WN_SHORTER
Window became shorter.
Definition: mutt_window.h:167
struct WindowState old
Previous state of the Window.
Definition: mutt_window.h:121
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
#define WN_VISIBLE
Window became visible.
Definition: mutt_window.h:171
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
#define WN_MOVED
Window moved.
Definition: mutt_window.h:170
const char * win_name(const struct MuttWindow *win)
Definition: common.c:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ notify_dump_window_focus()

static void notify_dump_window_focus ( struct NotifyCallback nc)
static

Definition at line 290 of file notify.c.

291 {
292  struct EventWindow *ev_w = nc->event_data;
293  struct MuttWindow *win = ev_w->win;
294 
295  struct Buffer buf = mutt_buffer_make(128);
296 
297  mutt_buffer_addstr(&buf, "Focus: ");
298 
299  if (win)
300  {
301  struct MuttWindow *dlg = dialog_find(win);
302  if (dlg && (dlg != win))
303  mutt_buffer_add_printf(&buf, "%s:", win_name(dlg));
304 
305  mutt_buffer_add_printf(&buf, "%s ", win_name(win));
306 
307  mutt_buffer_add_printf(&buf, "(C%d,R%d) [%dx%d]", win->state.col_offset,
308  win->state.row_offset, win->state.cols, win->state.rows);
309  }
310  else
311  {
312  mutt_buffer_addstr(&buf, "NONE");
313  }
314 
315  mutt_debug(LL_DEBUG1, "\tWindow: %s\n", mutt_b2s(&buf));
316 
317  mutt_buffer_dealloc(&buf);
318 }
struct MuttWindow * win
Window that changed.
Definition: mutt_window.h:193
An Event that happened to a Window.
Definition: mutt_window.h:191
struct Buffer mutt_buffer_make(size_t size)
Make a new buffer on the stack.
Definition: buffer.c:61
String manipulation buffer.
Definition: buffer.h:33
A division of the screen.
Definition: mutt_window.h:115
short col_offset
Absolute on-screen column.
Definition: mutt_window.h:59
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:294
int mutt_buffer_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
Definition: buffer.c:203
size_t mutt_buffer_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:225
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:57
#define mutt_b2s(buf)
Definition: buffer.h:41
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:120
short row_offset
Absolute on-screen row.
Definition: mutt_window.h:60
short rows
Number of rows, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:58
void * event_data
Data from notify_send()
Definition: observer.h:44
Log at debug level 1.
Definition: logging.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
Definition: dialog.c:46
const char * win_name(const struct MuttWindow *win)
Definition: common.c:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ debug_notify_observer()

int debug_notify_observer ( struct NotifyCallback nc)

Definition at line 320 of file notify.c.

321 {
322  mutt_debug(LL_DEBUG1, "\033[1;31mNotification:\033[0m %s\n", get_event_type(nc->event_type));
323 
324  switch (nc->event_type)
325  {
326  case NT_ACCOUNT:
328  break;
329  case NT_COLOR:
330  notify_dump_color(nc);
331  break;
332  case NT_COMMAND:
334  break;
335  case NT_CONFIG:
336  notify_dump_config(nc);
337  break;
338  case NT_CONTEXT:
340  break;
341  case NT_EMAIL:
342  notify_dump_email(nc);
343  break;
344  case NT_GLOBAL:
345  notify_dump_global(nc);
346  break;
347  case NT_MAILBOX:
349  break;
350  case NT_WINDOW:
351  if (nc->event_subtype == NT_WINDOW_STATE)
353  else if (nc->event_subtype == NT_WINDOW_FOCUS)
355  break;
356  default:
357  mutt_debug(LL_DEBUG1, "\tEvent Type: %d\n", nc->event_type);
358  mutt_debug(LL_DEBUG1, "\tEvent Sub-type: %d\n", nc->event_subtype);
359  mutt_debug(LL_DEBUG1, "\tEvent Data: %p\n", nc->event_data);
360  break;
361  }
362 
363  mutt_debug(LL_DEBUG1, "\tGlobal Data: %p\n", nc->global_data);
364 
365  return 0;
366 }
static void notify_dump_window_state(struct NotifyCallback *nc)
Definition: notify.c:254
static const char * get_event_type(enum NotifyType type)
Definition: notify.c:42
static void notify_dump_email(struct NotifyCallback *nc)
Definition: notify.c:229
static void notify_dump_window_focus(struct NotifyCallback *nc)
Definition: notify.c:290
Window focus has changed.
Definition: mutt_window.h:185
A Command has been executed, Command.
Definition: notify_type.h:35
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:41
static void notify_dump_color(struct NotifyCallback *nc)
Definition: notify.c:171
static void notify_dump_config(struct NotifyCallback *nc)
Definition: notify.c:207
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:42
static void notify_dump_context(struct NotifyCallback *nc)
Definition: notify.c:218
void * global_data
Data from notify_observer_add()
Definition: observer.h:45
Window state has changed, e.g. WN_VISIBLE.
Definition: mutt_window.h:183
Colour has changed, ColorId, EventColor.
Definition: notify_type.h:34
static void notify_dump_command(struct NotifyCallback *nc)
Definition: notify.c:197
Account has changed, NotifyAccount, EventAccount.
Definition: notify_type.h:33
Not object-related, NotifyGlobal.
Definition: notify_type.h:39
void * event_data
Data from notify_send()
Definition: observer.h:44
Email has changed, NotifyEmail, EventEmail.
Definition: notify_type.h:38
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:36
Context has changed, NotifyContext, EventContext.
Definition: notify_type.h:37
Log at debug level 1.
Definition: logging.h:40
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition: notify_type.h:40
#define mutt_debug(LEVEL,...)
Definition: logging.h:81
static void notify_dump_global(struct NotifyCallback *nc)
Definition: notify.c:240
static void notify_dump_mailbox(struct NotifyCallback *nc)
Definition: notify.c:245
static void notify_dump_account(struct NotifyCallback *nc)
Definition: notify.c:162
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ Fields

const struct Mapping Fields[]

Definition at line 98 of file color.c.

◆ ComposeFields

const struct Mapping ComposeFields[]

Definition at line 145 of file color.c.