MPIO HD200: rename button defines to adhere how they are labeled on the device.
[maemo-rb.git] / apps / plugins / fractals / fractal.h
blobdf58bef8c17c09f5c01286d0eee00dc86aeda51b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2009 Tomer Shalev
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef _FRACTAL_H
22 #define _FRACTAL_H
24 /* variable button definitions */
25 #if CONFIG_KEYPAD == RECORDER_PAD
26 #define FRACTAL_QUIT BUTTON_OFF
27 #define FRACTAL_UP BUTTON_UP
28 #define FRACTAL_DOWN BUTTON_DOWN
29 #define FRACTAL_LEFT BUTTON_LEFT
30 #define FRACTAL_RIGHT BUTTON_RIGHT
31 #define FRACTAL_ZOOM_IN BUTTON_PLAY
32 #define FRACTAL_ZOOM_OUT BUTTON_ON
33 #define FRACTAL_PRECISION_INC BUTTON_F2
34 #define FRACTAL_PRECISION_DEC BUTTON_F1
35 #define FRACTAL_RESET BUTTON_F3
37 #elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
38 #define FRACTAL_QUIT BUTTON_OFF
39 #define FRACTAL_UP BUTTON_UP
40 #define FRACTAL_DOWN BUTTON_DOWN
41 #define FRACTAL_LEFT BUTTON_LEFT
42 #define FRACTAL_RIGHT BUTTON_RIGHT
43 #define FRACTAL_ZOOM_IN BUTTON_SELECT
44 #define FRACTAL_ZOOM_OUT BUTTON_ON
45 #define FRACTAL_PRECISION_INC BUTTON_F2
46 #define FRACTAL_PRECISION_DEC BUTTON_F1
47 #define FRACTAL_RESET BUTTON_F3
49 #elif CONFIG_KEYPAD == ONDIO_PAD
50 #define FRACTAL_QUIT BUTTON_OFF
51 #define FRACTAL_UP BUTTON_UP
52 #define FRACTAL_DOWN BUTTON_DOWN
53 #define FRACTAL_LEFT BUTTON_LEFT
54 #define FRACTAL_RIGHT BUTTON_RIGHT
55 #define FRACTAL_ZOOM_IN_PRE BUTTON_MENU
56 #define FRACTAL_ZOOM_IN (BUTTON_MENU | BUTTON_REL)
57 #define FRACTAL_ZOOM_IN2 (BUTTON_MENU | BUTTON_UP)
58 #define FRACTAL_ZOOM_OUT (BUTTON_MENU | BUTTON_DOWN)
59 #define FRACTAL_PRECISION_INC (BUTTON_MENU | BUTTON_RIGHT)
60 #define FRACTAL_PRECISION_DEC (BUTTON_MENU | BUTTON_LEFT)
61 #define FRACTAL_RESET (BUTTON_MENU | BUTTON_OFF)
63 #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
64 (CONFIG_KEYPAD == IRIVER_H300_PAD)
65 #define FRACTAL_QUIT BUTTON_OFF
66 #define FRACTAL_UP BUTTON_UP
67 #define FRACTAL_DOWN BUTTON_DOWN
68 #define FRACTAL_LEFT BUTTON_LEFT
69 #define FRACTAL_RIGHT BUTTON_RIGHT
70 #define FRACTAL_ZOOM_IN BUTTON_SELECT
71 #define FRACTAL_ZOOM_OUT BUTTON_MODE
72 #define FRACTAL_PRECISION_INC (BUTTON_ON | BUTTON_RIGHT)
73 #define FRACTAL_PRECISION_DEC (BUTTON_ON | BUTTON_LEFT)
74 #define FRACTAL_RESET BUTTON_REC
76 #define FRACTAL_RC_QUIT BUTTON_RC_STOP
78 #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
79 (CONFIG_KEYPAD == IPOD_3G_PAD) || \
80 (CONFIG_KEYPAD == IPOD_1G2G_PAD)
81 #define FRACTAL_QUIT (BUTTON_SELECT | BUTTON_MENU)
82 #define FRACTAL_UP BUTTON_MENU
83 #define FRACTAL_DOWN BUTTON_PLAY
84 #define FRACTAL_LEFT BUTTON_LEFT
85 #define FRACTAL_RIGHT BUTTON_RIGHT
86 #define FRACTAL_ZOOM_IN BUTTON_SCROLL_FWD
87 #define FRACTAL_ZOOM_OUT BUTTON_SCROLL_BACK
88 #define FRACTAL_PRECISION_INC (BUTTON_SELECT | BUTTON_RIGHT)
89 #define FRACTAL_PRECISION_DEC (BUTTON_SELECT | BUTTON_LEFT)
90 #define FRACTAL_RESET (BUTTON_SELECT | BUTTON_PLAY)
92 #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
93 #define FRACTAL_QUIT BUTTON_POWER
94 #define FRACTAL_UP BUTTON_UP
95 #define FRACTAL_DOWN BUTTON_DOWN
96 #define FRACTAL_LEFT BUTTON_LEFT
97 #define FRACTAL_RIGHT BUTTON_RIGHT
98 #define FRACTAL_ZOOM_IN_PRE BUTTON_SELECT
99 #define FRACTAL_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
100 #define FRACTAL_ZOOM_OUT_PRE BUTTON_SELECT
101 #define FRACTAL_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
102 #define FRACTAL_PRECISION_INC_PRE BUTTON_PLAY
103 #define FRACTAL_PRECISION_INC (BUTTON_PLAY | BUTTON_REL)
104 #define FRACTAL_PRECISION_DEC_PRE BUTTON_PLAY
105 #define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_REPEAT)
106 #define FRACTAL_RESET BUTTON_REC
108 #elif CONFIG_KEYPAD == GIGABEAT_PAD
109 #define FRACTAL_QUIT BUTTON_POWER
110 #define FRACTAL_UP BUTTON_UP
111 #define FRACTAL_DOWN BUTTON_DOWN
112 #define FRACTAL_LEFT BUTTON_LEFT
113 #define FRACTAL_RIGHT BUTTON_RIGHT
114 #define FRACTAL_ZOOM_IN_PRE BUTTON_SELECT
115 #define FRACTAL_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
116 #define FRACTAL_ZOOM_OUT_PRE BUTTON_SELECT
117 #define FRACTAL_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
118 #define FRACTAL_PRECISION_INC BUTTON_VOL_UP
119 #define FRACTAL_PRECISION_DEC BUTTON_VOL_DOWN
120 #define FRACTAL_RESET BUTTON_A
122 #elif CONFIG_KEYPAD == SANSA_E200_PAD
123 #define FRACTAL_QUIT BUTTON_POWER
124 #define FRACTAL_UP BUTTON_UP
125 #define FRACTAL_DOWN BUTTON_DOWN
126 #define FRACTAL_LEFT BUTTON_LEFT
127 #define FRACTAL_RIGHT BUTTON_RIGHT
128 #define FRACTAL_ZOOM_IN BUTTON_SCROLL_FWD
129 #define FRACTAL_ZOOM_OUT BUTTON_SCROLL_BACK
130 #define FRACTAL_PRECISION_INC (BUTTON_SELECT | BUTTON_RIGHT)
131 #define FRACTAL_PRECISION_DEC (BUTTON_SELECT | BUTTON_LEFT)
132 #define FRACTAL_RESET BUTTON_REC
134 #elif CONFIG_KEYPAD == SANSA_FUZE_PAD
135 #define FRACTAL_QUIT (BUTTON_HOME|BUTTON_REPEAT)
136 #define FRACTAL_UP BUTTON_UP
137 #define FRACTAL_DOWN BUTTON_DOWN
138 #define FRACTAL_LEFT BUTTON_LEFT
139 #define FRACTAL_RIGHT BUTTON_RIGHT
140 #define FRACTAL_ZOOM_IN BUTTON_SCROLL_FWD
141 #define FRACTAL_ZOOM_OUT BUTTON_SCROLL_BACK
142 #define FRACTAL_PRECISION_INC (BUTTON_SELECT | BUTTON_RIGHT)
143 #define FRACTAL_PRECISION_DEC (BUTTON_SELECT | BUTTON_LEFT)
144 #define FRACTAL_RESET (BUTTON_SELECT | BUTTON_REPEAT)
146 #elif CONFIG_KEYPAD == SANSA_C200_PAD
147 #define FRACTAL_QUIT BUTTON_POWER
148 #define FRACTAL_UP BUTTON_UP
149 #define FRACTAL_DOWN BUTTON_DOWN
150 #define FRACTAL_LEFT BUTTON_LEFT
151 #define FRACTAL_RIGHT BUTTON_RIGHT
152 #define FRACTAL_ZOOM_IN BUTTON_VOL_UP
153 #define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
154 #define FRACTAL_PRECISION_INC (BUTTON_SELECT | BUTTON_RIGHT)
155 #define FRACTAL_PRECISION_DEC (BUTTON_SELECT | BUTTON_LEFT)
156 #define FRACTAL_RESET BUTTON_REC
158 #elif CONFIG_KEYPAD == SANSA_CLIP_PAD
159 #define FRACTAL_QUIT BUTTON_POWER
160 #define FRACTAL_UP BUTTON_UP
161 #define FRACTAL_DOWN BUTTON_DOWN
162 #define FRACTAL_LEFT BUTTON_LEFT
163 #define FRACTAL_RIGHT BUTTON_RIGHT
164 #define FRACTAL_ZOOM_IN BUTTON_VOL_UP
165 #define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
166 #define FRACTAL_PRECISION_INC (BUTTON_SELECT | BUTTON_RIGHT)
167 #define FRACTAL_PRECISION_DEC (BUTTON_SELECT | BUTTON_LEFT)
168 #define FRACTAL_RESET BUTTON_HOME
170 #elif CONFIG_KEYPAD == SANSA_M200_PAD
171 #define FRACTAL_QUIT BUTTON_POWER
172 #define FRACTAL_UP BUTTON_UP
173 #define FRACTAL_DOWN BUTTON_DOWN
174 #define FRACTAL_LEFT BUTTON_LEFT
175 #define FRACTAL_RIGHT BUTTON_RIGHT
176 #define FRACTAL_ZOOM_IN BUTTON_VOL_UP
177 #define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
178 #define FRACTAL_PRECISION_INC (BUTTON_SELECT | BUTTON_RIGHT)
179 #define FRACTAL_PRECISION_DEC (BUTTON_SELECT | BUTTON_LEFT)
180 #define FRACTAL_RESET (BUTTON_SELECT | BUTTON_UP)
182 #elif CONFIG_KEYPAD == IRIVER_H10_PAD
183 #define FRACTAL_QUIT BUTTON_POWER
184 #define FRACTAL_UP BUTTON_SCROLL_UP
185 #define FRACTAL_DOWN BUTTON_SCROLL_DOWN
186 #define FRACTAL_LEFT BUTTON_LEFT
187 #define FRACTAL_RIGHT BUTTON_RIGHT
188 #define FRACTAL_ZOOM_IN_PRE BUTTON_PLAY
189 #define FRACTAL_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
190 #define FRACTAL_ZOOM_OUT_PRE BUTTON_PLAY
191 #define FRACTAL_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
192 #define FRACTAL_PRECISION_INC BUTTON_FF
193 #define FRACTAL_PRECISION_DEC BUTTON_REW
194 #define FRACTAL_RESET (BUTTON_PLAY | BUTTON_REW)
196 #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
197 #define FRACTAL_QUIT BUTTON_EQ
198 #define FRACTAL_UP BUTTON_UP
199 #define FRACTAL_DOWN BUTTON_DOWN
200 #define FRACTAL_LEFT BUTTON_LEFT
201 #define FRACTAL_RIGHT BUTTON_RIGHT
202 #define FRACTAL_ZOOM_IN_PRE BUTTON_SELECT
203 #define FRACTAL_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
204 #define FRACTAL_ZOOM_OUT_PRE BUTTON_SELECT
205 #define FRACTAL_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
206 #define FRACTAL_PRECISION_INC (BUTTON_PLAY | BUTTON_RIGHT)
207 #define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_LEFT)
208 #define FRACTAL_RESET BUTTON_MODE
210 #elif CONFIG_KEYPAD == GIGABEAT_S_PAD
211 #define FRACTAL_QUIT BUTTON_BACK
212 #define FRACTAL_UP BUTTON_UP
213 #define FRACTAL_DOWN BUTTON_DOWN
214 #define FRACTAL_LEFT BUTTON_LEFT
215 #define FRACTAL_RIGHT BUTTON_RIGHT
216 #define FRACTAL_ZOOM_IN BUTTON_VOL_UP
217 #define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
218 #define FRACTAL_PRECISION_INC BUTTON_PREV
219 #define FRACTAL_PRECISION_DEC BUTTON_NEXT
220 #define FRACTAL_RESET BUTTON_MENU
222 #elif CONFIG_KEYPAD == MROBE100_PAD
223 #define FRACTAL_QUIT BUTTON_POWER
224 #define FRACTAL_UP BUTTON_UP
225 #define FRACTAL_DOWN BUTTON_DOWN
226 #define FRACTAL_LEFT BUTTON_LEFT
227 #define FRACTAL_RIGHT BUTTON_RIGHT
228 #define FRACTAL_ZOOM_IN_PRE BUTTON_SELECT
229 #define FRACTAL_ZOOM_IN (BUTTON_SELECT | BUTTON_REL)
230 #define FRACTAL_ZOOM_OUT_PRE BUTTON_SELECT
231 #define FRACTAL_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT)
232 #define FRACTAL_PRECISION_INC BUTTON_MENU
233 #define FRACTAL_PRECISION_DEC BUTTON_PLAY
234 #define FRACTAL_RESET BUTTON_DISPLAY
236 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
237 #define FRACTAL_QUIT BUTTON_RC_REC
238 #define FRACTAL_UP BUTTON_RC_VOL_UP
239 #define FRACTAL_DOWN BUTTON_RC_VOL_DOWN
240 #define FRACTAL_LEFT BUTTON_RC_REW
241 #define FRACTAL_RIGHT BUTTON_RC_FF
242 #define FRACTAL_ZOOM_IN_PRE BUTTON_RC_PLAY
243 #define FRACTAL_ZOOM_IN (BUTTON_RC_PLAY | BUTTON_REL)
244 #define FRACTAL_ZOOM_OUT_PRE BUTTON_RC_PLAY
245 #define FRACTAL_ZOOM_OUT (BUTTON_RC_PLAY | BUTTON_REPEAT)
246 #define FRACTAL_PRECISION_INC_PRE BUTTON_RC_MODE
247 #define FRACTAL_PRECISION_INC (BUTTON_RC_MODE|BUTTON_REL)
248 #define FRACTAL_PRECISION_DEC_PRE BUTTON_RC_MODE
249 #define FRACTAL_PRECISION_DEC (BUTTON_RC_MODE|BUTTON_REPEAT)
250 #define FRACTAL_RESET BUTTON_RC_MENU
252 #elif CONFIG_KEYPAD == COWON_D2_PAD
253 #define FRACTAL_QUIT BUTTON_POWER
255 #elif CONFIG_KEYPAD == CREATIVEZVM_PAD
256 #define FRACTAL_QUIT BUTTON_BACK
257 #define FRACTAL_UP BUTTON_UP
258 #define FRACTAL_DOWN BUTTON_DOWN
259 #define FRACTAL_LEFT BUTTON_LEFT
260 #define FRACTAL_RIGHT BUTTON_RIGHT
261 #define FRACTAL_ZOOM_IN BUTTON_PLAY
262 #define FRACTAL_ZOOM_OUT BUTTON_MENU
263 #define FRACTAL_PRECISION_INC (BUTTON_UP | BUTTON_CUSTOM)
264 #define FRACTAL_PRECISION_DEC (BUTTON_DOWN | BUTTON_CUSTOM)
265 #define FRACTAL_RESET BUTTON_SELECT
267 #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
268 #define FRACTAL_QUIT BUTTON_POWER
269 #define FRACTAL_UP BUTTON_UP
270 #define FRACTAL_DOWN BUTTON_DOWN
271 #define FRACTAL_LEFT BUTTON_LEFT
272 #define FRACTAL_RIGHT BUTTON_RIGHT
273 #define FRACTAL_ZOOM_IN BUTTON_VIEW
274 #define FRACTAL_ZOOM_OUT BUTTON_PLAYLIST
275 #define FRACTAL_PRECISION_INC BUTTON_VOL_UP
276 #define FRACTAL_PRECISION_DEC BUTTON_VOL_DOWN
277 #define FRACTAL_RESET BUTTON_MENU
279 #elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD
280 #define FRACTAL_QUIT BUTTON_POWER
281 #define FRACTAL_UP BUTTON_UP
282 #define FRACTAL_DOWN BUTTON_DOWN
283 #define FRACTAL_LEFT BUTTON_PREV
284 #define FRACTAL_RIGHT BUTTON_NEXT
285 #define FRACTAL_ZOOM_IN BUTTON_RIGHT
286 #define FRACTAL_ZOOM_OUT BUTTON_LEFT
287 #define FRACTAL_PRECISION_INC BUTTON_VOL_UP
288 #define FRACTAL_PRECISION_DEC BUTTON_VOL_DOWN
289 #define FRACTAL_RESET BUTTON_MENU
291 #elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD
292 #define FRACTAL_QUIT BUTTON_POWER
294 #elif CONFIG_KEYPAD == ONDAVX777_PAD
295 #define FRACTAL_QUIT BUTTON_POWER
297 #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD
298 #define FRACTAL_QUIT BUTTON_REC
299 #define FRACTAL_UP BUTTON_UP
300 #define FRACTAL_DOWN BUTTON_DOWN
301 #define FRACTAL_LEFT BUTTON_LEFT
302 #define FRACTAL_RIGHT BUTTON_RIGHT
303 #define FRACTAL_ZOOM_IN BUTTON_FFWD
304 #define FRACTAL_ZOOM_OUT BUTTON_REW
305 #define FRACTAL_PRECISION_INC (BUTTON_PLAY | BUTTON_UP)
306 #define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_DOWN)
307 #define FRACTAL_RESET (BUTTON_PLAY | BUTTON_RIGHT)
309 #elif CONFIG_KEYPAD == PBELL_VIBE500_PAD
310 #define FRACTAL_QUIT BUTTON_REC
311 #define FRACTAL_UP BUTTON_UP
312 #define FRACTAL_DOWN BUTTON_DOWN
313 #define FRACTAL_LEFT BUTTON_PREV
314 #define FRACTAL_RIGHT BUTTON_NEXT
315 #define FRACTAL_ZOOM_IN BUTTON_PLAY
316 #define FRACTAL_ZOOM_OUT BUTTON_MENU
317 #define FRACTAL_PRECISION_INC BUTTON_OK
318 #define FRACTAL_PRECISION_DEC BUTTON_CANCEL
319 #define FRACTAL_RESET (BUTTON_CANCEL | BUTTON_REPEAT)
321 #elif CONFIG_KEYPAD == MPIO_HD200_PAD
322 #define FRACTAL_QUIT (BUTTON_REC | BUTTON_PLAY)
323 #define FRACTAL_UP BUTTON_REW
324 #define FRACTAL_DOWN BUTTON_FF
325 #define FRACTAL_LEFT BUTTON_VOL_DOWN
326 #define FRACTAL_RIGHT BUTTON_VOL_UP
327 #define FRACTAL_ZOOM_IN (BUTTON_PLAY|BUTTON_FF)
328 #define FRACTAL_ZOOM_OUT (BUTTON_PLAY|BUTTON_REW)
329 #define FRACTAL_PRECISION_INC (BUTTON_PLAY | BUTTON_VOL_UP)
330 #define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_VOL_DOWN)
331 #define FRACTAL_RESET BUTTON_REC
333 #else
334 #error No keymap defined!
335 #endif
337 #ifdef HAVE_TOUCHSCREEN
338 #ifndef FRACTAL_UP
339 #define FRACTAL_UP BUTTON_TOPMIDDLE
340 #endif
341 #ifndef FRACTAL_DOWN
342 #define FRACTAL_DOWN BUTTON_BOTTOMMIDDLE
343 #endif
344 #ifndef FRACTAL_LEFT
345 #define FRACTAL_LEFT BUTTON_MIDLEFT
346 #endif
347 #ifndef FRACTAL_RIGHT
348 #define FRACTAL_RIGHT BUTTON_MIDRIGHT
349 #endif
350 #ifndef FRACTAL_ZOOM_IN
351 #define FRACTAL_ZOOM_IN_PRE BUTTON_TOPRIGHT
352 #define FRACTAL_ZOOM_IN (BUTTON_TOPRIGHT | BUTTON_REL)
353 #endif
354 #ifndef FRACTAL_ZOOM_OUT
355 #define FRACTAL_ZOOM_OUT_PRE BUTTON_TOPLEFT
356 #define FRACTAL_ZOOM_OUT (BUTTON_TOPLEFT | BUTTON_REL)
357 #endif
358 #ifndef FRACTAL_PRECISION_INC
359 #define FRACTAL_PRECISION_INC BUTTON_BOTTOMRIGHT
360 #endif
361 #ifndef FRACTAL_PRECISION_DEC
362 #define FRACTAL_PRECISION_DEC BUTTON_BOTTOMLEFT
363 #endif
364 #ifndef FRACTAL_RESET
365 #define FRACTAL_RESET BUTTON_CENTER
366 #endif
367 #endif
369 #endif