From fd4a10719d2b0a632c425ca7267d8819f4e2cb36 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 12 Jul 2022 12:11:00 +0100 Subject: apps: Move action_cur_t and action_last_t to action.c These types are not needed outside action.c. Change-Id: I71d25edf30811022fba32a548906755cf46cd694 --- apps/action.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ apps/action.h | 48 ------------------------------------------------ 2 files changed, 48 insertions(+), 48 deletions(-) (limited to 'apps') diff --git a/apps/action.c b/apps/action.c index 208fea4a97..2286e9fe29 100644 --- a/apps/action.c +++ b/apps/action.c @@ -58,6 +58,54 @@ #define REPEAT_WINDOW_TICKS HZ/4 #define ACTION_FILTER_TICKS HZ/2 /* timeout between filtered actions SL/BL */ +/* act_cur holds action state during get_action() call */ +typedef struct +{ + int action; + int button; + int context; + int timeout; + const struct button_mapping *items; + const struct button_mapping* (*get_context_map)(int); + bool is_prebutton; +} action_cur_t; + +/* act_last holds action state between get_action() calls */ +typedef struct +{ + int action; + long tick; + int button; + int context; + intptr_t data; + +#if defined(HAVE_BACKLIGHT) + unsigned int backlight_mask; + long bl_filter_tick; +#endif + +#if !defined(HAS_BUTTON_HOLD) + long sl_filter_tick; + unsigned int softlock_mask; + int unlock_combo; + bool keys_locked; + bool screen_has_lock; + +#endif + + bool repeated; + bool wait_for_release; + +#ifndef DISABLE_ACTION_REMAP + int key_remap; +#endif + +#ifdef HAVE_TOUCHSCREEN + bool ts_short_press; + int ts_data; +#endif +} action_last_t; + /* holds the action state between calls to get_action \ get_action_custom) */ static action_last_t action_last = { diff --git a/apps/action.h b/apps/action.h index 6e1278b33c..d88b9a51a8 100644 --- a/apps/action.h +++ b/apps/action.h @@ -379,54 +379,6 @@ enum { LAST_ACTION_PLACEHOLDER, /* custom actions should be this + something */ }; - /* act_cur holds action state during get_action() call */ -typedef struct -{ - int action; - int button; - int context; - int timeout; - const struct button_mapping *items; - const struct button_mapping* (*get_context_map)(int); - bool is_prebutton; -} action_cur_t; - -/* act_last holds action state between get_action() calls */ -typedef struct -{ - int action; - long tick; - int button; - int context; - intptr_t data; - -#if defined(HAVE_BACKLIGHT) - unsigned int backlight_mask; - long bl_filter_tick; -#endif - -#if !defined(HAS_BUTTON_HOLD) - long sl_filter_tick; - unsigned int softlock_mask; - int unlock_combo; - bool keys_locked; - bool screen_has_lock; - -#endif - - bool repeated; - bool wait_for_release; - -#ifndef DISABLE_ACTION_REMAP - int key_remap; -#endif - -#ifdef HAVE_TOUCHSCREEN - bool ts_short_press; - int ts_data; -#endif -} action_last_t; - struct button_mapping { int action_code; int button_code; -- cgit v1.2.3