From f02a289c157954ccfe48ee046db7a27b3d053d88 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 14 Jul 2014 16:56:40 -0600 Subject: [PATCH] Add larger images for media player. Also options to control spacing and borders on media player windows --- Kconfig | 18 ++ nxwm/Makefile | 3 +- nxwm/images/mediaforward43x41.png | Bin 0 -> 317 bytes nxwm/images/mediagrip30x30.png | Bin 0 -> 252 bytes nxwm/images/mediapause21x41.png | Bin 0 -> 157 bytes nxwm/images/mediaplay21x41.png | Bin 0 -> 289 bytes nxwm/images/mediaplayer44x50.png | Bin 1098 -> 1098 bytes nxwm/images/mediarewind43x41.png | Bin 0 -> 316 bytes nxwm/include/nxwmconfig.hxx | 4 + nxwm/src/cmediaplayer.cxx | 119 +++++--- nxwm/src/glyph_mediagrip30x30.cxx | 266 ++++++++++++++++++ nxwm/src/glyph_mediaplayer44x50.cxx | 90 +++--- nxwm/src/glyph_mplayer_controls43x41.cxx | 342 +++++++++++++++++++++++ 13 files changed, 762 insertions(+), 80 deletions(-) create mode 100755 nxwm/images/mediaforward43x41.png create mode 100755 nxwm/images/mediagrip30x30.png create mode 100755 nxwm/images/mediapause21x41.png create mode 100755 nxwm/images/mediaplay21x41.png create mode 100755 nxwm/images/mediarewind43x41.png create mode 100644 nxwm/src/glyph_mediagrip30x30.cxx create mode 100644 nxwm/src/glyph_mplayer_controls43x41.cxx diff --git a/Kconfig b/Kconfig index 2f91b0308..2bd8ea02d 100644 --- a/Kconfig +++ b/Kconfig @@ -1117,4 +1117,22 @@ config NXWM_MEDIAPLAYER NOTE: This application is currently under development and just a shell of an app which will be developed soon. +if NXWM_MEDIAPLAYER + +config NXWM_MEDIAPLAYER_XSPACING + int "Media Player Button Spacing" + default 12 + ---help--- + This is the space between play, forward, and reverse buttons in + units of pixels. + +config NXWM_MEDIAPLAYER_BORDERS + bool "Media Player Button Borders" + default n + ---help--- + If you have nice graphics, then borderless would probably be the + better choice. If you graphics is really more of a button label, + then have buttons with boarders might make more sense. + +endif # NXWM_MEDIAPLAYER endif # NXWM diff --git a/nxwm/Makefile b/nxwm/Makefile index 624be08c2..ad9b39e24 100644 --- a/nxwm/Makefile +++ b/nxwm/Makefile @@ -88,7 +88,8 @@ endif ifeq ($(CONFIG_NXWM_MEDIAPLAYER),y) CXXSRCS += cmediaplayer.cxx ifeq ($(CONFIG_NXWM_LARGE_ICONS),y) -CXXSRCS += glyph_mediaplayer44x50.cxx glyph_mplayer_controls32x32.cxx +CXXSRCS += glyph_mediaplayer44x50.cxx glyph_mplayer_controls43x41.cxx +CXXSRCS += glyph_mediagrip30x30.cxx else CXXSRCS += glyph_mediaplayer24x24.cxx glyph_mplayer_controls32x32.cxx endif diff --git a/nxwm/images/mediaforward43x41.png b/nxwm/images/mediaforward43x41.png new file mode 100755 index 0000000000000000000000000000000000000000..3165856dd91f183a89410107416b811c474c1cf4 GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^+CZ$y!2~3gzq`)?QjEnx?oJHr&dIz4aySb-B8wRq z_zr_GH=O_IvDnBJ48X3ikd03Z3_KaSVw#d~}ARP_qHgk&b`=pMSZb z$$a+MH!B+lA%SlPOrP&53ZLX4H&G>^NM4dDl;7BA!H3>s99QI4GcO__Zc;;jmJ8Fqm4ci`sfJ$613RsO3ryV!t2eV#6kAs)w*QxXzB*?!LHC zK(bd=%J#78wyR!~Q@X-G2cNmb)O~Tr%SH|Jq$M*iW~k(B0SX5B9$b}bvbbMn@kJqq siJlo-+?FrC=n{55#q>MgW#0lJLA)78&qol`;+0Qf3cRR910 literal 0 HcmV?d00001 diff --git a/nxwm/images/mediapause21x41.png b/nxwm/images/mediapause21x41.png new file mode 100755 index 0000000000000000000000000000000000000000..35e815930cb77fc0583647106a8ab33e0be2b12d GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^qCl+4!2~2j&wdpLQjEnx?oJHr&dIz4aySb-B8wRq z_zr_GH=O_IvDnB7CB8dHX;n=zF?2hIkx*ds>l?fq~<&!?FMWZFHDK yx|WoBmu->_p7iTZp5*oq6*hAH#~**(U&A@q literal 0 HcmV?d00001 diff --git a/nxwm/images/mediaplay21x41.png b/nxwm/images/mediaplay21x41.png new file mode 100755 index 0000000000000000000000000000000000000000..aa96551ecf946090ac7bd3e9ac81f4d6f70a6a21 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^qCl+4!2~2j&wdpLQjEnx?oJHr&dIz4aySb-B8wRq z_zr_GH=O_IvDnBK(qmhY!~Sg*JP-IEHu}Uwh4yk6Dq&B{2B=e&a|5 zL8fDR;)$1;tM*@Ae5>mHH-m&Uea@cNIR|1c3q_c>uxxvq#q@k#5YxLjyT;orGaU?$ zs|ffn=Un36A)Mf6I__u=pU za%)ZZB>ers++CM+bp4Ju<}shu^(w?S|7+8fe{kox#YfFPo96ZNj_iBB@v(Qs_s~C& jS^s>Ms{8d>>M^tRQzuuJ$hlvE&S&s+^>bP0l+XkKm7a5x literal 0 HcmV?d00001 diff --git a/nxwm/images/mediaplayer44x50.png b/nxwm/images/mediaplayer44x50.png index c70a2ed7b31a88d5a4ae13fd87f0d2562c9dfff2..9eaa4e2698d20672ee3c590e536ed9fe5de68fcd 100755 GIT binary patch delta 247 zcmVumT9Mth*%bmQ?%f9CW`5!$*rO>m;RtL${N7}ryI xSh)Stg1{a)Ih|LGUZf^Uk&C~s4s81)@c{hy_5@o zUVg!k@ED#Mb}3t9(%peG-9N+zSPq-5vvIbO3DVhqI}q%qtFCWm5EwAvHat22`(fF1 zH=O_IvDnA{@dG!}lx$3Z3(GaSVw#d~}*4U$X-b^WJ~|=U?_- z+SMiYUd^xKz!`>a)(Jb5n09I_S*&J15cxOJapAuu3&Qrt2CTcUUGT!3%cpAVf#uV= z*8FU+d7HW zlj(DZN~7xciHaLuCCUj${BS$ZvBoxxon_kmx3NsJ@;Ag9m#vRczhG{v)Oc-gFvl0) zUXKO&SuRYq!OB7}W=lsetFont(m_font); - // Create the Play Image + // Create all bitmaps NXWidgets::CRlePaletteBitmap *playBitmap = new NXWidgets:: CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_PLAY_ICON); - uint32_t playControlX = (m_windowSize.w >> 1) - (playBitmap->getWidth() >> 1); - uint32_t controlY = (180 * m_windowSize.h) >> 8; - - m_playPause = new NXWidgets:: - CImage(control, (nxgl_coord_t)playControlX, (nxgl_coord_t)controlY, - playBitmap->getWidth(), playBitmap->getHeight(), - playBitmap); - - m_playPause->setBorderless(true); - - // Create the Rewind Image - NXWidgets::CRlePaletteBitmap *rewBitmap = new NXWidgets:: CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_REW_ICON); - uint32_t rewControlX = playControlX - rewBitmap->getWidth() - 16; + NXWidgets::CRlePaletteBitmap *fwdBitmap = new NXWidgets:: + CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_FWD_ICON); + + // Button widths will depend on if the buttons will be bordered or not + + nxgl_coord_t playButtonW; + nxgl_coord_t rewButtonW; + nxgl_coord_t fwdButtonW; + +#ifdef CONFIG_NXWM_MEDIAPLAYER_BORDERS + // With the widest button + + nxgl_coord_t buttonW = playBitmap->getWidth(); + + if (buttonW < rewBitmap->getWidth()) + { + buttonW = rewBitmap->getWidth(); + } + + if (buttonW < fwdBitmap->getWidth()) + { + buttonW = fwdBitmap->getWidth(); + } + + // Add little space around the bitmap and use this width for all buttons + + buttonW += 8; + playButtonW = buttonW; + rewButtonW = buttonW; + fwdButtonW = buttonW; + +#else + // Use the bitmap image widths for the button widths (plus a bit) + + playButtonW = playBitmap->getWidth() + 8; + rewButtonW = rewBitmap->getWidth() + 8; + fwdButtonW = fwdBitmap->getWidth() + 8; +#endif + + // Use the same height for all buttons + + nxgl_coord_t buttonH = playBitmap->getHeight(); + + if (buttonH < rewBitmap->getHeight()) + { + buttonH = rewBitmap->getHeight(); + } + + if (buttonH < fwdBitmap->getHeight()) + { + buttonH = fwdBitmap->getHeight(); + } + + buttonH += 8; + + // Create the Play Image + + nxgl_coord_t playControlX = (m_windowSize.w >> 1) - (playButtonW >> 1); + uint32_t controlY = (180 * m_windowSize.h) >> 8; + + m_playPause = new NXWidgets:: + CImage(control, playControlX, (nxgl_coord_t)controlY, + playButtonW, buttonH, playBitmap); + + // Create the Rewind Image + + nxgl_coord_t rewControlX = playControlX - rewButtonW - + CONFIG_NXWM_MEDIAPLAYER_XSPACING; m_rew = new NXWidgets:: - CImage(control, (nxgl_coord_t)rewControlX, (nxgl_coord_t)controlY, - rewBitmap->getWidth(), rewBitmap->getHeight(), - rewBitmap); - - m_rew->setBorderless(true); + CImage(control, rewControlX, (nxgl_coord_t)controlY, + rewButtonW, buttonH, rewBitmap); // Create the Forward Image - NXWidgets::CRlePaletteBitmap *fwdBitmap = new NXWidgets:: - CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_REW_ICON); - - fwdBitmap = new NXWidgets:: - CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_FWD_ICON); - - uint32_t fwdControlX = playControlX + fwdBitmap->getWidth() + 16; + nxgl_coord_t fwdControlX = playControlX + playButtonW + + CONFIG_NXWM_MEDIAPLAYER_XSPACING; m_fwd = new NXWidgets:: - CImage(control, (nxgl_coord_t)fwdControlX, (nxgl_coord_t)controlY, - fwdBitmap->getWidth(), fwdBitmap->getHeight(), - fwdBitmap); + CImage(control, fwdControlX, (nxgl_coord_t)controlY, + fwdButtonW, buttonH, fwdBitmap); +#ifndef CONFIG_NXWM_MEDIAPLAYER_BORDERS + // Make the images boarder-less if that is how we are configured + + m_playPause->setBorderless(true); + m_rew->setBorderless(true); m_fwd->setBorderless(true); +#else + m_playPause->setBorderless(false); + m_rew->setBorderless(false); + m_fwd->setBorderless(false); +#endif // Create the Volume control NXWidgets::CRlePaletteBitmap *volBitmap = new NXWidgets:: - CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_REW_ICON); + CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_VOL_ICON); uint32_t volumeControlX = (9 * m_windowSize.w) >> 8; uint32_t volumeControlY = (232 * m_windowSize.h) >> 8; - volBitmap = new NXWidgets:: - CRlePaletteBitmap(&CONFIG_NXWM_MPLAYER_VOL_ICON); - m_volume = new NXWidgets:: CGlyphSliderHorizontal(control, (nxgl_coord_t)volumeControlX, diff --git a/nxwm/src/glyph_mediagrip30x30.cxx b/nxwm/src/glyph_mediagrip30x30.cxx new file mode 100644 index 000000000..ecbf5e4f9 --- /dev/null +++ b/nxwm/src/glyph_mediagrip30x30.cxx @@ -0,0 +1,266 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/mediagrip30x30.cxx + * + * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX, NxWidgets, nor the names of its contributors + * me be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ********************************************************************************************/ + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include + +#include "crlepalettebitmap.hxx" + +#include "nxwmconfig.hxx" +#include "nxwmglyphs.hxx" + +/******************************************************************************************** + * Pre-Processor Definitions + ********************************************************************************************/ + +#define BITMAP_NROWS 30 +#define BITMAP_NCOLUMNS 30 +#define BITMAP_NLUTCODES 4 + +#define MEDIA_GRIP_DARK_ICON 1 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 +# ifdef MEDIA_GRIP_DARK_ICON + +static const uint32_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x3663ab, 0x002199, 0xbdbdbd /* Codes 0-3 */ +}; + +static const uint32_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x4884e4, 0x002ccc, 0xfcfcfc /* Codes 0-3 */ +}; + +# else /* MEDIA_GRIP_DARK_ICON */ + +static const uint32_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x4884e4, 0x002ccc, 0xfcfcfc /* Codes 0-3 */ +}; + +static const uint32_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x5aa5ff, 0x0037ff, 0xffffff /* Codes 0-3 */ +}; +# endif /* MEDIA_GRIP_DARK_ICON */ + +/* RGB16 (565) Colors */ + +#elif CONFIG_NXWIDGETS_BPP == 16 +# ifdef MEDIA_GRIP_DARK_ICON + +static const uint16_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x3315, 0x0113, 0xbdf7 /* Codes 0-3 */ +}; + +static const uint16_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x4c3c, 0x0179, 0xffff /* Codes 0-3 */ +}; + +# else /* MEDIA_GRIP_DARK_ICON */ + +static const uint16_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x4c3c, 0x0179, 0xffff /* Codes 0-3 */ +}; + +static const uint16_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x5d3f, 0x01bf, 0xffff /* Codes 0-3 */ +}; + +# endif /* MEDIA_GRIP_DARK_ICON */ + +/* 8-bit color lookups. NOTE: This is really dumb! The lookup index is 8-bits and it used + * to lookup an 8-bit value. There is no savings in that! It would be better to just put + * the 8-bit color/greyscale value in the run-length encoded image and save the cost of these + * pointless lookups. But these pointless lookups do make the logic compatible with the + * 16- and 24-bit types. + */ + +#elif CONFIG_NXWIDGETS_BPP == 8 +# ifdef CONFIG_NXWIDGETS_GREYSCALE + +/* 8-bit Greyscale */ + +# ifdef MEDIA_GRIP_DARK_ICON + +static const uint8_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x5d, 0x24, 0xbd /* Codes 0-3 */ +}; + +static const uint8_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x7d, 0x31, 0xfc /* Codes 0-3 */ +}; + +# else /* MEDIA_GRIP_DARK_ICON */ + +static const uint8_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x7d, 0x31, 0xfc /* Codes 0-3 */ +}; + +static const uint8_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x98, 0x3d, 0xff /* Codes 0-3 */ +}; + +# endif /* MEDIA_GRIP_DARK_ICON */ + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +/* RGB8 (332) Colors */ + +# ifdef MEDIA_GRIP_DARK_ICON + +static const nxgl_mxpixel_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x2e, 0x06, 0xb6 /* Codes 0-3 */ +}; + +static const nxgl_mxpixel_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x53, 0x07, 0xff /* Codes 0-3 */ +}; + +# else /* MEDIA_GRIP_DARK_ICON */ + +static const nxgl_mxpixel_t g_gripNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x53, 0x07, 0xff /* Codes 0-3 */ +}; + +static const nxgl_mxpixel_t g_gripBrightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x57, 0x07, 0xff /* Codes 0-3 */ +}; + +# endif /* MEDIA_GRIP_DARK_ICON */ +# endif /* CONFIG_NXWIDGETS_GREYSCALE */ +#else +# error Unsupported pixel format +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_gripRleEntries[] = +{ + { 1, 0}, { 1, 1}, {26, 2}, { 1, 1}, { 1, 0}, /* Row 0 */ + { 1, 1}, {28, 2}, { 1, 1}, /* Row 1 */ + {30, 2}, /* Row 2 */ + {30, 2}, /* Row 3 */ + {30, 2}, /* Row 4 */ + {30, 2}, /* Row 5 */ + {12, 2}, { 1, 1}, { 4, 3}, { 1, 1}, {12, 2}, /* Row 6 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 7 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 8 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 9 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 10 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 11 */ + { 6, 2}, { 1, 1}, {16, 3}, { 1, 1}, { 6, 2}, /* Row 12 */ + { 6, 2}, {18, 3}, { 6, 2}, /* Row 13 */ + { 6, 2}, {18, 3}, { 6, 2}, /* Row 14 */ + { 6, 2}, {18, 3}, { 6, 2}, /* Row 15 */ + { 6, 2}, {18, 3}, { 6, 2}, /* Row 16 */ + { 6, 2}, { 1, 1}, {16, 3}, { 1, 1}, { 6, 2}, /* Row 17 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 18 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 19 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 20 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 21 */ + {12, 2}, { 6, 3}, {12, 2}, /* Row 22 */ + {12, 2}, { 1, 1}, { 4, 3}, { 1, 1}, {12, 2}, /* Row 23 */ + {30, 2}, /* Row 24 */ + {30, 2}, /* Row 25 */ + {30, 2}, /* Row 26 */ + {30, 2}, /* Row 27 */ + { 1, 1}, {28, 2}, { 1, 1}, /* Row 28 */ + { 1, 0}, { 1, 1}, {26, 2}, { 1, 1}, { 1, 0} /* Row 29 */ +}; + +/******************************************************************************************** + * Public Bitmap Structure Definitions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerVolBitmap = +{ + CONFIG_NXWIDGETS_BPP, // bpp - Bits per pixel + CONFIG_NXWIDGETS_FMT, // fmt - Color format + BITMAP_NLUTCODES, // nlut - Number of colors in the lLook-Up Table (LUT) + BITMAP_NCOLUMNS, // width - Width in pixels + BITMAP_NROWS, // height - Height in rows + { // lut - Pointer to the beginning of the Look-Up Table (LUT) + g_gripNormalLut, // Index 0: Unselected LUT + g_gripBrightLut, // Index 1: Selected LUT + }, + g_gripRleEntries // data - Pointer to the beginning of the RLE data +}; diff --git a/nxwm/src/glyph_mediaplayer44x50.cxx b/nxwm/src/glyph_mediaplayer44x50.cxx index c3a9412a5..0d82e6673 100644 --- a/nxwm/src/glyph_mediaplayer44x50.cxx +++ b/nxwm/src/glyph_mediaplayer44x50.cxx @@ -56,7 +56,7 @@ * Pre-Processor Definitions ********************************************************************************************/ -#define BITMAP_NROWS 50 +#define BITMAP_NROWS 48 #define BITMAP_NCOLUMNS 44 #define BITMAP_NLUTCODES 5 @@ -215,72 +215,70 @@ static const nxgl_mxpixel_t g_mediaplayerBrightLut[BITMAP_NLUTCODES] = static const struct NXWidgets::SRlePaletteBitmapEntry g_mediaplayerRleEntries[] = { - {41, 0}, { 3, 1}, /* Row 0 */ + {38, 0}, { 6, 1}, /* Row 0 */ {38, 0}, { 6, 1}, /* Row 1 */ - {38, 0}, { 6, 1}, /* Row 2 */ - {34, 0}, {10, 1}, /* Row 3 */ - {30, 0}, {14, 1}, /* Row 4 */ - {26, 0}, {13, 1}, { 2, 2}, { 3, 1}, /* Row 5 */ - {22, 0}, {13, 1}, { 6, 2}, { 3, 1}, /* Row 6 */ - {22, 0}, {13, 1}, { 6, 2}, { 3, 1}, /* Row 7 */ - {18, 0}, {13, 1}, {10, 2}, { 3, 1}, /* Row 8 */ - {14, 0}, {13, 1}, {14, 2}, { 3, 1}, /* Row 9 */ - {14, 0}, { 9, 1}, {18, 2}, { 3, 1}, /* Row 10 */ - {14, 0}, { 9, 1}, {18, 2}, { 3, 1}, /* Row 11 */ - {14, 0}, { 5, 1}, {19, 2}, { 1, 1}, { 2, 2}, { 3, 1}, /* Row 12 */ - {14, 0}, { 3, 1}, {17, 2}, { 5, 1}, { 2, 2}, { 3, 1}, /* Row 13 */ - {14, 0}, { 3, 1}, {13, 2}, { 9, 1}, { 2, 2}, { 3, 1}, /* Row 14 */ - {14, 0}, { 3, 1}, { 9, 2}, {13, 1}, { 2, 2}, { 3, 1}, /* Row 15 */ - {14, 0}, { 3, 1}, { 9, 2}, {13, 1}, { 2, 2}, { 3, 1}, /* Row 16 */ - {14, 0}, { 3, 1}, { 5, 2}, {10, 1}, { 4, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 17 */ - {14, 0}, { 3, 1}, { 2, 2}, { 9, 1}, { 8, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 18 */ - {14, 0}, { 3, 1}, { 2, 2}, { 6, 1}, {11, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 19 */ - {14, 0}, { 3, 1}, { 2, 2}, { 6, 1}, {11, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 20 */ + {34, 0}, {10, 1}, /* Row 2 */ + {30, 0}, {14, 1}, /* Row 3 */ + {26, 0}, {18, 1}, /* Row 4 */ + {22, 0}, {17, 1}, { 2, 2}, { 3, 1}, /* Row 5 */ + {18, 0}, {17, 1}, { 6, 2}, { 3, 1}, /* Row 6 */ + {14, 0}, {17, 1}, {10, 2}, { 3, 1}, /* Row 7 */ + {14, 0}, {13, 1}, {14, 2}, { 3, 1}, /* Row 8 */ + {14, 0}, { 9, 1}, {18, 2}, { 3, 1}, /* Row 9 */ + {14, 0}, { 5, 1}, {22, 2}, { 3, 1}, /* Row 10 */ + {14, 0}, { 3, 1}, {21, 2}, { 1, 1}, { 2, 2}, { 3, 1}, /* Row 11 */ + {14, 0}, { 3, 1}, {17, 2}, { 5, 1}, { 2, 2}, { 3, 1}, /* Row 12 */ + {14, 0}, { 3, 1}, {13, 2}, { 9, 1}, { 2, 2}, { 3, 1}, /* Row 13 */ + {14, 0}, { 3, 1}, { 9, 2}, {13, 1}, { 2, 2}, { 3, 1}, /* Row 14 */ + {14, 0}, { 3, 1}, { 5, 2}, {12, 1}, { 2, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 15 */ + {14, 0}, { 3, 1}, { 2, 2}, {11, 1}, { 6, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 16 */ + {14, 0}, { 3, 1}, { 2, 2}, { 7, 1}, {10, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 17 */ + {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 18 */ + {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 19 */ + {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 20 */ {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 21 */ {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 22 */ {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 23 */ {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 24 */ - {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 25 */ - {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 26 */ - {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 9, 0}, { 1, 3}, { 2, 4}, { 1, 3}, /* Row 27 */ + {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 9, 0}, { 1, 3}, { 2, 4}, { 1, 3}, /* Row 25 */ { 1, 0}, { 3, 1}, { 2, 2}, { 3, 1}, - {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 6, 0}, { 2, 3}, { 9, 1}, { 2, 2}, /* Row 28 */ + {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 6, 0}, { 2, 3}, { 9, 1}, { 2, 2}, /* Row 26 */ { 3, 1}, - {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 5, 0}, { 1, 4}, {11, 1}, { 2, 2}, /* Row 29 */ + {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 5, 0}, { 1, 4}, {11, 1}, { 2, 2}, /* Row 27 */ { 3, 1}, - {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 5, 0}, { 7, 1}, { 1, 4}, { 4, 1}, /* Row 30 */ + {14, 0}, { 3, 1}, { 2, 2}, { 3, 1}, { 5, 0}, { 7, 1}, { 1, 4}, { 4, 1}, /* Row 28 */ { 2, 2}, { 3, 1}, - { 9, 0}, { 1, 3}, { 2, 4}, { 1, 3}, { 1, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 31 */ + { 9, 0}, { 1, 3}, { 2, 4}, { 1, 3}, { 1, 0}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 29 */ { 4, 0}, { 3, 1}, { 1, 4}, { 1, 1}, { 5, 2}, { 2, 4}, { 1, 1}, { 2, 2}, { 3, 1}, - { 6, 0}, { 2, 4}, { 9, 1}, { 2, 2}, { 3, 1}, { 3, 0}, { 1, 4}, { 2, 1}, /* Row 32 */ + { 6, 0}, { 2, 4}, { 9, 1}, { 2, 2}, { 3, 1}, { 3, 0}, { 1, 4}, { 2, 1}, /* Row 30 */ { 2, 4}, {11, 2}, { 3, 1}, - { 5, 0}, { 1, 4}, {11, 1}, { 2, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, /* Row 33 */ + { 5, 0}, { 1, 4}, {11, 1}, { 2, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, /* Row 31 */ { 3, 1}, - { 5, 0}, {12, 1}, { 2, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, /* Row 34 */ - { 4, 0}, { 3, 1}, { 1, 4}, { 1, 1}, { 5, 2}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 35 */ + { 5, 0}, {12, 1}, { 2, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, /* Row 32 */ + { 4, 0}, { 3, 1}, { 1, 4}, { 1, 1}, { 5, 2}, { 3, 1}, { 2, 2}, { 3, 1}, /* Row 33 */ { 2, 0}, { 1, 3}, { 2, 1}, {14, 2}, { 3, 1}, - { 3, 0}, { 1, 4}, { 2, 1}, { 2, 3}, {11, 2}, { 3, 1}, { 2, 0}, { 1, 4}, /* Row 36 */ + { 3, 0}, { 1, 4}, { 2, 1}, { 2, 3}, {11, 2}, { 3, 1}, { 2, 0}, { 1, 4}, /* Row 34 */ { 2, 1}, {14, 2}, { 3, 1}, - { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, /* Row 37 */ - { 2, 0}, { 1, 3}, { 2, 1}, {14, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, /* Row 38 */ + { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, /* Row 35 */ + { 2, 0}, { 1, 3}, { 2, 1}, {14, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {13, 2}, /* Row 36 */ { 3, 1}, - { 2, 0}, { 1, 3}, { 2, 1}, {14, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {12, 2}, /* Row 39 */ + { 2, 0}, { 1, 3}, { 2, 1}, {14, 2}, { 3, 1}, { 3, 0}, { 3, 1}, {12, 2}, /* Row 37 */ { 1, 4}, { 3, 1}, - { 2, 0}, { 1, 4}, { 2, 1}, {14, 2}, { 3, 1}, { 4, 0}, { 4, 1}, {10, 2}, /* Row 40 */ + { 2, 0}, { 1, 4}, { 2, 1}, {14, 2}, { 3, 1}, { 4, 0}, { 4, 1}, {10, 2}, /* Row 38 */ { 3, 1}, { 1, 3}, - { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, { 4, 0}, { 1, 3}, { 5, 1}, { 1, 4}, /* Row 41 */ + { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, { 4, 0}, { 1, 3}, { 5, 1}, { 1, 4}, /* Row 39 */ { 5, 2}, { 1, 4}, { 4, 1}, { 1, 0}, - { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, { 5, 0}, { 1, 3}, {14, 1}, { 2, 0}, /* Row 42 */ - { 3, 0}, { 3, 1}, {12, 2}, { 1, 4}, { 2, 1}, { 1, 3}, { 5, 0}, { 1, 3}, /* Row 43 */ + { 3, 0}, { 3, 1}, {13, 2}, { 3, 1}, { 5, 0}, { 1, 3}, {14, 1}, { 2, 0}, /* Row 40 */ + { 3, 0}, { 3, 1}, {12, 2}, { 1, 4}, { 2, 1}, { 1, 3}, { 5, 0}, { 1, 3}, /* Row 41 */ {12, 1}, { 1, 4}, { 3, 0}, - { 4, 0}, { 4, 1}, {10, 2}, { 3, 1}, { 1, 4}, { 9, 0}, { 1, 4}, { 7, 1}, /* Row 44 */ + { 4, 0}, { 4, 1}, {10, 2}, { 3, 1}, { 1, 4}, { 9, 0}, { 1, 4}, { 7, 1}, /* Row 42 */ { 1, 3}, { 4, 0}, - { 4, 0}, { 1, 3}, { 5, 1}, { 1, 4}, { 5, 2}, { 1, 4}, { 4, 1}, {23, 0}, /* Row 45 */ - { 5, 0}, { 1, 3}, {13, 1}, {25, 0}, /* Row 46 */ - { 7, 0}, {11, 1}, {26, 0}, /* Row 47 */ - { 9, 0}, { 1, 3}, { 4, 1}, { 2, 4}, {28, 0}, /* Row 48 */ - {44, 0} /* Row 49 */ + { 4, 0}, { 1, 3}, { 5, 1}, { 1, 4}, { 5, 2}, { 1, 4}, { 4, 1}, {23, 0}, /* Row 43 */ + { 5, 0}, { 1, 3}, {13, 1}, {25, 0}, /* Row 44 */ + { 7, 0}, {11, 1}, {26, 0}, /* Row 45 */ + { 9, 0}, { 1, 3}, { 4, 1}, { 2, 4}, {28, 0}, /* Row 46 */ + {44, 0} /* Row 47 */ }; /******************************************************************************************** diff --git a/nxwm/src/glyph_mplayer_controls43x41.cxx b/nxwm/src/glyph_mplayer_controls43x41.cxx new file mode 100644 index 000000000..505d612d4 --- /dev/null +++ b/nxwm/src/glyph_mplayer_controls43x41.cxx @@ -0,0 +1,342 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_mediaplayer43x41.cxx + * + * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX, NxWidgets, nor the names of its contributors + * me be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ********************************************************************************************/ + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +/* Automatically NuttX bitmap file. */ +/* Generated from play_music.png by bitmap_converter.py. */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include "crlepalettebitmap.hxx" + +#include "nxwmconfig.hxx" +#include "nxwmglyphs.hxx" + +/******************************************************************************************** + * Pre-Processor Definitions + ********************************************************************************************/ + +#define FORWARD_BITMAP_NROWS 41 +#define FORWARD_BITMAP_NCOLUMNS 43 + +#define PLAY_BITMAP_NROWS 41 +#define PLAY_BITMAP_NCOLUMNS 21 + +#define REWIND_BITMAPNROWS 41 +#define REWIND_BITMAPNCOLUMNS 43 + +#define PAUSE_BITMAP_NROWS 41 +#define PAUSE_BITMAP_NCOLUMNS 21 + +#define BITMAP_NLUTCODES 8 + +/******************************************************************************************** + * Private Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB Colors */ + +static const NXWidgets::nxwidget_pixel_t g_normalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + MKRGB(189,189,189) /* Code 1 */ +}; + +static const NXWidgets::nxwidget_pixel_t g_brightLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + MKRGB(252,252,252) /* Code 1 */ +}; + +/* Bitmap definition for the "Forward" button */ + +static const struct NXWidgets::SRlePaletteBitmapEntry g_forwardRleEntries[] = +{ + { 1, 1}, {21, 0}, { 1, 1}, {20, 0}, /* Row 0 */ + { 2, 1}, {20, 0}, { 2, 1}, {19, 0}, /* Row 1 */ + { 3, 1}, {19, 0}, { 3, 1}, {18, 0}, /* Row 2 */ + { 4, 1}, {18, 0}, { 4, 1}, {17, 0}, /* Row 3 */ + { 5, 1}, {17, 0}, { 5, 1}, {16, 0}, /* Row 4 */ + { 6, 1}, {16, 0}, { 6, 1}, {15, 0}, /* Row 5 */ + { 7, 1}, {15, 0}, { 7, 1}, {14, 0}, /* Row 6 */ + { 8, 1}, {14, 0}, { 8, 1}, {13, 0}, /* Row 7 */ + { 9, 1}, {13, 0}, { 9, 1}, {12, 0}, /* Row 8 */ + {10, 1}, {12, 0}, {10, 1}, {11, 0}, /* Row 9 */ + {11, 1}, {11, 0}, {11, 1}, {10, 0}, /* Row 10 */ + {12, 1}, {10, 0}, {12, 1}, { 9, 0}, /* Row 11 */ + {13, 1}, { 9, 0}, {13, 1}, { 8, 0}, /* Row 12 */ + {14, 1}, { 8, 0}, {14, 1}, { 7, 0}, /* Row 13 */ + {15, 1}, { 7, 0}, {15, 1}, { 6, 0}, /* Row 14 */ + {16, 1}, { 6, 0}, {16, 1}, { 5, 0}, /* Row 15 */ + {17, 1}, { 5, 0}, {17, 1}, { 4, 0}, /* Row 16 */ + {18, 1}, { 4, 0}, {18, 1}, { 3, 0}, /* Row 17 */ + {19, 1}, { 3, 0}, {19, 1}, { 2, 0}, /* Row 18 */ + {20, 1}, { 2, 0}, {20, 1}, { 1, 0}, /* Row 19 */ + {21, 1}, { 1, 0}, {21, 1}, /* Row 20 */ + {20, 1}, { 2, 0}, {20, 1}, { 1, 0}, /* Row 21 */ + {19, 1}, { 3, 0}, {19, 1}, { 2, 0}, /* Row 22 */ + {18, 1}, { 4, 0}, {18, 1}, { 3, 0}, /* Row 23 */ + {17, 1}, { 5, 0}, {17, 1}, { 4, 0}, /* Row 24 */ + {16, 1}, { 6, 0}, {16, 1}, { 5, 0}, /* Row 25 */ + {15, 1}, { 7, 0}, {15, 1}, { 6, 0}, /* Row 26 */ + {14, 1}, { 8, 0}, {14, 1}, { 7, 0}, /* Row 27 */ + {13, 1}, { 9, 0}, {13, 1}, { 8, 0}, /* Row 28 */ + {12, 1}, {10, 0}, {12, 1}, { 9, 0}, /* Row 29 */ + {11, 1}, {11, 0}, {11, 1}, {10, 0}, /* Row 30 */ + {10, 1}, {12, 0}, {10, 1}, {11, 0}, /* Row 31 */ + { 9, 1}, {13, 0}, { 9, 1}, {12, 0}, /* Row 32 */ + { 8, 1}, {14, 0}, { 8, 1}, {13, 0}, /* Row 33 */ + { 7, 1}, {15, 0}, { 7, 1}, {14, 0}, /* Row 34 */ + { 6, 1}, {16, 0}, { 6, 1}, {15, 0}, /* Row 35 */ + { 5, 1}, {17, 0}, { 5, 1}, {16, 0}, /* Row 36 */ + { 4, 1}, {18, 0}, { 4, 1}, {17, 0}, /* Row 37 */ + { 3, 1}, {19, 0}, { 3, 1}, {18, 0}, /* Row 38 */ + { 2, 1}, {20, 0}, { 2, 1}, {19, 0}, /* Row 39 */ + { 1, 1}, {21, 0}, { 1, 1}, {20, 0} /* Row 40 */ +}; + +/* Bitmap definition for the "Play" button */ + +static const struct NXWidgets::SRlePaletteBitmapEntry g_playRleEntries[] = +{ + { 1, 1}, {20, 0}, /* Row 0 */ + { 2, 1}, {19, 0}, /* Row 1 */ + { 3, 1}, {18, 0}, /* Row 2 */ + { 4, 1}, {17, 0}, /* Row 3 */ + { 5, 1}, {16, 0}, /* Row 4 */ + { 6, 1}, {15, 0}, /* Row 5 */ + { 7, 1}, {14, 0}, /* Row 6 */ + { 8, 1}, {13, 0}, /* Row 7 */ + { 9, 1}, {12, 0}, /* Row 8 */ + {10, 1}, {11, 0}, /* Row 9 */ + {11, 1}, {10, 0}, /* Row 10 */ + {12, 1}, { 9, 0}, /* Row 11 */ + {13, 1}, { 8, 0}, /* Row 12 */ + {14, 1}, { 7, 0}, /* Row 13 */ + {15, 1}, { 6, 0}, /* Row 14 */ + {16, 1}, { 5, 0}, /* Row 15 */ + {17, 1}, { 4, 0}, /* Row 16 */ + {18, 1}, { 3, 0}, /* Row 17 */ + {19, 1}, { 2, 0}, /* Row 18 */ + {20, 1}, { 1, 0}, /* Row 19 */ + {21, 1}, /* Row 20 */ + {20, 1}, { 1, 0}, /* Row 21 */ + {19, 1}, { 2, 0}, /* Row 22 */ + {18, 1}, { 3, 0}, /* Row 23 */ + {17, 1}, { 4, 0}, /* Row 24 */ + {16, 1}, { 5, 0}, /* Row 25 */ + {15, 1}, { 6, 0}, /* Row 26 */ + {14, 1}, { 7, 0}, /* Row 27 */ + {13, 1}, { 8, 0}, /* Row 28 */ + {12, 1}, { 9, 0}, /* Row 29 */ + {11, 1}, {10, 0}, /* Row 30 */ + {10, 1}, {11, 0}, /* Row 31 */ + { 9, 1}, {12, 0}, /* Row 32 */ + { 8, 1}, {13, 0}, /* Row 33 */ + { 7, 1}, {14, 0}, /* Row 34 */ + { 6, 1}, {15, 0}, /* Row 35 */ + { 5, 1}, {16, 0}, /* Row 36 */ + { 4, 1}, {17, 0}, /* Row 37 */ + { 3, 1}, {18, 0}, /* Row 38 */ + { 2, 1}, {19, 0}, /* Row 39 */ + { 1, 1}, {20, 0} /* Row 40 */ +}; + +/* Bitmap definition for "Rewind" control */ + +static const struct NXWidgets::SRlePaletteBitmapEntry g_rewindRleEntries[] = +{ + {20, 0}, { 1, 1}, {21, 0}, { 1, 1}, /* Row 0 */ + {19, 0}, { 2, 1}, {20, 0}, { 2, 1}, /* Row 1 */ + {18, 0}, { 3, 1}, {19, 0}, { 3, 1}, /* Row 2 */ + {17, 0}, { 4, 1}, {18, 0}, { 4, 1}, /* Row 3 */ + {16, 0}, { 5, 1}, {17, 0}, { 5, 1}, /* Row 4 */ + {15, 0}, { 6, 1}, {16, 0}, { 6, 1}, /* Row 5 */ + {14, 0}, { 7, 1}, {15, 0}, { 7, 1}, /* Row 6 */ + {13, 0}, { 8, 1}, {14, 0}, { 8, 1}, /* Row 7 */ + {12, 0}, { 9, 1}, {13, 0}, { 9, 1}, /* Row 8 */ + {11, 0}, {10, 1}, {12, 0}, {10, 1}, /* Row 9 */ + {10, 0}, {11, 1}, {11, 0}, {11, 1}, /* Row 10 */ + { 9, 0}, {12, 1}, {10, 0}, {12, 1}, /* Row 11 */ + { 8, 0}, {13, 1}, { 9, 0}, {13, 1}, /* Row 12 */ + { 7, 0}, {14, 1}, { 8, 0}, {14, 1}, /* Row 13 */ + { 6, 0}, {15, 1}, { 7, 0}, {15, 1}, /* Row 14 */ + { 5, 0}, {16, 1}, { 6, 0}, {16, 1}, /* Row 15 */ + { 4, 0}, {17, 1}, { 5, 0}, {17, 1}, /* Row 16 */ + { 3, 0}, {18, 1}, { 4, 0}, {18, 1}, /* Row 17 */ + { 2, 0}, {19, 1}, { 3, 0}, {19, 1}, /* Row 18 */ + { 1, 0}, {20, 1}, { 2, 0}, {20, 1}, /* Row 19 */ + {21, 1}, { 1, 0}, {21, 1}, /* Row 20 */ + { 1, 0}, {20, 1}, { 2, 0}, {20, 1}, /* Row 21 */ + { 2, 0}, {19, 1}, { 3, 0}, {19, 1}, /* Row 22 */ + { 3, 0}, {18, 1}, { 4, 0}, {18, 1}, /* Row 23 */ + { 4, 0}, {17, 1}, { 5, 0}, {17, 1}, /* Row 24 */ + { 5, 0}, {16, 1}, { 6, 0}, {16, 1}, /* Row 25 */ + { 6, 0}, {15, 1}, { 7, 0}, {15, 1}, /* Row 26 */ + { 7, 0}, {14, 1}, { 8, 0}, {14, 1}, /* Row 27 */ + { 8, 0}, {13, 1}, { 9, 0}, {13, 1}, /* Row 28 */ + { 9, 0}, {12, 1}, {10, 0}, {12, 1}, /* Row 29 */ + {10, 0}, {11, 1}, {11, 0}, {11, 1}, /* Row 30 */ + {11, 0}, {10, 1}, {12, 0}, {10, 1}, /* Row 31 */ + {12, 0}, { 9, 1}, {13, 0}, { 9, 1}, /* Row 32 */ + {13, 0}, { 8, 1}, {14, 0}, { 8, 1}, /* Row 33 */ + {14, 0}, { 7, 1}, {15, 0}, { 7, 1}, /* Row 34 */ + {15, 0}, { 6, 1}, {16, 0}, { 6, 1}, /* Row 35 */ + {16, 0}, { 5, 1}, {17, 0}, { 5, 1}, /* Row 36 */ + {17, 0}, { 4, 1}, {18, 0}, { 4, 1}, /* Row 37 */ + {18, 0}, { 3, 1}, {19, 0}, { 3, 1}, /* Row 38 */ + {19, 0}, { 2, 1}, {20, 0}, { 2, 1}, /* Row 39 */ + {20, 0}, { 1, 1}, {21, 0}, { 1, 1} /* Row 40 */ +}; + +/* Bitmap definition for the "Pause" button */ + +static const struct NXWidgets::SRlePaletteBitmapEntry g_pauseRleEntries[] = +{ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 0 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 1 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 2 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 3 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 4 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 5 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 6 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 7 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 8 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 9 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 10 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 11 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 12 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 13 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 14 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 15 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 16 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 17 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 18 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 19 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 20 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 21 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 22 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 23 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 24 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 25 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 26 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 27 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 28 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 29 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 30 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 31 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 32 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 33 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 34 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 35 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 36 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 37 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 38 */ + { 2, 1}, { 5, 0}, {14, 1}, /* Row 39 */ + { 2, 1}, { 5, 0}, {14, 1} /* Row 40 */ +}; + +/******************************************************************************************** + * Public Data + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerFwdBitmap = +{ + CONFIG_NXWIDGETS_BPP, // bpp - Bits per pixel + CONFIG_NXWIDGETS_FMT, // fmt - Color format + BITMAP_NLUTCODES, // nlut - Number of colors in the lLook-Up Table (LUT) + FORWARD_BITMAP_NCOLUMNS, // width - Width in pixels + FORWARD_BITMAP_NROWS, // height - Height in rows + { // lut - Pointer to the beginning of the Look-Up Table (LUT) + g_normalLut, // Index 0: Unselected LUT + g_brightLut, // Index 1: Selected LUT + }, + g_forwardRleEntries // data - Pointer to the beginning of the RLE data +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerPlayBitmap = +{ + CONFIG_NXWIDGETS_BPP, // bpp - Bits per pixel + CONFIG_NXWIDGETS_FMT, // fmt - Color format + BITMAP_NLUTCODES, // nlut - Number of colors in the lLook-Up Table (LUT) + PLAY_BITMAP_NCOLUMNS, // width - Width in pixels + PLAY_BITMAP_NROWS, // height - Height in rows + { // lut - Pointer to the beginning of the Look-Up Table (LUT) + g_normalLut, // Index 0: Unselected LUT + g_brightLut, // Index 1: Selected LUT + }, + g_playRleEntries // data - Pointer to the beginning of the RLE data +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerRewBitmap = +{ + CONFIG_NXWIDGETS_BPP, // bpp - Bits per pixel + CONFIG_NXWIDGETS_FMT, // fmt - Color format + BITMAP_NLUTCODES, // nlut - Number of colors in the lLook-Up Table (LUT) + REWIND_BITMAPNCOLUMNS, // width - Width in pixels + REWIND_BITMAPNROWS, // height - Height in rows + { // lut - Pointer to the beginning of the Look-Up Table (LUT) + g_normalLut, // Index 0: Unselected LUT + g_brightLut, // Index 1: Selected LUT + }, + g_rewindRleEntries // data - Pointer to the beginning of the RLE data +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerPauseBitmap = +{ + CONFIG_NXWIDGETS_BPP, // bpp - Bits per pixel + CONFIG_NXWIDGETS_FMT, // fmt - Color format + BITMAP_NLUTCODES, // nlut - Number of colors in the lLook-Up Table (LUT) + PAUSE_BITMAP_NCOLUMNS, // width - Width in pixels + PAUSE_BITMAP_NROWS, // height - Height in rows + { // lut - Pointer to the beginning of the Look-Up Table (LUT) + g_normalLut, // Index 0: Unselected LUT + g_brightLut, // Index 1: Selected LUT + }, + g_pauseRleEntries // data - Pointer to the beginning of the RLE data +};