summaryrefslogtreecommitdiff
path: root/apps/keymaps/keymap-player.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-15 19:40:55 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch)
tree98ec96946eeb2ae709cb0528cc6998e21bb9b290 /apps/keymaps/keymap-player.c
parent17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff)
downloadrockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.gz
rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.zip
[1/4] Remove SH support and all archos targets
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
Diffstat (limited to 'apps/keymaps/keymap-player.c')
-rw-r--r--apps/keymaps/keymap-player.c165
1 files changed, 0 insertions, 165 deletions
diff --git a/apps/keymaps/keymap-player.c b/apps/keymaps/keymap-player.c
deleted file mode 100644
index bcfb4869df..0000000000
--- a/apps/keymaps/keymap-player.c
+++ /dev/null
@@ -1,165 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Jonathan Gordon
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22/* *
23 * Button Code Definitions for archos player targets
24 *
25 */
26
27#include "config.h"
28#include "action.h"
29#include "button.h"
30
31static const struct button_mapping button_context_standard[] = {
32 { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
33 { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
34 { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
35 { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
36
37 { ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
38 { ACTION_STD_CANCEL, BUTTON_STOP, BUTTON_NONE },
39 { ACTION_STD_OK, BUTTON_ON, BUTTON_NONE },
40 { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
41 { ACTION_STD_MENU, BUTTON_MENU, BUTTON_NONE },
42
43 LAST_ITEM_IN_LIST
44};
45
46static const struct button_mapping button_context_wps[] = {
47 { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
48 { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
49 { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
50 { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
51 { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
52 { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
53 { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
54 { ACTION_WPS_STOP, BUTTON_STOP, BUTTON_NONE },
55
56 { ACTION_WPS_VOLDOWN, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
57 { ACTION_WPS_VOLDOWN, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
58 { ACTION_WPS_VOLUP, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
59 { ACTION_WPS_VOLUP, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
60
61 { ACTION_WPS_BROWSE, BUTTON_ON|BUTTON_REL, BUTTON_ON },
62 { ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
63 { ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
64 { ACTION_STD_KEYLOCK, BUTTON_MENU|BUTTON_STOP, BUTTON_NONE },
65 { ACTION_WPS_HOTKEY, BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
66
67 LAST_ITEM_IN_LIST
68};
69
70static const struct button_mapping button_context_settings[] = {
71 { ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
72 { ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
73 { ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
74 { ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
75
76 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
77};
78
79static const struct button_mapping button_context_tree[] = {
80 { ACTION_TREE_WPS, BUTTON_ON, BUTTON_NONE },
81 { ACTION_TREE_HOTKEY, BUTTON_MENU|BUTTON_ON, BUTTON_NONE },
82
83 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
84}; /* button_context_listtree */
85
86static const struct button_mapping button_context_yesno[] = {
87 { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
88
89 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
90}; /* button_context_settings_yesno */
91
92static const struct button_mapping button_context_bmark[] = {
93 { ACTION_NONE, BUTTON_ON, BUTTON_NONE },
94 { ACTION_BMS_DELETE, BUTTON_PLAY|BUTTON_ON, BUTTON_NONE },
95
96 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
97}; /* button_context_settings_bmark */
98
99/*****************************************************************************
100 * Remote control mappings
101 *****************************************************************************/
102
103static const struct button_mapping remote_button_context_standard[] = {
104 { ACTION_STD_PREV, BUTTON_RC_LEFT, BUTTON_NONE },
105 { ACTION_STD_NEXT, BUTTON_RC_RIGHT, BUTTON_NONE },
106 { ACTION_STD_CANCEL, BUTTON_RC_STOP, BUTTON_NONE },
107 { ACTION_STD_OK, BUTTON_RC_PLAY, BUTTON_NONE },
108
109 LAST_ITEM_IN_LIST
110};
111
112static const struct button_mapping remote_button_context_wps[] = {
113 { ACTION_WPS_PLAY, BUTTON_RC_PLAY, BUTTON_NONE },
114 { ACTION_WPS_SKIPNEXT, BUTTON_RC_RIGHT, BUTTON_NONE },
115 { ACTION_WPS_SKIPPREV, BUTTON_RC_LEFT, BUTTON_NONE },
116 { ACTION_WPS_STOP, BUTTON_RC_STOP, BUTTON_NONE },
117
118 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
119 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
120
121 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
122};
123
124
125static const struct button_mapping* get_context_mapping_remote( int context )
126{
127 context ^= CONTEXT_REMOTE;
128
129 switch (context)
130 {
131 case CONTEXT_WPS:
132 return remote_button_context_wps;
133
134 default:
135 return remote_button_context_standard;
136 }
137}
138
139const struct button_mapping* get_context_mapping( int context )
140{
141 if (context&CONTEXT_REMOTE)
142 return get_context_mapping_remote(context);
143
144 switch (context)
145 {
146 case CONTEXT_WPS:
147 return button_context_wps;
148
149 case CONTEXT_SETTINGS:
150 return button_context_settings;
151
152 case CONTEXT_YESNOSCREEN:
153 return button_context_yesno;
154
155 case CONTEXT_TREE:
156 case CONTEXT_MAINMENU:
157 return button_context_tree;
158 case CONTEXT_BOOKMARKSCREEN:
159 return button_context_bmark;
160 case CONTEXT_STD:
161 case CONTEXT_LIST:
162 default:
163 return button_context_standard;
164 }
165}