NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
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.

Macros

#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_NOTMUCH(_fmt)
 
#define OPS_PGP(_fmt)
 
#define OPS_SIDEBAR(_fmt)
 
#define OPS_SMIME(_fmt)
 
#define OPS(_fmt)
 
#define DEFINE_OPS(opcode, help_string)   opcode,
 

Enumerations

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

Functions

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.

Authors
  • Damien Riegel
  • Richard Russon
  • Pietro Cerutti

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 opcodes.h.

Macro Definition Documentation

◆ OP_REPAINT

#define OP_REPAINT   -4

Repaint is needed.

Definition at line 34 of file opcodes.h.

◆ OP_PARTIAL_KEY

#define OP_PARTIAL_KEY   -3

Incomplete keybinding.

Definition at line 35 of file opcodes.h.

◆ OP_TIMEOUT

#define OP_TIMEOUT   -2

1 second with no events

Definition at line 36 of file opcodes.h.

◆ OP_ABORT

#define OP_ABORT   -1

$abort_key pressed (Ctrl-G)

Definition at line 37 of file opcodes.h.

◆ OPS_ATTACHMENT

#define OPS_ATTACHMENT (   _fmt)

Definition at line 40 of file opcodes.h.

◆ OPS_AUTOCRYPT

#define OPS_AUTOCRYPT (   _fmt)
Value:
/* L10N: Help screen description for OP_AUTOCRYPT_ACCT_MENU */ \
/* Index: <op_autocrypt_acct_menu> */ \
_fmt(OP_AUTOCRYPT_ACCT_MENU, N_("manage autocrypt accounts")) \
/* L10N: Help screen description for OP_AUTOCRYPT_CREATE_ACCT */ \
/* Autocrypt Dialog: <op_autocrypt_create_acct> */ \
_fmt(OP_AUTOCRYPT_CREATE_ACCT, N_("create a new autocrypt account")) \
/* L10N: Help screen description for OP_AUTOCRYPT_DELETE_ACCT */ \
/* Autocrypt Dialog: <op_autocrypt_delete_acct> */ \
_fmt(OP_AUTOCRYPT_DELETE_ACCT, N_("delete the current account")) \
/* L10N: Help screen description for OP_AUTOCRYPT_TOGGLE_ACTIVE */ \
/* Autocrypt Dialog: <op_autocrypt_toggle_active> */ \
_fmt(OP_AUTOCRYPT_TOGGLE_ACTIVE, N_("toggle the current account active/inactive")) \
/* L10N: Help screen description for OP_AUTOCRYPT_TOGGLE_PREFER */ \
/* Autocrypt Dialog: <op_autocrypt_toggle_prefer> */ \
_fmt(OP_AUTOCRYPT_TOGGLE_PREFER, N_("toggle the current account prefer-encrypt flag")) \
/* L10N: Help screen description for OP_COMPOSE_AUTOCRYPT_MENU */ \
/* Envelope Window: <op_compose_autocrypt_menu> */ \
_fmt(OP_COMPOSE_AUTOCRYPT_MENU, N_("show autocrypt compose menu options"))
#define N_(a)
Definition: message.h:32

Definition at line 152 of file opcodes.h.

◆ OPS_CORE

#define OPS_CORE (   _fmt)

Definition at line 175 of file opcodes.h.

◆ OPS_CRYPT

#define OPS_CRYPT (   _fmt)
Value:
/* L10N: Help screen description for OP_DECRYPT_COPY */ \
/* Index: <op_save> */ \
_fmt(OP_DECRYPT_COPY, N_("make decrypted copy")) \
/* L10N: Help screen description for OP_DECRYPT_SAVE */ \
/* Index: <op_save> */ \
_fmt(OP_DECRYPT_SAVE, N_("make decrypted copy and delete")) \
/* L10N: Help screen description for OP_EXTRACT_KEYS */ \
/* Attach Dialog: <op_extract_keys> */ \
/* Index: <op_extract_keys> */ \
_fmt(OP_EXTRACT_KEYS, N_("extract supported public keys")) \
/* L10N: Help screen description for OP_FORGET_PASSPHRASE */ \
/* Attach Dialog: <op_forget_passphrase> */ \
/* Compose Dialog: <op_forget_passphrase> */ \
/* Index: <op_forget_passphrase> */ \
_fmt(OP_FORGET_PASSPHRASE, N_("wipe passphrases from memory")) \

Definition at line 837 of file opcodes.h.

◆ OPS_ENVELOPE

#define OPS_ENVELOPE (   _fmt)

Definition at line 854 of file opcodes.h.

◆ OPS_NOTMUCH

#define OPS_NOTMUCH (   _fmt)
Value:
/* L10N: Help screen description for OP_MAIN_CHANGE_VFOLDER */ \
/* Index: <op_main_change_folder> */ \
_fmt(OP_MAIN_CHANGE_VFOLDER, N_("open a different virtual folder")) \
/* L10N: Help screen description for OP_MAIN_ENTIRE_THREAD */ \
/* Index: <op_main_entire_thread> */ \
_fmt(OP_MAIN_ENTIRE_THREAD, N_("read entire thread of the current message")) \
/* L10N: Help screen description for OP_MAIN_VFOLDER_FROM_QUERY */ \
/* Index: <op_main_vfolder_from_query> */ \
_fmt(OP_MAIN_VFOLDER_FROM_QUERY, N_("generate virtual folder from query")) \
/* L10N: Help screen description for OP_MAIN_VFOLDER_FROM_QUERY_READONLY */ \
/* Index: <op_main_vfolder_from_query> */ \
_fmt(OP_MAIN_VFOLDER_FROM_QUERY_READONLY, N_("generate a read-only virtual folder from query")) \
/* L10N: Help screen description for OP_MAIN_WINDOWED_VFOLDER_BACKWARD */ \
/* Index: <op_main_windowed_vfolder> */ \
_fmt(OP_MAIN_WINDOWED_VFOLDER_BACKWARD, N_("shifts virtual folder time window backwards")) \
/* L10N: Help screen description for OP_MAIN_WINDOWED_VFOLDER_FORWARD */ \
/* Index: <op_main_windowed_vfolder> */ \
_fmt(OP_MAIN_WINDOWED_VFOLDER_FORWARD, N_("shifts virtual folder time window forwards")) \
/* L10N: Help screen description for OP_MAIN_WINDOWED_VFOLDER_RESET */ \
/* Index: <op_main_windowed_vfolder> */ \
_fmt(OP_MAIN_WINDOWED_VFOLDER_RESET, N_("resets virtual folder time window to the present"))

Definition at line 890 of file opcodes.h.

◆ OPS_PGP

#define OPS_PGP (   _fmt)
Value:
/* L10N: Help screen description for OP_ATTACHMENT_ATTACH_KEY */ \
/* Compose Dialog: <op_attachment_attach_key> */ \
_fmt(OP_ATTACHMENT_ATTACH_KEY, N_("attach a PGP public key")) \
/* L10N: Help screen description for OP_CHECK_TRADITIONAL */ \
/* Attach Dialog: <op_check_traditional> */ \
/* Index: <op_check_traditional> */ \
_fmt(OP_CHECK_TRADITIONAL, N_("check for classic PGP")) \
/* L10N: Help screen description for OP_COMPOSE_PGP_MENU */ \
/* Envelope Window: <op_compose_pgp_menu> */ \
_fmt(OP_COMPOSE_PGP_MENU, N_("show PGP options")) \
/* L10N: Help screen description for OP_MAIL_KEY */ \
/* Index: <op_mail_key> */ \
_fmt(OP_MAIL_KEY, N_("mail a PGP public key")) \
/* L10N: Help screen description for OP_VERIFY_KEY */ \
/* GPGME Key Selection Dialog: <op_verify_key> */ \
/* PGP Key Selection Dialog: <op_verify_key> */ \
_fmt(OP_VERIFY_KEY, N_("verify a PGP public key")) \
/* L10N: Help screen description for OP_VIEW_ID */ \
/* GPGME Key Selection Dialog: <op_view_id> */ \
/* PGP Key Selection Dialog: <op_view_id> */ \
_fmt(OP_VIEW_ID, N_("view the key's user id")) \

Definition at line 916 of file opcodes.h.

◆ OPS_SIDEBAR

#define OPS_SIDEBAR (   _fmt)

Definition at line 939 of file opcodes.h.

◆ OPS_SMIME

#define OPS_SMIME (   _fmt)
Value:
/* L10N: Help screen description for OP_COMPOSE_SMIME_MENU */ \
/* Envelope Window: <op_compose_smime_menu> */ \
_fmt(OP_COMPOSE_SMIME_MENU, N_("show S/MIME options")) \

Definition at line 974 of file opcodes.h.

◆ OPS

#define OPS (   _fmt)
Value:
_fmt(OP_NULL, N_("null operation")) \
OPS_ATTACHMENT(_fmt) \
OPS_AUTOCRYPT(_fmt) \
OPS_CORE(_fmt) \
OPS_CRYPT(_fmt) \
OPS_ENVELOPE(_fmt) \
OPS_NOTMUCH(_fmt) \
OPS_PGP(_fmt) \
OPS_SIDEBAR(_fmt) \
OPS_SMIME(_fmt) \

Definition at line 979 of file opcodes.h.

◆ DEFINE_OPS

#define DEFINE_OPS (   opcode,
  help_string 
)    opcode,

Definition at line 997 of file opcodes.h.

Enumeration Type Documentation

◆ MuttOps

enum MuttOps

All NeoMutt Opcodes.

Opcodes, e.g. OP_TOGGLE_NEW

Enumerator
OP_MAX 

Definition at line 996 of file opcodes.h.

996 {
997#define DEFINE_OPS(opcode, help_string) opcode,
999#undef DEFINE_OPS
1000 OP_MAX,
1001};
#define DEFINE_OPS(opcode, help_string)
Definition: opcodes.h:997
#define OPS(_fmt)
Definition: opcodes.h:979
@ OP_MAX
Definition: opcodes.h:1000

Function Documentation

◆ opcodes_get_description()

const char * opcodes_get_description ( int  op)

Get the description of an opcode.

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

Definition at line 70 of file opcodes.c.

71{
72 if ((op < OP_REPAINT) || (op >= OP_MAX))
73 return "[UNKNOWN]";
74
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";
83
84 return OpStrings[op][1];
85}
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:36
#define OP_REPAINT
Repaint is needed.
Definition: opcodes.h:34
#define OP_ABORT
$abort_key pressed (Ctrl-G)
Definition: opcodes.h:37
#define OP_PARTIAL_KEY
Incomplete keybinding.
Definition: opcodes.h:35
+ Here is the caller graph for this function:

◆ opcodes_get_name()

const char * opcodes_get_name ( int  op)

Get the name of an opcode.

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

Definition at line 48 of file opcodes.c.

49{
50 if ((op < OP_REPAINT) || (op >= OP_MAX))
51 return "[UNKNOWN]";
52
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";
61
62 return OpStrings[op][0];
63}
+ Here is the caller graph for this function: