blob: 3c955ffe5be23503a373949080280a8556f89918 [file] [log] [blame]
Daniel Stenberg1c0c8612002-05-17 12:22:24 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Robert E. Hak
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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.
Daniel Stenberg1c0c8612002-05-17 12:22:24 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
Björn Stenbergfb00c212004-05-21 20:08:24 +000021#ifndef _ICONS_H_
22#define _ICONS_H_
23
Jonathan Gordon5599d682007-02-14 06:58:30 +000024#ifndef PLUGIN
25
Daniel Stenberg1c0c8612002-05-17 12:22:24 +000026#include <lcd.h>
Björn Stenberg51b45d52008-10-15 06:38:51 +000027#include "metadata.h"
Daniel Stenberg1c0c8612002-05-17 12:22:24 +000028
Dave Chapman95538f62006-02-21 01:23:30 +000029#ifdef HAVE_LCD_BITMAP
30
31/* External bitmaps */
32
Björn Stenbergac488f82008-11-03 14:37:50 +000033#include "bitmaps/rockboxlogo.h"
Dave Chapman95538f62006-02-21 01:23:30 +000034#ifdef HAVE_REMOTE_LCD
Björn Stenbergac488f82008-11-03 14:37:50 +000035#include "bitmaps/remote_rockboxlogo.h"
Dave Chapman95538f62006-02-21 01:23:30 +000036#endif
37
Daniel Stenberg1c0c8612002-05-17 12:22:24 +000038
Björn Stenbergabe11fd2002-09-03 15:58:47 +000039/* Symbolic names for icons */
40enum icons_5x8 {
Kevin Ferraref57d0222005-11-22 21:55:05 +000041 Icon_Lock_Main,
42 Icon_Lock_Remote,
Martin Scarratt617b67e2006-09-02 17:30:30 +000043 Icon_Stereo,
44 Icon_Mono,
Martin Scarratt183499a2006-09-26 11:56:59 +000045#if CONFIG_CODEC != SWCODEC
46 Icon_q,
47#endif
Kevin Ferraref57d0222005-11-22 21:55:05 +000048 Icon5x8Last
Björn Stenbergabe11fd2002-09-03 15:58:47 +000049};
50
51enum icons_7x8 {
52 Icon_Plug,
Jens Arnold97a80492005-06-23 02:18:29 +000053 Icon_USBPlug,
Björn Stenbergabe11fd2002-09-03 15:58:47 +000054 Icon_Mute,
55 Icon_Play,
56 Icon_Stop,
57 Icon_Pause,
58 Icon_FastForward,
59 Icon_FastBackward,
60 Icon_Record,
61 Icon_RecPause,
Anton Oleynikov2c836342005-11-19 20:45:32 +000062 Icon_Radio,
63 Icon_Radio_Mute,
Björn Stenbergabe11fd2002-09-03 15:58:47 +000064 Icon_Repeat,
Björn Stenberg7e23c702002-10-08 10:24:29 +000065 Icon_RepeatOne,
Björn Stenbergabe11fd2002-09-03 15:58:47 +000066 Icon_Shuffle,
Björn Stenberg0ad20102002-09-03 20:47:23 +000067 Icon_DownArrow,
68 Icon_UpArrow,
Linus Nielsen Feltzing0ad617c2005-08-21 23:01:12 +000069 Icon_RepeatAB,
Kevin Ferraref57d0222005-11-22 21:55:05 +000070 Icon7x8Last
Björn Stenbergabe11fd2002-09-03 15:58:47 +000071};
72
Michael Sevakis0f5cb942006-11-06 18:07:30 +000073#if CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING)
74#define BM_GLYPH_WIDTH 4
75enum Glyphs_4x8 {
76 Glyph_4x8_0 = 0,
77 Glyph_4x8_1,
78 Glyph_4x8_2,
79 Glyph_4x8_3,
80 Glyph_4x8_4,
81 Glyph_4x8_5,
82 Glyph_4x8_6,
83 Glyph_4x8_7,
84 Glyph_4x8_8,
85 Glyph_4x8_9,
86 Glyph_4x8_k,
87 Glyph_4x8Last
Martin Scarrattd7fa5692006-09-12 18:26:27 +000088};
Michael Sevakis0f5cb942006-11-06 18:07:30 +000089extern const unsigned char bitmap_glyphs_4x8[Glyph_4x8Last][4];
Martin Scarrattd7fa5692006-09-12 18:26:27 +000090
Michael Sevakis0f5cb942006-11-06 18:07:30 +000091#define BM_MPA_L3_M_WIDTH 6
Björn Stenberg51b45d52008-10-15 06:38:51 +000092
Michael Sevakis0f5cb942006-11-06 18:07:30 +000093/* This enum is redundant but sort of in keeping with the style */
94enum rec_format_18x8 {
Michael Sevakis0729b922006-11-24 19:49:04 +000095 Format_18x8_AIFF = REC_FORMAT_AIFF,
Michael Sevakis0f5cb942006-11-06 18:07:30 +000096 Format_18x8_MPA_L3 = REC_FORMAT_MPA_L3,
97 Format_18x8_WAVPACK = REC_FORMAT_WAVPACK,
98 Format_18x8_PCM_WAV = REC_FORMAT_PCM_WAV,
99 Format_18x8Last = REC_NUM_FORMATS
Martin Scarratt617b67e2006-09-02 17:30:30 +0000100};
Michael Sevakis0f5cb942006-11-06 18:07:30 +0000101extern const unsigned char bitmap_formats_18x8[Format_18x8Last][18];
Björn Stenberg51b45d52008-10-15 06:38:51 +0000102
Michael Sevakis0f5cb942006-11-06 18:07:30 +0000103#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */
Magnus Holmgren1ecdbcc2006-09-12 20:32:06 +0000104
Kevin Ferraref57d0222005-11-22 21:55:05 +0000105extern const unsigned char bitmap_icons_5x8[Icon5x8Last][5];
Kevin Ferraref57d0222005-11-22 21:55:05 +0000106extern const unsigned char bitmap_icons_7x8[Icon7x8Last][7];
Jörg Hohensohnf5e7a762005-03-01 22:55:52 +0000107extern const unsigned char bitmap_icon_disk[];
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000108
Markus Braunde8fbf02002-08-07 10:35:26 +0000109#define STATUSBAR_X_POS 0
Robert Hak648ccc82003-02-26 21:39:13 +0000110#define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */
Markus Braunde8fbf02002-08-07 10:35:26 +0000111#define STATUSBAR_HEIGHT 8
112#define STATUSBAR_WIDTH LCD_WIDTH
113#define ICON_BATTERY_X_POS 0
114#define ICON_BATTERY_WIDTH 18
115#define ICON_PLUG_X_POS STATUSBAR_X_POS+ICON_BATTERY_WIDTH+2
116#define ICON_PLUG_WIDTH 7
117#define ICON_VOLUME_X_POS STATUSBAR_X_POS+ICON_BATTERY_WIDTH+ICON_PLUG_WIDTH+2+2
Markus Braun11d208c2002-08-20 20:32:08 +0000118#define ICON_VOLUME_WIDTH 16
Markus Braunde8fbf02002-08-07 10:35:26 +0000119#define ICON_PLAY_STATE_X_POS STATUSBAR_X_POS+ICON_BATTERY_WIDTH+ICON_PLUG_WIDTH+ICON_VOLUME_WIDTH+2+2+2
120#define ICON_PLAY_STATE_WIDTH 7
121#define ICON_PLAY_MODE_X_POS STATUSBAR_X_POS+ICON_BATTERY_WIDTH+ICON_PLUG_WIDTH+ICON_VOLUME_WIDTH+ICON_PLAY_STATE_WIDTH+2+2+2+2
122#define ICON_PLAY_MODE_WIDTH 7
123#define ICON_SHUFFLE_X_POS STATUSBAR_X_POS+ICON_BATTERY_WIDTH+ICON_PLUG_WIDTH+ICON_VOLUME_WIDTH+ICON_PLAY_STATE_WIDTH+ICON_PLAY_MODE_WIDTH+2+2+2+2+2
124#define ICON_SHUFFLE_WIDTH 7
125#define LOCK_X_POS STATUSBAR_X_POS+ICON_BATTERY_WIDTH+ICON_PLUG_WIDTH+ICON_VOLUME_WIDTH+ICON_PLAY_STATE_WIDTH+ICON_PLAY_MODE_WIDTH+ICON_SHUFFLE_WIDTH+2+2+2+2+2+2
126#define LOCK_WIDTH 5
Jörg Hohensohnf5e7a762005-03-01 22:55:52 +0000127#define ICON_DISK_WIDTH 12
Jörg Hohensohnc76fbf72005-02-19 00:34:15 +0000128#define ICON_DISK_X_POS STATUSBAR_WIDTH-ICON_DISK_WIDTH
Markus Braun11d208c2002-08-20 20:32:08 +0000129#define TIME_X_END STATUSBAR_WIDTH-1
Markus Braunde8fbf02002-08-07 10:35:26 +0000130
Daniel Stenberg1c0c8612002-05-17 12:22:24 +0000131#endif /* End HAVE_LCD_BITMAP */
Jonathan Gordon5599d682007-02-14 06:58:30 +0000132#endif /* PLUGIN */
Björn Stenbergfb00c212004-05-21 20:08:24 +0000133#endif /* _ICONS_H_ */