NeoMutt  2025-01-09-41-g086358
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
names.c
Go to the documentation of this file.
1
29#include "config.h"
30#include "mutt/lib.h"
31#include "config/lib.h"
32#include "email/lib.h"
33#include "core/lib.h"
34#include "gui/lib.h"
35#include "lib.h"
36#include "menu/lib.h"
37#include "mview.h"
38
39#define DEBUG_NAME(NAME) \
40 case NAME: \
41 return #NAME
42
43#define DEBUG_DEFAULT \
44 default: \
45 return "UNKNOWN"
46
47const char *name_content_type(enum ContentType type)
48{
49 switch (type)
50 {
62 }
63}
64
66{
67 switch (enc)
68 {
77 }
78}
79
81{
82 switch (disp)
83 {
89 }
90}
91
92const char *name_notify_type(enum NotifyType type)
93{
94 switch (type)
95 {
120 }
121}
122
123const char *name_mailbox_type(enum MailboxType type)
124{
125 switch (type)
126 {
140 }
141}
142
143const char *name_menu_type(enum MenuType mt)
144{
145 switch (mt)
146 {
149#ifdef USE_AUTOCRYPT
151#endif
156#ifdef CRYPT_BACKEND_GPGME
159#endif
168 }
169}
170
171const char *name_notify_global(int id)
172{
173 switch (id)
174 {
179 }
180}
181
182const char *name_notify_config(int id)
183{
184 switch (id)
185 {
190 }
191}
192
193const char *name_notify_mailbox(int id)
194{
195 switch (id)
196 {
206 }
207}
208
209const char *name_notify_mview(int id)
210{
211 switch (id)
212 {
217 }
218}
219
220const char *name_window_type(const struct MuttWindow *win)
221{
222 if (!win)
223 return "NULL";
224
225 switch (win->type)
226 {
254 }
255}
256
257const char *name_window_size(const struct MuttWindow *win)
258{
259 if (!win)
260 return "NULL";
261
262 switch (win->size)
263 {
268 }
269}
270
271const char *name_color_id(int cid)
272{
273 if (cid < 0)
274 return "UNSET";
275
276 switch (cid)
277 {
341 }
342}
@ MT_COLOR_SIDEBAR_DIVIDER
Line dividing sidebar from the index/pager.
Definition: color.h:71
@ MT_COLOR_MARKERS
Pager: markers, line continuation.
Definition: color.h:52
@ MT_COLOR_COMPOSE_SECURITY_ENCRYPT
Mail will be encrypted.
Definition: color.h:44
@ MT_COLOR_MESSAGE
Informational message.
Definition: color.h:53
@ MT_COLOR_INDEX_AUTHOR
Index: author field.
Definition: color.h:89
@ MT_COLOR_MAX
Definition: color.h:99
@ MT_COLOR_QUOTED0
Pager: quoted text, level 0.
Definition: color.h:59
@ MT_COLOR_SIDEBAR_NEW
Mailbox with new mail.
Definition: color.h:75
@ MT_COLOR_HEADER
Message headers (takes a pattern)
Definition: color.h:49
@ MT_COLOR_STATUS
Status bar (takes a pattern)
Definition: color.h:80
@ MT_COLOR_SIDEBAR_UNREAD
Mailbox with unread mail.
Definition: color.h:78
@ MT_COLOR_INDEX_SIZE
Index: size field.
Definition: color.h:95
@ MT_COLOR_INDICATOR
Selected item in list.
Definition: color.h:50
@ MT_COLOR_STRIPE_EVEN
Stripes: even lines of the Help Page.
Definition: color.h:81
@ MT_COLOR_SIDEBAR_SPOOLFILE
$spool_file (Spool mailbox)
Definition: color.h:77
@ MT_COLOR_ERROR
Error message.
Definition: color.h:47
@ MT_COLOR_NONE
No colour.
Definition: color.h:37
@ MT_COLOR_COMPOSE_SECURITY_NONE
Mail will not be encrypted or signed.
Definition: color.h:45
@ MT_COLOR_SIDEBAR_ORDINARY
Mailbox with no new or flagged messages.
Definition: color.h:76
@ MT_COLOR_QUOTED1
Pager: quoted text, level 1.
Definition: color.h:60
@ MT_COLOR_INDEX_TAGS
Index: tags field (g, J)
Definition: color.h:98
@ MT_COLOR_QUOTED3
Pager: quoted text, level 3.
Definition: color.h:62
@ MT_COLOR_BOLD
Bold text.
Definition: color.h:41
@ MT_COLOR_INDEX_SUBJECT
Index: subject field.
Definition: color.h:96
@ MT_COLOR_BODY
Pager: highlight body of message (takes a pattern)
Definition: color.h:40
@ MT_COLOR_INDEX_DATE
Index: date field.
Definition: color.h:91
@ MT_COLOR_QUOTED6
Pager: quoted text, level 6.
Definition: color.h:65
@ MT_COLOR_PROGRESS
Progress bar.
Definition: color.h:57
@ MT_COLOR_COMPOSE_SECURITY_BOTH
Mail will be encrypted and signed.
Definition: color.h:43
@ MT_COLOR_QUOTED8
Pager: quoted text, level 8.
Definition: color.h:67
@ MT_COLOR_SIDEBAR_BACKGROUND
Background colour for the Sidebar.
Definition: color.h:70
@ MT_COLOR_INDEX_TAG
Index: tag field (G)
Definition: color.h:97
@ MT_COLOR_HDRDEFAULT
Header default colour.
Definition: color.h:48
@ MT_COLOR_OPTIONS
Options in prompt.
Definition: color.h:56
@ MT_COLOR_TREE
Index: tree-drawing characters.
Definition: color.h:84
@ MT_COLOR_QUOTED7
Pager: quoted text, level 7.
Definition: color.h:66
@ MT_COLOR_NORMAL
Plain text.
Definition: color.h:55
@ MT_COLOR_ATTACH_HEADERS
MIME attachment test (takes a pattern)
Definition: color.h:39
@ MT_COLOR_SEARCH
Pager: search matches.
Definition: color.h:69
@ MT_COLOR_COMPOSE_SECURITY_SIGN
Mail will be signed.
Definition: color.h:46
@ MT_COLOR_MESSAGE_LOG
Menu showing log messages.
Definition: color.h:54
@ MT_COLOR_INDEX_LABEL
Index: label field.
Definition: color.h:93
@ MT_COLOR_ITALIC
Italic text.
Definition: color.h:51
@ MT_COLOR_QUOTED4
Pager: quoted text, level 4.
Definition: color.h:63
@ MT_COLOR_STRIPE_ODD
Stripes: odd lines of the Help Page.
Definition: color.h:82
@ MT_COLOR_PROMPT
Question/user input.
Definition: color.h:58
@ MT_COLOR_COMPOSE_HEADER
Header labels, e.g. From:
Definition: color.h:42
@ MT_COLOR_INDEX
Index: default colour.
Definition: color.h:88
@ MT_COLOR_QUOTED9
Pager: quoted text, level 9.
Definition: color.h:68
@ MT_COLOR_QUOTED2
Pager: quoted text, level 2.
Definition: color.h:61
@ MT_COLOR_ATTACHMENT
MIME attachments text (entire line)
Definition: color.h:38
@ MT_COLOR_SIDEBAR_INDICATOR
Current open mailbox.
Definition: color.h:74
@ MT_COLOR_SIDEBAR_HIGHLIGHT
Select cursor.
Definition: color.h:73
@ MT_COLOR_WARNING
Warning messages.
Definition: color.h:86
@ MT_COLOR_UNDERLINE
Underlined text.
Definition: color.h:85
@ MT_COLOR_INDEX_NUMBER
Index: index number.
Definition: color.h:94
@ MT_COLOR_SIGNATURE
Pager: signature lines.
Definition: color.h:79
@ MT_COLOR_INDEX_FLAGS
Index: flags field.
Definition: color.h:92
@ MT_COLOR_QUOTED5
Pager: quoted text, level 5.
Definition: color.h:64
@ MT_COLOR_SIDEBAR_FLAGGED
Mailbox with flagged messages.
Definition: color.h:72
@ MT_COLOR_TILDE
Pager: empty lines after message.
Definition: color.h:83
@ MT_COLOR_INDEX_COLLAPSED
Index: number of messages in collapsed thread.
Definition: color.h:90
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
@ NT_MAILBOX_UNTAG
Clear the 'last-tagged' pointer.
Definition: mailbox.h:192
@ NT_MAILBOX_CHANGE
Mailbox has been changed.
Definition: mailbox.h:185
@ NT_MAILBOX_RESORT
Email list needs resorting.
Definition: mailbox.h:190
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
Definition: mailbox.h:183
@ NT_MAILBOX_INVALID
Email list was changed.
Definition: mailbox.h:189
@ NT_MAILBOX_DELETE_ALL
All Mailboxes are about to be deleted.
Definition: mailbox.h:184
@ NT_MAILBOX_UPDATE
Update internal tables.
Definition: mailbox.h:191
@ NT_MAILBOX_ADD
Mailbox has been added.
Definition: mailbox.h:182
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
@ MUTT_MMDF
'mmdf' Mailbox type
Definition: mailbox.h:46
@ MUTT_MAILBOX_ERROR
Error occurred examining Mailbox.
Definition: mailbox.h:43
@ MUTT_POP
'POP3' Mailbox type
Definition: mailbox.h:52
@ MUTT_MH
'MH' Mailbox type
Definition: mailbox.h:47
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
Definition: mailbox.h:49
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:50
@ MUTT_MBOX
'mbox' Mailbox type
Definition: mailbox.h:45
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
Definition: mailbox.h:42
@ MUTT_COMPRESSED
Compressed file Mailbox type.
Definition: mailbox.h:53
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
Definition: mailbox.h:44
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:48
Structs that make up an email.
Convenience wrapper for the gui headers.
GUI present the user with a selectable list.
ContentEncoding
Content-Transfer-Encoding.
Definition: mime.h:47
@ ENC_7BIT
7-bit text
Definition: mime.h:49
@ ENC_UUENCODED
UUEncoded text.
Definition: mime.h:54
@ ENC_OTHER
Encoding unknown.
Definition: mime.h:48
@ ENC_BINARY
Binary.
Definition: mime.h:53
@ ENC_BASE64
Base-64 encoded text.
Definition: mime.h:52
@ ENC_8BIT
8-bit text
Definition: mime.h:50
@ ENC_QUOTED_PRINTABLE
Quoted-printable text.
Definition: mime.h:51
ContentType
Content-Type.
Definition: mime.h:30
@ TYPE_AUDIO
Type: 'audio/*'.
Definition: mime.h:32
@ TYPE_IMAGE
Type: 'image/*'.
Definition: mime.h:34
@ TYPE_OTHER
Unknown Content-Type.
Definition: mime.h:31
@ TYPE_MESSAGE
Type: 'message/*'.
Definition: mime.h:35
@ TYPE_MODEL
Type: 'model/*'.
Definition: mime.h:36
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition: mime.h:37
@ TYPE_APPLICATION
Type: 'application/*'.
Definition: mime.h:33
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
@ TYPE_ANY
Type: '*' or '.*'.
Definition: mime.h:40
@ TYPE_VIDEO
Type: 'video/*'.
Definition: mime.h:39
ContentDisposition
Content-Disposition values.
Definition: mime.h:61
@ DISP_ATTACH
Content is attached.
Definition: mime.h:63
@ DISP_INLINE
Content is inline.
Definition: mime.h:62
@ DISP_NONE
No preferred disposition.
Definition: mime.h:65
@ DISP_FORM_DATA
Content is form-data.
Definition: mime.h:64
Convenience wrapper for the library headers.
@ WT_CUSTOM
Window with a custom drawing function.
Definition: mutt_window.h:95
@ WT_ROOT
Parent of All Windows.
Definition: mutt_window.h:73
@ WT_DLG_ALIAS
Alias Dialog, dlg_alias()
Definition: mutt_window.h:78
@ WT_ALL_DIALOGS
Container for All Dialogs (nested Windows)
Definition: mutt_window.h:75
@ WT_DLG_BROWSER
Browser Dialog, dlg_browser()
Definition: mutt_window.h:81
@ WT_MESSAGE
Window for messages/errors.
Definition: mutt_window.h:99
@ WT_DLG_SMIME
Smime Dialog, dlg_smime()
Definition: mutt_window.h:92
@ WT_DLG_QUERY
Query Dialog, dlg_query()
Definition: mutt_window.h:91
@ WT_DLG_HISTORY
History Dialog, dlg_history()
Definition: mutt_window.h:86
@ WT_DLG_PGP
Pgp Dialog, dlg_pgp()
Definition: mutt_window.h:89
@ WT_CONTAINER
Invisible shaping container Window.
Definition: mutt_window.h:74
@ WT_DLG_CERTIFICATE
Certificate Dialog, dlg_certificate()
Definition: mutt_window.h:82
@ WT_DLG_COMPOSE
Compose Dialog, dlg_compose()
Definition: mutt_window.h:83
@ WT_DLG_INDEX
Index Dialog, dlg_index()
Definition: mutt_window.h:87
@ WT_PAGER
A panel containing the Pager Window.
Definition: mutt_window.h:100
@ WT_DLG_GPGME
GPGME Dialog, dlg_gpgme()
Definition: mutt_window.h:84
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
Definition: mutt_window.h:102
@ WT_HELP_BAR
Help Bar containing list of useful key bindings.
Definition: mutt_window.h:96
@ WT_DLG_POSTPONED
Postponed Dialog, dlg_postponed()
Definition: mutt_window.h:90
@ WT_INDEX
A panel containing the Index Window.
Definition: mutt_window.h:97
@ WT_DLG_ATTACHMENT
Attachment Dialog, dlg_attachment()
Definition: mutt_window.h:79
@ WT_SIDEBAR
Side panel containing Accounts or groups of data.
Definition: mutt_window.h:101
@ WT_DLG_PAGER
Pager Dialog, dlg_pager()
Definition: mutt_window.h:85
@ WT_DLG_AUTOCRYPT
Autocrypt Dialog, dlg_autocrypt()
Definition: mutt_window.h:80
@ WT_MENU
An Window containing a Menu.
Definition: mutt_window.h:98
@ WT_DLG_PATTERN
Pattern Dialog, dlg_pattern()
Definition: mutt_window.h:88
@ MUTT_WIN_SIZE_FIXED
Window has a fixed size.
Definition: mutt_window.h:48
@ MUTT_WIN_SIZE_MINIMISE
Window size depends on its children.
Definition: mutt_window.h:50
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
Definition: mutt_window.h:49
View of a Mailbox.
@ NT_MVIEW_DELETE
The Mview is about to be destroyed.
Definition: mview.h:63
@ NT_MVIEW_CHANGE
The Mview has changed.
Definition: mview.h:64
@ NT_MVIEW_ADD
The Mview has been opened.
Definition: mview.h:62
#define DEBUG_NAME(NAME)
Definition: names.c:39
const char * name_content_encoding(enum ContentEncoding enc)
Definition: names.c:65
const char * name_window_size(const struct MuttWindow *win)
Definition: names.c:257
const char * name_notify_global(int id)
Definition: names.c:171
const char * name_mailbox_type(enum MailboxType type)
Definition: names.c:123
const char * name_menu_type(enum MenuType mt)
Definition: names.c:143
const char * name_notify_type(enum NotifyType type)
Definition: names.c:92
const char * name_window_type(const struct MuttWindow *win)
Definition: names.c:220
const char * name_notify_mview(int id)
Definition: names.c:209
const char * name_notify_config(int id)
Definition: names.c:182
const char * name_content_type(enum ContentType type)
Definition: names.c:47
const char * name_content_disposition(enum ContentDisposition disp)
Definition: names.c:80
const char * name_notify_mailbox(int id)
Definition: names.c:193
#define DEBUG_DEFAULT
Definition: names.c:43
const char * name_color_id(int cid)
Definition: names.c:271
@ NT_GLOBAL_STARTUP
NeoMutt is initialised.
Definition: neomutt.h:61
@ NT_GLOBAL_COMMAND
A NeoMutt command.
Definition: neomutt.h:63
@ NT_GLOBAL_SHUTDOWN
NeoMutt is about to close.
Definition: neomutt.h:62
NotifyType
Notification Types.
Definition: notify_type.h:34
@ NT_TIMEOUT
Timeout has occurred.
Definition: notify_type.h:56
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:57
@ NT_MENU
Menu has changed, MenuRedrawFlags.
Definition: notify_type.h:51
@ NT_ATTACH
Attachment command changed, NotifyAttach.
Definition: notify_type.h:39
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:43
@ NT_COLOR
Colour has changed, NotifyColor, EventColor.
Definition: notify_type.h:41
@ NT_EMAIL
Email has changed, NotifyEmail, EventEmail.
Definition: notify_type.h:44
@ NT_BINDING
Key binding has changed, NotifyBinding, EventBinding.
Definition: notify_type.h:40
@ NT_ENVELOPE
Envelope has changed, NotifyEnvelope.
Definition: notify_type.h:45
@ NT_SCORE
Email scoring has changed.
Definition: notify_type.h:54
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition: notify_type.h:49
@ NT_PAGER
Pager data has changed, NotifyPager, PagerPrivateData.
Definition: notify_type.h:53
@ NT_COMMAND
A Command has been executed, Command.
Definition: notify_type.h:42
@ NT_HEADER
A header has changed, NotifyHeader EventHeader.
Definition: notify_type.h:47
@ NT_ACCOUNT
Account has changed, NotifyAccount, EventAccount.
Definition: notify_type.h:36
@ NT_INDEX
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:48
@ NT_ALL
Register for all notifications.
Definition: notify_type.h:35
@ NT_MVIEW
MailboxView has changed, NotifyMview, EventMview.
Definition: notify_type.h:50
@ NT_GLOBAL
Not object-related, NotifyGlobal.
Definition: notify_type.h:46
@ NT_ALTERN
Alternates command changed, NotifyAlternates.
Definition: notify_type.h:38
@ NT_SUBJRX
Subject Regex has changed, NotifySubjRx.
Definition: notify_type.h:55
@ NT_RESIZE
Window has been resized.
Definition: notify_type.h:52
@ NT_ALIAS
Alias has changed, NotifyAlias, EventAlias.
Definition: notify_type.h:37
Key value store.
enum MuttWindowSize size
Type of Window, e.g. MUTT_WIN_SIZE_FIXED.
Definition: mutt_window.h:131
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:144
@ NT_CONFIG_DELETED
Config item has been deleted.
Definition: subset.h:64
@ NT_CONFIG_RESET
Config item has been reset to initial, or parent, value.
Definition: subset.h:63
@ NT_CONFIG_SET
Config item has been set.
Definition: subset.h:62
MenuType
Types of GUI selections.
Definition: type.h:36
@ MENU_KEY_SELECT_PGP
Select a PGP key.
Definition: type.h:48
@ MENU_INDEX
Index panel (list of emails)
Definition: type.h:51
@ MENU_KEY_SELECT_SMIME
Select a SMIME key.
Definition: type.h:49
@ MENU_QUERY
Select from results of external query.
Definition: type.h:55
@ MENU_AUTOCRYPT
Autocrypt Account menu.
Definition: type.h:40
@ MENU_COMPOSE
Compose an email.
Definition: type.h:42
@ MENU_ATTACHMENT
Select an attachment.
Definition: type.h:38
@ MENU_PGP
PGP encryption menu.
Definition: type.h:53
@ MENU_GENERIC
Generic selection list.
Definition: type.h:46
@ MENU_PAGER
Pager pager (email viewer)
Definition: type.h:52
@ MENU_SMIME
SMIME encryption menu.
Definition: type.h:56
@ MENU_MAX
Definition: type.h:57
@ MENU_EDITOR
Text entry area.
Definition: type.h:44
@ MENU_ALIAS
Select an email address by its alias.
Definition: type.h:37
@ MENU_FOLDER
General file/mailbox browser.
Definition: type.h:45
@ MENU_POSTPONED
Select a postponed email.
Definition: type.h:54