blob: 0f0d29847b1b1bfb5b09f3362d7407cad1f5f6b8 [file] [log] [blame]
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dan Everton
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __UISDL_H__
21#define __UISDL_H__
22
Dan Evertonb585e872006-02-09 21:49:28 +000023#include <stdbool.h>
24#include "SDL.h"
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000025
Jens Arnolda57608c2006-02-08 13:54:21 +000026/* colour definitions are R, G, B */
27
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000028#if defined(ARCHOS_RECORDER)
29#define UI_TITLE "Jukebox Recorder"
Daniel Stenberg4582f232006-03-19 06:59:36 +000030#define UI_WIDTH 270 /* width of GUI window */
31#define UI_HEIGHT 406 /* height of GUI window */
32#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
33#define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */
34#define UI_LCD_BLACK 0, 0, 0 /* black */
35#define UI_LCD_POSX 80 /* x position of lcd */
36#define UI_LCD_POSY 104 /* y position of lcd (96 for real aspect) */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000037#define UI_LCD_WIDTH 112
Daniel Stenberg4582f232006-03-19 06:59:36 +000038#define UI_LCD_HEIGHT 64 /* (80 for real aspect) */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000039
40#elif defined(ARCHOS_PLAYER)
41#define UI_TITLE "Jukebox Player"
Daniel Stenberg4582f232006-03-19 06:59:36 +000042#define UI_WIDTH 284 /* width of GUI window */
43#define UI_HEIGHT 420 /* height of GUI window */
44#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
45#define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */
46#define UI_LCD_BLACK 0, 0, 0 /* black */
47#define UI_LCD_POSX 75 /* x position of lcd */
48#define UI_LCD_POSY 116 /* y position of lcd */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000049#define UI_LCD_WIDTH 132
Jens Arnold3e496e32006-02-20 00:31:10 +000050#define UI_LCD_HEIGHT 64
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000051
52#elif defined(ARCHOS_FMRECORDER) || defined(ARCHOS_RECORDERV2)
53#define UI_TITLE "Jukebox FM Recorder"
Daniel Stenberg4582f232006-03-19 06:59:36 +000054#define UI_WIDTH 285 /* width of GUI window */
55#define UI_HEIGHT 414 /* height of GUI window */
56#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
57#define UI_LCD_BGCOLORLIGHT 126, 229, 126 /* bkgnd color of LCD (backlight) */
58#define UI_LCD_BLACK 0, 0, 0 /* black */
59#define UI_LCD_POSX 87 /* x position of lcd */
60#define UI_LCD_POSY 77 /* y position of lcd (69 for real aspect) */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000061#define UI_LCD_WIDTH 112
Daniel Stenberg4582f232006-03-19 06:59:36 +000062#define UI_LCD_HEIGHT 64 /* (80 for real aspect) */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000063
64#elif defined(ARCHOS_ONDIOSP) || defined(ARCHOS_ONDIOFM)
65#define UI_TITLE "Ondio"
Daniel Stenberg4582f232006-03-19 06:59:36 +000066#define UI_WIDTH 155 /* width of GUI window */
67#define UI_HEIGHT 334 /* height of GUI window */
68#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
Jens Arnoldae0c1af2006-06-03 12:09:12 +000069#define UI_LCD_BGCOLORLIGHT 130, 180, 250 /* bkgnd color of LCD (backlight mod) */
Daniel Stenberg4582f232006-03-19 06:59:36 +000070#define UI_LCD_BLACK 0, 0, 0 /* black */
71#define UI_LCD_POSX 21 /* x position of lcd */
72#define UI_LCD_POSY 82 /* y position of lcd (74 for real aspect) */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000073#define UI_LCD_WIDTH 112
Daniel Stenberg4582f232006-03-19 06:59:36 +000074#define UI_LCD_HEIGHT 64 /* (80 for real aspect) */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000075
76#elif defined(IRIVER_H120) || defined(IRIVER_H100)
77#define UI_TITLE "iriver H1x0"
Daniel Stenberg4582f232006-03-19 06:59:36 +000078#define UI_WIDTH 379 /* width of GUI window */
79#define UI_HEIGHT 508 /* height of GUI window */
80#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
81#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
82#define UI_LCD_BLACK 0, 0, 0 /* black */
83#define UI_LCD_POSX 109 /* x position of lcd */
84#define UI_LCD_POSY 23 /* y position of lcd */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000085#define UI_LCD_WIDTH 160
86#define UI_LCD_HEIGHT 128
Daniel Stenberg4582f232006-03-19 06:59:36 +000087#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
88#define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */
89#define UI_REMOTE_POSX 50 /* x position of remote lcd */
90#define UI_REMOTE_POSY 403 /* y position of remote lcd */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000091#define UI_REMOTE_WIDTH 128
92#define UI_REMOTE_HEIGHT 64
93
Dan Evertonb585e872006-02-09 21:49:28 +000094#elif defined(IRIVER_H300)
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000095#define UI_TITLE "iriver H300"
Daniel Stenberg4582f232006-03-19 06:59:36 +000096#define UI_WIDTH 288 /* width of GUI window */
97#define UI_HEIGHT 581 /* height of GUI window */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +000098/* high-colour */
Daniel Stenberg4582f232006-03-19 06:59:36 +000099#define UI_LCD_POSX 26 /* x position of lcd */
100#define UI_LCD_POSY 36 /* y position of lcd */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000101#define UI_LCD_WIDTH 220
102#define UI_LCD_HEIGHT 176
Daniel Stenberg4582f232006-03-19 06:59:36 +0000103#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
104#define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */
105#define UI_REMOTE_POSX 12 /* x position of remote lcd */
106#define UI_REMOTE_POSY 478 /* y position of remote lcd */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000107#define UI_REMOTE_WIDTH 128
108#define UI_REMOTE_HEIGHT 64
109
Jens Arnold729b25c2007-08-05 20:43:54 +0000110#elif defined(IPOD_1G2G)
111#define UI_TITLE "iPod 1G/2G"
112#define UI_WIDTH 224 /* width of GUI window */
113#define UI_HEIGHT 382 /* height of GUI window */
114#define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */
115#define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */
116#define UI_LCD_BLACK 0, 0, 0 /* black */
117#define UI_LCD_POSX 32 /* x position of lcd */
118#define UI_LCD_POSY 12 /* y position of lcd */
119#define UI_LCD_WIDTH 160
120#define UI_LCD_HEIGHT 128
121
Jens Arnoldedc19fb2006-10-16 18:15:36 +0000122#elif defined(IPOD_3G)
123#define UI_TITLE "iPod 3G"
124#define UI_WIDTH 218 /* width of GUI window */
125#define UI_HEIGHT 389 /* height of GUI window */
126#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
127#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
128#define UI_LCD_BLACK 0, 0, 0 /* black */
129#define UI_LCD_POSX 29 /* x position of lcd */
130#define UI_LCD_POSY 16 /* y position of lcd */
131#define UI_LCD_WIDTH 160
132#define UI_LCD_HEIGHT 128
133
Dave Chapman8ad2df82006-02-09 00:48:53 +0000134#elif defined(IPOD_4G)
135#define UI_TITLE "iPod 4G"
Daniel Stenberg4582f232006-03-19 06:59:36 +0000136#define UI_WIDTH 196 /* width of GUI window */
137#define UI_HEIGHT 370 /* height of GUI window */
138#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
139#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
140#define UI_LCD_BLACK 0, 0, 0 /* black */
141#define UI_LCD_POSX 19 /* x position of lcd */
142#define UI_LCD_POSY 14 /* y position of lcd */
Dave Chapman8ad2df82006-02-09 00:48:53 +0000143#define UI_LCD_WIDTH 160
144#define UI_LCD_HEIGHT 128
145
Jens Arnold80865f22006-04-02 19:07:27 +0000146#elif defined(IPOD_MINI) || defined(IPOD_MINI2G)
147#define UI_TITLE "iPod mini"
148#define UI_WIDTH 191 /* width of GUI window */
149#define UI_HEIGHT 365 /* height of GUI window */
150#define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */
151#define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */
152#define UI_LCD_BLACK 0, 0, 0 /* black */
153#define UI_LCD_POSX 24 /* x position of lcd */
154#define UI_LCD_POSY 17 /* y position of lcd */
155#define UI_LCD_WIDTH 138
156#define UI_LCD_HEIGHT 110
157
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000158#elif defined(IPOD_COLOR)
159#define UI_TITLE "iPod Color"
Daniel Stenberg4582f232006-03-19 06:59:36 +0000160#define UI_WIDTH 261 /* width of GUI window */
161#define UI_HEIGHT 493 /* height of GUI window */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000162/* high-colour */
Daniel Stenberg4582f232006-03-19 06:59:36 +0000163#define UI_LCD_POSX 21 /* x position of lcd */
164#define UI_LCD_POSY 16 /* y position of lcd */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000165#define UI_LCD_WIDTH 220
166#define UI_LCD_HEIGHT 176
167
168#elif defined(IPOD_NANO)
169#define UI_TITLE "iPod Nano"
Daniel Stenberg4582f232006-03-19 06:59:36 +0000170#define UI_WIDTH 199 /* width of GUI window */
171#define UI_HEIGHT 421 /* height of GUI window */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000172/* high-colour */
Daniel Stenberg4582f232006-03-19 06:59:36 +0000173#define UI_LCD_POSX 13 /* x position of lcd */
174#define UI_LCD_POSY 14 /* y position of lcd */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000175#define UI_LCD_WIDTH 176
176#define UI_LCD_HEIGHT 132
177
Dan Everton3ba00602006-02-13 21:46:28 +0000178#elif defined(IPOD_VIDEO)
179#define UI_TITLE "iPod Video"
Daniel Stenberg4582f232006-03-19 06:59:36 +0000180#define UI_WIDTH 350 /* width of GUI window */
181#define UI_HEIGHT 591 /* height of GUI window */
Dan Everton3ba00602006-02-13 21:46:28 +0000182/* high-colour */
Daniel Stenberg4582f232006-03-19 06:59:36 +0000183#define UI_LCD_POSX 14 /* x position of lcd */
184#define UI_LCD_POSY 12 /* y position of lcd */
Dan Everton3ba00602006-02-13 21:46:28 +0000185#define UI_LCD_WIDTH 320
186#define UI_LCD_HEIGHT 240
187
Linus Nielsen Feltzing93941752006-02-04 22:37:44 +0000188#elif defined(IAUDIO_X5)
189#define UI_TITLE "iAudio X5"
Daniel Stenberg4582f232006-03-19 06:59:36 +0000190#define UI_WIDTH 300 /* width of GUI window */
Jens Arnold05ddd9a2006-07-28 07:35:45 +0000191#define UI_HEIGHT 558 /* height of GUI window */
192/* high-colour */
Daniel Stenberg4582f232006-03-19 06:59:36 +0000193#define UI_LCD_POSX 55 /* x position of lcd */
194#define UI_LCD_POSY 61 /* y position of lcd (74 for real aspect) */
195#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
196#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
Daniel Stenberg4582f232006-03-19 06:59:36 +0000197#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
Jens Arnold05ddd9a2006-07-28 07:35:45 +0000198#define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */
199#define UI_REMOTE_POSX 12 /* x position of remote lcd */
200#define UI_REMOTE_POSY 462 /* y position of remote lcd */
201#define UI_REMOTE_WIDTH 128
202#define UI_REMOTE_HEIGHT 96
Marcoen Hirschberg338e2bb2006-02-24 15:42:52 +0000203
Jens Arnold88760182007-03-05 00:04:00 +0000204#elif defined(IAUDIO_M5)
205#define UI_TITLE "iAudio M5"
Jens Arnold4bd75312007-03-05 18:36:17 +0000206#define UI_WIDTH 374 /* width of GUI window */
207#define UI_HEIGHT 650 /* height of GUI window */
Jens Arnold88760182007-03-05 00:04:00 +0000208/* high-colour */
Jens Arnold4bd75312007-03-05 18:36:17 +0000209#define UI_LCD_POSX 82 /* x position of lcd */
210#define UI_LCD_POSY 74 /* y position of lcd (74 for real aspect) */
Jens Arnold88760182007-03-05 00:04:00 +0000211#define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */
212#define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */
213#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
214#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
215#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
216#define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */
Jens Arnold4bd75312007-03-05 18:36:17 +0000217#define UI_REMOTE_POSX 59 /* x position of remote lcd */
218#define UI_REMOTE_POSY 509 /* y position of remote lcd */
Jens Arnold88760182007-03-05 00:04:00 +0000219#define UI_REMOTE_WIDTH 128
220#define UI_REMOTE_HEIGHT 96
221
Marcoen Hirschberg338e2bb2006-02-24 15:42:52 +0000222#elif defined(GIGABEAT_F)
223#define UI_TITLE "Toshiba Gigabeat"
Daniel Stenberg4582f232006-03-19 06:59:36 +0000224#define UI_WIDTH 401 /* width of GUI window */
225#define UI_HEIGHT 655 /* height of GUI window */
Marcoen Hirschberg338e2bb2006-02-24 15:42:52 +0000226/* high-colour */
Daniel Stenberg4582f232006-03-19 06:59:36 +0000227#define UI_LCD_POSX 48 /* x position of lcd */
228#define UI_LCD_POSY 60 /* y position of lcd */
Marcoen Hirschberg338e2bb2006-02-24 15:42:52 +0000229#define UI_LCD_WIDTH 240
230#define UI_LCD_HEIGHT 320
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000231
Daniel Stenberge43b29d2006-08-03 20:25:39 +0000232#elif defined(IRIVER_H10)
Barry Wardell99c2dc52006-08-19 19:21:17 +0000233#define UI_TITLE "iriver H10 20Gb"
Daniel Stenberge43b29d2006-08-03 20:25:39 +0000234#define UI_WIDTH 392 /* width of GUI window */
235#define UI_HEIGHT 391 /* height of GUI window */
236/* high-colour */
237#define UI_LCD_POSX 111 /* x position of lcd */
238#define UI_LCD_POSY 30 /* y position of lcd (74 for real aspect) */
239#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
240#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
Tomasz Malesinskia19032c2006-08-18 19:14:11 +0000241
Barry Wardell99c2dc52006-08-19 19:21:17 +0000242#elif defined(IRIVER_H10_5GB)
243#define UI_TITLE "iriver H10 5/6Gb"
244#define UI_WIDTH 353 /* width of GUI window */
245#define UI_HEIGHT 460 /* height of GUI window */
246/* high-colour */
247#define UI_LCD_POSX 112 /* x position of lcd */
248#define UI_LCD_POSY 45 /* y position of lcd (74 for real aspect) */
249#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
250#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
251
Barry Wardell24f4a2a2006-10-26 13:38:09 +0000252#elif defined(SANSA_E200)
253#define UI_TITLE "Sansa e200"
254#define UI_WIDTH 260 /* width of GUI window */
255#define UI_HEIGHT 502 /* height of GUI window */
256/* high-colour */
257#define UI_LCD_POSX 42 /* x position of lcd */
258#define UI_LCD_POSY 37 /* y position of lcd (74 for real aspect) */
259#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
260#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
261
Mark Arigoe14a7602007-09-08 03:10:22 +0000262#elif defined(SANSA_C200)
263#define UI_TITLE "Sansa c200"
264#define UI_WIDTH 350 /* width of GUI window */
265#define UI_HEIGHT 152 /* height of GUI window */
266/* high-colour */
267#define UI_LCD_POSX 42 /* x position of lcd */
268#define UI_LCD_POSY 35 /* y position of lcd (74 for real aspect) */
269#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
270#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
271
Tomasz Malesinskia19032c2006-08-18 19:14:11 +0000272#elif defined(IRIVER_IFP7XX)
273#define UI_TITLE "iriver iFP7xx"
274#define UI_WIDTH 425 /* width of GUI window */
275#define UI_HEIGHT 183 /* height of GUI window */
276#define UI_LCD_BGCOLOR 94, 104, 84 /* bkgnd color of LCD (no backlight) */
277#define UI_LCD_BGCOLORLIGHT 60, 160, 230 /* bkgnd color of LCD (backlight) */
278#define UI_LCD_BLACK 0, 0, 0 /* black */
279#define UI_LCD_POSX 115 /* x position of lcd */
280#define UI_LCD_POSY 54 /* y position of lcd */
281#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
282#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
283
Dave Chapmand64e6262007-01-14 13:48:09 +0000284#elif defined(ARCHOS_AV300)
285#define UI_TITLE "Archos AV300"
286/* We are temporarily using a 2bpp LCD driver and dummy bitmap */
287#define UI_WIDTH 420 /* width of GUI window */
288#define UI_HEIGHT 340 /* height of GUI window */
289#define UI_LCD_POSX 50 /* x position of lcd */
290#define UI_LCD_POSY 50 /* y position of lcd */
291#define UI_LCD_WIDTH 320
292#define UI_LCD_HEIGHT 240
293#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
294#define UI_LCD_BGCOLORLIGHT 173, 216, 230 /* bkgnd color of LCD (backlight) */
295#define UI_LCD_BLACK 0, 0, 0 /* black */
296
Daniel Stenberge43b29d2006-08-03 20:25:39 +0000297#endif
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000298extern SDL_Surface *gui_surface;
Dan Evertonee2019d2006-02-09 11:17:52 +0000299extern bool background; /* True if the background image is enabled */
Dan Evertonb585e872006-02-09 21:49:28 +0000300extern int display_zoom;
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000301
Daniel Stenberg4582f232006-03-19 06:59:36 +0000302#endif /* #ifndef __UISDL_H__ */
Linus Nielsen Feltzing3f66e8e2006-02-03 16:01:16 +0000303