1
0
Fork 0
forked from len0rd/rockbox

Plugin Api add core bitmaps

share all the core icons with plugins
these are all small mono icons like usb plug icon or
play, fast forward, rewind icons

--include the icon_helper function

Change-Id: I385028815a4dd368515f491a9e19dee3d500252d
This commit is contained in:
William Wilgus 2021-08-19 22:00:36 -04:00 • committed by William Wilgus
parent cbf1970b56
commit b56372bbcb
7 changed files with 110 additions and 2 deletions

View file

@ -122,3 +122,11 @@ const unsigned char bitmap_icon_disk[12] =
{0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00};
#endif
const struct cbmp_bitmap_info_entry core_bitmaps[CBMP_BitmapFormatLast] = /* */
{
/* index, pointer, w, h, count */
[CBMP_Mono_5x8] = {bitmap_icons_5x8[0], 5,8, Icon5x8Last},
[CBMP_Mono_7x8] = {bitmap_icons_7x8[0], 7, 8, Icon7x8Last},
[CBMP_Mono_12x8] = {bitmap_icon_disk, 12, 8, 1},
};

View file

@ -32,7 +32,25 @@
#ifdef HAVE_REMOTE_LCD
#include "bitmaps/remote_rockboxlogo.h"
#endif
#endif /* PLUGIN */
struct cbmp_bitmap_info_entry /* */
{
const unsigned char* pbmp;
unsigned char width;
unsigned char height; /* !ASSUMES MULTIPLES OF 8! */
unsigned char count;
};
enum cbmp_bitmap_format
{
CBMP_Mono_5x8 = 0,
CBMP_Mono_7x8,
CBMP_Mono_12x8,
CBMP_BitmapFormatLast
};
extern const struct cbmp_bitmap_info_entry core_bitmaps[CBMP_BitmapFormatLast];
/* Symbolic names for icons */
enum icons_5x8 {
@ -65,6 +83,12 @@ enum icons_7x8 {
Icon7x8Last
};
enum icons_12x8 {
Icon_Disk,
Icon12x8Last
};
#ifndef PLUGIN
#if defined (HAVE_RECORDING)
#define BM_GLYPH_WIDTH 4
enum Glyphs_4x8 {