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:
parent
4a4997c57b
commit
cd49b315d9
@ -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. */
|
/* We save these values due to delete_window() call below. */
|
||||||
menu_func_T func = it->func;
|
menu_func_T func = it->func;
|
||||||
void *it_data = it->data;
|
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;
|
if (!mi_is_selectable(it)) return;
|
||||||
|
|
||||||
@ -1387,7 +1387,7 @@ new_menu(menu_item_flags_T flags)
|
|||||||
|
|
||||||
void
|
void
|
||||||
add_to_menu(struct menu_item **mi, char *text, char *rtext,
|
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)
|
menu_item_flags_T flags)
|
||||||
{
|
{
|
||||||
int n = count_items(*mi);
|
int n = count_items(*mi);
|
||||||
|
@ -96,7 +96,7 @@ struct menu_item {
|
|||||||
* ``default'' handler defined in which case @rtext (if non NULL)
|
* ``default'' handler defined in which case @rtext (if non NULL)
|
||||||
* will be drawn and @func will be called when selecting the item. */
|
* will be drawn and @func will be called when selecting the item. */
|
||||||
char *rtext; /* Right aligned guiding text */
|
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 */
|
menu_func_T func; /* Called when selecting the item */
|
||||||
|
|
||||||
void *data; /* Private data passed to handler */
|
void *data; /* Private data passed to handler */
|
||||||
@ -170,7 +170,7 @@ struct menu_item *new_menu(menu_item_flags_T);
|
|||||||
|
|
||||||
void
|
void
|
||||||
add_to_menu(struct menu_item **mi, char *text, char *rtext,
|
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);
|
menu_item_flags_T flags);
|
||||||
|
|
||||||
#define add_menu_separator(menu) \
|
#define add_menu_separator(menu) \
|
||||||
|
@ -67,6 +67,8 @@ enum main_action {
|
|||||||
MAIN_ACTIONS,
|
MAIN_ACTIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef long main_action_T;
|
||||||
|
|
||||||
enum edit_action {
|
enum edit_action {
|
||||||
#include "config/actions-edit.inc"
|
#include "config/actions-edit.inc"
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ static int
|
|||||||
exmode_action_handler(struct session *ses, char *command,
|
exmode_action_handler(struct session *ses, char *command,
|
||||||
char *args)
|
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_NONE) return 0;
|
||||||
if (action_id == ACT_MAIN_QUIT) action_id = ACT_MAIN_REALLY_QUIT;
|
if (action_id == ACT_MAIN_QUIT) action_id = ACT_MAIN_REALLY_QUIT;
|
||||||
|
@ -65,7 +65,7 @@ goto_url_action(struct session *ses,
|
|||||||
/* Many execution paths may lead to this code so it needs to take appropriate
|
/* 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. */
|
* precausions to stuff like doc_view and doc_view->vs being NULL. */
|
||||||
enum frame_event_status
|
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;
|
enum frame_event_status status = FRAME_EVENT_OK;
|
||||||
struct terminal *term = ses->tab->term;
|
struct terminal *term = ses->tab->term;
|
||||||
|
@ -21,7 +21,7 @@ enum frame_event_status {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum frame_event_status do_action(struct session *ses,
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -1757,7 +1757,7 @@ link_typeahead_handler(struct input_line *line, int action_id)
|
|||||||
|
|
||||||
/* Hack time .. should we change mode? */
|
/* Hack time .. should we change mode? */
|
||||||
if (!line->data) {
|
if (!line->data) {
|
||||||
enum main_action action_id = ACT_MAIN_NONE;
|
main_action_T action_id = ACT_MAIN_NONE;
|
||||||
|
|
||||||
switch (*buffer) {
|
switch (*buffer) {
|
||||||
case '#':
|
case '#':
|
||||||
|
@ -1622,7 +1622,7 @@ send_mouse_event(struct session *ses, struct document_view *doc_view,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
try_typeahead(struct session *ses, struct document_view *doc_view,
|
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)) {
|
switch (get_opt_int("document.browse.search.typeahead", ses)) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -1676,7 +1676,7 @@ send_kbd_event(struct session *ses, struct document_view *doc_view,
|
|||||||
struct term_event *ev)
|
struct term_event *ev)
|
||||||
{
|
{
|
||||||
int event;
|
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)
|
if (doc_view && send_to_frame(ses, doc_view, ev) != FRAME_EVENT_IGNORED)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user