1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 * (This is a real mess if it has to be coded in one single C file)
13 * File scrolling addition (C) 2005 Alexander Spyridakis
14 * Copyright (C) 2004 Jörg Hohensohn aka [IDC]Dragon
15 * Heavily borrowed from the IJG implementation (C) Thomas G. Lane
16 * Small & fast downscaling IDCT (C) 2002 by Guido Vollbeding JPEGclub.org
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
24 * KIND, either express or implied.
26 ****************************************************************************/
33 /* variable button definitions */
34 #if CONFIG_KEYPAD == RECORDER_PAD
35 #define JPEG_ZOOM_IN BUTTON_PLAY
36 #define JPEG_ZOOM_OUT BUTTON_ON
37 #define JPEG_UP BUTTON_UP
38 #define JPEG_DOWN BUTTON_DOWN
39 #define JPEG_LEFT BUTTON_LEFT
40 #define JPEG_RIGHT BUTTON_RIGHT
41 #define JPEG_NEXT BUTTON_F3
42 #define JPEG_PREVIOUS BUTTON_F2
43 #define JPEG_MENU BUTTON_OFF
45 #elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
46 #define JPEG_ZOOM_IN BUTTON_SELECT
47 #define JPEG_ZOOM_OUT BUTTON_ON
48 #define JPEG_UP BUTTON_UP
49 #define JPEG_DOWN BUTTON_DOWN
50 #define JPEG_LEFT BUTTON_LEFT
51 #define JPEG_RIGHT BUTTON_RIGHT
52 #define JPEG_NEXT BUTTON_F3
53 #define JPEG_PREVIOUS BUTTON_F2
54 #define JPEG_MENU BUTTON_OFF
56 #elif CONFIG_KEYPAD == ONDIO_PAD
57 #define JPEG_ZOOM_PRE BUTTON_MENU
58 #define JPEG_ZOOM_IN (BUTTON_MENU | BUTTON_REL)
59 #define JPEG_ZOOM_OUT (BUTTON_MENU | BUTTON_DOWN)
60 #define JPEG_UP BUTTON_UP
61 #define JPEG_DOWN BUTTON_DOWN
62 #define JPEG_LEFT BUTTON_LEFT
63 #define JPEG_RIGHT BUTTON_RIGHT
64 #define JPEG_NEXT (BUTTON_MENU | BUTTON_RIGHT)
65 #define JPEG_PREVIOUS (BUTTON_MENU | BUTTON_LEFT)
66 #define JPEG_MENU BUTTON_OFF
68 #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
69 (CONFIG_KEYPAD == IRIVER_H300_PAD)
70 #define JPEG_ZOOM_IN BUTTON_SELECT
71 #define JPEG_ZOOM_OUT BUTTON_MODE
72 #define JPEG_UP BUTTON_UP
73 #define JPEG_DOWN BUTTON_DOWN
74 #define JPEG_LEFT BUTTON_LEFT
75 #define JPEG_RIGHT BUTTON_RIGHT
76 #if (CONFIG_KEYPAD == IRIVER_H100_PAD)
77 #define JPEG_NEXT BUTTON_ON
78 #define JPEG_PREVIOUS BUTTON_REC
80 #define JPEG_NEXT BUTTON_REC
81 #define JPEG_PREVIOUS BUTTON_ON
83 #define JPEG_MENU BUTTON_OFF
84 #define JPEG_RC_MENU BUTTON_RC_STOP
86 #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
87 (CONFIG_KEYPAD == IPOD_1G2G_PAD)
88 #define JPEG_ZOOM_IN BUTTON_SCROLL_FWD
89 #define JPEG_ZOOM_OUT BUTTON_SCROLL_BACK
90 #define JPEG_UP BUTTON_MENU
91 #define JPEG_DOWN BUTTON_PLAY
92 #define JPEG_LEFT BUTTON_LEFT
93 #define JPEG_RIGHT BUTTON_RIGHT
94 #define JPEG_MENU (BUTTON_SELECT | BUTTON_MENU)
95 #define JPEG_NEXT (BUTTON_SELECT | BUTTON_RIGHT)
96 #define JPEG_PREVIOUS (BUTTON_SELECT | BUTTON_LEFT)
98 #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
99 #define JPEG_ZOOM_PRE BUTTON_SELECT
100 #define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
101 #define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
102 #define JPEG_UP BUTTON_UP
103 #define JPEG_DOWN BUTTON_DOWN
104 #define JPEG_LEFT BUTTON_LEFT
105 #define JPEG_RIGHT BUTTON_RIGHT
106 #define JPEG_MENU BUTTON_POWER
107 #define JPEG_NEXT BUTTON_PLAY
108 #define JPEG_PREVIOUS BUTTON_REC
110 #elif CONFIG_KEYPAD == GIGABEAT_PAD
111 #define JPEG_ZOOM_IN BUTTON_VOL_UP
112 #define JPEG_ZOOM_OUT BUTTON_VOL_DOWN
113 #define JPEG_UP BUTTON_UP
114 #define JPEG_DOWN BUTTON_DOWN
115 #define JPEG_LEFT BUTTON_LEFT
116 #define JPEG_RIGHT BUTTON_RIGHT
117 #define JPEG_MENU BUTTON_MENU
118 #define JPEG_NEXT (BUTTON_A | BUTTON_RIGHT)
119 #define JPEG_PREVIOUS (BUTTON_A | BUTTON_LEFT)
121 #elif CONFIG_KEYPAD == SANSA_E200_PAD
122 #define JPEG_ZOOM_PRE BUTTON_SELECT
123 #define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
124 #define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
125 #define JPEG_UP BUTTON_UP
126 #define JPEG_DOWN BUTTON_DOWN
127 #define JPEG_LEFT BUTTON_LEFT
128 #define JPEG_RIGHT BUTTON_RIGHT
129 #define JPEG_MENU BUTTON_POWER
130 #define JPEG_SLIDE_SHOW BUTTON_REC
131 #define JPEG_NEXT BUTTON_SCROLL_FWD
132 #define JPEG_NEXT_REPEAT (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
133 #define JPEG_PREVIOUS BUTTON_SCROLL_BACK
134 #define JPEG_PREVIOUS_REPEAT (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
136 #elif CONFIG_KEYPAD == SANSA_FUZE_PAD
137 #define JPEG_ZOOM_PRE BUTTON_SELECT
138 #define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
139 #define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
140 #define JPEG_UP BUTTON_UP
141 #define JPEG_DOWN BUTTON_DOWN
142 #define JPEG_LEFT BUTTON_LEFT
143 #define JPEG_RIGHT BUTTON_RIGHT
144 #define JPEG_MENU (BUTTON_HOME|BUTTON_REPEAT)
145 #define JPEG_NEXT BUTTON_SCROLL_FWD
146 #define JPEG_NEXT_REPEAT (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
147 #define JPEG_PREVIOUS BUTTON_SCROLL_BACK
148 #define JPEG_PREVIOUS_REPEAT (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
150 #elif CONFIG_KEYPAD == SANSA_C200_PAD
151 #define JPEG_ZOOM_PRE BUTTON_SELECT
152 #define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
153 #define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
154 #define JPEG_UP BUTTON_UP
155 #define JPEG_DOWN BUTTON_DOWN
156 #define JPEG_LEFT BUTTON_LEFT
157 #define JPEG_RIGHT BUTTON_RIGHT
158 #define JPEG_MENU BUTTON_POWER
159 #define JPEG_SLIDE_SHOW BUTTON_REC
160 #define JPEG_NEXT BUTTON_VOL_UP
161 #define JPEG_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT)
162 #define JPEG_PREVIOUS BUTTON_VOL_DOWN
163 #define JPEG_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT)
165 #elif CONFIG_KEYPAD == SANSA_CLIP_PAD
166 #define JPEG_ZOOM_PRE BUTTON_SELECT
167 #define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
168 #define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
169 #define JPEG_UP BUTTON_UP
170 #define JPEG_DOWN BUTTON_DOWN
171 #define JPEG_LEFT BUTTON_LEFT
172 #define JPEG_RIGHT BUTTON_RIGHT
173 #define JPEG_MENU BUTTON_POWER
174 #define JPEG_SLIDE_SHOW BUTTON_HOME
175 #define JPEG_NEXT BUTTON_VOL_UP
176 #define JPEG_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT)
177 #define JPEG_PREVIOUS BUTTON_VOL_DOWN
178 #define JPEG_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT)
180 #elif CONFIG_KEYPAD == SANSA_M200_PAD
181 #define JPEG_ZOOM_PRE BUTTON_SELECT
182 #define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
183 #define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
184 #define JPEG_UP BUTTON_UP
185 #define JPEG_DOWN BUTTON_DOWN
186 #define JPEG_LEFT BUTTON_LEFT
187 #define JPEG_RIGHT BUTTON_RIGHT
188 #define JPEG_MENU BUTTON_POWER
189 #define JPEG_SLIDE_SHOW (BUTTON_SELECT | BUTTON_UP)
190 #define JPEG_NEXT BUTTON_VOL_UP
191 #define JPEG_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT)
192 #define JPEG_PREVIOUS BUTTON_VOL_DOWN
193 #define JPEG_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT)
195 #elif CONFIG_KEYPAD == IRIVER_H10_PAD
196 #define JPEG_ZOOM_PRE BUTTON_PLAY
197 #define JPEG_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
198 #define JPEG_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
199 #define JPEG_UP BUTTON_SCROLL_UP
200 #define JPEG_DOWN BUTTON_SCROLL_DOWN
201 #define JPEG_LEFT BUTTON_LEFT
202 #define JPEG_RIGHT BUTTON_RIGHT
203 #define JPEG_MENU BUTTON_POWER
204 #define JPEG_NEXT BUTTON_FF
205 #define JPEG_PREVIOUS BUTTON_REW
207 #elif CONFIG_KEYPAD == MROBE500_PAD
209 #elif CONFIG_KEYPAD == GIGABEAT_S_PAD
210 #define JPEG_ZOOM_IN BUTTON_VOL_UP
211 #define JPEG_ZOOM_OUT BUTTON_VOL_DOWN
212 #define JPEG_UP BUTTON_UP
213 #define JPEG_DOWN BUTTON_DOWN
214 #define JPEG_LEFT BUTTON_LEFT
215 #define JPEG_RIGHT BUTTON_RIGHT
216 #define JPEG_MENU BUTTON_MENU
217 #define JPEG_NEXT BUTTON_NEXT
218 #define JPEG_PREVIOUS BUTTON_PREV
220 #elif CONFIG_KEYPAD == MROBE100_PAD
221 #define JPEG_ZOOM_IN BUTTON_SELECT
222 #define JPEG_ZOOM_OUT BUTTON_PLAY
223 #define JPEG_UP BUTTON_UP
224 #define JPEG_DOWN BUTTON_DOWN
225 #define JPEG_LEFT BUTTON_LEFT
226 #define JPEG_RIGHT BUTTON_RIGHT
227 #define JPEG_MENU BUTTON_MENU
228 #define JPEG_NEXT (BUTTON_DISPLAY | BUTTON_RIGHT)
229 #define JPEG_PREVIOUS (BUTTON_DISPLAY | BUTTON_LEFT)
231 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
232 #define JPEG_ZOOM_PRE BUTTON_RC_PLAY
233 #define JPEG_ZOOM_IN (BUTTON_RC_PLAY|BUTTON_REL)
234 #define JPEG_ZOOM_OUT (BUTTON_RC_PLAY|BUTTON_REPEAT)
235 #define JPEG_UP BUTTON_RC_VOL_UP
236 #define JPEG_DOWN BUTTON_RC_VOL_DOWN
237 #define JPEG_LEFT BUTTON_RC_REW
238 #define JPEG_RIGHT BUTTON_RC_FF
239 #define JPEG_MENU BUTTON_RC_REC
240 #define JPEG_NEXT BUTTON_RC_MODE
241 #define JPEG_PREVIOUS BUTTON_RC_MENU
243 #elif CONFIG_KEYPAD == COWOND2_PAD
245 #elif CONFIG_KEYPAD == IAUDIO67_PAD
246 #define JPEG_ZOOM_IN BUTTON_VOLUP
247 #define JPEG_ZOOM_OUT BUTTON_VOLDOWN
248 #define JPEG_UP BUTTON_STOP
249 #define JPEG_DOWN BUTTON_PLAY
250 #define JPEG_LEFT BUTTON_LEFT
251 #define JPEG_RIGHT BUTTON_RIGHT
252 #define JPEG_MENU BUTTON_MENU
253 #define JPEG_NEXT (BUTTON_PLAY|BUTTON_VOLUP)
254 #define JPEG_PREVIOUS (BUTTON_PLAY|BUTTON_VOLDOWN)
256 #elif CONFIG_KEYPAD == CREATIVEZVM_PAD
258 #define JPEG_ZOOM_IN BUTTON_PLAY
259 #define JPEG_ZOOM_OUT BUTTON_CUSTOM
260 #define JPEG_UP BUTTON_UP
261 #define JPEG_DOWN BUTTON_DOWN
262 #define JPEG_LEFT BUTTON_LEFT
263 #define JPEG_RIGHT BUTTON_RIGHT
264 #define JPEG_MENU BUTTON_MENU
265 #define JPEG_NEXT BUTTON_SELECT
266 #define JPEG_PREVIOUS BUTTON_BACK
268 #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
269 #define JPEG_ZOOM_IN BUTTON_VOL_UP
270 #define JPEG_ZOOM_OUT BUTTON_VOL_DOWN
271 #define JPEG_UP BUTTON_UP
272 #define JPEG_DOWN BUTTON_DOWN
273 #define JPEG_LEFT BUTTON_LEFT
274 #define JPEG_RIGHT BUTTON_RIGHT
275 #define JPEG_MENU BUTTON_MENU
276 #define JPEG_NEXT BUTTON_VIEW
277 #define JPEG_PREVIOUS BUTTON_PLAYLIST
279 #elif CONFIG_KEYPAD == ONDAVX747_PAD
281 #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD
282 #define JPEG_ZOOM_IN (BUTTON_PLAY|BUTTON_UP)
283 #define JPEG_ZOOM_OUT (BUTTON_PLAY|BUTTON_DOWN)
284 #define JPEG_UP BUTTON_UP
285 #define JPEG_DOWN BUTTON_DOWN
286 #define JPEG_LEFT BUTTON_LEFT
287 #define JPEG_RIGHT BUTTON_RIGHT
288 #define JPEG_MENU BUTTON_PLAY
289 #define JPEG_NEXT BUTTON_FFWD
290 #define JPEG_PREVIOUS BUTTON_REW
293 #error No keymap defined!
296 #ifdef HAVE_TOUCHSCREEN
298 #define JPEG_UP BUTTON_TOPMIDDLE
301 #define JPEG_DOWN BUTTON_BOTTOMMIDDLE
304 #define JPEG_LEFT BUTTON_MIDLEFT
307 #define JPEG_RIGHT BUTTON_MIDRIGHT
310 #define JPEG_ZOOM_IN BUTTON_TOPRIGHT
312 #ifndef JPEG_ZOOM_OUT
313 #define JPEG_ZOOM_OUT BUTTON_TOPLEFT
316 #define JPEG_MENU (BUTTON_CENTER|BUTTON_REL)
319 #define JPEG_NEXT BUTTON_BOTTOMRIGHT
321 #ifndef JPEG_PREVIOUS
322 #define JPEG_PREVIOUS BUTTON_BOTTOMLEFT
327 #endif /* _JPEG_JPEG_H */