1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[action] enum main_action -> main_action_T

This commit is contained in:
Witold Filipczyk 2022-01-28 15:26:43 +01:00
parent 4a4997c57b
commit cd49b315d9
8 changed files with 12 additions and 10 deletions

View File

@ -141,7 +141,7 @@ select_menu_item(struct terminal *term, struct menu_item *it, void *data)
/* We save these values due to delete_window() call below. */
menu_func_T func = it->func;
void *it_data = it->data;
enum main_action action_id = it->action_id;
main_action_T action_id = it->action_id;
if (!mi_is_selectable(it)) return;
@ -1387,7 +1387,7 @@ new_menu(menu_item_flags_T flags)
void
add_to_menu(struct menu_item **mi, char *text, char *rtext,
enum main_action action_id, menu_func_T func, void *data,
main_action_T action_id, menu_func_T func, void *data,
menu_item_flags_T flags)
{
int n = count_items(*mi);

View File

@ -96,7 +96,7 @@ struct menu_item {
* ``default'' handler defined in which case @rtext (if non NULL)
* will be drawn and @func will be called when selecting the item. */
char *rtext; /* Right aligned guiding text */
enum main_action action_id; /* Default item handlers */
main_action_T action_id; /* Default item handlers */
menu_func_T func; /* Called when selecting the item */
void *data; /* Private data passed to handler */
@ -170,7 +170,7 @@ struct menu_item *new_menu(menu_item_flags_T);
void
add_to_menu(struct menu_item **mi, char *text, char *rtext,
enum main_action action_id, menu_func_T func, void *data,
main_action_T action_id, menu_func_T func, void *data,
menu_item_flags_T flags);
#define add_menu_separator(menu) \

View File

@ -67,6 +67,8 @@ enum main_action {
MAIN_ACTIONS,
};
typedef long main_action_T;
enum edit_action {
#include "config/actions-edit.inc"

View File

@ -41,7 +41,7 @@ static int
exmode_action_handler(struct session *ses, char *command,
char *args)
{
enum main_action action_id = get_action_from_string(KEYMAP_MAIN, command);
main_action_T action_id = get_action_from_string(KEYMAP_MAIN, command);
if (action_id == ACT_MAIN_NONE) return 0;
if (action_id == ACT_MAIN_QUIT) action_id = ACT_MAIN_REALLY_QUIT;

View File

@ -65,7 +65,7 @@ goto_url_action(struct session *ses,
/* Many execution paths may lead to this code so it needs to take appropriate
* precausions to stuff like doc_view and doc_view->vs being NULL. */
enum frame_event_status
do_action(struct session *ses, enum main_action action_id, int verbose)
do_action(struct session *ses, main_action_T action_id, int verbose)
{
enum frame_event_status status = FRAME_EVENT_OK;
struct terminal *term = ses->tab->term;

View File

@ -21,7 +21,7 @@ enum frame_event_status {
};
enum frame_event_status do_action(struct session *ses,
enum main_action action_id, int verbose);
main_action_T action_id, int verbose);
#ifdef __cplusplus
}

View File

@ -1757,7 +1757,7 @@ link_typeahead_handler(struct input_line *line, int action_id)
/* Hack time .. should we change mode? */
if (!line->data) {
enum main_action action_id = ACT_MAIN_NONE;
main_action_T action_id = ACT_MAIN_NONE;
switch (*buffer) {
case '#':

View File

@ -1622,7 +1622,7 @@ send_mouse_event(struct session *ses, struct document_view *doc_view,
static void
try_typeahead(struct session *ses, struct document_view *doc_view,
struct term_event *ev, enum main_action action_id)
struct term_event *ev, main_action_T action_id)
{
switch (get_opt_int("document.browse.search.typeahead", ses)) {
case 0:
@ -1676,7 +1676,7 @@ send_kbd_event(struct session *ses, struct document_view *doc_view,
struct term_event *ev)
{
int event;
enum main_action action_id;
main_action_T action_id;
if (doc_view && send_to_frame(ses, doc_view, ev) != FRAME_EVENT_IGNORED)
return NULL;