diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-12-15 03:07:18 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-12-16 01:44:05 -0500 |
commit | 28f768cb8421025c15f1970d2724d467f845f055 (patch) | |
tree | 9942124a1e8117605e10dd05a6dcf46b781872ae /apps/onplay.h | |
parent | 31759c9e53761eac75a33d6d702d43c76d942ae8 (diff) | |
download | rockbox-28f768cb8421025c15f1970d2724d467f845f055.tar.gz rockbox-28f768cb8421025c15f1970d2724d467f845f055.zip |
onplay hotkey add flags
idea here as discussed with chris_s is to allow flags
in the hotkey_assignment struct to change how items are displayed
Change-Id: Id4cf1d79fbe3ff8f5590b9a863fccf00ddd457f9
Diffstat (limited to 'apps/onplay.h')
-rw-r--r-- | apps/onplay.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/apps/onplay.h b/apps/onplay.h index 80e0371eaf..98d93b368c 100644 --- a/apps/onplay.h +++ b/apps/onplay.h | |||
@@ -21,6 +21,10 @@ | |||
21 | #ifndef _ONPLAY_H_ | 21 | #ifndef _ONPLAY_H_ |
22 | #define _ONPLAY_H_ | 22 | #define _ONPLAY_H_ |
23 | 23 | ||
24 | #ifdef HAVE_HOTKEY | ||
25 | #include "menu.h" | ||
26 | #endif | ||
27 | |||
24 | int onplay(char* file, int attr, int from_screen, bool hotkey); | 28 | int onplay(char* file, int attr, int from_screen, bool hotkey); |
25 | int get_onplay_context(void); | 29 | int get_onplay_context(void); |
26 | 30 | ||
@@ -37,15 +41,12 @@ enum { | |||
37 | }; | 41 | }; |
38 | 42 | ||
39 | #ifdef HAVE_HOTKEY | 43 | #ifdef HAVE_HOTKEY |
40 | int get_hotkey_lang_id(int action); | ||
41 | 44 | ||
42 | enum hotkey_action { | 45 | enum hotkey_action { |
43 | HOTKEY_OFF = 0, | 46 | HOTKEY_OFF = 0, |
44 | HOTKEY_VIEW_PLAYLIST, | 47 | HOTKEY_VIEW_PLAYLIST, |
45 | HOTKEY_PROPERTIES, | 48 | HOTKEY_PROPERTIES, |
46 | #ifdef HAVE_TAGCACHE | ||
47 | HOTKEY_PICTUREFLOW, | 49 | HOTKEY_PICTUREFLOW, |
48 | #endif | ||
49 | HOTKEY_SHOW_TRACK_INFO, | 50 | HOTKEY_SHOW_TRACK_INFO, |
50 | HOTKEY_PITCHSCREEN, | 51 | HOTKEY_PITCHSCREEN, |
51 | HOTKEY_OPEN_WITH, | 52 | HOTKEY_OPEN_WITH, |
@@ -55,6 +56,22 @@ enum hotkey_action { | |||
55 | HOTKEY_INSERT, | 56 | HOTKEY_INSERT, |
56 | HOTKEY_INSERT_SHUFFLED, | 57 | HOTKEY_INSERT_SHUFFLED, |
57 | }; | 58 | }; |
59 | enum hotkey_flags { | ||
60 | HOTKEY_FLAG_NONE = 0x0, | ||
61 | HOTKEY_FLAG_WPS = 0x1, | ||
62 | HOTKEY_FLAG_TREE = 0x2, | ||
63 | HOTKEY_FLAG_NOSBS = 0x4, | ||
64 | }; | ||
65 | |||
66 | struct hotkey_assignment { | ||
67 | int action; /* hotkey_action */ | ||
68 | int lang_id; /* Language ID */ | ||
69 | struct menu_func func; /* Function to run if this entry is selected */ | ||
70 | int16_t return_code; /* What to return after the function is run. */ | ||
71 | uint16_t flags; /* Flags what context, display options */ | ||
72 | }; /* (Pick ONPLAY_FUNC_RETURN to use function's return value) */ | ||
73 | |||
74 | const struct hotkey_assignment *get_hotkey(int action); | ||
58 | #endif | 75 | #endif |
59 | 76 | ||
60 | /* needed for the playlist viewer.. eventually clean this up */ | 77 | /* needed for the playlist viewer.. eventually clean this up */ |