diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-07-12 12:11:00 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-04-21 20:37:26 -0400 |
commit | fd4a10719d2b0a632c425ca7267d8819f4e2cb36 (patch) | |
tree | 9bdb789755f2ee3b2a1a62805c6307ead6e90d47 | |
parent | 7b1dd6b60a1b39468be02bb7a1e71f4be354ce0f (diff) | |
download | rockbox-fd4a10719d2b0a632c425ca7267d8819f4e2cb36.tar.gz rockbox-fd4a10719d2b0a632c425ca7267d8819f4e2cb36.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.c | 48 | ||||
-rw-r--r-- | apps/action.h | 48 |
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 @@ | |||
58 | #define REPEAT_WINDOW_TICKS HZ/4 | 58 | #define REPEAT_WINDOW_TICKS HZ/4 |
59 | #define ACTION_FILTER_TICKS HZ/2 /* timeout between filtered actions SL/BL */ | 59 | #define ACTION_FILTER_TICKS HZ/2 /* timeout between filtered actions SL/BL */ |
60 | 60 | ||
61 | /* act_cur holds action state during get_action() call */ | ||
62 | typedef struct | ||
63 | { | ||
64 | int action; | ||
65 | int button; | ||
66 | int context; | ||
67 | int timeout; | ||
68 | const struct button_mapping *items; | ||
69 | const struct button_mapping* (*get_context_map)(int); | ||
70 | bool is_prebutton; | ||
71 | } action_cur_t; | ||
72 | |||
73 | /* act_last holds action state between get_action() calls */ | ||
74 | typedef struct | ||
75 | { | ||
76 | int action; | ||
77 | long tick; | ||
78 | int button; | ||
79 | int context; | ||
80 | intptr_t data; | ||
81 | |||
82 | #if defined(HAVE_BACKLIGHT) | ||
83 | unsigned int backlight_mask; | ||
84 | long bl_filter_tick; | ||
85 | #endif | ||
86 | |||
87 | #if !defined(HAS_BUTTON_HOLD) | ||
88 | long sl_filter_tick; | ||
89 | unsigned int softlock_mask; | ||
90 | int unlock_combo; | ||
91 | bool keys_locked; | ||
92 | bool screen_has_lock; | ||
93 | |||
94 | #endif | ||
95 | |||
96 | bool repeated; | ||
97 | bool wait_for_release; | ||
98 | |||
99 | #ifndef DISABLE_ACTION_REMAP | ||
100 | int key_remap; | ||
101 | #endif | ||
102 | |||
103 | #ifdef HAVE_TOUCHSCREEN | ||
104 | bool ts_short_press; | ||
105 | int ts_data; | ||
106 | #endif | ||
107 | } action_last_t; | ||
108 | |||
61 | /* holds the action state between calls to get_action \ get_action_custom) */ | 109 | /* holds the action state between calls to get_action \ get_action_custom) */ |
62 | static action_last_t action_last = | 110 | static action_last_t action_last = |
63 | { | 111 | { |
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 { | |||
379 | LAST_ACTION_PLACEHOLDER, /* custom actions should be this + something */ | 379 | LAST_ACTION_PLACEHOLDER, /* custom actions should be this + something */ |
380 | }; | 380 | }; |
381 | 381 | ||
382 | /* act_cur holds action state during get_action() call */ | ||
383 | typedef struct | ||
384 | { | ||
385 | int action; | ||
386 | int button; | ||
387 | int context; | ||
388 | int timeout; | ||
389 | const struct button_mapping *items; | ||
390 | const struct button_mapping* (*get_context_map)(int); | ||
391 | bool is_prebutton; | ||
392 | } action_cur_t; | ||
393 | |||
394 | /* act_last holds action state between get_action() calls */ | ||
395 | typedef struct | ||
396 | { | ||
397 | int action; | ||
398 | long tick; | ||
399 | int button; | ||
400 | int context; | ||
401 | intptr_t data; | ||
402 | |||
403 | #if defined(HAVE_BACKLIGHT) | ||
404 | unsigned int backlight_mask; | ||
405 | long bl_filter_tick; | ||
406 | #endif | ||
407 | |||
408 | #if !defined(HAS_BUTTON_HOLD) | ||
409 | long sl_filter_tick; | ||
410 | unsigned int softlock_mask; | ||
411 | int unlock_combo; | ||
412 | bool keys_locked; | ||
413 | bool screen_has_lock; | ||
414 | |||
415 | #endif | ||
416 | |||
417 | bool repeated; | ||
418 | bool wait_for_release; | ||
419 | |||
420 | #ifndef DISABLE_ACTION_REMAP | ||
421 | int key_remap; | ||
422 | #endif | ||
423 | |||
424 | #ifdef HAVE_TOUCHSCREEN | ||
425 | bool ts_short_press; | ||
426 | int ts_data; | ||
427 | #endif | ||
428 | } action_last_t; | ||
429 | |||
430 | struct button_mapping { | 382 | struct button_mapping { |
431 | int action_code; | 383 | int action_code; |
432 | int button_code; | 384 | int button_code; |