summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-07-12 12:11:00 +0100
committerSolomon Peachy <pizza@shaftnet.org>2024-04-21 20:37:26 -0400
commitfd4a10719d2b0a632c425ca7267d8819f4e2cb36 (patch)
tree9bdb789755f2ee3b2a1a62805c6307ead6e90d47
parent7b1dd6b60a1b39468be02bb7a1e71f4be354ce0f (diff)
downloadrockbox-fd4a10719d.tar.gz
rockbox-fd4a10719d.zip
apps: Move action_cur_t and action_last_t to action.c
These types are not needed outside action.c. Change-Id: I71d25edf30811022fba32a548906755cf46cd694
-rw-r--r--apps/action.c48
-rw-r--r--apps/action.h48
2 files changed, 48 insertions, 48 deletions
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;