NeoMutt  2025-12-11-949-g4870ee
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.c File Reference

Fuzzy functions. More...

#include "config.h"
#include <string.h>
#include "mutt/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "fuzzy/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "module_data.h"
+ Include dependency graph for functions.c:

Go to the source code of this file.

Functions

void fuzzy_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic)
 Initialise the Fuzzy Keybindings - Implements ::init_keys_api.
 
struct SubMenufuzzy_get_submenu (void)
 Get the Fuzzy SubMenu.
 

Variables

static const struct MenuFuncOp OpFuzzy []
 Functions for the Fuzzy Window.
 
const struct MenuOpSeq FuzzyDefaultBindings []
 Key bindings for the Fuzzy Window.
 

Detailed Description

Fuzzy functions.

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 functions.c.

Function Documentation

◆ fuzzy_init_keys()

void fuzzy_init_keys ( struct NeoMutt * n,
struct SubMenu * sm_generic )

Initialise the Fuzzy Keybindings - Implements ::init_keys_api.

Definition at line 70 of file functions.c.

71{
73 ASSERT(mod_data);
74
75 struct MenuDefinition *md = NULL;
76 struct SubMenu *sm = NULL;
77
79 md = km_register_menu(MENU_FUZZY, "fuzzy");
80 km_menu_add_submenu(md, sm);
82
83 mod_data->md_fuzzy = md;
84 mod_data->sm_fuzzy = sm;
85}
const struct MenuOpSeq FuzzyDefaultBindings[]
Key bindings for the Fuzzy Window.
Definition functions.c:56
static const struct MenuFuncOp OpFuzzy[]
Functions for the Fuzzy Window.
Definition functions.c:43
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
Definition init.c:123
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
Definition init.c:88
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
Definition init.c:105
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
Definition init.c:136
@ MODULE_ID_FUZZY
ModuleFuzzy, Fuzzy matching library
Definition module_api.h:67
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:666
#define ASSERT(COND)
Definition signal2.h:59
Fuzzy private Module data.
Definition module_data.h:32
struct MenuDefinition * md_fuzzy
Fuzzy Menu Definition.
Definition module_data.h:33
struct SubMenu * sm_fuzzy
Fuzzy functions.
Definition module_data.h:34
Functions for a Dialog or Window.
Definition menudef.h:44
Collection of related functions.
Definition menudef.h:33
@ MENU_FUZZY
Fuzzy searcher.
Definition type.h:43
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fuzzy_get_submenu()

struct SubMenu * fuzzy_get_submenu ( void )

Get the Fuzzy SubMenu.

Return values
ptrFuzzy SubMenu

Definition at line 91 of file functions.c.

92{
94 ASSERT(mod_data);
95
96 return mod_data->sm_fuzzy;
97}
Container for Accounts, Notifications.
Definition neomutt.h:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ OpFuzzy

const struct MenuFuncOp OpFuzzy[]
static
Initial value:
= {
{ "first-entry", OP_FIRST_ENTRY },
{ "last-entry", OP_LAST_ENTRY },
{ "next-entry", OP_NEXT_ENTRY },
{ "next-page", OP_NEXT_PAGE },
{ "previous-entry", OP_PREV_ENTRY },
{ "previous-page", OP_PREV_PAGE },
{ NULL, 0 },
}

Functions for the Fuzzy Window.

Definition at line 43 of file functions.c.

43 { /* map: fuzzy */
44 { "first-entry", OP_FIRST_ENTRY },
45 { "last-entry", OP_LAST_ENTRY },
46 { "next-entry", OP_NEXT_ENTRY },
47 { "next-page", OP_NEXT_PAGE },
48 { "previous-entry", OP_PREV_ENTRY },
49 { "previous-page", OP_PREV_PAGE },
50 { NULL, 0 },
51};

◆ FuzzyDefaultBindings

const struct MenuOpSeq FuzzyDefaultBindings[]
Initial value:
= {
{ OP_FIRST_ENTRY, "<home>" },
{ OP_LAST_ENTRY, "<end>" },
{ OP_NEXT_ENTRY, "<down>" },
{ OP_NEXT_PAGE, "<pagedown>" },
{ OP_PREV_ENTRY, "<up>" },
{ OP_PREV_PAGE, "<pageup>" },
{ 0, NULL },
}

Key bindings for the Fuzzy Window.

Definition at line 56 of file functions.c.

56 { /* map: fuzzy */
57 { OP_FIRST_ENTRY, "<home>" },
58 { OP_LAST_ENTRY, "<end>" },
59 { OP_NEXT_ENTRY, "<down>" },
60 { OP_NEXT_PAGE, "<pagedown>" },
61 { OP_PREV_ENTRY, "<up>" },
62 { OP_PREV_PAGE, "<pageup>" },
63 { 0, NULL },
64};