NeoMutt  2023-03-22
Teaching an old dog new tricks
functions.h File Reference

Browser functions. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  BrowserFunction
 A NeoMutt function. More...


typedef int(* browser_function_t) (struct BrowserPrivateData *priv, int op)


int browser_function_dispatcher (struct MuttWindow *win_browser, int op)
 Perform a Browser function. More...


struct BrowserFunction BrowserFunctions []
 All the NeoMutt functions that the Browser supports. More...

Detailed Description

Browser functions.

  • 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

Definition in file functions.h.

Typedef Documentation

◆ browser_function_t

typedef int(* browser_function_t) (struct BrowserPrivateData *priv, int op)

Definition at line 38 of file functions.h.

Function Documentation

◆ browser_function_dispatcher()

int browser_function_dispatcher ( struct MuttWindow win_browser,
int  op 

Perform a Browser function.

win_browserWindow for the Index
opOperation to perform, e.g. OP_GOTO_PARENT
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 1142 of file functions.c.

1144 if (!win_browser)
1145 {
1147 return FR_ERROR;
1148 }
1150 struct BrowserPrivateData *priv = win_browser->parent->wdata;
1151 if (!priv)
1152 return FR_ERROR;
1154 int rc = FR_UNKNOWN;
1155 for (size_t i = 0; BrowserFunctions[i].op != OP_NULL; i++)
1156 {
1157 const struct BrowserFunction *fn = &BrowserFunctions[i];
1158 if (fn->op == op)
1159 {
1160 rc = fn->function(priv, op);
1161 break;
1162 }
1163 }
1165 return rc;
struct BrowserFunction BrowserFunctions[]
All the NeoMutt functions that the Browser supports.
Definition: functions.c:1086
static const char * Not_available_in_this_menu
Definition: functions.c:63
Unknown function.
Definition: dispatcher.h:33
Valid function - error occurred.
Definition: dispatcher.h:38
#define mutt_error(...)
Definition: logging.h:87
#define _(a)
Definition: message.h:28
A NeoMutt function.
Definition: functions.h:44
int op
Op code, e.g. OP_MAIN_LIMIT.
Definition: functions.h:45
browser_function_t function
Function to call.
Definition: functions.h:46
Private state data for the Browser.
Definition: private_data.h:34
struct MuttWindow * win_browser
Browser Window.
Definition: private_data.h:52
void * wdata
Private data.
Definition: mutt_window.h:145
struct MuttWindow * parent
Parent Window.
Definition: mutt_window.h:135
+ Here is the caller graph for this function:

Variable Documentation

◆ BrowserFunctions

struct BrowserFunction BrowserFunctions[]

All the NeoMutt functions that the Browser supports.

Definition at line 1086 of file functions.c.