summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2017-08-30 16:15:39 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2017-08-30 16:15:39 +0200
commit6cb26c2f27020e52053b1f1b7e611dc4e657cd99 (patch)
tree73e9e97b7a3dc6308e62f345ce9dc2cc4e2ce1d3
parent04fb4caf8f21b0d6161c0c07f4ce30d28ff7142b (diff)
downloadcalcurse-6cb26c2f27020e52053b1f1b7e611dc4e657cd99.tar.gz
calcurse-6cb26c2f27020e52053b1f1b7e611dc4e657cd99.zip
Relocate HANDLE_KEY macros
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/calcurse.c90
1 files changed, 44 insertions, 46 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 0f8ad30..c3bd84e 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -660,55 +660,53 @@ int main(int argc, char **argv)
key = keys_getch(win[KEY].p, &count, &reg);
switch (key) {
+ HANDLE_KEY(KEY_GENERIC_CHANGE_VIEW, key_generic_change_view);
+ HANDLE_KEY(KEY_GENERIC_OTHER_CMD, key_generic_other_cmd);
+ HANDLE_KEY(KEY_GENERIC_GOTO, key_generic_goto);
+ HANDLE_KEY(KEY_GENERIC_GOTO_TODAY, key_generic_goto_today);
+ HANDLE_KEY(KEY_VIEW_ITEM, key_view_item);
+ HANDLE_KEY(KEY_GENERIC_CONFIG_MENU, key_generic_config_menu);
+ HANDLE_KEY(KEY_GENERIC_ADD_APPT, key_generic_add_appt);
+ HANDLE_KEY(KEY_GENERIC_ADD_TODO, key_generic_add_todo);
+ HANDLE_KEY(KEY_ADD_ITEM, key_add_item);
+ HANDLE_KEY(KEY_EDIT_ITEM, key_edit_item);
+ HANDLE_KEY(KEY_DEL_ITEM, key_del_item);
+ HANDLE_KEY(KEY_GENERIC_COPY, key_generic_copy);
+ HANDLE_KEY(KEY_GENERIC_PASTE, key_generic_paste);
+ HANDLE_KEY(KEY_REPEAT_ITEM, key_repeat_item);
+ HANDLE_KEY(KEY_FLAG_ITEM, key_flag_item);
+ HANDLE_KEY(KEY_PIPE_ITEM, key_pipe_item);
+ HANDLE_KEY(KEY_RAISE_PRIORITY, key_raise_priority);
+ HANDLE_KEY(KEY_LOWER_PRIORITY, key_lower_priority);
+ HANDLE_KEY(KEY_EDIT_NOTE, key_edit_note);
+ HANDLE_KEY(KEY_VIEW_NOTE, key_view_note);
+ HANDLE_KEY(KEY_GENERIC_CREDITS, key_generic_credits);
+ HANDLE_KEY(KEY_GENERIC_HELP, key_generic_help);
+ HANDLE_KEY(KEY_GENERIC_SAVE, key_generic_save);
+ HANDLE_KEY(KEY_GENERIC_RELOAD, key_generic_reload);
+ HANDLE_KEY(KEY_GENERIC_IMPORT, key_generic_import);
+ HANDLE_KEY(KEY_GENERIC_EXPORT, key_generic_export);
+ HANDLE_KEY(KEY_GENERIC_PREV_DAY, key_generic_prev_day);
+ HANDLE_KEY(KEY_MOVE_LEFT, key_move_left);
+ HANDLE_KEY(KEY_GENERIC_NEXT_DAY, key_generic_next_day);
+ HANDLE_KEY(KEY_MOVE_RIGHT, key_move_right);
+ HANDLE_KEY(KEY_GENERIC_PREV_WEEK, key_generic_prev_week);
+ HANDLE_KEY(KEY_MOVE_UP, key_move_up);
+ HANDLE_KEY(KEY_GENERIC_NEXT_WEEK, key_generic_next_week);
+ HANDLE_KEY(KEY_MOVE_DOWN, key_move_down);
+ HANDLE_KEY(KEY_GENERIC_PREV_MONTH, key_generic_prev_month);
+ HANDLE_KEY(KEY_GENERIC_NEXT_MONTH, key_generic_next_month);
+ HANDLE_KEY(KEY_GENERIC_PREV_YEAR, key_generic_prev_year);
+ HANDLE_KEY(KEY_GENERIC_NEXT_YEAR, key_generic_next_year);
+ HANDLE_KEY(KEY_START_OF_WEEK, key_start_of_week);
+ HANDLE_KEY(KEY_END_OF_WEEK, key_end_of_week);
+ HANDLE_KEY(KEY_GENERIC_SCROLL_UP, key_generic_scroll_up);
+ HANDLE_KEY(KEY_GENERIC_SCROLL_DOWN, key_generic_scroll_down);
+ HANDLE_KEY(KEY_GENERIC_QUIT, key_generic_quit);
+ HANDLE_KEY(KEY_GENERIC_CMD, key_generic_cmd);
case KEY_GENERIC_REDRAW:
resize = 1;
break;
-
- HANDLE_KEY(KEY_GENERIC_CHANGE_VIEW, key_generic_change_view);
- HANDLE_KEY(KEY_GENERIC_OTHER_CMD, key_generic_other_cmd);
- HANDLE_KEY(KEY_GENERIC_GOTO, key_generic_goto);
- HANDLE_KEY(KEY_GENERIC_GOTO_TODAY, key_generic_goto_today);
- HANDLE_KEY(KEY_VIEW_ITEM, key_view_item);
- HANDLE_KEY(KEY_GENERIC_CONFIG_MENU, key_generic_config_menu);
- HANDLE_KEY(KEY_GENERIC_ADD_APPT, key_generic_add_appt);
- HANDLE_KEY(KEY_GENERIC_ADD_TODO, key_generic_add_todo);
- HANDLE_KEY(KEY_ADD_ITEM, key_add_item);
- HANDLE_KEY(KEY_EDIT_ITEM, key_edit_item);
- HANDLE_KEY(KEY_DEL_ITEM, key_del_item);
- HANDLE_KEY(KEY_GENERIC_COPY, key_generic_copy);
- HANDLE_KEY(KEY_GENERIC_PASTE, key_generic_paste);
- HANDLE_KEY(KEY_REPEAT_ITEM, key_repeat_item);
- HANDLE_KEY(KEY_FLAG_ITEM, key_flag_item);
- HANDLE_KEY(KEY_PIPE_ITEM, key_pipe_item);
- HANDLE_KEY(KEY_RAISE_PRIORITY, key_raise_priority);
- HANDLE_KEY(KEY_LOWER_PRIORITY, key_lower_priority);
- HANDLE_KEY(KEY_EDIT_NOTE, key_edit_note);
- HANDLE_KEY(KEY_VIEW_NOTE, key_view_note);
- HANDLE_KEY(KEY_GENERIC_CREDITS, key_generic_credits);
- HANDLE_KEY(KEY_GENERIC_HELP, key_generic_help);
- HANDLE_KEY(KEY_GENERIC_SAVE, key_generic_save);
- HANDLE_KEY(KEY_GENERIC_RELOAD, key_generic_reload);
- HANDLE_KEY(KEY_GENERIC_IMPORT, key_generic_import);
- HANDLE_KEY(KEY_GENERIC_EXPORT, key_generic_export);
- HANDLE_KEY(KEY_GENERIC_PREV_DAY, key_generic_prev_day);
- HANDLE_KEY(KEY_MOVE_LEFT, key_move_left);
- HANDLE_KEY(KEY_GENERIC_NEXT_DAY, key_generic_next_day);
- HANDLE_KEY(KEY_MOVE_RIGHT, key_move_right);
- HANDLE_KEY(KEY_GENERIC_PREV_WEEK, key_generic_prev_week);
- HANDLE_KEY(KEY_MOVE_UP, key_move_up);
- HANDLE_KEY(KEY_GENERIC_NEXT_WEEK, key_generic_next_week);
- HANDLE_KEY(KEY_MOVE_DOWN, key_move_down);
- HANDLE_KEY(KEY_GENERIC_PREV_MONTH, key_generic_prev_month);
- HANDLE_KEY(KEY_GENERIC_NEXT_MONTH, key_generic_next_month);
- HANDLE_KEY(KEY_GENERIC_PREV_YEAR, key_generic_prev_year);
- HANDLE_KEY(KEY_GENERIC_NEXT_YEAR, key_generic_next_year);
- HANDLE_KEY(KEY_START_OF_WEEK, key_start_of_week);
- HANDLE_KEY(KEY_END_OF_WEEK, key_end_of_week);
- HANDLE_KEY(KEY_GENERIC_SCROLL_UP, key_generic_scroll_up);
- HANDLE_KEY(KEY_GENERIC_SCROLL_DOWN, key_generic_scroll_down);
- HANDLE_KEY(KEY_GENERIC_QUIT, key_generic_quit);
- HANDLE_KEY(KEY_GENERIC_CMD, key_generic_cmd);
-
case KEY_RESIZE:
case ERR:
/* Do not reset the count parameter on resize or error. */