summaryrefslogtreecommitdiff
path: root/apps/recorder
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/recorder
parent7afe2e86931313653d4dedb6d5167c79c2822aba (diff)
downloadrockbox-6a5cc0bd25bd468c79e453fa49f353edd824141a.tar.gz
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/recorder')
-rw-r--r--apps/recorder/bmp.c7
-rw-r--r--apps/recorder/icons.c38
-rw-r--r--apps/recorder/icons.h45
-rw-r--r--apps/recorder/keyboard.c16
4 files changed, 7 insertions, 99 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c
index b33c0a329d..352b2f47b1 100644
--- a/apps/recorder/bmp.c
+++ b/apps/recorder/bmp.c
@@ -215,13 +215,6 @@ int read_bmp_file(char* filename,
215 } 215 }
216 216
217 height = readlong(&bmph.height); 217 height = readlong(&bmph.height);
218 if (height > LCD_HEIGHT) {
219 DEBUGF("read_bmp_file: Bitmap too high (%d pixels, max is %d)\n",
220 height, LCD_HEIGHT);
221 close(fd);
222 return -5;
223 }
224
225 depth = readshort(&bmph.bit_count); 218 depth = readshort(&bmph.bit_count);
226 padded_width = ((width * depth + 31) >> 3) & ~3; /* 4-byte boundary aligned */ 219 padded_width = ((width * depth + 31) >> 3) & ~3; /* 4-byte boundary aligned */
227 220
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index ccb42d5919..007cd07b7d 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -44,44 +44,6 @@ const unsigned char bitmap_icons_5x8[][5] =
44#endif 44#endif
45}; 45};
46 46
47const unsigned char bitmap_icons_6x8[][6] =
48{
49 { 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */
50 { 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */
51 { 0x55, 0x00, 0x55, 0x55, 0x55, 0x55 }, /* Playlist */
52 { 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00 }, /* Cursor / Marker */
53 { 0x58, 0x5f, 0x42, 0x50, 0x55, 0x55 }, /* WPS file */
54 { 0x63, 0x7f, 0x3a, 0x7f, 0x63, 0x00 }, /* Mod or ajz file */
55 { 0x60, 0x70, 0x38, 0x2c, 0x7e, 0x7e }, /* Font file */
56 { 0x3e, 0x2a, 0x3e, 0x2a, 0x2a, 0x3e }, /* Language file */
57 { 0x4e, 0x51, 0x51, 0x40, 0x55, 0x55 }, /* Config file */
58 { 0x0a, 0x0a, 0x5f, 0x4e, 0x24, 0x18 }, /* Plugin file */
59 { 0x7f, 0x41, 0x4f, 0x4a, 0x4c, 0x78 }, /* Bookmark file */
60 { 0x5f, 0x45, 0x5b, 0x40, 0x55, 0x55 }, /* Preset file */
61 { 0x77, 0x55, 0x55, 0x55, 0x55, 0x77 }, /* Queued Item */
62 { 0x3e, 0x41, 0x3e, 0x1c, 0x1c, 0x08 }, /* Moving Item */
63 { 0x7f, 0x7f, 0x1c, 0x3e, 0x77, 0x63 }, /* Keyboard file */
64 { 0x00, 0x00, 0x00, 0x08, 0x1c, 0x3e }, /* Reverse Cursor / Marker */
65 { 0x06, 0x03, 0x5b, 0x5b, 0x0f, 0x06 }, /* question mark */
66 { 0x00, 0x18, 0x24, 0x24, 0x18, 0x00 }, /* Menu Settings */
67 { 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00 }, /* function call from the menu */
68 { 0x18, 0x18, 0x7e, 0x7e, 0x18, 0x18 }, /* sub menu */
69 { 0x01, 0x55, 0x01, 0x55, 0x54, 0x54 }, /* in submenu */
70 { 0x1c, 0x3e, 0x7f, 0x7f, 0x3e, 0x1c }, /* Recording menu */
71 { 0x1c, 0x1c, 0x22, 0x41, 0x7f, 0x00 }, /* voice menu */
72 { 0x06, 0x0f, 0x78, 0x78, 0x0f, 0x06 }, /* general settings menu */
73 { 0x1e, 0x22, 0x49, 0x49, 0x22, 0x1e }, /* system menu */
74 { 0x7f, 0x7f, 0x3e, 0x1c, 0x08, 0x00 }, /* playback menu */
75 { 0x1f, 0x51, 0x71, 0x71, 0x51, 0x1f }, /* display menu */
76 { 0x1e, 0x32, 0x32, 0x32, 0x1e, 0x00 }, /* remote display menu */
77#if CONFIG_TUNER
78 { 0x03, 0x05, 0x7f, 0x05, 0x03, 0x00 }, /* radio */
79#endif
80 { 0x1f, 0x11, 0x7d, 0x46, 0x44, 0x78 }, /* File View Menu */
81 { 0x06, 0x7f, 0x06, 0x18, 0x7f, 0x18 }, /* EQ menu */
82 { 0x20, 0x70, 0x70, 0x3f, 0x0a, 0x0a }, /* "rockbox" musical note */
83};
84
85const unsigned char bitmap_icons_7x8[][7] = 47const unsigned char bitmap_icons_7x8[][7] =
86{ 48{
87 {0x08,0x1c,0x3e,0x3e,0x3e,0x14,0x14}, /* Power plug */ 49 {0x08,0x1c,0x3e,0x3e,0x3e,0x14,0x14}, /* Power plug */
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h
index 7682d44733..8c4cd2b2dd 100644
--- a/apps/recorder/icons.h
+++ b/apps/recorder/icons.h
@@ -32,10 +32,6 @@
32#include <remote_rockboxlogo.h> 32#include <remote_rockboxlogo.h>
33#endif 33#endif
34 34
35/*
36 * Icons of size 6x8 pixels
37 */
38
39 35
40/* Symbolic names for icons */ 36/* Symbolic names for icons */
41enum icons_5x8 { 37enum icons_5x8 {
@@ -49,46 +45,6 @@ enum icons_5x8 {
49 Icon5x8Last 45 Icon5x8Last
50}; 46};
51 47
52/* If any icons are added to this enum, they must be
53 added to the unused_but_needed enum in ../player/icons.h */
54enum icons_6x8 {
55 Icon_Audio,
56 Icon_Folder,
57 Icon_Playlist,
58 Icon_Cursor,
59 Icon_Wps,
60 Icon_Firmware,
61 Icon_Font,
62 Icon_Language,
63 Icon_Config,
64 Icon_Plugin,
65 Icon_Bookmark,
66 Icon_Preset,
67 Icon_Queued,
68 Icon_Moving,
69 Icon_Keyboard,
70 Icon_Reverse_Cursor,
71 Icon_Questionmark,
72 Icon_Menu_setting,
73 Icon_Menu_functioncall,
74 Icon_Submenu,
75 Icon_Submenu_Entered,
76 Icon_Recording,
77 Icon_Voice,
78 Icon_General_settings_menu,
79 Icon_System_menu,
80 Icon_Playback_menu,
81 Icon_Display_menu,
82 Icon_Remote_Display_menu,
83#if CONFIG_TUNER
84 Icon_Radio_screen,
85#endif
86 Icon_file_view_menu,
87 Icon_EQ,
88 Icon_Rockbox,
89 Icon6x8Last,
90};
91
92enum icons_7x8 { 48enum icons_7x8 {
93 Icon_Plug, 49 Icon_Plug,
94 Icon_USBPlug, 50 Icon_USBPlug,
@@ -144,7 +100,6 @@ extern const unsigned char bitmap_formats_18x8[Format_18x8Last][18];
144#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */ 100#endif /* CONFIG_CODEC == SWCODEC && defined (HAVE_RECORDING) */
145 101
146extern const unsigned char bitmap_icons_5x8[Icon5x8Last][5]; 102extern const unsigned char bitmap_icons_5x8[Icon5x8Last][5];
147extern const unsigned char bitmap_icons_6x8[Icon6x8Last][6];
148extern const unsigned char bitmap_icons_7x8[Icon7x8Last][7]; 103extern const unsigned char bitmap_icons_7x8[Icon7x8Last][7];
149extern const unsigned char bitmap_icon_disk[]; 104extern const unsigned char bitmap_icon_disk[];
150 105
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 9856e80d4a..bb8e4e93c3 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -31,7 +31,7 @@
31#include "logf.h" 31#include "logf.h"
32#include "hangul.h" 32#include "hangul.h"
33#include "action.h" 33#include "action.h"
34#include "icons.h" 34#include "icon.h"
35 35
36#ifndef O_BINARY 36#ifndef O_BINARY
37#define O_BINARY 0 37#define O_BINARY 0
@@ -654,10 +654,9 @@ int kbd_input(char* text, int buflen)
654 /* Draw nicer bitmap arrow if room, else settle for "<". */ 654 /* Draw nicer bitmap arrow if room, else settle for "<". */
655 if (text_w >= 6 && pm->font_h >= 8) 655 if (text_w >= 6 && pm->font_h >= 8)
656 { 656 {
657 sc->mono_bitmap(bitmap_icons_6x8[Icon_Reverse_Cursor], 657 screen_put_iconxy(sc, (text_w - 6) / 2,
658 (text_w - 6) / 2, 658 pm->main_y + (pm->font_h - 8) / 2 ,
659 pm->main_y + (pm->font_h - 8) / 2 , 659 Icon_Reverse_Cursor);
660 6, 8);
661 } 660 }
662 else 661 else
663 { 662 {
@@ -672,10 +671,9 @@ int kbd_input(char* text, int buflen)
672 /* Draw nicer bitmap arrow if room, else settle for ">". */ 671 /* Draw nicer bitmap arrow if room, else settle for ">". */
673 if (text_w >= 6 && pm->font_h >= 8) 672 if (text_w >= 6 && pm->font_h >= 8)
674 { 673 {
675 sc->mono_bitmap(bitmap_icons_6x8[Icon_Cursor], 674 screen_put_iconxy(sc, sc->width - text_w + (text_w - 6) / 2,
676 sc->width - text_w + (text_w - 6) / 2, 675 pm->main_y + (pm->font_h - 8) / 2,
677 pm->main_y + (pm->font_h - 8) / 2, 676 Icon_Cursor);
678 6, 8);
679 } 677 }
680 else 678 else
681 { 679 {