summaryrefslogtreecommitdiffstats
path: root/apps/player
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-04-16 09:14:36 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-04-16 09:14:36 +0000
commit6a5cc0bd25bd468c79e453fa49f353edd824141a (patch)
tree8b406e8390550ff8b87eae3214309867574657f0 /apps/player
parent7afe2e86931313653d4dedb6d5167c79c2822aba (diff)
downloadrockbox-6a5cc0bd25bd468c79e453fa49f353edd824141a.tar.gz
rockbox-6a5cc0bd25bd468c79e453fa49f353edd824141a.tar.bz2
rockbox-6a5cc0bd25bd468c79e453fa49f353edd824141a.zip
Customizable icons for all bitmap targets. (FS#7013)
http://www.rockbox.org/twiki/bin/view/Main/CustomIcons for info on format and how to load them git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13177 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/player')
-rw-r--r--apps/player/icons.c89
-rw-r--r--apps/player/icons.h45
2 files changed, 87 insertions, 47 deletions
diff --git a/apps/player/icons.c b/apps/player/icons.c
index 3f9b7c1547..6717eb12bd 100644
--- a/apps/player/icons.c
+++ b/apps/player/icons.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2002 Justin Heiner
+ * Copyright (C) 2007 Jonathan Gordon
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
@@ -17,8 +17,93 @@
*
****************************************************************************/
#include "lcd.h"
-#include "icons.h"
+#include "icon.h"
#ifdef HAVE_LCD_CHARCELLS
+/* For the moment, charcell cant load custom maps... */
+
+enum old_values{
+ old_Icon_Queued = 'Q',
+ old_Icon_Moving = 'M',
+ old_Icon_Unknown = 0xe100,
+ old_Icon_Bookmark,
+ old_Icon_Plugin,
+ old_Icon_Folder,
+ old_Icon_Firmware,
+ old_Icon_Language,
+ old_Icon_Audio,
+ old_Icon_Wps,
+ old_Icon_Playlist,
+ old_Icon_Text,
+ old_Icon_Config,
+};
+
+static const long icon_unknown = old_Icon_Unknown;
+static const long icons[Icon_Last_Themeable] = {
+ [0 ... Icon_Last_Themeable-1] = 0,
+
+ [Icon_Audio] = old_Icon_Audio,
+ [Icon_Folder] = old_Icon_Folder,
+ [Icon_Playlist] = old_Icon_Playlist,
+ [Icon_Cursor] = CURSOR_CHAR,
+ [Icon_Wps] = old_Icon_Wps,
+ [Icon_Firmware] = old_Icon_Firmware,
+ [Icon_Language] = old_Icon_Language,
+ [Icon_Config] = old_Icon_Config,
+ [Icon_Plugin] = old_Icon_Plugin,
+ [Icon_Bookmark] = old_Icon_Bookmark,
+ [Icon_Queued] = 'Q',
+ [Icon_Moving] = 'M',
+
+ /*
+ [Icon_Keyboard] = ,
+ [Icon_Font] = ,
+ [Icon_Preset] = ,
+ [Icon_Reverse_Cursor] = ,
+ [Icon_Questionmark] = ,
+ [Icon_Menu_setting] = ,
+ [Icon_Menu_functioncall] = ,
+ [Icon_Submenu] = ,
+ [Icon_Submenu_Entered] = ,
+ [Icon_Recording] = ,
+ [Icon_Voice] = ,
+ [Icon_General_settings_menu] = ,
+ [Icon_System_menu] = ,
+ [Icon_Playback_menu] = ,
+ [Icon_Display_menu] = ,
+ [Icon_Remote_Display_menu] = ,
+ [Icon_Radio_screen] = ,
+ [Icon_file_view_menu] = ,
+ [Icon_EQ] = ,
+ [Icon_Rockbox] = ,
+ */
+};
+
+/* as above, but x,y are letter position, NOT PIXEL */
+extern void screen_put_iconxy(struct screen * screen,
+ int x, int y, enum themable_icons icon)
+{
+ if (icon == -1)
+ screen->putc(x, y, icon_unknown);
+ else if ((icon==Icon_NOICON) && (icons[icon]!=0))
+ screen->putc(x, y, ' ');
+ else
+ screen->putc(x, y, icons[icon]);
+}
+
+void screen_put_cursorxy(struct screen * display, int x, int y, bool on)
+{
+ screen_put_iconxy(display, x, y, on?Icon_Cursor:-1);
+
+}
+
+void icons_init(void)
+{
+}
+
+
+
+
+
#endif
diff --git a/apps/player/icons.h b/apps/player/icons.h
index 5df94b09e3..48dfdfc345 100644
--- a/apps/player/icons.h
+++ b/apps/player/icons.h
@@ -25,50 +25,5 @@
* Icons of size 5x7 pixels for the Player LCD
*/
-#ifdef HAVE_LCD_CHARCELLS
-
-enum {
- Icon_Queued = 'Q',
- Icon_Moving = 'M',
- Icon_Unknown = 0xe100,
- Icon_Bookmark,
- Icon_Plugin,
- Icon_Folder,
- Icon_Firmware,
- Icon_Language,
- Icon_Audio,
- Icon_Wps,
- Icon_Playlist,
- Icon_Text,
- Icon_Config,
-};
-
-/* put icons from the 6x8 enum here if the player
- doesnt have an icon for it */
-enum unused_but_needed {
- Icon_Cursor,
- Icon_Font,
- Icon_Preset,
- Icon_Keyboard,
- Icon_Reverse_Cursor,
- Icon_Questionmark,
- Icon_Menu_setting,
- Icon_Menu_functioncall,
- Icon_Submenu,
- Icon_Submenu_Entered,
- Icon_Recording,
- Icon_Voice,
- Icon_General_settings_menu,
- Icon_System_menu,
- Icon_Playback_menu,
- Icon_Display_menu,
- Icon_Remote_Display_menu,
- Icon_Radio_screen,
- Icon_file_view_menu,
- Icon_EQ,
- Icon_Rockbox,
- Icon6x8Last,
-};
-#endif
#endif /* _ICONS_H_ */