Teaching an old dog new tricks
No Matches
opcodes.h File Reference

All user-callable functions. More...

#include "config.h"
#include "mutt/lib.h"
+ Include dependency graph for opcodes.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define OP_REPAINT   -4
 Repaint is needed.
#define OP_PARTIAL_KEY   -3
 Incomplete keybinding.
#define OP_TIMEOUT   -2
 1 second with no events
#define OP_ABORT   -1
 $abort_key pressed (Ctrl-G)
#define OPS_ATTACHMENT(_fmt)
#define OPS_AUTOCRYPT(_fmt)
#define OPS_CORE(_fmt)
#define OPS_CRYPT(_fmt)
#define OPS_ENVELOPE(_fmt)
#define OPS_MIX(_fmt)
#define OPS_NOTMUCH(_fmt)
#define OPS_PGP(_fmt)
#define OPS_SIDEBAR(_fmt)
#define OPS_SMIME(_fmt)    _fmt(OP_COMPOSE_SMIME_MENU, N_("show S/MIME options")) \
#define OPS(_fmt)
#define DEFINE_OPS(opcode, help_string)   opcode,


enum  MuttOps { OP_MAX }
 All NeoMutt Opcodes. More...


const char * opcodes_get_description (int op)
 Get the description of an opcode.
const char * opcodes_get_name (int op)
 Get the name of an opcode.

Detailed Description

All user-callable functions.

  • Damien Riegel

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

Definition in file opcodes.h.

Macro Definition Documentation


#define OP_REPAINT   -4

Repaint is needed.

Definition at line 32 of file opcodes.h.


#define OP_PARTIAL_KEY   -3

Incomplete keybinding.

Definition at line 33 of file opcodes.h.


#define OP_TIMEOUT   -2

1 second with no events

Definition at line 34 of file opcodes.h.


#define OP_ABORT   -1

$abort_key pressed (Ctrl-G)

Definition at line 35 of file opcodes.h.


#define OPS_ATTACHMENT (   _fmt)

Definition at line 38 of file opcodes.h.


#define OPS_AUTOCRYPT (   _fmt)
_fmt(OP_AUTOCRYPT_ACCT_MENU, N_("manage autocrypt accounts")) \
_fmt(OP_AUTOCRYPT_CREATE_ACCT, N_("create a new autocrypt account")) \
_fmt(OP_AUTOCRYPT_DELETE_ACCT, N_("delete the current account")) \
_fmt(OP_AUTOCRYPT_TOGGLE_ACTIVE, N_("toggle the current account active/inactive")) \
_fmt(OP_AUTOCRYPT_TOGGLE_PREFER, N_("toggle the current account prefer-encrypt flag")) \
_fmt(OP_COMPOSE_AUTOCRYPT_MENU, N_("show autocrypt compose menu options"))
#define N_(a)
Definition: message.h:32

Definition at line 75 of file opcodes.h.


#define OPS_CORE (   _fmt)

Definition at line 86 of file opcodes.h.


#define OPS_CRYPT (   _fmt)
_fmt(OP_DECRYPT_COPY, N_("make decrypted copy")) \
_fmt(OP_DECRYPT_SAVE, N_("make decrypted copy and delete")) \
_fmt(OP_EXTRACT_KEYS, N_("extract supported public keys")) \
_fmt(OP_FORGET_PASSPHRASE, N_("wipe passphrases from memory")) \

Definition at line 289 of file opcodes.h.


#define OPS_ENVELOPE (   _fmt)
_fmt(OP_ENVELOPE_EDIT_BCC, N_("edit the BCC list")) \
_fmt(OP_ENVELOPE_EDIT_CC, N_("edit the CC list")) \
_fmt(OP_ENVELOPE_EDIT_FCC, N_("enter a file to save a copy of this message in")) \
_fmt(OP_ENVELOPE_EDIT_FOLLOWUP_TO, N_("edit the Followup-To field")) \
_fmt(OP_ENVELOPE_EDIT_FROM, N_("edit the from field")) \
_fmt(OP_ENVELOPE_EDIT_HEADERS, N_("edit the message with headers")) \
_fmt(OP_ENVELOPE_EDIT_NEWSGROUPS, N_("edit the newsgroups list")) \
_fmt(OP_ENVELOPE_EDIT_REPLY_TO, N_("edit the Reply-To field")) \
_fmt(OP_ENVELOPE_EDIT_SUBJECT, N_("edit the subject of this message")) \
_fmt(OP_ENVELOPE_EDIT_TO, N_("edit the TO list")) \
_fmt(OP_ENVELOPE_EDIT_X_COMMENT_TO, N_("edit the X-Comment-To field")) \

Definition at line 295 of file opcodes.h.


#define OPS_MIX (   _fmt)
_fmt(OP_COMPOSE_MIX, N_("send the message through a mixmaster remailer chain")) \
_fmt(OP_MIX_APPEND, N_("append a remailer to the chain")) \
_fmt(OP_MIX_CHAIN_NEXT, N_("select the next element of the chain")) \
_fmt(OP_MIX_CHAIN_PREV, N_("select the previous element of the chain")) \
_fmt(OP_MIX_DELETE, N_("delete a remailer from the chain")) \
_fmt(OP_MIX_INSERT, N_("insert a remailer into the chain")) \
_fmt(OP_MIX_USE, N_("accept the chain constructed"))

Definition at line 309 of file opcodes.h.


#define OPS_NOTMUCH (   _fmt)
_fmt(OP_MAIN_CHANGE_VFOLDER, N_("open a different virtual folder")) \
_fmt(OP_MAIN_ENTIRE_THREAD, N_("read entire thread of the current message")) \
_fmt(OP_MAIN_VFOLDER_FROM_QUERY, N_("generate virtual folder from query")) \
_fmt(OP_MAIN_VFOLDER_FROM_QUERY_READONLY, N_("generate a read-only virtual folder from query")) \
_fmt(OP_MAIN_WINDOWED_VFOLDER_BACKWARD, N_("shifts virtual folder time window backwards")) \
_fmt(OP_MAIN_WINDOWED_VFOLDER_FORWARD, N_("shifts virtual folder time window forwards")) \
_fmt(OP_MAIN_WINDOWED_VFOLDER_RESET, N_("resets virtual folder time window to the present"))

Definition at line 322 of file opcodes.h.


#define OPS_PGP (   _fmt)
_fmt(OP_ATTACHMENT_ATTACH_KEY, N_("attach a PGP public key")) \
_fmt(OP_CHECK_TRADITIONAL, N_("check for classic PGP")) \
_fmt(OP_COMPOSE_PGP_MENU, N_("show PGP options")) \
_fmt(OP_MAIL_KEY, N_("mail a PGP public key")) \
_fmt(OP_VERIFY_KEY, N_("verify a PGP public key")) \
_fmt(OP_VIEW_ID, N_("view the key's user id")) \

Definition at line 334 of file opcodes.h.


#define OPS_SIDEBAR (   _fmt)
_fmt(OP_SIDEBAR_FIRST, N_("move the highlight to the first mailbox")) \
_fmt(OP_SIDEBAR_LAST, N_("move the highlight to the last mailbox")) \
_fmt(OP_SIDEBAR_NEXT, N_("move the highlight to next mailbox")) \
_fmt(OP_SIDEBAR_NEXT_NEW, N_("move the highlight to next mailbox with new mail")) \
_fmt(OP_SIDEBAR_OPEN, N_("open highlighted mailbox")) \
_fmt(OP_SIDEBAR_PAGE_DOWN, N_("scroll the sidebar down 1 page")) \
_fmt(OP_SIDEBAR_PAGE_UP, N_("scroll the sidebar up 1 page")) \
_fmt(OP_SIDEBAR_PREV, N_("move the highlight to previous mailbox")) \
_fmt(OP_SIDEBAR_PREV_NEW, N_("move the highlight to previous mailbox with new mail")) \
_fmt(OP_SIDEBAR_TOGGLE_VIRTUAL, N_("toggle between mailboxes and virtual mailboxes")) \
_fmt(OP_SIDEBAR_TOGGLE_VISIBLE, N_("make the sidebar (in)visible")) \

Definition at line 342 of file opcodes.h.


#define OPS_SMIME (   _fmt)     _fmt(OP_COMPOSE_SMIME_MENU, N_("show S/MIME options")) \

Definition at line 355 of file opcodes.h.


#define OPS (   _fmt)
_fmt(OP_NULL, N_("null operation")) \
OPS_CORE(_fmt) \
OPS_CRYPT(_fmt) \
OPS_MIX(_fmt) \
OPS_PGP(_fmt) \
OPS_SMIME(_fmt) \

Definition at line 358 of file opcodes.h.


#define DEFINE_OPS (   opcode,
)    opcode,

Definition at line 377 of file opcodes.h.

Enumeration Type Documentation

◆ MuttOps

enum MuttOps

All NeoMutt Opcodes.

Opcodes, e.g. OP_TOGGLE_NEW


Definition at line 376 of file opcodes.h.

376 {
377#define DEFINE_OPS(opcode, help_string) opcode,
379#undef DEFINE_OPS
380 OP_MAX,
#define DEFINE_OPS(opcode, help_string)
Definition: opcodes.h:377
#define OPS(_fmt)
Definition: opcodes.h:358
Definition: opcodes.h:380

Function Documentation

◆ opcodes_get_description()

const char * opcodes_get_description ( int  op)

Get the description of an opcode.

opOpcode, e.g. OP_HELP
Return values
strDescription of the opcode

Definition at line 70 of file opcodes.c.

72 if ((op < OP_REPAINT) || (op >= OP_MAX))
73 return "[UNKNOWN]";
75 if (op == OP_ABORT)
76 return "abort the current action";
77 if (op == OP_TIMEOUT)
78 return "timeout occurred";
79 if (op == OP_PARTIAL_KEY)
80 return "partial keybinding";
81 if (op == OP_REPAINT)
82 return "repaint required";
84 return OpStrings[op][1];
static const char * OpStrings[][2]
Lookup table mapping an opcode to its name and description e.g.
Definition: opcodes.c:37
#define OP_TIMEOUT
1 second with no events
Definition: opcodes.h:34
#define OP_REPAINT
Repaint is needed.
Definition: opcodes.h:32
#define OP_ABORT
$abort_key pressed (Ctrl-G)
Definition: opcodes.h:35
Incomplete keybinding.
Definition: opcodes.h:33
+ Here is the caller graph for this function:

◆ opcodes_get_name()

const char * opcodes_get_name ( int  op)

Get the name of an opcode.

opOpcode, e.g. OP_HELP
Return values
strName of the opcode

Definition at line 48 of file opcodes.c.

50 if ((op < OP_REPAINT) || (op >= OP_MAX))
51 return "[UNKNOWN]";
53 if (op == OP_ABORT)
54 return "OP_ABORT";
55 if (op == OP_TIMEOUT)
56 return "OP_TIMEOUT";
57 if (op == OP_PARTIAL_KEY)
58 return "OP_PARTIAL_KEY";
59 if (op == OP_REPAINT)
60 return "OP_REPAINT";
62 return OpStrings[op][0];
+ Here is the caller graph for this function: