From 5e7ac07aaccc6365076aecf687d122e607944aa5 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 12 Jul 2014 14:40:15 -0600 Subject: NxWM: Rename all glyphs to include the size of the glyph as part of the filename --- NxWidgets/nxwm/Makefile | 8 +- NxWidgets/nxwm/src/glyph_calculator.cxx | 191 ---------- NxWidgets/nxwm/src/glyph_calculator24x25.cxx | 191 ++++++++++ NxWidgets/nxwm/src/glyph_calibration.cxx | 198 ---------- NxWidgets/nxwm/src/glyph_calibration24x21.cxx | 198 ++++++++++ NxWidgets/nxwm/src/glyph_cmd.cxx | 181 ---------- NxWidgets/nxwm/src/glyph_cmd25x22.cxx | 181 ++++++++++ NxWidgets/nxwm/src/glyph_mediaplayer.cxx | 160 --------- NxWidgets/nxwm/src/glyph_mediaplayer24x24.cxx | 160 +++++++++ NxWidgets/nxwm/src/glyph_minimize.cxx | 179 --------- NxWidgets/nxwm/src/glyph_minimize21x21.cxx | 179 +++++++++ NxWidgets/nxwm/src/glyph_mplayer_controls.cxx | 398 --------------------- NxWidgets/nxwm/src/glyph_mplayer_controls32x32.cxx | 398 +++++++++++++++++++++ NxWidgets/nxwm/src/glyph_nsh.cxx | 215 ----------- NxWidgets/nxwm/src/glyph_nsh25x25.cxx | 215 +++++++++++ NxWidgets/nxwm/src/glyph_start.cxx | 216 ----------- NxWidgets/nxwm/src/glyph_start25x25.cxx | 216 +++++++++++ NxWidgets/nxwm/src/glyph_stop.cxx | 194 ---------- NxWidgets/nxwm/src/glyph_stop21x21.cxx | 194 ++++++++++ 19 files changed, 1936 insertions(+), 1936 deletions(-) delete mode 100644 NxWidgets/nxwm/src/glyph_calculator.cxx create mode 100644 NxWidgets/nxwm/src/glyph_calculator24x25.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_calibration.cxx create mode 100644 NxWidgets/nxwm/src/glyph_calibration24x21.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_cmd.cxx create mode 100644 NxWidgets/nxwm/src/glyph_cmd25x22.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_mediaplayer.cxx create mode 100644 NxWidgets/nxwm/src/glyph_mediaplayer24x24.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_minimize.cxx create mode 100644 NxWidgets/nxwm/src/glyph_minimize21x21.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_mplayer_controls.cxx create mode 100644 NxWidgets/nxwm/src/glyph_mplayer_controls32x32.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_nsh.cxx create mode 100644 NxWidgets/nxwm/src/glyph_nsh25x25.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_start.cxx create mode 100644 NxWidgets/nxwm/src/glyph_start25x25.cxx delete mode 100644 NxWidgets/nxwm/src/glyph_stop.cxx create mode 100644 NxWidgets/nxwm/src/glyph_stop21x21.cxx (limited to 'NxWidgets') diff --git a/NxWidgets/nxwm/Makefile b/NxWidgets/nxwm/Makefile index 87a277504..a26bf73cc 100644 --- a/NxWidgets/nxwm/Makefile +++ b/NxWidgets/nxwm/Makefile @@ -75,12 +75,12 @@ CXXSRCS += cnxconsole.cxx endif # Images -CXXSRCS += glyph_calculator.cxx glyph_calibration.cxx glyph_cmd.cxx -CXXSRCS += glyph_minimize.cxx glyph_nsh.cxx glyph_play24x24.cxx glyph_start.cxx -CXXSRCS += glyph_stop.cxx +CXXSRCS += glyph_calculator24x25.cxx glyph_calibration24x21.cxx glyph_cmd25x22.cxx +CXXSRCS += glyph_minimize21x21.cxx glyph_nsh25x25.cxx glyph_play24x24.cxx +CXXSRCS += glyph_start25x25.cxx glyph_stop21x21.cxx ifeq ($(CONFIG_NXWM_MEDIAPLAYER),y) -CXXSRCS += glyph_mediaplayer.cxx cmediaplayer.cxx glyph_mplayer_controls.cxx +CXXSRCS += glyph_mediaplayer24x24.cxx cmediaplayer.cxx glyph_mplayer_controls32x32.cxx endif SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) diff --git a/NxWidgets/nxwm/src/glyph_calculator.cxx b/NxWidgets/nxwm/src/glyph_calculator.cxx deleted file mode 100644 index e8f5376d3..000000000 --- a/NxWidgets/nxwm/src/glyph_calculator.cxx +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_calculator.cxx - * - * Copyright (C) 2012 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 25 -#define BITMAP_NCOLUMNS 24 -#define BITMAP_NLUTCODES 8 - -/******************************************************************************************** - * Private Bitmap Data - ********************************************************************************************/ - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 - -static const uint32_t g_calculatorNormalLut[BITMAP_NLUTCODES] = -{ - 0xfcfcfc, 0xb8bcbc, 0xf8f8f8, 0x6890c8, 0x384c80, 0xe8e8e8, 0x646464, 0x909090 /* Codes 0-7 */ -}; - -static const uint32_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = -{ - 0xffffff, 0xc9cccc, 0xf9f9f9, 0x8dabd5, 0x69789f, 0xededed, 0x8a8a8a, 0xababab /* Codes 0-7 */ -}; - -/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ - -#elif CONFIG_NXWIDGETS_BPP == 16 - -static const uint16_t g_calculatorNormalLut[BITMAP_NLUTCODES] = -{ - 0xffff, 0xbdf7, 0xffdf, 0x6c99, 0x3a70, 0xef5d, 0x632c, 0x9492 /* Codes 0-7 */ -}; - -static const uint16_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = -{ - 0xffff, 0xce79, 0xffdf, 0x8d5a, 0x6bd3, 0xef7d, 0x8c51, 0xad55 /* Codes 0-7 */ -}; - -/* 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 p;ointless lookups do make the logic compatible with the - * 16- and 24-bit types. - */ - -#elif CONFIG_NXWIDGETS_BPP == 8 -# ifdef CONFIG_NXWIDGETS_GREYSCALE - -static const uint8_t g_calculatorNormalLut[BITMAP_NLUTCODES] = -{ - 0xfc, 0xba, 0xf8, 0x8a, 0x4b, 0xe8, 0x64, 0x90 /* Codes 0-7 */ -}; - -static const uint8_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = -{ - 0xff, 0xcb, 0xf9, 0xa6, 0x77, 0xed, 0x8a, 0xab /* Codes 0-7 */ -}; - -# else /* CONFIG_NXWIDGETS_GREYSCALE */ - -static const nxgl_mxpixel_t g_calculatorNormalLut[BITMAP_NLUTCODES] = -{ - 0xff, 0xb7, 0xff, 0x73, 0x2a, 0xff, 0x6d, 0x92 /* Codes 0-7 */ -}; - -static const nxgl_mxpixel_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = -{ - 0xff, 0xdb, 0xff, 0x97, 0x6e, 0xff, 0x92, 0xb6 /* Codes 0-7 */ -}; - -# endif /* CONFIG_NXWIDGETS_GREYSCALE */ -#else -# error "Unsupport pixel format" -#endif - -static const struct NXWidgets::SRlePaletteBitmapEntry g_calculatorRleEntries[] = -{ - { 23, 0}, { 1, 1}, /* Row 0 */ - { 1, 0}, { 21, 1}, { 1, 2}, { 1, 1}, /* Row 1 */ - { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 2 */ - { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 3 */ - { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 4 */ - { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 5 */ - { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 6 */ - { 1, 2}, { 1, 1}, { 20, 4}, { 1, 0}, { 1, 1}, /* Row 7 */ - { 1, 2}, { 1, 1}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, /* Row 8 */ - { 4, 5}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 9 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 10 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 11 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 20, 6}, { 1, 0}, { 1, 1}, /* Row 12 */ - { 1, 0}, { 1, 1}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, /* Row 13 */ - { 4, 5}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 14 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 15 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 16 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 20, 6}, { 1, 0}, { 1, 1}, /* Row 17 */ - { 1, 2}, { 1, 1}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, /* Row 18 */ - { 4, 5}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 2}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 19 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 2}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 20 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 2}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 21 */ - { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, - { 1, 2}, { 1, 1}, { 20, 6}, { 1, 0}, { 1, 1}, /* Row 22 */ - { 23, 0}, { 1, 1}, /* Row 23 */ - { 24, 1} /* Row 24 */ -}; - -/******************************************************************************************** - * Public Bitmap Structure Defintions - ********************************************************************************************/ - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_calculatorBitmap = -{ - 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_calculatorNormalLut, // Index 0: Unselected LUT - g_calculatorBrightlLut, // Index 1: Selected LUT - }, - g_calculatorRleEntries // data - Pointer to the beginning of the RLE data -}; diff --git a/NxWidgets/nxwm/src/glyph_calculator24x25.cxx b/NxWidgets/nxwm/src/glyph_calculator24x25.cxx new file mode 100644 index 000000000..6184212f8 --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_calculator24x25.cxx @@ -0,0 +1,191 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_calculator24x25.cxx + * + * Copyright (C) 2012 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 25 +#define BITMAP_NCOLUMNS 24 +#define BITMAP_NLUTCODES 8 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 + +static const uint32_t g_calculatorNormalLut[BITMAP_NLUTCODES] = +{ + 0xfcfcfc, 0xb8bcbc, 0xf8f8f8, 0x6890c8, 0x384c80, 0xe8e8e8, 0x646464, 0x909090 /* Codes 0-7 */ +}; + +static const uint32_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = +{ + 0xffffff, 0xc9cccc, 0xf9f9f9, 0x8dabd5, 0x69789f, 0xededed, 0x8a8a8a, 0xababab /* Codes 0-7 */ +}; + +/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ + +#elif CONFIG_NXWIDGETS_BPP == 16 + +static const uint16_t g_calculatorNormalLut[BITMAP_NLUTCODES] = +{ + 0xffff, 0xbdf7, 0xffdf, 0x6c99, 0x3a70, 0xef5d, 0x632c, 0x9492 /* Codes 0-7 */ +}; + +static const uint16_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = +{ + 0xffff, 0xce79, 0xffdf, 0x8d5a, 0x6bd3, 0xef7d, 0x8c51, 0xad55 /* Codes 0-7 */ +}; + +/* 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 p;ointless lookups do make the logic compatible with the + * 16- and 24-bit types. + */ + +#elif CONFIG_NXWIDGETS_BPP == 8 +# ifdef CONFIG_NXWIDGETS_GREYSCALE + +static const uint8_t g_calculatorNormalLut[BITMAP_NLUTCODES] = +{ + 0xfc, 0xba, 0xf8, 0x8a, 0x4b, 0xe8, 0x64, 0x90 /* Codes 0-7 */ +}; + +static const uint8_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = +{ + 0xff, 0xcb, 0xf9, 0xa6, 0x77, 0xed, 0x8a, 0xab /* Codes 0-7 */ +}; + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +static const nxgl_mxpixel_t g_calculatorNormalLut[BITMAP_NLUTCODES] = +{ + 0xff, 0xb7, 0xff, 0x73, 0x2a, 0xff, 0x6d, 0x92 /* Codes 0-7 */ +}; + +static const nxgl_mxpixel_t g_calculatorBrightlLut[BITMAP_NLUTCODES] = +{ + 0xff, 0xdb, 0xff, 0x97, 0x6e, 0xff, 0x92, 0xb6 /* Codes 0-7 */ +}; + +# endif /* CONFIG_NXWIDGETS_GREYSCALE */ +#else +# error "Unsupport pixel format" +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_calculatorRleEntries[] = +{ + { 23, 0}, { 1, 1}, /* Row 0 */ + { 1, 0}, { 21, 1}, { 1, 2}, { 1, 1}, /* Row 1 */ + { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 2 */ + { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 3 */ + { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 4 */ + { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 5 */ + { 1, 0}, { 1, 1}, { 19, 3}, { 1, 4}, { 1, 0}, { 1, 1}, /* Row 6 */ + { 1, 2}, { 1, 1}, { 20, 4}, { 1, 0}, { 1, 1}, /* Row 7 */ + { 1, 2}, { 1, 1}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, /* Row 8 */ + { 4, 5}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 9 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 10 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 11 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 20, 6}, { 1, 0}, { 1, 1}, /* Row 12 */ + { 1, 0}, { 1, 1}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, /* Row 13 */ + { 4, 5}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 14 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 15 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 16 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 20, 6}, { 1, 0}, { 1, 1}, /* Row 17 */ + { 1, 2}, { 1, 1}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, { 4, 5}, { 1, 6}, /* Row 18 */ + { 4, 5}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 2}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 19 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 2}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 20 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 2}, { 1, 1}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, /* Row 21 */ + { 1, 5}, { 3, 7}, { 1, 6}, { 1, 5}, { 3, 7}, { 1, 6}, { 1, 0}, { 1, 1}, + { 1, 2}, { 1, 1}, { 20, 6}, { 1, 0}, { 1, 1}, /* Row 22 */ + { 23, 0}, { 1, 1}, /* Row 23 */ + { 24, 1} /* Row 24 */ +}; + +/******************************************************************************************** + * Public Bitmap Structure Defintions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_calculatorBitmap = +{ + 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_calculatorNormalLut, // Index 0: Unselected LUT + g_calculatorBrightlLut, // Index 1: Selected LUT + }, + g_calculatorRleEntries // data - Pointer to the beginning of the RLE data +}; diff --git a/NxWidgets/nxwm/src/glyph_calibration.cxx b/NxWidgets/nxwm/src/glyph_calibration.cxx deleted file mode 100644 index 3a9a30806..000000000 --- a/NxWidgets/nxwm/src/glyph_calibration.cxx +++ /dev/null @@ -1,198 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_calibration.cxx - * - * Copyright (C) 2012 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 21 -#define BITMAP_NCOLUMNS 24 -#define BITMAP_NLUTCODES 6 - -/******************************************************************************************** - * Private Bitmap Data - ********************************************************************************************/ - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 - -static const uint32_t g_calibrationNormalLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xfcfcfc, 0xacacac, 0xd8d8d8, 0xd8881c, 0x9c6014 /* Codes 1-5 */ -}; - -static const uint32_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xffffff, 0xc0c0c0, 0xe1e1e1, 0xe1a554, 0xb4874e /* Codes 1-5 */ -}; -/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ - -#elif CONFIG_NXWIDGETS_BPP == 16 - -static const uint16_t g_calibrationNormalLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xffff, 0xad75, 0xdedb, 0xdc43, 0x9b02 /* Codes 1-5 */ -}; - -static const uint16_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xffff, 0xc618, 0xe71c, 0xe52a, 0xb429 /* Codes 1-5 */ -}; - -/* 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 p;ointless 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 */ - -static const uint8_t g_calibrationNormalLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xfc, 0xac, 0xd8, 0x93, 0x69 /* Codes 1-5 */ -}; - -static const uint8_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xff, 0xc0, 0xe1, 0xad, 0x8d /* Codes 1-5 */ -}; - -# else /* CONFIG_NXWIDGETS_GREYSCALE */ - -/* RGB8 (332) Colors */ - -static const nxgl_mxpixel_t g_calibrationNormalLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xff, 0xb6, 0xdb, 0xd0, 0x8c /* Codes 1-5 */ -}; - -static const nxgl_mxpixel_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xff, 0xdb, 0xff, 0xf5, 0xb1 /* Codes 1-5 */ -}; - -# endif -#else -# error "Unsupport pixel format" -#endif - -static const struct NXWidgets::SRlePaletteBitmapEntry g_calibrationRleEntries[] = -{ - { 11, 0}, { 1, 1}, { 1, 2}, { 6, 0}, { 1, 3}, { 1, 2}, { 3, 0}, /* Row 0 */ - { 11, 0}, { 1, 1}, { 1, 2}, { 4, 0}, { 2, 1}, { 1, 3}, { 2, 1}, { 2, 0}, /* Row 1 */ - { 11, 0}, { 1, 1}, { 1, 2}, { 2, 0}, { 2, 1}, { 2, 2}, { 1, 3}, { 1, 2}, /* Row 2 */ - { 3, 0}, - { 11, 0}, { 1, 1}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 0}, { 1, 3}, { 4, 0}, /* Row 3 */ - { 9, 0}, { 2, 1}, { 2, 3}, { 2, 2}, { 4, 0}, { 1, 3}, { 4, 0}, /* Row 4 */ - { 3, 0}, { 1, 1}, { 1, 2}, { 2, 0}, { 2, 1}, { 2, 2}, { 1, 1}, { 1, 2}, /* Row 5 */ - { 5, 0}, { 1, 1}, { 2, 3}, { 3, 0}, - { 2, 0}, { 2, 1}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 0}, { 1, 1}, { 1, 2}, /* Row 6 */ - { 4, 0}, { 1, 1}, { 1, 3}, { 1, 0}, { 2, 3}, { 2, 0}, - { 3, 0}, { 1, 2}, { 1, 3}, { 2, 2}, { 4, 0}, { 1, 1}, { 1, 2}, { 4, 0}, /* Row 7 */ - { 1, 1}, { 3, 0}, { 1, 3}, { 2, 0}, - { 4, 0}, { 1, 3}, { 6, 0}, { 1, 1}, { 1, 2}, { 3, 0}, { 1, 1}, { 1, 3}, /* Row 8 */ - { 3, 0}, { 2, 3}, { 1, 0}, - { 3, 0}, { 1, 1}, { 2, 3}, { 5, 0}, { 1, 1}, { 1, 2}, { 3, 0}, { 1, 1}, /* Row 9 */ - { 5, 0}, { 1, 3}, { 1, 0}, - { 2, 0}, { 1, 1}, { 1, 3}, { 1, 0}, { 2, 3}, { 4, 0}, { 1, 1}, { 1, 2}, /* Row 10 */ - { 3, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 1, 0}, - { 2, 0}, { 1, 1}, { 3, 0}, { 1, 3}, { 4, 0}, { 1, 1}, { 1, 2}, { 3, 0}, /* Row 11 */ - { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 1, 0}, - { 1, 0}, { 1, 1}, { 1, 3}, { 2, 4}, { 1, 5}, { 2, 3}, { 3, 0}, { 1, 1}, /* Row 12 */ - { 1, 2}, { 2, 0}, { 9, 3}, - { 1, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 3, 0}, /* Row 13 */ - { 1, 1}, { 1, 2}, { 11, 0}, - { 1, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 3, 0}, /* Row 14 */ - { 1, 1}, { 1, 2}, { 11, 0}, - { 1, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 3, 0}, /* Row 15 */ - { 1, 1}, { 1, 2}, { 11, 0}, - { 9, 3}, { 2, 0}, { 1, 1}, { 1, 2}, { 11, 0}, /* Row 16 */ - { 11, 0}, { 1, 1}, { 1, 2}, { 11, 0}, /* Row 17 */ - { 10, 0}, { 1, 1}, { 2, 3}, { 1, 2}, { 10, 0}, /* Row 18 */ - { 5, 0}, { 4, 1}, { 6, 3}, { 4, 2}, { 5, 0}, /* Row 19 */ - { 4, 0}, { 4, 1}, { 8, 3}, { 4, 2}, { 4, 0}, /* Row 20 */ -}; - -/******************************************************************************************** - * Public Bitmap Structure Defintions - ********************************************************************************************/ - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_calibrationBitmap = -{ - 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_calibrationNormalLut, // Index 0: Unselected LUT - g_calibrationSelectedLut, // Index 1: Selected LUT - }, - g_calibrationRleEntries // data - Pointer to the beginning of the RLE data -}; diff --git a/NxWidgets/nxwm/src/glyph_calibration24x21.cxx b/NxWidgets/nxwm/src/glyph_calibration24x21.cxx new file mode 100644 index 000000000..2d01edadf --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_calibration24x21.cxx @@ -0,0 +1,198 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_calibration24x21.cxx + * + * Copyright (C) 2012 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 21 +#define BITMAP_NCOLUMNS 24 +#define BITMAP_NLUTCODES 6 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 + +static const uint32_t g_calibrationNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xfcfcfc, 0xacacac, 0xd8d8d8, 0xd8881c, 0x9c6014 /* Codes 1-5 */ +}; + +static const uint32_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xffffff, 0xc0c0c0, 0xe1e1e1, 0xe1a554, 0xb4874e /* Codes 1-5 */ +}; +/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ + +#elif CONFIG_NXWIDGETS_BPP == 16 + +static const uint16_t g_calibrationNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xffff, 0xad75, 0xdedb, 0xdc43, 0x9b02 /* Codes 1-5 */ +}; + +static const uint16_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xffff, 0xc618, 0xe71c, 0xe52a, 0xb429 /* Codes 1-5 */ +}; + +/* 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 p;ointless 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 */ + +static const uint8_t g_calibrationNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xfc, 0xac, 0xd8, 0x93, 0x69 /* Codes 1-5 */ +}; + +static const uint8_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xff, 0xc0, 0xe1, 0xad, 0x8d /* Codes 1-5 */ +}; + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +/* RGB8 (332) Colors */ + +static const nxgl_mxpixel_t g_calibrationNormalLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xff, 0xb6, 0xdb, 0xd0, 0x8c /* Codes 1-5 */ +}; + +static const nxgl_mxpixel_t g_calibrationSelectedLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xff, 0xdb, 0xff, 0xf5, 0xb1 /* Codes 1-5 */ +}; + +# endif +#else +# error "Unsupport pixel format" +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_calibrationRleEntries[] = +{ + { 11, 0}, { 1, 1}, { 1, 2}, { 6, 0}, { 1, 3}, { 1, 2}, { 3, 0}, /* Row 0 */ + { 11, 0}, { 1, 1}, { 1, 2}, { 4, 0}, { 2, 1}, { 1, 3}, { 2, 1}, { 2, 0}, /* Row 1 */ + { 11, 0}, { 1, 1}, { 1, 2}, { 2, 0}, { 2, 1}, { 2, 2}, { 1, 3}, { 1, 2}, /* Row 2 */ + { 3, 0}, + { 11, 0}, { 1, 1}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 0}, { 1, 3}, { 4, 0}, /* Row 3 */ + { 9, 0}, { 2, 1}, { 2, 3}, { 2, 2}, { 4, 0}, { 1, 3}, { 4, 0}, /* Row 4 */ + { 3, 0}, { 1, 1}, { 1, 2}, { 2, 0}, { 2, 1}, { 2, 2}, { 1, 1}, { 1, 2}, /* Row 5 */ + { 5, 0}, { 1, 1}, { 2, 3}, { 3, 0}, + { 2, 0}, { 2, 1}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 0}, { 1, 1}, { 1, 2}, /* Row 6 */ + { 4, 0}, { 1, 1}, { 1, 3}, { 1, 0}, { 2, 3}, { 2, 0}, + { 3, 0}, { 1, 2}, { 1, 3}, { 2, 2}, { 4, 0}, { 1, 1}, { 1, 2}, { 4, 0}, /* Row 7 */ + { 1, 1}, { 3, 0}, { 1, 3}, { 2, 0}, + { 4, 0}, { 1, 3}, { 6, 0}, { 1, 1}, { 1, 2}, { 3, 0}, { 1, 1}, { 1, 3}, /* Row 8 */ + { 3, 0}, { 2, 3}, { 1, 0}, + { 3, 0}, { 1, 1}, { 2, 3}, { 5, 0}, { 1, 1}, { 1, 2}, { 3, 0}, { 1, 1}, /* Row 9 */ + { 5, 0}, { 1, 3}, { 1, 0}, + { 2, 0}, { 1, 1}, { 1, 3}, { 1, 0}, { 2, 3}, { 4, 0}, { 1, 1}, { 1, 2}, /* Row 10 */ + { 3, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 1, 0}, + { 2, 0}, { 1, 1}, { 3, 0}, { 1, 3}, { 4, 0}, { 1, 1}, { 1, 2}, { 3, 0}, /* Row 11 */ + { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 1, 0}, + { 1, 0}, { 1, 1}, { 1, 3}, { 2, 4}, { 1, 5}, { 2, 3}, { 3, 0}, { 1, 1}, /* Row 12 */ + { 1, 2}, { 2, 0}, { 9, 3}, + { 1, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 3, 0}, /* Row 13 */ + { 1, 1}, { 1, 2}, { 11, 0}, + { 1, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 3, 0}, /* Row 14 */ + { 1, 1}, { 1, 2}, { 11, 0}, + { 1, 0}, { 1, 1}, { 1, 0}, { 2, 4}, { 1, 5}, { 1, 0}, { 1, 3}, { 3, 0}, /* Row 15 */ + { 1, 1}, { 1, 2}, { 11, 0}, + { 9, 3}, { 2, 0}, { 1, 1}, { 1, 2}, { 11, 0}, /* Row 16 */ + { 11, 0}, { 1, 1}, { 1, 2}, { 11, 0}, /* Row 17 */ + { 10, 0}, { 1, 1}, { 2, 3}, { 1, 2}, { 10, 0}, /* Row 18 */ + { 5, 0}, { 4, 1}, { 6, 3}, { 4, 2}, { 5, 0}, /* Row 19 */ + { 4, 0}, { 4, 1}, { 8, 3}, { 4, 2}, { 4, 0}, /* Row 20 */ +}; + +/******************************************************************************************** + * Public Bitmap Structure Defintions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_calibrationBitmap = +{ + 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_calibrationNormalLut, // Index 0: Unselected LUT + g_calibrationSelectedLut, // Index 1: Selected LUT + }, + g_calibrationRleEntries // data - Pointer to the beginning of the RLE data +}; diff --git a/NxWidgets/nxwm/src/glyph_cmd.cxx b/NxWidgets/nxwm/src/glyph_cmd.cxx deleted file mode 100644 index cc8b8dca3..000000000 --- a/NxWidgets/nxwm/src/glyph_cmd.cxx +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_cmd.cxx - * - * Copyright (C) 2012 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 22 -#define BITMAP_NCOLUMNS 25 -#define BITMAP_NLUTCODES 8 - -/******************************************************************************************** - * Private Bitmap Data - ********************************************************************************************/ - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 - -static const uint32_t g_cmdNormalLut[BITMAP_NLUTCODES] = -{ - 0x909090, 0x000000, 0xb4fcfc, 0xb4d8fc, 0x6cb4fc, 0x6c6c6c, 0xfcfcfc, 0x484848 -}; - -static const uint32_t g_cmdBrightlLut[BITMAP_NLUTCODES] = -{ - 0xababab, 0x3f3f3f, 0xc6fcfc, 0xc6e1fc, 0x90c6fc, 0x909090, 0xfcfcfc, 0x757575 -}; -/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ - -#elif CONFIG_NXWIDGETS_BPP == 16 - -static const uint16_t g_cmdNormalLut[BITMAP_NLUTCODES] = -{ - 0x9492, 0x0000, 0xb7ff, 0xb6df, 0x6dbf, 0x6b6d, 0xffff, 0x4a49 -}; - -static const uint16_t g_cmdBrightlLut[BITMAP_NLUTCODES] = -{ - 0xad55, 0x39e7, 0xc7ff, 0xc71f, 0x963f, 0x9492, 0xffff, 0x73ae -}; - -/* 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 p;ointless 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 */ - -static const uint8_t g_cmdNormalLut[BITMAP_NLUTCODES] = -{ - 0x90, 0x00, 0xe6, 0xd1, 0xa6, 0x6c, 0xfc, 0x48 -}; - -static const uint8_t g_cmdBrightlLut[BITMAP_NLUTCODES] = -{ - 0xab, 0x3f, 0xeb, 0xdc, 0xbc, 0x90, 0xfc, 0x75 -}; - -# else /* CONFIG_NXWIDGETS_GREYSCALE */ - -/* RGB8 (332) Colors */ - -static const nxgl_mxpixel_t g_cmdNormalLut[BITMAP_NLUTCODES] = -{ - 0x92, 0x00, 0xbf, 0xbb, 0x77, 0x6d, 0xff, 0x49 -}; - -static const nxgl_mxpixel_t g_cmdBrightlLut[BITMAP_NLUTCODES] = -{ - 0xb6, 0x24, 0xdf, 0xdf, 0x9b, 0x92, 0xff, 0x6d -}; - -# endif -#else -# error "Unsupport pixel format" -#endif - -static const struct NXWidgets::SRlePaletteBitmapEntry g_cmdRleEntries[] = -{ - { 24, 0}, { 1, 1}, /* Row 0 */ - { 24, 0}, { 1, 1}, /* Row 1 */ - { 2, 0}, { 1, 2}, { 13, 3}, { 7, 4}, { 1, 0}, { 1, 1}, /* Row 2 */ - { 2, 0}, { 3, 3}, { 18, 4}, { 1, 0}, { 1, 1}, /* Row 3 */ - { 2, 0}, { 3, 3}, { 18, 4}, { 1, 0}, { 1, 1}, /* Row 4 */ - { 24, 0}, { 1, 1}, /* Row 5 */ - { 1, 0}, { 22, 1}, { 1, 0}, { 1, 1}, /* Row 6 */ - { 1, 0}, { 1, 1}, { 21, 5}, { 1, 0}, { 1, 1}, /* Row 7 */ - { 1, 0}, { 1, 1}, { 21, 5}, { 1, 0}, { 1, 1}, /* Row 8 */ - { 1, 0}, { 1, 1}, { 2, 5}, { 1, 6}, { 18, 5}, { 1, 0}, { 1, 1}, /* Row 9 */ - { 1, 0}, { 1, 1}, { 3, 5}, { 1, 6}, { 17, 5}, { 1, 0}, { 1, 1}, /* Row 10 */ - { 1, 0}, { 1, 1}, { 4, 5}, { 1, 6}, { 16, 5}, { 1, 0}, { 1, 1}, /* Row 11 */ - { 1, 0}, { 1, 1}, { 5, 5}, { 1, 6}, { 15, 5}, { 1, 0}, { 1, 1}, /* Row 12 */ - { 1, 0}, { 1, 1}, { 6, 5}, { 1, 6}, { 14, 5}, { 1, 0}, { 1, 1}, /* Row 13 */ - { 1, 0}, { 1, 1}, { 5, 5}, { 1, 6}, { 1, 7}, { 14, 5}, { 1, 0}, { 1, 1}, /* Row 14 */ - { 1, 0}, { 1, 1}, { 4, 5}, { 1, 6}, { 1, 7}, { 15, 5}, { 1, 0}, { 1, 1}, /* Row 15 */ - { 1, 0}, { 1, 1}, { 3, 5}, { 1, 6}, { 1, 7}, { 4, 5}, { 9, 6}, { 3, 5}, /* Row 16 */ - { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 2, 5}, { 1, 6}, { 1, 7}, { 6, 5}, { 9, 7}, { 2, 5}, /* Row 17 */ - { 1, 0}, { 1, 1}, - { 1, 0}, { 1, 1}, { 2, 5}, { 1, 7}, { 18, 5}, { 1, 0}, { 1, 1}, /* Row 18 */ - { 1, 0}, { 1, 1}, { 21, 5}, { 1, 0}, { 1, 1}, /* Row 19 */ - { 24, 0}, { 1, 1}, /* Row 20 */ - { 25, 1}, /* Row 21 */ -}; - -/******************************************************************************************** - * Public Bitmap Structure Defintions - ********************************************************************************************/ - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_cmdBitmap = -{ - 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_cmdNormalLut, // Index 0: Unselected LUT - g_cmdBrightlLut, // Index 1: Selected LUT - }, - g_cmdRleEntries // data - Pointer to the beginning of the RLE data -}; diff --git a/NxWidgets/nxwm/src/glyph_cmd25x22.cxx b/NxWidgets/nxwm/src/glyph_cmd25x22.cxx new file mode 100644 index 000000000..4cd66c571 --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_cmd25x22.cxx @@ -0,0 +1,181 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_cmd24x22.cxx + * + * Copyright (C) 2012 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 22 +#define BITMAP_NCOLUMNS 25 +#define BITMAP_NLUTCODES 8 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 + +static const uint32_t g_cmdNormalLut[BITMAP_NLUTCODES] = +{ + 0x909090, 0x000000, 0xb4fcfc, 0xb4d8fc, 0x6cb4fc, 0x6c6c6c, 0xfcfcfc, 0x484848 +}; + +static const uint32_t g_cmdBrightlLut[BITMAP_NLUTCODES] = +{ + 0xababab, 0x3f3f3f, 0xc6fcfc, 0xc6e1fc, 0x90c6fc, 0x909090, 0xfcfcfc, 0x757575 +}; +/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ + +#elif CONFIG_NXWIDGETS_BPP == 16 + +static const uint16_t g_cmdNormalLut[BITMAP_NLUTCODES] = +{ + 0x9492, 0x0000, 0xb7ff, 0xb6df, 0x6dbf, 0x6b6d, 0xffff, 0x4a49 +}; + +static const uint16_t g_cmdBrightlLut[BITMAP_NLUTCODES] = +{ + 0xad55, 0x39e7, 0xc7ff, 0xc71f, 0x963f, 0x9492, 0xffff, 0x73ae +}; + +/* 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 p;ointless 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 */ + +static const uint8_t g_cmdNormalLut[BITMAP_NLUTCODES] = +{ + 0x90, 0x00, 0xe6, 0xd1, 0xa6, 0x6c, 0xfc, 0x48 +}; + +static const uint8_t g_cmdBrightlLut[BITMAP_NLUTCODES] = +{ + 0xab, 0x3f, 0xeb, 0xdc, 0xbc, 0x90, 0xfc, 0x75 +}; + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +/* RGB8 (332) Colors */ + +static const nxgl_mxpixel_t g_cmdNormalLut[BITMAP_NLUTCODES] = +{ + 0x92, 0x00, 0xbf, 0xbb, 0x77, 0x6d, 0xff, 0x49 +}; + +static const nxgl_mxpixel_t g_cmdBrightlLut[BITMAP_NLUTCODES] = +{ + 0xb6, 0x24, 0xdf, 0xdf, 0x9b, 0x92, 0xff, 0x6d +}; + +# endif +#else +# error "Unsupport pixel format" +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_cmdRleEntries[] = +{ + { 24, 0}, { 1, 1}, /* Row 0 */ + { 24, 0}, { 1, 1}, /* Row 1 */ + { 2, 0}, { 1, 2}, { 13, 3}, { 7, 4}, { 1, 0}, { 1, 1}, /* Row 2 */ + { 2, 0}, { 3, 3}, { 18, 4}, { 1, 0}, { 1, 1}, /* Row 3 */ + { 2, 0}, { 3, 3}, { 18, 4}, { 1, 0}, { 1, 1}, /* Row 4 */ + { 24, 0}, { 1, 1}, /* Row 5 */ + { 1, 0}, { 22, 1}, { 1, 0}, { 1, 1}, /* Row 6 */ + { 1, 0}, { 1, 1}, { 21, 5}, { 1, 0}, { 1, 1}, /* Row 7 */ + { 1, 0}, { 1, 1}, { 21, 5}, { 1, 0}, { 1, 1}, /* Row 8 */ + { 1, 0}, { 1, 1}, { 2, 5}, { 1, 6}, { 18, 5}, { 1, 0}, { 1, 1}, /* Row 9 */ + { 1, 0}, { 1, 1}, { 3, 5}, { 1, 6}, { 17, 5}, { 1, 0}, { 1, 1}, /* Row 10 */ + { 1, 0}, { 1, 1}, { 4, 5}, { 1, 6}, { 16, 5}, { 1, 0}, { 1, 1}, /* Row 11 */ + { 1, 0}, { 1, 1}, { 5, 5}, { 1, 6}, { 15, 5}, { 1, 0}, { 1, 1}, /* Row 12 */ + { 1, 0}, { 1, 1}, { 6, 5}, { 1, 6}, { 14, 5}, { 1, 0}, { 1, 1}, /* Row 13 */ + { 1, 0}, { 1, 1}, { 5, 5}, { 1, 6}, { 1, 7}, { 14, 5}, { 1, 0}, { 1, 1}, /* Row 14 */ + { 1, 0}, { 1, 1}, { 4, 5}, { 1, 6}, { 1, 7}, { 15, 5}, { 1, 0}, { 1, 1}, /* Row 15 */ + { 1, 0}, { 1, 1}, { 3, 5}, { 1, 6}, { 1, 7}, { 4, 5}, { 9, 6}, { 3, 5}, /* Row 16 */ + { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 2, 5}, { 1, 6}, { 1, 7}, { 6, 5}, { 9, 7}, { 2, 5}, /* Row 17 */ + { 1, 0}, { 1, 1}, + { 1, 0}, { 1, 1}, { 2, 5}, { 1, 7}, { 18, 5}, { 1, 0}, { 1, 1}, /* Row 18 */ + { 1, 0}, { 1, 1}, { 21, 5}, { 1, 0}, { 1, 1}, /* Row 19 */ + { 24, 0}, { 1, 1}, /* Row 20 */ + { 25, 1}, /* Row 21 */ +}; + +/******************************************************************************************** + * Public Bitmap Structure Defintions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_cmdBitmap = +{ + 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_cmdNormalLut, // Index 0: Unselected LUT + g_cmdBrightlLut, // Index 1: Selected LUT + }, + g_cmdRleEntries // data - Pointer to the beginning of the RLE data +}; diff --git a/NxWidgets/nxwm/src/glyph_mediaplayer.cxx b/NxWidgets/nxwm/src/glyph_mediaplayer.cxx deleted file mode 100644 index ee8c1a873..000000000 --- a/NxWidgets/nxwm/src/glyph_mediaplayer.cxx +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_mediaplayer.cxx - * - * Copyright (C) 2013 Ken Pettit. All rights reserved. - * Author: Ken Pettit - * - * 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 BITMAP_WIDTH 24 -#define BITMAP_HEIGHT 24 -#define BITMAP_PALETTESIZE 9 - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -static const NXWidgets::nxwidget_pixel_t palette[BITMAP_PALETTESIZE] = -{ - MKRGB(248,252,251), MKRGB(120,198,241), MKRGB( 97,177,228), MKRGB( 31,104,177), - MKRGB( 73,153,213), MKRGB( 46,122,193), MKRGB(140,196,230), MKRGB( 9, 77,154), - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR -}; - -static const NXWidgets::nxwidget_pixel_t hilight_palette[BITMAP_PALETTESIZE] = -{ - MKRGB(255,255,255), MKRGB(170,248,255), MKRGB(147,227,255), MKRGB( 81,154,227), - MKRGB(123,203,255), MKRGB( 96,172,243), MKRGB(190,246,255), MKRGB( 59,127,204), - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR -}; - -static const NXWidgets::SRlePaletteBitmapEntry bitmap[] = -{ - { 8, 8}, { 8, 7}, { 8, 8}, /* Row 0 */ - { 6, 8}, { 1, 7}, { 1, 3}, { 1, 5}, { 2, 2}, { 2, 1}, - { 2, 2}, { 1, 5}, { 1, 3}, { 1, 7}, { 6, 8}, /* Row 1 */ - { 4, 8}, { 2, 7}, { 1, 4}, { 1, 2}, { 1, 6}, { 6, 1}, - { 1, 6}, { 1, 2}, { 1, 4}, { 2, 7}, { 4, 8}, /* Row 2 */ - { 3, 8}, { 1, 7}, { 1, 3}, { 1, 2}, { 1, 6}, { 2, 1}, - { 4, 6}, { 2, 1}, { 2, 6}, { 2, 2}, { 1, 3}, { 1, 7}, - { 3, 8}, /* Row 3 */ - { 2, 8}, { 1, 7}, { 1, 3}, { 1, 1}, { 2, 6}, { 3, 1}, - { 2, 2}, { 1, 4}, { 1, 3}, { 5, 5}, { 1, 1}, { 1, 3}, - { 1, 7}, { 2, 8}, /* Row 4 */ - { 2, 8}, { 1, 7}, { 1, 2}, { 1, 6}, { 4, 1}, { 1, 4}, - { 3, 5}, { 2, 6}, { 3, 0}, { 1, 3}, { 2, 2}, { 1, 7}, - { 2, 8}, /* Row 5 */ - { 1, 8}, { 1, 7}, { 1, 4}, { 1, 6}, { 4, 1}, { 1, 2}, - { 1, 5}, { 1, 6}, { 7, 0}, { 1, 3}, { 1, 2}, { 1, 6}, - { 1, 4}, { 1, 7}, { 1, 8}, /* Row 6 */ - { 1, 8}, { 1, 3}, { 1, 6}, { 4, 1}, { 1, 2}, { 1, 5}, - { 4, 0}, { 2, 6}, { 1, 3}, { 1, 5}, { 1, 0}, { 1, 3}, - { 1, 2}, { 1, 1}, { 1, 6}, { 1, 3}, { 1, 8}, /* Row 7 */ - { 1, 3}, { 1, 4}, { 1, 6}, { 4, 1}, { 1, 2}, { 1, 5}, - { 2, 0}, { 1, 6}, { 3, 3}, { 1, 4}, { 1, 5}, { 1, 0}, - { 1, 3}, { 1, 2}, { 1, 1}, { 1, 6}, { 1, 4}, { 1, 3}, /* Row 8 */ - { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 4}, - { 1, 3}, { 1, 4}, { 3, 2}, { 1, 5}, { 1, 0}, { 1, 3}, - { 1, 2}, { 3, 1}, { 1, 3}, /* Row 9 */ - { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3}, - { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 3}, { 1, 2}, - { 3, 1}, { 1, 3}, /* Row 10 */ - { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3}, - { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 7}, { 1, 2}, - { 3, 1}, { 1, 3}, /* Row 11 */ - { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3}, - { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 7}, { 1, 2}, - { 3, 1}, { 1, 5}, /* Row 12 */ - { 1, 3}, { 1, 6}, { 4, 1}, { 2, 2}, { 1, 5}, { 1, 0}, - { 1, 3}, { 1, 4}, { 2, 2}, { 1, 5}, { 1, 7}, { 1, 6}, - { 1, 0}, { 1, 7}, { 1, 2}, { 2, 1}, { 1, 6}, { 1, 3}, /* Row 13 */ - { 1, 3}, { 5, 1}, { 1, 2}, { 2, 3}, { 1, 0}, { 1, 3}, - { 1, 4}, { 1, 2}, { 1, 7}, { 1, 6}, { 3, 0}, { 1, 7}, - { 1, 2}, { 2, 1}, { 1, 2}, { 1, 3}, /* Row 14 */ - { 1, 5}, { 1, 4}, { 3, 1}, { 1, 2}, { 1, 3}, { 1, 2}, - { 1, 6}, { 1, 0}, { 1, 3}, { 1, 2}, { 1, 5}, { 1, 6}, - { 4, 0}, { 1, 7}, { 1, 2}, { 2, 1}, { 1, 4}, { 1, 5}, /* Row 15 */ - { 1, 8}, { 1, 4}, { 2, 1}, { 1, 2}, { 1, 3}, { 4, 0}, - { 1, 3}, { 1, 2}, { 1, 3}, { 1, 6}, { 3, 0}, { 1, 6}, - { 1, 7}, { 1, 2}, { 2, 1}, { 1, 4}, { 1, 8}, /* Row 16 */ - { 1, 8}, { 1, 5}, { 1, 2}, { 1, 1}, { 1, 5}, { 1, 6}, - { 4, 0}, { 1, 3}, { 2, 2}, { 1, 3}, { 1, 6}, { 1, 0}, - { 1, 6}, { 1, 7}, { 1, 4}, { 2, 1}, { 1, 2}, { 1, 5}, - { 1, 8}, /* Row 17 */ - { 2, 8}, { 1, 5}, { 1, 1}, { 1, 5}, { 1, 1}, { 4, 0}, - { 1, 3}, { 1, 2}, { 1, 1}, { 1, 4}, { 1, 3}, { 1, 7}, - { 1, 3}, { 1, 2}, { 3, 1}, { 1, 5}, { 2, 8}, /* Row 18 */ - { 2, 8}, { 1, 5}, { 1, 4}, { 1, 1}, { 1, 3}, { 1, 6}, - { 1, 0}, { 1, 6}, { 1, 3}, { 1, 2}, { 9, 1}, { 1, 4}, - { 1, 5}, { 2, 8}, /* Row 19 */ - { 3, 8}, { 1, 5}, { 1, 4}, { 1, 1}, { 1, 3}, { 1, 5}, - { 1, 3}, { 10, 1}, { 1, 4}, { 1, 5}, { 3, 8}, /* Row 20 */ - { 4, 8}, { 2, 4}, { 12, 1}, { 2, 4}, { 4, 8}, /* Row 21 */ - { 6, 8}, { 2, 4}, { 8, 1}, { 2, 4}, { 6, 8}, /* Row 22 */ - { 8, 8}, { 8, 4}, { 8, 8}, /* Row 23 */ -}; - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_mediaplayerBitmap = -{ - CONFIG_NXWIDGETS_BPP, - CONFIG_NXWIDGETS_FMT, - BITMAP_PALETTESIZE, - BITMAP_WIDTH, - BITMAP_HEIGHT, - {palette, hilight_palette}, - bitmap -}; diff --git a/NxWidgets/nxwm/src/glyph_mediaplayer24x24.cxx b/NxWidgets/nxwm/src/glyph_mediaplayer24x24.cxx new file mode 100644 index 000000000..5e8899c38 --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_mediaplayer24x24.cxx @@ -0,0 +1,160 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_mediaplayer24x24.cxx + * + * Copyright (C) 2013 Ken Pettit. All rights reserved. + * Author: Ken Pettit + * + * 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 BITMAP_WIDTH 24 +#define BITMAP_HEIGHT 24 +#define BITMAP_PALETTESIZE 9 + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +static const NXWidgets::nxwidget_pixel_t palette[BITMAP_PALETTESIZE] = +{ + MKRGB(248,252,251), MKRGB(120,198,241), MKRGB( 97,177,228), MKRGB( 31,104,177), + MKRGB( 73,153,213), MKRGB( 46,122,193), MKRGB(140,196,230), MKRGB( 9, 77,154), + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR +}; + +static const NXWidgets::nxwidget_pixel_t hilight_palette[BITMAP_PALETTESIZE] = +{ + MKRGB(255,255,255), MKRGB(170,248,255), MKRGB(147,227,255), MKRGB( 81,154,227), + MKRGB(123,203,255), MKRGB( 96,172,243), MKRGB(190,246,255), MKRGB( 59,127,204), + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR +}; + +static const NXWidgets::SRlePaletteBitmapEntry bitmap[] = +{ + { 8, 8}, { 8, 7}, { 8, 8}, /* Row 0 */ + { 6, 8}, { 1, 7}, { 1, 3}, { 1, 5}, { 2, 2}, { 2, 1}, + { 2, 2}, { 1, 5}, { 1, 3}, { 1, 7}, { 6, 8}, /* Row 1 */ + { 4, 8}, { 2, 7}, { 1, 4}, { 1, 2}, { 1, 6}, { 6, 1}, + { 1, 6}, { 1, 2}, { 1, 4}, { 2, 7}, { 4, 8}, /* Row 2 */ + { 3, 8}, { 1, 7}, { 1, 3}, { 1, 2}, { 1, 6}, { 2, 1}, + { 4, 6}, { 2, 1}, { 2, 6}, { 2, 2}, { 1, 3}, { 1, 7}, + { 3, 8}, /* Row 3 */ + { 2, 8}, { 1, 7}, { 1, 3}, { 1, 1}, { 2, 6}, { 3, 1}, + { 2, 2}, { 1, 4}, { 1, 3}, { 5, 5}, { 1, 1}, { 1, 3}, + { 1, 7}, { 2, 8}, /* Row 4 */ + { 2, 8}, { 1, 7}, { 1, 2}, { 1, 6}, { 4, 1}, { 1, 4}, + { 3, 5}, { 2, 6}, { 3, 0}, { 1, 3}, { 2, 2}, { 1, 7}, + { 2, 8}, /* Row 5 */ + { 1, 8}, { 1, 7}, { 1, 4}, { 1, 6}, { 4, 1}, { 1, 2}, + { 1, 5}, { 1, 6}, { 7, 0}, { 1, 3}, { 1, 2}, { 1, 6}, + { 1, 4}, { 1, 7}, { 1, 8}, /* Row 6 */ + { 1, 8}, { 1, 3}, { 1, 6}, { 4, 1}, { 1, 2}, { 1, 5}, + { 4, 0}, { 2, 6}, { 1, 3}, { 1, 5}, { 1, 0}, { 1, 3}, + { 1, 2}, { 1, 1}, { 1, 6}, { 1, 3}, { 1, 8}, /* Row 7 */ + { 1, 3}, { 1, 4}, { 1, 6}, { 4, 1}, { 1, 2}, { 1, 5}, + { 2, 0}, { 1, 6}, { 3, 3}, { 1, 4}, { 1, 5}, { 1, 0}, + { 1, 3}, { 1, 2}, { 1, 1}, { 1, 6}, { 1, 4}, { 1, 3}, /* Row 8 */ + { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 4}, + { 1, 3}, { 1, 4}, { 3, 2}, { 1, 5}, { 1, 0}, { 1, 3}, + { 1, 2}, { 3, 1}, { 1, 3}, /* Row 9 */ + { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3}, + { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 3}, { 1, 2}, + { 3, 1}, { 1, 3}, /* Row 10 */ + { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3}, + { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 7}, { 1, 2}, + { 3, 1}, { 1, 3}, /* Row 11 */ + { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3}, + { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 7}, { 1, 2}, + { 3, 1}, { 1, 5}, /* Row 12 */ + { 1, 3}, { 1, 6}, { 4, 1}, { 2, 2}, { 1, 5}, { 1, 0}, + { 1, 3}, { 1, 4}, { 2, 2}, { 1, 5}, { 1, 7}, { 1, 6}, + { 1, 0}, { 1, 7}, { 1, 2}, { 2, 1}, { 1, 6}, { 1, 3}, /* Row 13 */ + { 1, 3}, { 5, 1}, { 1, 2}, { 2, 3}, { 1, 0}, { 1, 3}, + { 1, 4}, { 1, 2}, { 1, 7}, { 1, 6}, { 3, 0}, { 1, 7}, + { 1, 2}, { 2, 1}, { 1, 2}, { 1, 3}, /* Row 14 */ + { 1, 5}, { 1, 4}, { 3, 1}, { 1, 2}, { 1, 3}, { 1, 2}, + { 1, 6}, { 1, 0}, { 1, 3}, { 1, 2}, { 1, 5}, { 1, 6}, + { 4, 0}, { 1, 7}, { 1, 2}, { 2, 1}, { 1, 4}, { 1, 5}, /* Row 15 */ + { 1, 8}, { 1, 4}, { 2, 1}, { 1, 2}, { 1, 3}, { 4, 0}, + { 1, 3}, { 1, 2}, { 1, 3}, { 1, 6}, { 3, 0}, { 1, 6}, + { 1, 7}, { 1, 2}, { 2, 1}, { 1, 4}, { 1, 8}, /* Row 16 */ + { 1, 8}, { 1, 5}, { 1, 2}, { 1, 1}, { 1, 5}, { 1, 6}, + { 4, 0}, { 1, 3}, { 2, 2}, { 1, 3}, { 1, 6}, { 1, 0}, + { 1, 6}, { 1, 7}, { 1, 4}, { 2, 1}, { 1, 2}, { 1, 5}, + { 1, 8}, /* Row 17 */ + { 2, 8}, { 1, 5}, { 1, 1}, { 1, 5}, { 1, 1}, { 4, 0}, + { 1, 3}, { 1, 2}, { 1, 1}, { 1, 4}, { 1, 3}, { 1, 7}, + { 1, 3}, { 1, 2}, { 3, 1}, { 1, 5}, { 2, 8}, /* Row 18 */ + { 2, 8}, { 1, 5}, { 1, 4}, { 1, 1}, { 1, 3}, { 1, 6}, + { 1, 0}, { 1, 6}, { 1, 3}, { 1, 2}, { 9, 1}, { 1, 4}, + { 1, 5}, { 2, 8}, /* Row 19 */ + { 3, 8}, { 1, 5}, { 1, 4}, { 1, 1}, { 1, 3}, { 1, 5}, + { 1, 3}, { 10, 1}, { 1, 4}, { 1, 5}, { 3, 8}, /* Row 20 */ + { 4, 8}, { 2, 4}, { 12, 1}, { 2, 4}, { 4, 8}, /* Row 21 */ + { 6, 8}, { 2, 4}, { 8, 1}, { 2, 4}, { 6, 8}, /* Row 22 */ + { 8, 8}, { 8, 4}, { 8, 8}, /* Row 23 */ +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mediaplayerBitmap = +{ + CONFIG_NXWIDGETS_BPP, + CONFIG_NXWIDGETS_FMT, + BITMAP_PALETTESIZE, + BITMAP_WIDTH, + BITMAP_HEIGHT, + {palette, hilight_palette}, + bitmap +}; diff --git a/NxWidgets/nxwm/src/glyph_minimize.cxx b/NxWidgets/nxwm/src/glyph_minimize.cxx deleted file mode 100644 index bf228e0b2..000000000 --- a/NxWidgets/nxwm/src/glyph_minimize.cxx +++ /dev/null @@ -1,179 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_minimize.cxx - * - * Copyright (C) 2012 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 21 -#define BITMAP_NCOLUMNS 21 -#define BITMAP_NLUTCODES 8 - -/******************************************************************************************** - * Private Bitmap Data - ********************************************************************************************/ - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 - -static const uint32_t g_minimizeNormalLut[BITMAP_NLUTCODES] = -{ - 0x2448b4, 0x486cd8, 0x0024b4, 0x0024d8, 0x242490, 0x0000b4, 0xfcfcfc, 0xd8fcfc /* Codes 0-7 */ -}; - -static const uint32_t g_minimizeBrightLut[BITMAP_NLUTCODES] = -{ - 0x5a75c6, 0x7590e1, 0x3f5ac6, 0x3f5ae1, 0x5a5aab, 0x3f3fc6, 0xfcfcfc, 0xe1fcfc /* Codes 0-7 */ -}; - -/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ - -#elif CONFIG_NXWIDGETS_BPP == 16 - -static const uint16_t g_minimizeNormalLut[BITMAP_NLUTCODES] = -{ - 0x2256, 0x4b7b, 0x0136, 0x013b, 0x2132, 0x0016, 0xffff, 0xdfff /* Codes 0-7 */ -}; - -static const uint16_t g_minimizeBrightLut[BITMAP_NLUTCODES] = -{ - 0x5bb8, 0x749c, 0x3ad8, 0x3adc, 0x5ad5, 0x39f8, 0xffff, 0xe7ff /* Codes 0-7 */ -}; - -/* 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 p;ointless 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 */ - -static const uint8_t g_minimizeNormalLut[BITMAP_NLUTCODES] = -{ - 0x49, 0x6d, 0x29, 0x2d, 0x30, 0x14, 0xfc, 0xf1 /* Codes 0-7 */ -}; - -static const uint8_t g_minimizeBrightLut[BITMAP_NLUTCODES] = -{ - 0x76, 0x91, 0x5e, 0x61, 0x63, 0x4e, 0xfc, 0xf3 /* Codes 0-7 */ -}; - -# else /* CONFIG_NXWIDGETS_GREYSCALE */ - -/* RGB8 (332) Colors */ - -static const nxgl_mxpixel_t g_minimizeNormalLut[BITMAP_NLUTCODES] = -{ - 0x2a, 0x4f, 0x06, 0x07, 0x26, 0x02, 0xff, 0xdf /* Codes 0-7 */ -}; - -static const uint8_t g_minimizeBrightLut[BITMAP_NLUTCODES] = -{ - 0x4f, 0x73, 0x2b, 0x2b, 0x4a, 0x27, 0xff, 0xff /* Codes 0-7 */ -}; - -# endif -#else -# error "Unsupport pixel format" -#endif - -static const struct NXWidgets::SRlePaletteBitmapEntry g_minimizeRleEntries[] = -{ - { 1, 0}, { 20, 1}, /* Row 0 */ - { 1, 1}, { 5, 2}, { 5, 3}, { 8, 2}, { 1, 4}, { 1, 0}, /* Row 1 */ - { 1, 1}, { 3, 2}, { 8, 3}, { 8, 2}, { 1, 4}, /* Row 2 */ - { 1, 1}, { 2, 2}, { 10, 3}, { 7, 2}, { 1, 4}, /* Row 3 */ - { 1, 1}, { 1, 2}, { 10, 3}, { 8, 2}, { 1, 4}, /* Row 4 */ - { 1, 1}, { 1, 2}, { 9, 3}, { 9, 2}, { 1, 4}, /* Row 5 */ - { 1, 1}, { 9, 3}, { 9, 2}, { 1, 5}, { 1, 4}, /* Row 6 */ - { 1, 1}, { 8, 3}, { 10, 2}, { 1, 5}, { 1, 4}, /* Row 7 */ - { 1, 1}, { 7, 3}, { 11, 2}, { 1, 5}, { 1, 4}, /* Row 8 */ - { 1, 1}, { 1, 2}, { 4, 3}, { 12, 2}, { 2, 5}, { 1, 4}, /* Row 9 */ - { 1, 1}, { 2, 2}, { 1, 3}, { 14, 2}, { 2, 5}, { 1, 4}, /* Row 10 */ - { 1, 1}, { 16, 2}, { 3, 5}, { 1, 4}, /* Row 11 */ - { 1, 1}, { 15, 2}, { 4, 5}, { 1, 4}, /* Row 12 */ - { 1, 1}, { 13, 2}, { 6, 5}, { 1, 4}, /* Row 13 */ - { 1, 1}, { 11, 2}, { 8, 5}, { 1, 4}, /* Row 14 */ - { 1, 1}, { 8, 2}, { 11, 5}, { 1, 4}, /* Row 15 */ - { 1, 1}, { 4, 2}, { 15, 5}, { 1, 4}, /* Row 16 */ - { 1, 1}, { 2, 2}, { 14, 6}, { 1, 7}, { 2, 5}, { 1, 4}, /* Row 17 */ - { 1, 1}, { 1, 2}, { 1, 5}, { 15, 7}, { 2, 5}, { 1, 4}, /* Row 18 */ - { 1, 1}, { 19, 5}, { 1, 0}, /* Row 19 */ - { 1, 1}, { 1, 0}, { 17, 4}, { 1, 0}, { 1, 1}, /* Row 20 */ -}; - -/******************************************************************************************** - * Public Bitmap Structure Defintions - ********************************************************************************************/ - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_minimizeBitmap = -{ - 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_minimizeNormalLut, // Index 0: Unselected LUT - g_minimizeBrightLut, // Index 1: Selected LUT - }, - g_minimizeRleEntries // data - Pointer to the beginning of the RLE data -}; diff --git a/NxWidgets/nxwm/src/glyph_minimize21x21.cxx b/NxWidgets/nxwm/src/glyph_minimize21x21.cxx new file mode 100644 index 000000000..275f66862 --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_minimize21x21.cxx @@ -0,0 +1,179 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_minimize21x21.cxx + * + * Copyright (C) 2012 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 21 +#define BITMAP_NCOLUMNS 21 +#define BITMAP_NLUTCODES 8 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 + +static const uint32_t g_minimizeNormalLut[BITMAP_NLUTCODES] = +{ + 0x2448b4, 0x486cd8, 0x0024b4, 0x0024d8, 0x242490, 0x0000b4, 0xfcfcfc, 0xd8fcfc /* Codes 0-7 */ +}; + +static const uint32_t g_minimizeBrightLut[BITMAP_NLUTCODES] = +{ + 0x5a75c6, 0x7590e1, 0x3f5ac6, 0x3f5ae1, 0x5a5aab, 0x3f3fc6, 0xfcfcfc, 0xe1fcfc /* Codes 0-7 */ +}; + +/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ + +#elif CONFIG_NXWIDGETS_BPP == 16 + +static const uint16_t g_minimizeNormalLut[BITMAP_NLUTCODES] = +{ + 0x2256, 0x4b7b, 0x0136, 0x013b, 0x2132, 0x0016, 0xffff, 0xdfff /* Codes 0-7 */ +}; + +static const uint16_t g_minimizeBrightLut[BITMAP_NLUTCODES] = +{ + 0x5bb8, 0x749c, 0x3ad8, 0x3adc, 0x5ad5, 0x39f8, 0xffff, 0xe7ff /* Codes 0-7 */ +}; + +/* 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 p;ointless 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 */ + +static const uint8_t g_minimizeNormalLut[BITMAP_NLUTCODES] = +{ + 0x49, 0x6d, 0x29, 0x2d, 0x30, 0x14, 0xfc, 0xf1 /* Codes 0-7 */ +}; + +static const uint8_t g_minimizeBrightLut[BITMAP_NLUTCODES] = +{ + 0x76, 0x91, 0x5e, 0x61, 0x63, 0x4e, 0xfc, 0xf3 /* Codes 0-7 */ +}; + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +/* RGB8 (332) Colors */ + +static const nxgl_mxpixel_t g_minimizeNormalLut[BITMAP_NLUTCODES] = +{ + 0x2a, 0x4f, 0x06, 0x07, 0x26, 0x02, 0xff, 0xdf /* Codes 0-7 */ +}; + +static const uint8_t g_minimizeBrightLut[BITMAP_NLUTCODES] = +{ + 0x4f, 0x73, 0x2b, 0x2b, 0x4a, 0x27, 0xff, 0xff /* Codes 0-7 */ +}; + +# endif +#else +# error "Unsupport pixel format" +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_minimizeRleEntries[] = +{ + { 1, 0}, { 20, 1}, /* Row 0 */ + { 1, 1}, { 5, 2}, { 5, 3}, { 8, 2}, { 1, 4}, { 1, 0}, /* Row 1 */ + { 1, 1}, { 3, 2}, { 8, 3}, { 8, 2}, { 1, 4}, /* Row 2 */ + { 1, 1}, { 2, 2}, { 10, 3}, { 7, 2}, { 1, 4}, /* Row 3 */ + { 1, 1}, { 1, 2}, { 10, 3}, { 8, 2}, { 1, 4}, /* Row 4 */ + { 1, 1}, { 1, 2}, { 9, 3}, { 9, 2}, { 1, 4}, /* Row 5 */ + { 1, 1}, { 9, 3}, { 9, 2}, { 1, 5}, { 1, 4}, /* Row 6 */ + { 1, 1}, { 8, 3}, { 10, 2}, { 1, 5}, { 1, 4}, /* Row 7 */ + { 1, 1}, { 7, 3}, { 11, 2}, { 1, 5}, { 1, 4}, /* Row 8 */ + { 1, 1}, { 1, 2}, { 4, 3}, { 12, 2}, { 2, 5}, { 1, 4}, /* Row 9 */ + { 1, 1}, { 2, 2}, { 1, 3}, { 14, 2}, { 2, 5}, { 1, 4}, /* Row 10 */ + { 1, 1}, { 16, 2}, { 3, 5}, { 1, 4}, /* Row 11 */ + { 1, 1}, { 15, 2}, { 4, 5}, { 1, 4}, /* Row 12 */ + { 1, 1}, { 13, 2}, { 6, 5}, { 1, 4}, /* Row 13 */ + { 1, 1}, { 11, 2}, { 8, 5}, { 1, 4}, /* Row 14 */ + { 1, 1}, { 8, 2}, { 11, 5}, { 1, 4}, /* Row 15 */ + { 1, 1}, { 4, 2}, { 15, 5}, { 1, 4}, /* Row 16 */ + { 1, 1}, { 2, 2}, { 14, 6}, { 1, 7}, { 2, 5}, { 1, 4}, /* Row 17 */ + { 1, 1}, { 1, 2}, { 1, 5}, { 15, 7}, { 2, 5}, { 1, 4}, /* Row 18 */ + { 1, 1}, { 19, 5}, { 1, 0}, /* Row 19 */ + { 1, 1}, { 1, 0}, { 17, 4}, { 1, 0}, { 1, 1}, /* Row 20 */ +}; + +/******************************************************************************************** + * Public Bitmap Structure Defintions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_minimizeBitmap = +{ + 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_minimizeNormalLut, // Index 0: Unselected LUT + g_minimizeBrightLut, // Index 1: Selected LUT + }, + g_minimizeRleEntries // data - Pointer to the beginning of the RLE data +}; diff --git a/NxWidgets/nxwm/src/glyph_mplayer_controls.cxx b/NxWidgets/nxwm/src/glyph_mplayer_controls.cxx deleted file mode 100644 index 38da35844..000000000 --- a/NxWidgets/nxwm/src/glyph_mplayer_controls.cxx +++ /dev/null @@ -1,398 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_mediaplayer.cxx - * - * Copyright (C) 2013 Ken Pettit. All rights reserved. - * Author: Ken Pettit - * - * 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 BITMAP_WIDTH 32 -#define BITMAP_HEIGHT 32 -#define BITMAP_PALETTESIZE 8 - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -static const NXWidgets::nxwidget_pixel_t palette[BITMAP_PALETTESIZE] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, MKRGB( 11, 24,108), MKRGB( 63, 90,192), MKRGB(121,136,250), - MKRGB(224,234,244), MKRGB( 69, 80,149), MKRGB(127,169,239), MKRGB(152,174,207), -}; - -static const NXWidgets::nxwidget_pixel_t hilight_palette[BITMAP_PALETTESIZE] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, MKRGB( 61, 74,158), MKRGB(113,140,242), MKRGB(171,186,255), - MKRGB(255,255,255), MKRGB(119,130,199), MKRGB(177,219,255), MKRGB(202,224,255), -}; - -/* Bitmap definition for the "Play" button */ - -static const NXWidgets::SRlePaletteBitmapEntry play_bitmap[] = -{ - { 32, 0}, /* Row 0 */ - { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ - { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ - { 8, 0}, { 3, 6}, { 9, 7}, { 3, 6}, { 1, 7}, { 8, 0}, /* Row 3 */ - { 7, 0}, { 7, 6}, { 4, 7}, { 7, 6}, { 7, 0}, /* Row 4 */ - { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ - { 5, 0}, { 6, 3}, { 9, 6}, { 7, 3}, { 5, 0}, /* Row 6 */ - { 4, 0}, { 1, 2}, { 22, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ - { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ - { 3, 0}, { 3, 2}, { 5, 3}, { 1, 6}, { 13, 3}, { 4, 2}, - { 3, 0}, /* Row 9 */ - { 2, 0}, { 1, 5}, { 6, 2}, { 2, 3}, { 2, 4}, { 1, 6}, - { 9, 3}, { 6, 2}, { 1, 5}, { 2, 0}, /* Row 10 */ - { 2, 0}, { 1, 5}, { 8, 2}, { 1, 7}, { 3, 4}, { 1, 6}, - { 2, 2}, { 1, 3}, { 10, 2}, { 1, 5}, { 2, 0}, /* Row 11 */ - { 1, 0}, { 4, 5}, { 6, 2}, { 1, 7}, { 4, 4}, { 1, 7}, - { 1, 3}, { 8, 2}, { 4, 5}, { 2, 0}, /* Row 12 */ - { 1, 0}, { 7, 5}, { 3, 2}, { 1, 7}, { 6, 4}, { 1, 7}, - { 3, 2}, { 8, 5}, { 2, 0}, /* Row 13 */ - { 1, 0}, { 9, 5}, { 1, 2}, { 1, 7}, { 8, 4}, { 1, 7}, - { 8, 5}, { 1, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ - { 1, 0}, { 4, 1}, { 6, 5}, { 1, 7}, { 10, 4}, { 1, 7}, - { 3, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ - { 1, 0}, { 8, 1}, { 2, 5}, { 1, 7}, { 10, 4}, { 1, 7}, - { 7, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ - { 1, 0}, { 10, 1}, { 1, 7}, { 9, 4}, { 1, 5}, { 8, 1}, - { 1, 5}, { 1, 0}, /* Row 17 */ - { 1, 0}, { 10, 1}, { 1, 7}, { 7, 4}, { 1, 5}, { 10, 1}, - { 2, 0}, /* Row 18 */ - { 1, 0}, { 1, 5}, { 9, 1}, { 1, 7}, { 5, 4}, { 1, 7}, - { 12, 1}, { 2, 0}, /* Row 19 */ - { 2, 0}, { 9, 1}, { 1, 7}, { 4, 4}, { 1, 5}, { 13, 1}, - { 2, 0}, /* Row 20 */ - { 2, 0}, { 9, 1}, { 1, 7}, { 2, 4}, { 1, 7}, { 1, 2}, - { 13, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ - { 2, 0}, { 1, 5}, { 8, 1}, { 1, 7}, { 1, 4}, { 1, 5}, - { 6, 2}, { 9, 1}, { 3, 0}, /* Row 22 */ - { 3, 0}, { 7, 1}, { 1, 2}, { 1, 5}, { 10, 2}, { 6, 1}, - { 1, 5}, { 3, 0}, /* Row 23 */ - { 4, 0}, { 4, 1}, { 16, 2}, { 4, 1}, { 4, 0}, /* Row 24 */ - { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ - { 5, 0}, { 1, 5}, { 1, 1}, { 19, 2}, { 1, 5}, { 5, 0}, /* Row 26 */ - { 6, 0}, { 1, 5}, { 18, 2}, { 7, 0}, /* Row 27 */ - { 8, 0}, { 15, 2}, { 1, 5}, { 8, 0}, /* Row 28 */ - { 9, 0}, { 1, 5}, { 12, 2}, { 10, 0}, /* Row 29 */ - { 12, 0}, { 8, 2}, { 12, 0}, /* Row 30 */ - { 32, 0}, /* Row 31 */ -}; - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerPlayBitmap = -{ - CONFIG_NXWIDGETS_BPP, - CONFIG_NXWIDGETS_FMT, - BITMAP_PALETTESIZE, - BITMAP_WIDTH, - BITMAP_HEIGHT, - {palette, hilight_palette}, - play_bitmap -}; - -/* Bitmap definition for the "Pause" button */ - -static const NXWidgets::SRlePaletteBitmapEntry pause_bitmap[] = -{ - { 32, 0}, /* Row 0 */ - { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ - { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ - { 8, 0}, { 4, 6}, { 8, 7}, { 4, 6}, { 8, 0}, /* Row 3 */ - { 7, 0}, { 7, 6}, { 3, 7}, { 8, 6}, { 7, 0}, /* Row 4 */ - { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ - { 5, 0}, { 6, 3}, { 9, 6}, { 7, 3}, { 5, 0}, /* Row 6 */ - { 4, 0}, { 1, 2}, { 22, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ - { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ - { 3, 0}, { 3, 2}, { 19, 3}, { 4, 2}, { 3, 0}, /* Row 9 */ - { 2, 0}, { 1, 5}, { 5, 2}, { 2, 3}, { 1, 6}, { 3, 4}, - { 3, 3}, { 1, 7}, { 2, 4}, { 1, 7}, { 2, 3}, { 6, 2}, - { 1, 5}, { 2, 0}, /* Row 10 */ - { 2, 0}, { 1, 5}, { 7, 2}, { 1, 7}, { 3, 4}, { 1, 7}, - { 1, 2}, { 1, 3}, { 4, 4}, { 1, 3}, { 7, 2}, { 1, 5}, - { 2, 0}, /* Row 11 */ - { 1, 0}, { 4, 5}, { 5, 2}, { 1, 7}, { 3, 4}, { 1, 7}, - { 1, 2}, { 1, 3}, { 4, 4}, { 1, 6}, { 4, 2}, { 4, 5}, - { 2, 0}, /* Row 12 */ - { 1, 0}, { 8, 5}, { 1, 2}, { 1, 7}, { 3, 4}, { 1, 7}, - { 1, 2}, { 1, 5}, { 4, 4}, { 1, 5}, { 1, 2}, { 7, 5}, - { 2, 0}, /* Row 13 */ - { 1, 0}, { 9, 5}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 2}, - { 1, 5}, { 4, 4}, { 8, 5}, { 1, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ - { 1, 0}, { 4, 1}, { 5, 5}, { 1, 7}, { 3, 4}, { 1, 7}, - { 2, 5}, { 4, 4}, { 5, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ - { 1, 0}, { 9, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 2, 5}, - { 4, 4}, { 1, 5}, { 8, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ - { 1, 0}, { 9, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, - { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 1, 5}, { 1, 0}, /* Row 17 */ - { 1, 0}, { 9, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, - { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 2, 0}, /* Row 18 */ - { 1, 0}, { 1, 5}, { 8, 1}, { 1, 7}, { 3, 4}, { 1, 7}, - { 1, 1}, { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 2, 0}, /* Row 19 */ - { 2, 0}, { 8, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, - { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 2, 0}, /* Row 20 */ - { 2, 0}, { 8, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, - { 1, 2}, { 4, 4}, { 1, 5}, { 7, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ - { 2, 0}, { 1, 5}, { 7, 1}, { 1, 7}, { 3, 4}, { 1, 6}, - { 1, 1}, { 1, 2}, { 4, 4}, { 1, 2}, { 7, 1}, { 3, 0}, /* Row 22 */ - { 3, 0}, { 7, 1}, { 1, 2}, { 3, 6}, { 4, 2}, { 2, 6}, - { 2, 2}, { 6, 1}, { 1, 5}, { 3, 0}, /* Row 23 */ - { 4, 0}, { 4, 1}, { 16, 2}, { 4, 1}, { 4, 0}, /* Row 24 */ - { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ - { 5, 0}, { 1, 5}, { 1, 1}, { 6, 2}, { 6, 2}, { 7, 2}, - { 1, 5}, { 5, 0}, /* Row 26 */ - { 6, 0}, { 1, 5}, { 4, 2}, { 1, 5}, { 8, 2}, { 1, 5}, - { 4, 2}, { 7, 0}, /* Row 27 */ - { 8, 0}, { 3, 2}, { 4, 2}, { 2, 2}, { 4, 2}, { 2, 2}, - { 1, 5}, { 8, 0}, /* Row 28 */ - { 9, 0}, { 1, 5}, { 3, 2}, { 6, 2}, { 3, 2}, { 10, 0}, /* Row 29 */ - { 12, 0}, { 8, 2}, { 12, 0}, /* Row 30 */ - { 32, 0}, /* Row 31 */ -}; - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerPauseBitmap = -{ - CONFIG_NXWIDGETS_BPP, - CONFIG_NXWIDGETS_FMT, - BITMAP_PALETTESIZE, - BITMAP_WIDTH, - BITMAP_HEIGHT, - {palette, hilight_palette}, - pause_bitmap -}; - -/* Bitmap definition for "Rewind" control */ - -static const NXWidgets::SRlePaletteBitmapEntry rew_bitmap[] = -{ - { 32, 0}, /* Row 0 */ -// { 14, 0}, { 3, 4}, { 1, 7}, { 14, 0}, /* Row 1 */ - { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ - { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ - { 8, 0}, { 1, 7}, { 3, 6}, { 8, 7}, - { 3, 6}, { 1, 7}, { 8, 0}, /* Row 3 */ - { 7, 0}, { 7, 6}, { 3, 7}, { 8, 6}, { 7, 0}, /* Row 4 */ - { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ - { 5, 0}, { 6, 3}, { 9, 6}, { 7, 3}, { 5, 0}, /* Row 6 */ - { 4, 0}, { 23, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ - { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ - { 3, 0}, { 3, 2}, { 18, 3}, { 5, 2}, { 3, 0}, /* Row 9 */ - { 2, 0}, { 1, 5}, { 5, 2}, { 6, 3}, { 1, 6}, { 7, 3}, - { 2, 2}, { 2, 6}, { 3, 2}, { 1, 5}, { 2, 0}, /* Row 10 */ - { 2, 0}, { 1, 5}, { 9, 2}, { 1, 6}, { 2, 4}, { 1, 3}, - { 1, 2}, { 2, 3}, { 3, 2}, { 1, 6}, { 2, 4}, { 1, 6}, - { 3, 2}, { 1, 5}, { 2, 0}, /* Row 11 */ - { 1, 0}, { 2, 5}, { 7, 2}, { 1, 6}, { 4, 4}, { 1, 3}, - { 4, 2}, { 1, 3}, { 1, 7}, { 3, 4}, { 1, 7}, { 3, 2}, - { 1, 5}, { 2, 0}, /* Row 12 */ - { 1, 0}, { 5, 5}, { 2, 2}, { 1, 5}, { 1, 7}, { 5, 4}, - { 1, 5}, { 3, 2}, { 1, 7}, { 5, 4}, { 1, 7}, { 1, 2}, - { 3, 5}, { 2, 0}, /* Row 13 */ - { 1, 0}, { 6, 5}, { 1, 7}, { 7, 4}, { 1, 5}, { 1, 2}, - { 1, 7}, { 7, 4}, { 1, 7}, { 3, 5}, { 1, 1}, { 1, 5}, - { 1, 0}, /* Row 14 */ - { 1, 0}, { 4, 1}, { 1, 7}, { 9, 4}, { 1, 7}, { 9, 4}, - { 1, 7}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ - { 1, 0}, { 4, 1}, { 1, 5}, { 9, 4}, { 1, 7}, { 9, 4}, - { 1, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ - { 1, 0}, { 6, 1}, { 1, 5}, { 7, 4}, { 1, 5}, { 1, 1}, - { 1, 5}, { 7, 4}, { 1, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 17 */ - { 1, 0}, { 8, 1}, { 1, 7}, { 5, 4}, { 1, 5}, { 3, 1}, - { 1, 7}, { 5, 4}, { 1, 5}, { 4, 1}, { 2, 0}, /* Row 18 */ - { 1, 0}, { 1, 5}, { 8, 1}, { 1, 5}, { 4, 4}, { 1, 5}, - { 4, 1}, { 1, 5}, { 4, 4}, { 1, 5}, { 4, 1}, { 2, 0}, /* Row 19 */ - { 2, 0}, { 10, 1}, { 1, 7}, { 2, 4}, { 1, 2}, { 6, 1}, - { 1, 7}, { 2, 4}, { 1, 5}, { 4, 1}, { 2, 0}, /* Row 20 */ - { 2, 0}, { 11, 1}, { 1, 5}, { 1, 4}, { 1, 2}, { 7, 1}, - { 1, 5}, { 1, 7}, { 1, 5}, { 3, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ - { 2, 0}, { 1, 5}, { 9, 1}, { 1, 2}, { 1, 1}, { 6, 2}, - { 9, 1}, { 3, 0}, /* Row 22 */ - { 3, 0}, { 7, 1}, { 12, 2}, { 6, 1}, { 1, 5}, { 3, 0}, /* Row 23 */ - { 4, 0}, { 5, 1}, { 14, 2}, { 5, 1}, { 4, 0}, /* Row 24 */ - { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ - { 5, 0}, { 1, 5}, { 1, 1}, { 6, 2}, { 6, 2}, { 7, 2}, - { 1, 5}, { 5, 0}, /* Row 26 */ - { 6, 0}, { 1, 5}, { 4, 2}, { 1, 5}, { 8, 2}, { 1, 5}, - { 4, 2}, { 7, 0}, /* Row 27 */ - { 8, 0}, { 3, 2}, { 3, 2}, { 4, 2}, { 3, 2}, { 2, 2}, - { 1, 5}, { 8, 0}, /* Row 28 */ - { 9, 0}, { 1, 5}, { 3, 2}, { 6, 2}, { 2, 2}, { 1, 5}, - { 10, 0}, /* Row 29 */ - { 12, 0}, { 3, 2}, { 2, 2}, { 3, 2}, { 12, 0}, /* Row 30 */ - { 32, 0}, /* Row 31 */ -}; - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerRewBitmap = -{ - CONFIG_NXWIDGETS_BPP, - CONFIG_NXWIDGETS_FMT, - BITMAP_PALETTESIZE, - BITMAP_WIDTH, - BITMAP_HEIGHT, - {palette, hilight_palette}, - rew_bitmap -}; - -/* Bitmap definition for "Forward" control */ - -static const NXWidgets::SRlePaletteBitmapEntry fwd_bitmap[] = -{ - { 32, 0}, /* Row 0 */ - { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ - { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ - { 8, 0}, { 1, 7}, { 3, 6}, { 8, 7}, - { 3, 6}, { 1, 7}, { 8, 0}, /* Row 3 */ - { 7, 0}, { 7, 6}, { 3, 7}, { 8, 6}, { 7, 0}, /* Row 4 */ - { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ - { 5, 0}, { 6, 3}, { 10, 6}, { 6, 3}, { 5, 0}, /* Row 6 */ - { 4, 0}, { 1, 2}, { 22, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ - { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ - { 3, 0}, { 3, 2}, { 19, 3}, { 4, 2}, { 3, 0}, /* Row 9 */ - { 2, 0}, { 1, 5}, { 3, 2}, { 2, 6}, { 2, 2}, { 7, 3}, - { 1, 6}, { 5, 3}, { 6, 2}, { 1, 5}, { 2, 0}, /* Row 10 */ - { 2, 0}, { 1, 5}, { 3, 2}, { 1, 7}, { 2, 4}, { 1, 3}, - { 2, 2}, { 3, 3}, { 1, 2}, { 1, 6}, { 2, 4}, { 1, 6}, - { 9, 2}, { 1, 5}, { 2, 0}, /* Row 11 */ - { 1, 0}, { 2, 5}, { 3, 2}, { 1, 7}, { 3, 4}, { 1, 7}, - { 5, 2}, { 1, 6}, { 4, 4}, { 1, 5}, { 7, 2}, { 1, 5}, - { 2, 0}, /* Row 12 */ - { 1, 0}, { 4, 5}, { 1, 2}, { 1, 7}, { 5, 4}, { 1, 7}, - { 3, 2}, { 1, 6}, { 5, 4}, { 1, 7}, { 1, 5}, { 2, 2}, - { 4, 5}, { 2, 0}, /* Row 13 */ - { 1, 0}, { 1, 5}, { 1, 1}, { 2, 5}, { 1, 1}, { 1, 7}, - { 7, 4}, { 1, 7}, { 1, 2}, { 1, 5}, { 7, 4}, { 1, 7}, - { 4, 5}, { 1, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ - { 1, 0}, { 5, 1}, { 1, 7}, { 9, 4}, { 1, 7}, { 9, 4}, - { 1, 5}, { 3, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ - { 1, 0}, { 5, 1}, { 1, 7}, { 8, 4}, { 2, 7}, { 8, 4}, - { 1, 7}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ - { 1, 0}, { 5, 1}, { 1, 5}, { 7, 4}, { 1, 5}, { 1, 1}, - { 1, 5}, { 7, 4}, { 1, 5}, { 5, 1}, { 1, 5}, { 1, 0}, /* Row 17 */ - { 1, 0}, { 5, 1}, { 1, 5}, { 5, 4}, { 1, 7}, { 3, 1}, - { 1, 5}, { 5, 4}, { 1, 7}, { 7, 1}, { 2, 0}, /* Row 18 */ - { 1, 0}, { 1, 5}, { 4, 1}, { 1, 5}, { 3, 4}, { 1, 7}, - { 1, 2}, { 4, 1}, { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, - { 2, 0}, /* Row 19 */ - { 2, 0}, { 4, 1}, { 1, 5}, { 2, 4}, { 1, 5}, { 6, 1}, - { 1, 5}, { 2, 4}, { 1, 7}, { 10, 1}, { 2, 0}, /* Row 20 */ - { 2, 0}, { 4, 1}, { 2, 7}, { 8, 1}, { 1, 5}, { 1, 4}, - { 1, 2}, { 10, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ - { 2, 0}, { 1, 5}, { 9, 1}, { 6, 2}, { 1, 1}, { 1, 2}, - { 9, 1}, { 3, 0}, /* Row 22 */ - { 3, 0}, { 7, 1}, { 12, 2}, { 6, 1}, { 1, 5}, { 3, 0}, /* Row 23 */ - { 4, 0}, { 5, 1}, { 14, 2}, { 5, 1}, { 4, 0}, /* Row 24 */ - { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ - { 5, 0}, { 1, 5}, { 1, 1}, { 6, 2}, { 6, 2}, { 7, 2}, - { 1, 5}, { 5, 0}, /* Row 26 */ - { 6, 0}, { 1, 5}, { 4, 2}, { 1, 5}, { 8, 2}, { 1, 5}, - { 4, 2}, { 7, 0}, /* Row 27 */ - { 8, 0}, { 3, 2}, { 3, 2}, { 4, 2}, { 3, 2}, { 2, 2}, - { 1, 5}, { 8, 0}, /* Row 28 */ - { 9, 0}, { 1, 5}, { 3, 2}, { 6, 2}, { 2, 2}, { 1, 5}, - { 10, 0}, /* Row 29 */ - { 12, 0}, { 3, 2}, { 2, 2}, { 3, 2}, { 12, 0}, /* Row 30 */ - { 32, 0}, /* Row 31 */ -}; - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerFwdBitmap = -{ - CONFIG_NXWIDGETS_BPP, - CONFIG_NXWIDGETS_FMT, - BITMAP_PALETTESIZE, - BITMAP_WIDTH, - BITMAP_HEIGHT, - {palette, hilight_palette}, - fwd_bitmap -}; - -static const NXWidgets::SRlePaletteBitmapEntry vol_bitmap[] = -{ - { 22, 0}, /* Row 0 */ - { 9, 0}, { 5, 7}, { 8, 0}, /* Row 1 */ - { 6, 0}, { 2, 6}, { 6, 7}, { 2, 6}, { 1, 7}, { 5, 0}, /* Row 2 */ - { 4, 0}, { 2, 3}, { 9, 6}, { 3, 3}, { 4, 0}, /* Row 3 */ - { 3, 0}, { 5, 3}, { 6, 6}, { 5, 3}, { 3, 0}, /* Row 4 */ - { 3, 0}, { 16, 3}, { 3, 0}, /* Row 5 */ - { 2, 0}, { 2, 2}, { 13, 3}, { 3, 2}, { 2, 0}, /* Row 6 */ - { 1, 0}, { 1, 5}, { 4, 2}, { 10, 3}, { 4, 2}, { 1, 5}, - { 1, 0}, /* Row 7 */ - { 1, 0}, { 2, 5}, { 15, 2}, { 3, 5}, { 1, 0}, /* Row 8 */ - { 1, 0}, { 5, 5}, { 10, 2}, { 5, 5}, { 1, 0}, /* Row 9 */ - { 1, 0}, { 2, 1}, { 15, 5}, { 3, 1}, { 1, 0}, /* Row 10 */ - { 1, 0}, { 5, 1}, { 10, 5}, { 5, 1}, { 1, 0}, /* Row 11 */ - { 1, 0}, { 20, 1}, { 1, 0}, /* Row 12 */ - { 1, 0}, { 20, 1}, { 1, 0}, /* Row 13 */ - { 1, 0}, { 19, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ - { 1, 0}, { 1, 5}, { 7, 1}, { 1, 5}, { 4, 2}, { 6, 1}, - { 2, 0}, /* Row 15 */ - { 2, 0}, { 5, 1}, { 8, 2}, { 4, 1}, { 1, 5}, { 2, 0}, /* Row 16 */ - { 3, 0}, { 2, 1}, { 12, 2}, { 2, 1}, { 3, 0}, /* Row 17 */ - { 3, 0}, { 1, 5}, { 1, 1}, { 13, 2}, { 1, 5}, { 3, 0}, /* Row 18 */ - { 6, 0}, { 10, 2}, { 1, 5}, { 5, 0}, /* Row 19 */ - { 6, 0}, { 1, 5}, { 8, 2}, { 7, 0}, /* Row 20 */ - { 22, 0}, /* Row 21 */ -}; - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerVolBitmap = -{ - CONFIG_NXWIDGETS_BPP, - CONFIG_NXWIDGETS_FMT, - BITMAP_PALETTESIZE, - 22, - 22, - {hilight_palette, hilight_palette}, - vol_bitmap -}; diff --git a/NxWidgets/nxwm/src/glyph_mplayer_controls32x32.cxx b/NxWidgets/nxwm/src/glyph_mplayer_controls32x32.cxx new file mode 100644 index 000000000..f4cd222b0 --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_mplayer_controls32x32.cxx @@ -0,0 +1,398 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_mediaplayer32x32.cxx + * + * Copyright (C) 2013 Ken Pettit. All rights reserved. + * Author: Ken Pettit + * + * 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 BITMAP_WIDTH 32 +#define BITMAP_HEIGHT 32 +#define BITMAP_PALETTESIZE 8 + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +static const NXWidgets::nxwidget_pixel_t palette[BITMAP_PALETTESIZE] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, MKRGB( 11, 24,108), MKRGB( 63, 90,192), MKRGB(121,136,250), + MKRGB(224,234,244), MKRGB( 69, 80,149), MKRGB(127,169,239), MKRGB(152,174,207), +}; + +static const NXWidgets::nxwidget_pixel_t hilight_palette[BITMAP_PALETTESIZE] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, MKRGB( 61, 74,158), MKRGB(113,140,242), MKRGB(171,186,255), + MKRGB(255,255,255), MKRGB(119,130,199), MKRGB(177,219,255), MKRGB(202,224,255), +}; + +/* Bitmap definition for the "Play" button */ + +static const NXWidgets::SRlePaletteBitmapEntry play_bitmap[] = +{ + { 32, 0}, /* Row 0 */ + { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ + { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ + { 8, 0}, { 3, 6}, { 9, 7}, { 3, 6}, { 1, 7}, { 8, 0}, /* Row 3 */ + { 7, 0}, { 7, 6}, { 4, 7}, { 7, 6}, { 7, 0}, /* Row 4 */ + { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ + { 5, 0}, { 6, 3}, { 9, 6}, { 7, 3}, { 5, 0}, /* Row 6 */ + { 4, 0}, { 1, 2}, { 22, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ + { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ + { 3, 0}, { 3, 2}, { 5, 3}, { 1, 6}, { 13, 3}, { 4, 2}, + { 3, 0}, /* Row 9 */ + { 2, 0}, { 1, 5}, { 6, 2}, { 2, 3}, { 2, 4}, { 1, 6}, + { 9, 3}, { 6, 2}, { 1, 5}, { 2, 0}, /* Row 10 */ + { 2, 0}, { 1, 5}, { 8, 2}, { 1, 7}, { 3, 4}, { 1, 6}, + { 2, 2}, { 1, 3}, { 10, 2}, { 1, 5}, { 2, 0}, /* Row 11 */ + { 1, 0}, { 4, 5}, { 6, 2}, { 1, 7}, { 4, 4}, { 1, 7}, + { 1, 3}, { 8, 2}, { 4, 5}, { 2, 0}, /* Row 12 */ + { 1, 0}, { 7, 5}, { 3, 2}, { 1, 7}, { 6, 4}, { 1, 7}, + { 3, 2}, { 8, 5}, { 2, 0}, /* Row 13 */ + { 1, 0}, { 9, 5}, { 1, 2}, { 1, 7}, { 8, 4}, { 1, 7}, + { 8, 5}, { 1, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ + { 1, 0}, { 4, 1}, { 6, 5}, { 1, 7}, { 10, 4}, { 1, 7}, + { 3, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ + { 1, 0}, { 8, 1}, { 2, 5}, { 1, 7}, { 10, 4}, { 1, 7}, + { 7, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ + { 1, 0}, { 10, 1}, { 1, 7}, { 9, 4}, { 1, 5}, { 8, 1}, + { 1, 5}, { 1, 0}, /* Row 17 */ + { 1, 0}, { 10, 1}, { 1, 7}, { 7, 4}, { 1, 5}, { 10, 1}, + { 2, 0}, /* Row 18 */ + { 1, 0}, { 1, 5}, { 9, 1}, { 1, 7}, { 5, 4}, { 1, 7}, + { 12, 1}, { 2, 0}, /* Row 19 */ + { 2, 0}, { 9, 1}, { 1, 7}, { 4, 4}, { 1, 5}, { 13, 1}, + { 2, 0}, /* Row 20 */ + { 2, 0}, { 9, 1}, { 1, 7}, { 2, 4}, { 1, 7}, { 1, 2}, + { 13, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ + { 2, 0}, { 1, 5}, { 8, 1}, { 1, 7}, { 1, 4}, { 1, 5}, + { 6, 2}, { 9, 1}, { 3, 0}, /* Row 22 */ + { 3, 0}, { 7, 1}, { 1, 2}, { 1, 5}, { 10, 2}, { 6, 1}, + { 1, 5}, { 3, 0}, /* Row 23 */ + { 4, 0}, { 4, 1}, { 16, 2}, { 4, 1}, { 4, 0}, /* Row 24 */ + { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ + { 5, 0}, { 1, 5}, { 1, 1}, { 19, 2}, { 1, 5}, { 5, 0}, /* Row 26 */ + { 6, 0}, { 1, 5}, { 18, 2}, { 7, 0}, /* Row 27 */ + { 8, 0}, { 15, 2}, { 1, 5}, { 8, 0}, /* Row 28 */ + { 9, 0}, { 1, 5}, { 12, 2}, { 10, 0}, /* Row 29 */ + { 12, 0}, { 8, 2}, { 12, 0}, /* Row 30 */ + { 32, 0}, /* Row 31 */ +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerPlayBitmap = +{ + CONFIG_NXWIDGETS_BPP, + CONFIG_NXWIDGETS_FMT, + BITMAP_PALETTESIZE, + BITMAP_WIDTH, + BITMAP_HEIGHT, + {palette, hilight_palette}, + play_bitmap +}; + +/* Bitmap definition for the "Pause" button */ + +static const NXWidgets::SRlePaletteBitmapEntry pause_bitmap[] = +{ + { 32, 0}, /* Row 0 */ + { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ + { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ + { 8, 0}, { 4, 6}, { 8, 7}, { 4, 6}, { 8, 0}, /* Row 3 */ + { 7, 0}, { 7, 6}, { 3, 7}, { 8, 6}, { 7, 0}, /* Row 4 */ + { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ + { 5, 0}, { 6, 3}, { 9, 6}, { 7, 3}, { 5, 0}, /* Row 6 */ + { 4, 0}, { 1, 2}, { 22, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ + { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ + { 3, 0}, { 3, 2}, { 19, 3}, { 4, 2}, { 3, 0}, /* Row 9 */ + { 2, 0}, { 1, 5}, { 5, 2}, { 2, 3}, { 1, 6}, { 3, 4}, + { 3, 3}, { 1, 7}, { 2, 4}, { 1, 7}, { 2, 3}, { 6, 2}, + { 1, 5}, { 2, 0}, /* Row 10 */ + { 2, 0}, { 1, 5}, { 7, 2}, { 1, 7}, { 3, 4}, { 1, 7}, + { 1, 2}, { 1, 3}, { 4, 4}, { 1, 3}, { 7, 2}, { 1, 5}, + { 2, 0}, /* Row 11 */ + { 1, 0}, { 4, 5}, { 5, 2}, { 1, 7}, { 3, 4}, { 1, 7}, + { 1, 2}, { 1, 3}, { 4, 4}, { 1, 6}, { 4, 2}, { 4, 5}, + { 2, 0}, /* Row 12 */ + { 1, 0}, { 8, 5}, { 1, 2}, { 1, 7}, { 3, 4}, { 1, 7}, + { 1, 2}, { 1, 5}, { 4, 4}, { 1, 5}, { 1, 2}, { 7, 5}, + { 2, 0}, /* Row 13 */ + { 1, 0}, { 9, 5}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 2}, + { 1, 5}, { 4, 4}, { 8, 5}, { 1, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ + { 1, 0}, { 4, 1}, { 5, 5}, { 1, 7}, { 3, 4}, { 1, 7}, + { 2, 5}, { 4, 4}, { 5, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ + { 1, 0}, { 9, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 2, 5}, + { 4, 4}, { 1, 5}, { 8, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ + { 1, 0}, { 9, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, + { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 1, 5}, { 1, 0}, /* Row 17 */ + { 1, 0}, { 9, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, + { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 2, 0}, /* Row 18 */ + { 1, 0}, { 1, 5}, { 8, 1}, { 1, 7}, { 3, 4}, { 1, 7}, + { 1, 1}, { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 2, 0}, /* Row 19 */ + { 2, 0}, { 8, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, + { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, { 2, 0}, /* Row 20 */ + { 2, 0}, { 8, 1}, { 1, 7}, { 3, 4}, { 1, 7}, { 1, 1}, + { 1, 2}, { 4, 4}, { 1, 5}, { 7, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ + { 2, 0}, { 1, 5}, { 7, 1}, { 1, 7}, { 3, 4}, { 1, 6}, + { 1, 1}, { 1, 2}, { 4, 4}, { 1, 2}, { 7, 1}, { 3, 0}, /* Row 22 */ + { 3, 0}, { 7, 1}, { 1, 2}, { 3, 6}, { 4, 2}, { 2, 6}, + { 2, 2}, { 6, 1}, { 1, 5}, { 3, 0}, /* Row 23 */ + { 4, 0}, { 4, 1}, { 16, 2}, { 4, 1}, { 4, 0}, /* Row 24 */ + { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ + { 5, 0}, { 1, 5}, { 1, 1}, { 6, 2}, { 6, 2}, { 7, 2}, + { 1, 5}, { 5, 0}, /* Row 26 */ + { 6, 0}, { 1, 5}, { 4, 2}, { 1, 5}, { 8, 2}, { 1, 5}, + { 4, 2}, { 7, 0}, /* Row 27 */ + { 8, 0}, { 3, 2}, { 4, 2}, { 2, 2}, { 4, 2}, { 2, 2}, + { 1, 5}, { 8, 0}, /* Row 28 */ + { 9, 0}, { 1, 5}, { 3, 2}, { 6, 2}, { 3, 2}, { 10, 0}, /* Row 29 */ + { 12, 0}, { 8, 2}, { 12, 0}, /* Row 30 */ + { 32, 0}, /* Row 31 */ +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerPauseBitmap = +{ + CONFIG_NXWIDGETS_BPP, + CONFIG_NXWIDGETS_FMT, + BITMAP_PALETTESIZE, + BITMAP_WIDTH, + BITMAP_HEIGHT, + {palette, hilight_palette}, + pause_bitmap +}; + +/* Bitmap definition for "Rewind" control */ + +static const NXWidgets::SRlePaletteBitmapEntry rew_bitmap[] = +{ + { 32, 0}, /* Row 0 */ +// { 14, 0}, { 3, 4}, { 1, 7}, { 14, 0}, /* Row 1 */ + { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ + { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ + { 8, 0}, { 1, 7}, { 3, 6}, { 8, 7}, + { 3, 6}, { 1, 7}, { 8, 0}, /* Row 3 */ + { 7, 0}, { 7, 6}, { 3, 7}, { 8, 6}, { 7, 0}, /* Row 4 */ + { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ + { 5, 0}, { 6, 3}, { 9, 6}, { 7, 3}, { 5, 0}, /* Row 6 */ + { 4, 0}, { 23, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ + { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ + { 3, 0}, { 3, 2}, { 18, 3}, { 5, 2}, { 3, 0}, /* Row 9 */ + { 2, 0}, { 1, 5}, { 5, 2}, { 6, 3}, { 1, 6}, { 7, 3}, + { 2, 2}, { 2, 6}, { 3, 2}, { 1, 5}, { 2, 0}, /* Row 10 */ + { 2, 0}, { 1, 5}, { 9, 2}, { 1, 6}, { 2, 4}, { 1, 3}, + { 1, 2}, { 2, 3}, { 3, 2}, { 1, 6}, { 2, 4}, { 1, 6}, + { 3, 2}, { 1, 5}, { 2, 0}, /* Row 11 */ + { 1, 0}, { 2, 5}, { 7, 2}, { 1, 6}, { 4, 4}, { 1, 3}, + { 4, 2}, { 1, 3}, { 1, 7}, { 3, 4}, { 1, 7}, { 3, 2}, + { 1, 5}, { 2, 0}, /* Row 12 */ + { 1, 0}, { 5, 5}, { 2, 2}, { 1, 5}, { 1, 7}, { 5, 4}, + { 1, 5}, { 3, 2}, { 1, 7}, { 5, 4}, { 1, 7}, { 1, 2}, + { 3, 5}, { 2, 0}, /* Row 13 */ + { 1, 0}, { 6, 5}, { 1, 7}, { 7, 4}, { 1, 5}, { 1, 2}, + { 1, 7}, { 7, 4}, { 1, 7}, { 3, 5}, { 1, 1}, { 1, 5}, + { 1, 0}, /* Row 14 */ + { 1, 0}, { 4, 1}, { 1, 7}, { 9, 4}, { 1, 7}, { 9, 4}, + { 1, 7}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ + { 1, 0}, { 4, 1}, { 1, 5}, { 9, 4}, { 1, 7}, { 9, 4}, + { 1, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ + { 1, 0}, { 6, 1}, { 1, 5}, { 7, 4}, { 1, 5}, { 1, 1}, + { 1, 5}, { 7, 4}, { 1, 5}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 17 */ + { 1, 0}, { 8, 1}, { 1, 7}, { 5, 4}, { 1, 5}, { 3, 1}, + { 1, 7}, { 5, 4}, { 1, 5}, { 4, 1}, { 2, 0}, /* Row 18 */ + { 1, 0}, { 1, 5}, { 8, 1}, { 1, 5}, { 4, 4}, { 1, 5}, + { 4, 1}, { 1, 5}, { 4, 4}, { 1, 5}, { 4, 1}, { 2, 0}, /* Row 19 */ + { 2, 0}, { 10, 1}, { 1, 7}, { 2, 4}, { 1, 2}, { 6, 1}, + { 1, 7}, { 2, 4}, { 1, 5}, { 4, 1}, { 2, 0}, /* Row 20 */ + { 2, 0}, { 11, 1}, { 1, 5}, { 1, 4}, { 1, 2}, { 7, 1}, + { 1, 5}, { 1, 7}, { 1, 5}, { 3, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ + { 2, 0}, { 1, 5}, { 9, 1}, { 1, 2}, { 1, 1}, { 6, 2}, + { 9, 1}, { 3, 0}, /* Row 22 */ + { 3, 0}, { 7, 1}, { 12, 2}, { 6, 1}, { 1, 5}, { 3, 0}, /* Row 23 */ + { 4, 0}, { 5, 1}, { 14, 2}, { 5, 1}, { 4, 0}, /* Row 24 */ + { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ + { 5, 0}, { 1, 5}, { 1, 1}, { 6, 2}, { 6, 2}, { 7, 2}, + { 1, 5}, { 5, 0}, /* Row 26 */ + { 6, 0}, { 1, 5}, { 4, 2}, { 1, 5}, { 8, 2}, { 1, 5}, + { 4, 2}, { 7, 0}, /* Row 27 */ + { 8, 0}, { 3, 2}, { 3, 2}, { 4, 2}, { 3, 2}, { 2, 2}, + { 1, 5}, { 8, 0}, /* Row 28 */ + { 9, 0}, { 1, 5}, { 3, 2}, { 6, 2}, { 2, 2}, { 1, 5}, + { 10, 0}, /* Row 29 */ + { 12, 0}, { 3, 2}, { 2, 2}, { 3, 2}, { 12, 0}, /* Row 30 */ + { 32, 0}, /* Row 31 */ +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerRewBitmap = +{ + CONFIG_NXWIDGETS_BPP, + CONFIG_NXWIDGETS_FMT, + BITMAP_PALETTESIZE, + BITMAP_WIDTH, + BITMAP_HEIGHT, + {palette, hilight_palette}, + rew_bitmap +}; + +/* Bitmap definition for "Forward" control */ + +static const NXWidgets::SRlePaletteBitmapEntry fwd_bitmap[] = +{ + { 32, 0}, /* Row 0 */ + { 14, 0}, { 4, 7}, { 14, 0}, /* Row 1 */ + { 10, 0}, { 12, 7}, { 10, 0}, /* Row 2 */ + { 8, 0}, { 1, 7}, { 3, 6}, { 8, 7}, + { 3, 6}, { 1, 7}, { 8, 0}, /* Row 3 */ + { 7, 0}, { 7, 6}, { 3, 7}, { 8, 6}, { 7, 0}, /* Row 4 */ + { 6, 0}, { 3, 3}, { 13, 6}, { 4, 3}, { 6, 0}, /* Row 5 */ + { 5, 0}, { 6, 3}, { 10, 6}, { 6, 3}, { 5, 0}, /* Row 6 */ + { 4, 0}, { 1, 2}, { 22, 3}, { 1, 2}, { 4, 0}, /* Row 7 */ + { 3, 0}, { 1, 5}, { 23, 3}, { 1, 2}, { 1, 5}, { 3, 0}, /* Row 8 */ + { 3, 0}, { 3, 2}, { 19, 3}, { 4, 2}, { 3, 0}, /* Row 9 */ + { 2, 0}, { 1, 5}, { 3, 2}, { 2, 6}, { 2, 2}, { 7, 3}, + { 1, 6}, { 5, 3}, { 6, 2}, { 1, 5}, { 2, 0}, /* Row 10 */ + { 2, 0}, { 1, 5}, { 3, 2}, { 1, 7}, { 2, 4}, { 1, 3}, + { 2, 2}, { 3, 3}, { 1, 2}, { 1, 6}, { 2, 4}, { 1, 6}, + { 9, 2}, { 1, 5}, { 2, 0}, /* Row 11 */ + { 1, 0}, { 2, 5}, { 3, 2}, { 1, 7}, { 3, 4}, { 1, 7}, + { 5, 2}, { 1, 6}, { 4, 4}, { 1, 5}, { 7, 2}, { 1, 5}, + { 2, 0}, /* Row 12 */ + { 1, 0}, { 4, 5}, { 1, 2}, { 1, 7}, { 5, 4}, { 1, 7}, + { 3, 2}, { 1, 6}, { 5, 4}, { 1, 7}, { 1, 5}, { 2, 2}, + { 4, 5}, { 2, 0}, /* Row 13 */ + { 1, 0}, { 1, 5}, { 1, 1}, { 2, 5}, { 1, 1}, { 1, 7}, + { 7, 4}, { 1, 7}, { 1, 2}, { 1, 5}, { 7, 4}, { 1, 7}, + { 4, 5}, { 1, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ + { 1, 0}, { 5, 1}, { 1, 7}, { 9, 4}, { 1, 7}, { 9, 4}, + { 1, 5}, { 3, 1}, { 1, 5}, { 1, 0}, /* Row 15 */ + { 1, 0}, { 5, 1}, { 1, 7}, { 8, 4}, { 2, 7}, { 8, 4}, + { 1, 7}, { 4, 1}, { 1, 5}, { 1, 0}, /* Row 16 */ + { 1, 0}, { 5, 1}, { 1, 5}, { 7, 4}, { 1, 5}, { 1, 1}, + { 1, 5}, { 7, 4}, { 1, 5}, { 5, 1}, { 1, 5}, { 1, 0}, /* Row 17 */ + { 1, 0}, { 5, 1}, { 1, 5}, { 5, 4}, { 1, 7}, { 3, 1}, + { 1, 5}, { 5, 4}, { 1, 7}, { 7, 1}, { 2, 0}, /* Row 18 */ + { 1, 0}, { 1, 5}, { 4, 1}, { 1, 5}, { 3, 4}, { 1, 7}, + { 1, 2}, { 4, 1}, { 1, 5}, { 4, 4}, { 1, 5}, { 8, 1}, + { 2, 0}, /* Row 19 */ + { 2, 0}, { 4, 1}, { 1, 5}, { 2, 4}, { 1, 5}, { 6, 1}, + { 1, 5}, { 2, 4}, { 1, 7}, { 10, 1}, { 2, 0}, /* Row 20 */ + { 2, 0}, { 4, 1}, { 2, 7}, { 8, 1}, { 1, 5}, { 1, 4}, + { 1, 2}, { 10, 1}, { 1, 5}, { 2, 0}, /* Row 21 */ + { 2, 0}, { 1, 5}, { 9, 1}, { 6, 2}, { 1, 1}, { 1, 2}, + { 9, 1}, { 3, 0}, /* Row 22 */ + { 3, 0}, { 7, 1}, { 12, 2}, { 6, 1}, { 1, 5}, { 3, 0}, /* Row 23 */ + { 4, 0}, { 5, 1}, { 14, 2}, { 5, 1}, { 4, 0}, /* Row 24 */ + { 4, 0}, { 1, 5}, { 2, 1}, { 18, 2}, { 2, 1}, { 5, 0}, /* Row 25 */ + { 5, 0}, { 1, 5}, { 1, 1}, { 6, 2}, { 6, 2}, { 7, 2}, + { 1, 5}, { 5, 0}, /* Row 26 */ + { 6, 0}, { 1, 5}, { 4, 2}, { 1, 5}, { 8, 2}, { 1, 5}, + { 4, 2}, { 7, 0}, /* Row 27 */ + { 8, 0}, { 3, 2}, { 3, 2}, { 4, 2}, { 3, 2}, { 2, 2}, + { 1, 5}, { 8, 0}, /* Row 28 */ + { 9, 0}, { 1, 5}, { 3, 2}, { 6, 2}, { 2, 2}, { 1, 5}, + { 10, 0}, /* Row 29 */ + { 12, 0}, { 3, 2}, { 2, 2}, { 3, 2}, { 12, 0}, /* Row 30 */ + { 32, 0}, /* Row 31 */ +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerFwdBitmap = +{ + CONFIG_NXWIDGETS_BPP, + CONFIG_NXWIDGETS_FMT, + BITMAP_PALETTESIZE, + BITMAP_WIDTH, + BITMAP_HEIGHT, + {palette, hilight_palette}, + fwd_bitmap +}; + +static const NXWidgets::SRlePaletteBitmapEntry vol_bitmap[] = +{ + { 22, 0}, /* Row 0 */ + { 9, 0}, { 5, 7}, { 8, 0}, /* Row 1 */ + { 6, 0}, { 2, 6}, { 6, 7}, { 2, 6}, { 1, 7}, { 5, 0}, /* Row 2 */ + { 4, 0}, { 2, 3}, { 9, 6}, { 3, 3}, { 4, 0}, /* Row 3 */ + { 3, 0}, { 5, 3}, { 6, 6}, { 5, 3}, { 3, 0}, /* Row 4 */ + { 3, 0}, { 16, 3}, { 3, 0}, /* Row 5 */ + { 2, 0}, { 2, 2}, { 13, 3}, { 3, 2}, { 2, 0}, /* Row 6 */ + { 1, 0}, { 1, 5}, { 4, 2}, { 10, 3}, { 4, 2}, { 1, 5}, + { 1, 0}, /* Row 7 */ + { 1, 0}, { 2, 5}, { 15, 2}, { 3, 5}, { 1, 0}, /* Row 8 */ + { 1, 0}, { 5, 5}, { 10, 2}, { 5, 5}, { 1, 0}, /* Row 9 */ + { 1, 0}, { 2, 1}, { 15, 5}, { 3, 1}, { 1, 0}, /* Row 10 */ + { 1, 0}, { 5, 1}, { 10, 5}, { 5, 1}, { 1, 0}, /* Row 11 */ + { 1, 0}, { 20, 1}, { 1, 0}, /* Row 12 */ + { 1, 0}, { 20, 1}, { 1, 0}, /* Row 13 */ + { 1, 0}, { 19, 1}, { 1, 5}, { 1, 0}, /* Row 14 */ + { 1, 0}, { 1, 5}, { 7, 1}, { 1, 5}, { 4, 2}, { 6, 1}, + { 2, 0}, /* Row 15 */ + { 2, 0}, { 5, 1}, { 8, 2}, { 4, 1}, { 1, 5}, { 2, 0}, /* Row 16 */ + { 3, 0}, { 2, 1}, { 12, 2}, { 2, 1}, { 3, 0}, /* Row 17 */ + { 3, 0}, { 1, 5}, { 1, 1}, { 13, 2}, { 1, 5}, { 3, 0}, /* Row 18 */ + { 6, 0}, { 10, 2}, { 1, 5}, { 5, 0}, /* Row 19 */ + { 6, 0}, { 1, 5}, { 8, 2}, { 7, 0}, /* Row 20 */ + { 22, 0}, /* Row 21 */ +}; + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_mplayerVolBitmap = +{ + CONFIG_NXWIDGETS_BPP, + CONFIG_NXWIDGETS_FMT, + BITMAP_PALETTESIZE, + 22, + 22, + {hilight_palette, hilight_palette}, + vol_bitmap +}; diff --git a/NxWidgets/nxwm/src/glyph_nsh.cxx b/NxWidgets/nxwm/src/glyph_nsh.cxx deleted file mode 100644 index efa83f7ed..000000000 --- a/NxWidgets/nxwm/src/glyph_nsh.cxx +++ /dev/null @@ -1,215 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_nsh.cxx - * - * Copyright (C) 2012 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 25 -#define BITMAP_NCOLUMNS 25 -#define BITMAP_NLUTCODES 36 - -/******************************************************************************************** - * Private Bitmap Data - ********************************************************************************************/ - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 - -static const uint32_t g_nshLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xffffdb, 0x4949db, 0x2424db, 0x4924db, 0xdbdbff, 0x6d6ddb, 0x6d92db, 0x2424b6, /* Codes 1-8 */ - 0xffdbdb, 0xdbffff, 0x4992db, 0x24246d, 0xffffff, 0x6db6db, 0x242492, 0x4924ff, /* Codes 9-16 */ - 0x49b6db, 0x6d6db6, 0x92b6db, 0xb6dbdb, 0xb6dbff, 0x2424ff, 0x9292db, 0x9292b6, /* Codes 17-24 */ - 0x00006d, 0x9292ff, 0x240092, 0x24006d, 0x4949ff, 0x494992, 0x92b6ff, 0xb6b6db, /* Codes 25-32 */ - 0x4924b6, 0x92dbdb, 0x926ddb /* Codes 33-35 */ -}; - -/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ - -#elif CONFIG_NXWIDGETS_BPP == 16 - -static const uint16_t g_nshLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xfffb, 0x4a5b, 0x213b, 0x493b, 0xdedf, 0x6b7b, 0x6c9b, 0x2136, 0xfedb, 0xdfff, /* Codes 1-10 */ - 0x4c9b, 0x212d, 0xffff, 0x6dbb, 0x2132, 0x493f, 0x4dbb, 0x6b76, 0x95bb, 0xb6db, /* Codes 11-20 */ - 0xb6df, 0x213f, 0x949b, 0x9496, 0x000d, 0x949f, 0x2012, 0x200d, 0x4a5f, 0x4a52, /* Codes 21-30 */ - 0x95bf, 0xb5bb, 0x4936, 0x96db, 0x937b /* Codes 31-35 */ -}; - -/* 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 p;ointless 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 */ - -static const uint8_t g_nshLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xfa, 0x59, 0x38, 0x43, 0xdf, 0x79, 0x8f, 0x34, 0xe5, 0xf4, 0x84, 0x2c, 0xff, /* Codes 1-13 */ - 0xa4, 0x30, 0x48, 0x99, 0x75, 0xaf, 0xcf, 0xd4, 0x3c, 0x9a, 0x96, 0x0c, 0x9e, /* Codes 14-16 */ - 0x1b, 0x17, 0x5d, 0x51, 0xb3, 0xba, 0x3f, 0xc5, 0x84 /* Codes 27-35 */ -}; - -# else /* CONFIG_NXWIDGETS_GREYSCALE */ - -/* RGB8 (332) Colors */ - -static const nxgl_mxpixel_t g_nshLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0xff, 0x4b, 0x27, 0x47, 0xdb, 0x6f, 0x73, 0x26, 0xfb, 0xdf, 0x53, 0x25, 0xff, /* Codes 1-13 */ - 0x77, 0x26, 0x47, 0x57, 0x6e, 0x97, 0xbb, 0xbb, 0x27, 0x93, 0x92, 0x01, 0x93, /* Codes 14-16 */ - 0x22, 0x21, 0x4b, 0x4a, 0x97, 0xb7, 0x46, 0x9b, 0x8f /* Codes 27-35 */ -}; - -# endif -#else -# error "Unsupport pixel format" -#endif - -static const struct NXWidgets::SRlePaletteBitmapEntry g_nshRleEntries[] = -{ - { 11, 0}, { 1, 1}, { 1, 2}, { 1, 1}, { 11, 0}, /* Row 0 */ - { 11, 0}, { 3, 3}, { 11, 0}, /* Row 1 */ - { 9, 0}, { 4, 3}, { 1, 4}, { 2, 3}, { 9, 0}, /* Row 2 */ - { 4, 0}, { 1, 5}, { 4, 0}, { 2, 3}, { 1, 6}, { 1, 7}, { 1, 8}, { 1, 4}, /* Row 3 */ - { 1, 3}, { 6, 0}, { 1, 9}, { 2, 0}, - { 3, 0}, { 1, 5}, { 1, 10}, { 1, 11}, { 2, 0}, { 1, 3}, { 1, 4}, { 1, 3}, /* Row 4 */ - { 2, 10}, { 1, 12}, { 1, 3}, { 1, 4}, { 1, 3}, { 3, 0}, { 1, 13}, { 1, 5}, - { 1, 14}, { 2, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 15}, { 1, 16}, { 2, 4}, { 1, 3}, /* Row 5 */ - { 1, 10}, { 1, 13}, { 1, 10}, { 1, 12}, { 1, 3}, { 1, 4}, { 1, 3}, { 1, 2}, - { 1, 10}, { 1, 5}, { 1, 17}, { 1, 15}, { 2, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 18}, { 1, 8}, { 2, 4}, { 1, 3}, /* Row 6 */ - { 1, 10}, { 2, 13}, { 1, 19}, { 1, 12}, { 1, 4}, { 1, 3}, { 1, 19}, { 1, 13}, - { 1, 20}, { 1, 15}, { 1, 9}, { 2, 0}, - { 3, 0}, { 1, 10}, { 2, 13}, { 1, 10}, { 1, 12}, { 1, 16}, { 1, 4}, { 1, 3}, /* Row 7 */ - { 1, 10}, { 1, 5}, { 1, 13}, { 1, 10}, { 1, 12}, { 1, 4}, { 1, 2}, { 1, 10}, - { 1, 13}, { 1, 17}, { 1, 15}, { 3, 0}, - { 3, 0}, { 1, 10}, { 2, 13}, { 1, 10}, { 1, 18}, { 1, 8}, { 1, 4}, { 1, 3}, /* Row 8 */ - { 1, 10}, { 1, 21}, { 2, 13}, { 1, 19}, { 1, 22}, { 1, 23}, { 2, 13}, { 1, 15}, - { 1, 1}, { 3, 0}, - { 2, 0}, { 1, 2}, { 2, 13}, { 1, 5}, { 1, 13}, { 1, 10}, { 1, 18}, { 1, 4}, /* Row 9 */ - { 1, 3}, { 1, 10}, { 1, 5}, { 1, 24}, { 2, 13}, { 1, 24}, { 2, 13}, { 1, 19}, - { 1, 16}, { 1, 3}, { 1, 2}, { 2, 0}, - { 2, 0}, { 1, 2}, { 2, 13}, { 1, 18}, { 2, 13}, { 1, 10}, { 1, 16}, { 1, 3}, /* Row 10 */ - { 2, 10}, { 1, 12}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 12}, - { 2, 4}, { 1, 3}, { 1, 1}, { 1, 0}, - { 1, 1}, { 1, 3}, { 1, 2}, { 2, 13}, { 1, 25}, { 1, 10}, { 1, 13}, { 1, 10}, /* Row 11 */ - { 1, 15}, { 1, 3}, { 2, 10}, { 1, 25}, { 1, 26}, { 1, 13}, { 1, 10}, { 1, 13}, - { 1, 19}, { 1, 12}, { 3, 4}, { 1, 2}, { 1, 1}, - { 1, 2}, { 1, 3}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 3}, { 1, 10}, { 1, 13}, /* Row 12 */ - { 1, 18}, { 1, 27}, { 2, 10}, { 1, 28}, { 1, 22}, { 1, 23}, { 1, 13}, { 1, 20}, - { 1, 25}, { 1, 16}, { 3, 4}, { 1, 3}, { 1, 2}, - { 1, 1}, { 1, 3}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 3}, { 1, 23}, { 1, 13}, /* Row 13 */ - { 1, 10}, { 1, 25}, { 2, 10}, { 1, 25}, { 1, 29}, { 1, 10}, { 1, 13}, { 1, 10}, - { 1, 30}, { 1, 8}, { 3, 4}, { 1, 3}, { 1, 1}, - { 2, 0}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 4}, { 1, 3}, { 2, 10}, { 1, 18}, /* Row 14 */ - { 1, 5}, { 1, 10}, { 1, 25}, { 1, 31}, { 1, 13}, { 1, 10}, { 1, 13}, { 1, 32}, - { 1, 28}, { 2, 4}, { 1, 3}, { 2, 0}, - { 2, 0}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 4}, { 1, 3}, { 1, 23}, { 1, 13}, /* Row 15 */ - { 1, 5}, { 1, 21}, { 1, 10}, { 1, 12}, { 1, 10}, { 1, 13}, { 1, 5}, { 1, 13}, - { 1, 10}, { 1, 30}, { 1, 4}, { 2, 3}, { 2, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 2, 4}, { 1, 3}, { 2, 13}, { 2, 21}, /* Row 16 */ - { 1, 10}, { 1, 13}, { 1, 5}, { 1, 3}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 33}, - { 4, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 3, 4}, { 1, 10}, { 1, 13}, { 2, 21}, /* Row 17 */ - { 2, 13}, { 1, 18}, { 1, 3}, { 1, 6}, { 2, 13}, { 1, 15}, { 1, 1}, { 3, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 3, 4}, { 1, 23}, { 1, 13}, { 1, 10}, /* Row 18 */ - { 1, 5}, { 1, 13}, { 1, 5}, { 1, 28}, { 1, 4}, { 1, 3}, { 1, 5}, { 1, 13}, - { 1, 14}, { 1, 15}, { 3, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 1, 4}, { 1, 3}, { 1, 4}, { 1, 3}, /* Row 19 */ - { 1, 10}, { 3, 13}, { 1, 18}, { 1, 15}, { 1, 4}, { 1, 3}, { 1, 6}, { 1, 10}, - { 1, 21}, { 1, 15}, { 1, 9}, { 2, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 1, 1}, { 1, 0}, { 1, 3}, { 1, 4}, /* Row 20 */ - { 1, 3}, { 1, 10}, { 1, 13}, { 1, 18}, { 1, 15}, { 1, 4}, { 1, 2}, { 1, 1}, - { 2, 0}, { 1, 13}, { 1, 34}, { 1, 15}, { 2, 0}, - { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 1, 9}, { 2, 0}, { 2, 3}, { 1, 23}, /* Row 21 */ - { 1, 20}, { 1, 25}, { 1, 4}, { 1, 3}, { 1, 1}, { 3, 0}, { 1, 5}, { 1, 14}, - { 1, 15}, { 2, 0}, - { 3, 0}, { 1, 9}, { 2, 15}, { 1, 9}, { 2, 0}, { 3, 3}, { 1, 12}, { 1, 8}, /* Row 22 */ - { 1, 3}, { 1, 2}, { 4, 0}, { 1, 14}, { 1, 15}, { 1, 20}, { 2, 0}, - { 11, 0}, { 2, 3}, { 1, 6}, { 1, 1}, { 10, 0}, /* Row 23 */ - { 11, 0}, { 1, 1}, { 1, 35}, { 1, 1}, { 11, 0}, /* Row 24 */ -}; - -/******************************************************************************************** - * Public Bitmap Structure Defintions - ********************************************************************************************/ - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_nshBitmap = -{ - 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_nshLut, // Index 0: Unselected LUT - g_nshLut, // Index 1: Selected LUT - }, - g_nshRleEntries // data - Pointer to the beginning of the RLE data -}; diff --git a/NxWidgets/nxwm/src/glyph_nsh25x25.cxx b/NxWidgets/nxwm/src/glyph_nsh25x25.cxx new file mode 100644 index 000000000..23e1507ab --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_nsh25x25.cxx @@ -0,0 +1,215 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_nsh25x25.cxx + * + * Copyright (C) 2012 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 25 +#define BITMAP_NCOLUMNS 25 +#define BITMAP_NLUTCODES 36 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 + +static const uint32_t g_nshLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xffffdb, 0x4949db, 0x2424db, 0x4924db, 0xdbdbff, 0x6d6ddb, 0x6d92db, 0x2424b6, /* Codes 1-8 */ + 0xffdbdb, 0xdbffff, 0x4992db, 0x24246d, 0xffffff, 0x6db6db, 0x242492, 0x4924ff, /* Codes 9-16 */ + 0x49b6db, 0x6d6db6, 0x92b6db, 0xb6dbdb, 0xb6dbff, 0x2424ff, 0x9292db, 0x9292b6, /* Codes 17-24 */ + 0x00006d, 0x9292ff, 0x240092, 0x24006d, 0x4949ff, 0x494992, 0x92b6ff, 0xb6b6db, /* Codes 25-32 */ + 0x4924b6, 0x92dbdb, 0x926ddb /* Codes 33-35 */ +}; + +/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ + +#elif CONFIG_NXWIDGETS_BPP == 16 + +static const uint16_t g_nshLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xfffb, 0x4a5b, 0x213b, 0x493b, 0xdedf, 0x6b7b, 0x6c9b, 0x2136, 0xfedb, 0xdfff, /* Codes 1-10 */ + 0x4c9b, 0x212d, 0xffff, 0x6dbb, 0x2132, 0x493f, 0x4dbb, 0x6b76, 0x95bb, 0xb6db, /* Codes 11-20 */ + 0xb6df, 0x213f, 0x949b, 0x9496, 0x000d, 0x949f, 0x2012, 0x200d, 0x4a5f, 0x4a52, /* Codes 21-30 */ + 0x95bf, 0xb5bb, 0x4936, 0x96db, 0x937b /* Codes 31-35 */ +}; + +/* 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 p;ointless 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 */ + +static const uint8_t g_nshLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xfa, 0x59, 0x38, 0x43, 0xdf, 0x79, 0x8f, 0x34, 0xe5, 0xf4, 0x84, 0x2c, 0xff, /* Codes 1-13 */ + 0xa4, 0x30, 0x48, 0x99, 0x75, 0xaf, 0xcf, 0xd4, 0x3c, 0x9a, 0x96, 0x0c, 0x9e, /* Codes 14-16 */ + 0x1b, 0x17, 0x5d, 0x51, 0xb3, 0xba, 0x3f, 0xc5, 0x84 /* Codes 27-35 */ +}; + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +/* RGB8 (332) Colors */ + +static const nxgl_mxpixel_t g_nshLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0xff, 0x4b, 0x27, 0x47, 0xdb, 0x6f, 0x73, 0x26, 0xfb, 0xdf, 0x53, 0x25, 0xff, /* Codes 1-13 */ + 0x77, 0x26, 0x47, 0x57, 0x6e, 0x97, 0xbb, 0xbb, 0x27, 0x93, 0x92, 0x01, 0x93, /* Codes 14-16 */ + 0x22, 0x21, 0x4b, 0x4a, 0x97, 0xb7, 0x46, 0x9b, 0x8f /* Codes 27-35 */ +}; + +# endif +#else +# error "Unsupport pixel format" +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_nshRleEntries[] = +{ + { 11, 0}, { 1, 1}, { 1, 2}, { 1, 1}, { 11, 0}, /* Row 0 */ + { 11, 0}, { 3, 3}, { 11, 0}, /* Row 1 */ + { 9, 0}, { 4, 3}, { 1, 4}, { 2, 3}, { 9, 0}, /* Row 2 */ + { 4, 0}, { 1, 5}, { 4, 0}, { 2, 3}, { 1, 6}, { 1, 7}, { 1, 8}, { 1, 4}, /* Row 3 */ + { 1, 3}, { 6, 0}, { 1, 9}, { 2, 0}, + { 3, 0}, { 1, 5}, { 1, 10}, { 1, 11}, { 2, 0}, { 1, 3}, { 1, 4}, { 1, 3}, /* Row 4 */ + { 2, 10}, { 1, 12}, { 1, 3}, { 1, 4}, { 1, 3}, { 3, 0}, { 1, 13}, { 1, 5}, + { 1, 14}, { 2, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 15}, { 1, 16}, { 2, 4}, { 1, 3}, /* Row 5 */ + { 1, 10}, { 1, 13}, { 1, 10}, { 1, 12}, { 1, 3}, { 1, 4}, { 1, 3}, { 1, 2}, + { 1, 10}, { 1, 5}, { 1, 17}, { 1, 15}, { 2, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 18}, { 1, 8}, { 2, 4}, { 1, 3}, /* Row 6 */ + { 1, 10}, { 2, 13}, { 1, 19}, { 1, 12}, { 1, 4}, { 1, 3}, { 1, 19}, { 1, 13}, + { 1, 20}, { 1, 15}, { 1, 9}, { 2, 0}, + { 3, 0}, { 1, 10}, { 2, 13}, { 1, 10}, { 1, 12}, { 1, 16}, { 1, 4}, { 1, 3}, /* Row 7 */ + { 1, 10}, { 1, 5}, { 1, 13}, { 1, 10}, { 1, 12}, { 1, 4}, { 1, 2}, { 1, 10}, + { 1, 13}, { 1, 17}, { 1, 15}, { 3, 0}, + { 3, 0}, { 1, 10}, { 2, 13}, { 1, 10}, { 1, 18}, { 1, 8}, { 1, 4}, { 1, 3}, /* Row 8 */ + { 1, 10}, { 1, 21}, { 2, 13}, { 1, 19}, { 1, 22}, { 1, 23}, { 2, 13}, { 1, 15}, + { 1, 1}, { 3, 0}, + { 2, 0}, { 1, 2}, { 2, 13}, { 1, 5}, { 1, 13}, { 1, 10}, { 1, 18}, { 1, 4}, /* Row 9 */ + { 1, 3}, { 1, 10}, { 1, 5}, { 1, 24}, { 2, 13}, { 1, 24}, { 2, 13}, { 1, 19}, + { 1, 16}, { 1, 3}, { 1, 2}, { 2, 0}, + { 2, 0}, { 1, 2}, { 2, 13}, { 1, 18}, { 2, 13}, { 1, 10}, { 1, 16}, { 1, 3}, /* Row 10 */ + { 2, 10}, { 1, 12}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 12}, + { 2, 4}, { 1, 3}, { 1, 1}, { 1, 0}, + { 1, 1}, { 1, 3}, { 1, 2}, { 2, 13}, { 1, 25}, { 1, 10}, { 1, 13}, { 1, 10}, /* Row 11 */ + { 1, 15}, { 1, 3}, { 2, 10}, { 1, 25}, { 1, 26}, { 1, 13}, { 1, 10}, { 1, 13}, + { 1, 19}, { 1, 12}, { 3, 4}, { 1, 2}, { 1, 1}, + { 1, 2}, { 1, 3}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 3}, { 1, 10}, { 1, 13}, /* Row 12 */ + { 1, 18}, { 1, 27}, { 2, 10}, { 1, 28}, { 1, 22}, { 1, 23}, { 1, 13}, { 1, 20}, + { 1, 25}, { 1, 16}, { 3, 4}, { 1, 3}, { 1, 2}, + { 1, 1}, { 1, 3}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 3}, { 1, 23}, { 1, 13}, /* Row 13 */ + { 1, 10}, { 1, 25}, { 2, 10}, { 1, 25}, { 1, 29}, { 1, 10}, { 1, 13}, { 1, 10}, + { 1, 30}, { 1, 8}, { 3, 4}, { 1, 3}, { 1, 1}, + { 2, 0}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 4}, { 1, 3}, { 2, 10}, { 1, 18}, /* Row 14 */ + { 1, 5}, { 1, 10}, { 1, 25}, { 1, 31}, { 1, 13}, { 1, 10}, { 1, 13}, { 1, 32}, + { 1, 28}, { 2, 4}, { 1, 3}, { 2, 0}, + { 2, 0}, { 1, 2}, { 2, 13}, { 1, 15}, { 1, 4}, { 1, 3}, { 1, 23}, { 1, 13}, /* Row 15 */ + { 1, 5}, { 1, 21}, { 1, 10}, { 1, 12}, { 1, 10}, { 1, 13}, { 1, 5}, { 1, 13}, + { 1, 10}, { 1, 30}, { 1, 4}, { 2, 3}, { 2, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 2, 4}, { 1, 3}, { 2, 13}, { 2, 21}, /* Row 16 */ + { 1, 10}, { 1, 13}, { 1, 5}, { 1, 3}, { 1, 10}, { 1, 13}, { 1, 10}, { 1, 33}, + { 4, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 3, 4}, { 1, 10}, { 1, 13}, { 2, 21}, /* Row 17 */ + { 2, 13}, { 1, 18}, { 1, 3}, { 1, 6}, { 2, 13}, { 1, 15}, { 1, 1}, { 3, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 3, 4}, { 1, 23}, { 1, 13}, { 1, 10}, /* Row 18 */ + { 1, 5}, { 1, 13}, { 1, 5}, { 1, 28}, { 1, 4}, { 1, 3}, { 1, 5}, { 1, 13}, + { 1, 14}, { 1, 15}, { 3, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 1, 4}, { 1, 3}, { 1, 4}, { 1, 3}, /* Row 19 */ + { 1, 10}, { 3, 13}, { 1, 18}, { 1, 15}, { 1, 4}, { 1, 3}, { 1, 6}, { 1, 10}, + { 1, 21}, { 1, 15}, { 1, 9}, { 2, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 1, 1}, { 1, 0}, { 1, 3}, { 1, 4}, /* Row 20 */ + { 1, 3}, { 1, 10}, { 1, 13}, { 1, 18}, { 1, 15}, { 1, 4}, { 1, 2}, { 1, 1}, + { 2, 0}, { 1, 13}, { 1, 34}, { 1, 15}, { 2, 0}, + { 3, 0}, { 1, 10}, { 1, 13}, { 1, 15}, { 1, 9}, { 2, 0}, { 2, 3}, { 1, 23}, /* Row 21 */ + { 1, 20}, { 1, 25}, { 1, 4}, { 1, 3}, { 1, 1}, { 3, 0}, { 1, 5}, { 1, 14}, + { 1, 15}, { 2, 0}, + { 3, 0}, { 1, 9}, { 2, 15}, { 1, 9}, { 2, 0}, { 3, 3}, { 1, 12}, { 1, 8}, /* Row 22 */ + { 1, 3}, { 1, 2}, { 4, 0}, { 1, 14}, { 1, 15}, { 1, 20}, { 2, 0}, + { 11, 0}, { 2, 3}, { 1, 6}, { 1, 1}, { 10, 0}, /* Row 23 */ + { 11, 0}, { 1, 1}, { 1, 35}, { 1, 1}, { 11, 0}, /* Row 24 */ +}; + +/******************************************************************************************** + * Public Bitmap Structure Defintions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_nshBitmap = +{ + 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_nshLut, // Index 0: Unselected LUT + g_nshLut, // Index 1: Selected LUT + }, + g_nshRleEntries // data - Pointer to the beginning of the RLE data +}; diff --git a/NxWidgets/nxwm/src/glyph_start.cxx b/NxWidgets/nxwm/src/glyph_start.cxx deleted file mode 100644 index 2fd7b3cd1..000000000 --- a/NxWidgets/nxwm/src/glyph_start.cxx +++ /dev/null @@ -1,216 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_start.cxx - * - * Copyright (C) 2012 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 25 -#define BITMAP_NCOLUMNS 25 -#define BITMAP_NLUTCODES 34 - -/******************************************************************************************** - * Private Bitmap Data - ********************************************************************************************/ - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 - -static const uint32_t g_startLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x6db66d, 0x006d00, 0x246d00, 0x6d9249, 0xdbffb6, 0xb6b692, 0x246d24, 0x249224, /* Codes 1-8 */ - 0x49b649, 0x6db649, 0x499249, 0xdbffdb, 0x92b692, 0xb6dbb6, 0x6ddb6d, 0x92b66d, /* Codes 9-16 */ - 0x6d926d, 0x92db92, 0x49926d, 0x49b624, 0x92db6d, 0xb6ffb6, 0xffffff, 0x496d49, /* Codes 17-24 */ - 0x92ff92, 0x24b624, 0x496d24, 0xb6db92, 0x499224, 0x249200, 0x92dbb6, 0x004900, /* Codes 25-32 */ - 0x009200 /* Code 33 */ -}; - -/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ - -#elif CONFIG_NXWIDGETS_BPP == 16 - -static const uint16_t g_startLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x6dad, 0x0360, 0x2360, 0x6c89, 0xdff6, 0xb5b2, 0x2364, 0x2484, 0x4da9, 0x6da9, /* Codes 0-10 */ - 0x4c89, 0xdffb, 0x95b2, 0xb6d6, 0x6ecd, 0x95ad, 0x6c8d, 0x96d2, 0x4c8d, 0x4da4, /* Codes 11-20 */ - 0x96cd, 0xb7f6, 0xffff, 0x4b69, 0x97f2, 0x25a4, 0x4b64, 0xb6d2, 0x4c84, 0x2480, /* Codes 21-30 */ - 0x96d6, 0x0240, 0x0480 /* Codes 31-33 */ -}; - -/* 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 p;ointless 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 */ - -static const uint8_t g_startLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x97, 0x3f, 0x4a, 0x7e, 0xeb, 0xb1, 0x4e, 0x64, 0x88, 0x93, 0x73, 0xf0, 0xa7, /* Codes 1-13 */ - 0xcb, 0xad, 0xa2, 0x82, 0xbc, 0x77, 0x84, 0xb8, 0xe0, 0xff, 0x5e, 0xd1, 0x79, /* Codes 14-26 */ - 0x59, 0xc7, 0x6f, 0x60, 0xc0, 0x2a, 0x55 /* Codes 27-33 */ -}; - -# else /* CONFIG_NXWIDGETS_GREYSCALE */ - -/* RGB8 (332) Colors */ - -static const nxgl_mxpixel_t g_startLut[BITMAP_NLUTCODES] = -{ - CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x75, 0x0c, 0x2c, 0x71, 0xde, 0xb6, 0x2c, 0x30, 0x55, 0x75, 0x51, 0xdf, 0x96, /* Codes 1-13 */ - 0xba, 0x79, 0x95, 0x71, 0x9a, 0x51, 0x54, 0x99, 0xbe, 0xff, 0x4d, 0x9e, 0x34, /* Codes 14-26 */ - 0x4c, 0xba, 0x50, 0x30, 0x9a, 0x08, 0x10 /* Codes 27-33 */ -}; - -# endif -#else -# error "Unsupport pixel format" -#endif - -static const struct NXWidgets::SRlePaletteBitmapEntry g_startRleEntries[] = -{ - { 7, 0}, { 1, 1}, { 3, 2}, { 1, 3}, { 4, 2}, { 1, 4}, { 1, 5}, { 7, 0}, /* Row 0 */ - { 5, 0}, { 1, 6}, { 2, 7}, { 1, 8}, { 1, 9}, { 2, 1}, { 1, 10}, { 2, 9}, /* Row 1 */ - { 1, 11}, { 2, 7}, { 1, 1}, { 1, 12}, { 5, 0}, - { 4, 0}, { 1, 13}, { 1, 7}, { 1, 3}, { 1, 9}, { 8, 1}, { 1, 9}, { 1, 3}, /* Row 2 */ - { 1, 7}, { 1, 11}, { 1, 14}, { 4, 0}, - { 3, 0}, { 1, 13}, { 1, 7}, { 1, 3}, { 1, 9}, { 1, 15}, { 4, 1}, { 1, 16}, /* Row 3 */ - { 3, 1}, { 1, 15}, { 1, 9}, { 1, 8}, { 1, 7}, { 1, 17}, { 4, 0}, - { 2, 0}, { 1, 14}, { 1, 11}, { 1, 3}, { 1, 9}, { 1, 15}, { 4, 1}, { 1, 18}, /* Row 4 */ - { 1, 14}, { 1, 13}, { 1, 1}, { 1, 15}, { 1, 10}, { 1, 1}, { 1, 10}, { 2, 7}, - { 1, 13}, { 3, 0}, - { 2, 0}, { 1, 19}, { 1, 7}, { 1, 20}, { 1, 10}, { 2, 1}, { 1, 21}, { 1, 1}, /* Row 5 */ - { 1, 18}, { 1, 22}, { 1, 23}, { 1, 14}, { 1, 1}, { 2, 15}, { 1, 1}, { 1, 10}, - { 1, 9}, { 1, 2}, { 1, 11}, { 1, 14}, { 2, 0}, - { 1, 0}, { 1, 14}, { 1, 7}, { 1, 8}, { 1, 9}, { 1, 10}, { 1, 1}, { 1, 18}, /* Row 6 */ - { 1, 23}, { 1, 1}, { 1, 15}, { 1, 14}, { 1, 23}, { 1, 14}, { 1, 1}, { 2, 23}, - { 1, 1}, { 2, 9}, { 1, 8}, { 1, 2}, { 1, 4}, { 2, 0}, - { 1, 0}, { 1, 24}, { 1, 2}, { 1, 8}, { 1, 9}, { 1, 1}, { 1, 13}, { 2, 23}, /* Row 7 */ - { 1, 1}, { 1, 21}, { 1, 22}, { 1, 23}, { 1, 14}, { 1, 1}, { 1, 25}, { 1, 23}, - { 1, 14}, { 1, 1}, { 1, 9}, { 1, 26}, { 1, 2}, { 1, 7}, { 1, 14}, { 1, 0}, - { 1, 22}, { 1, 7}, { 1, 8}, { 2, 9}, { 1, 1}, { 1, 5}, { 1, 23}, { 1, 18}, /* Row 8 */ - { 1, 9}, { 1, 1}, { 1, 14}, { 1, 23}, { 1, 14}, { 1, 11}, { 1, 1}, { 1, 22}, - { 1, 23}, { 1, 21}, { 1, 9}, { 1, 26}, { 1, 8}, { 1, 7}, { 1, 1}, { 1, 0}, - { 1, 13}, { 1, 7}, { 2, 8}, { 1, 9}, { 1, 18}, { 1, 23}, { 1, 14}, { 2, 9}, /* Row 9 */ - { 1, 1}, { 1, 14}, { 1, 23}, { 1, 14}, { 1, 11}, { 1, 9}, { 1, 1}, { 1, 23}, - { 1, 14}, { 1, 10}, { 2, 8}, { 1, 2}, { 1, 24}, { 1, 0}, - { 1, 1}, { 1, 7}, { 2, 8}, { 1, 9}, { 1, 14}, { 1, 23}, { 1, 1}, { 2, 9}, /* Row 10 */ - { 1, 1}, { 1, 14}, { 1, 23}, { 1, 18}, { 1, 11}, { 2, 9}, { 1, 22}, { 1, 23}, - { 1, 1}, { 2, 8}, { 1, 3}, { 1, 27}, { 1, 14}, - { 1, 11}, { 1, 2}, { 2, 8}, { 1, 10}, { 2, 23}, { 1, 9}, { 2, 20}, { 1, 1}, /* Row 11 */ - { 1, 14}, { 1, 23}, { 1, 18}, { 1, 11}, { 2, 9}, { 1, 18}, { 1, 23}, { 1, 1}, - { 2, 8}, { 2, 7}, { 1, 14}, - { 1, 11}, { 1, 2}, { 2, 8}, { 1, 10}, { 1, 23}, { 1, 22}, { 1, 9}, { 2, 26}, /* Row 12 */ - { 1, 1}, { 1, 14}, { 1, 23}, { 1, 18}, { 1, 11}, { 2, 9}, { 1, 18}, { 1, 23}, - { 1, 1}, { 2, 8}, { 2, 7}, { 1, 13}, - { 1, 1}, { 1, 3}, { 2, 8}, { 1, 9}, { 1, 23}, { 1, 22}, { 1, 9}, { 2, 8}, /* Row 13 */ - { 1, 1}, { 1, 22}, { 1, 23}, { 1, 18}, { 2, 8}, { 1, 11}, { 1, 18}, { 1, 23}, - { 1, 1}, { 2, 8}, { 2, 7}, { 1, 14}, - { 1, 13}, { 1, 7}, { 2, 8}, { 1, 11}, { 1, 18}, { 1, 23}, { 1, 1}, { 2, 8}, /* Row 14 */ - { 1, 10}, { 1, 28}, { 1, 22}, { 1, 21}, { 2, 8}, { 1, 11}, { 1, 22}, { 1, 23}, - { 1, 9}, { 2, 8}, { 1, 7}, { 1, 24}, { 1, 0}, - { 1, 14}, { 1, 7}, { 3, 8}, { 1, 1}, { 1, 23}, { 1, 14}, { 1, 11}, { 1, 8}, /* Row 15 */ - { 1, 11}, { 1, 10}, { 1, 1}, { 1, 9}, { 1, 8}, { 1, 29}, { 1, 1}, { 1, 12}, - { 1, 23}, { 1, 11}, { 2, 8}, { 1, 7}, { 1, 11}, { 1, 0}, - { 1, 0}, { 1, 7}, { 1, 3}, { 2, 8}, { 1, 9}, { 1, 28}, { 1, 23}, { 1, 18}, /* Row 16 */ - { 1, 11}, { 5, 8}, { 1, 9}, { 1, 22}, { 1, 23}, { 1, 10}, { 2, 8}, { 1, 30}, - { 1, 7}, { 1, 13}, { 1, 0}, - { 1, 0}, { 1, 17}, { 1, 7}, { 3, 8}, { 1, 1}, { 2, 23}, { 1, 31}, { 1, 15}, /* Row 17 */ - { 2, 26}, { 1, 9}, { 1, 21}, { 1, 22}, { 1, 23}, { 1, 13}, { 1, 29}, { 2, 8}, - { 1, 2}, { 1, 8}, { 2, 0}, - { 2, 0}, { 1, 24}, { 1, 2}, { 3, 8}, { 1, 9}, { 1, 22}, { 4, 23}, { 1, 14}, /* Row 18 */ - { 2, 23}, { 1, 1}, { 1, 29}, { 2, 8}, { 2, 7}, { 1, 13}, { 2, 0}, - { 2, 0}, { 1, 13}, { 1, 7}, { 1, 3}, { 3, 8}, { 1, 9}, { 1, 1}, { 1, 18}, /* Row 19 */ - { 1, 14}, { 2, 23}, { 1, 18}, { 1, 10}, { 4, 8}, { 1, 2}, { 1, 17}, { 3, 0}, - { 3, 0}, { 1, 17}, { 1, 2}, { 1, 7}, { 3, 8}, { 1, 29}, { 1, 11}, { 1, 10}, /* Row 20 */ - { 1, 1}, { 1, 9}, { 1, 11}, { 4, 8}, { 1, 2}, { 1, 27}, { 1, 14}, { 3, 0}, - { 3, 0}, { 1, 14}, { 1, 11}, { 2, 3}, { 10, 8}, { 1, 30}, { 1, 32}, { 1, 7}, /* Row 21 */ - { 1, 13}, { 4, 0}, - { 4, 0}, { 1, 14}, { 1, 24}, { 1, 7}, { 1, 3}, { 8, 8}, { 1, 7}, { 1, 32}, /* Row 22 */ - { 1, 27}, { 1, 13}, { 5, 0}, - { 5, 0}, { 1, 14}, { 1, 17}, { 2, 7}, { 2, 2}, { 2, 33}, { 1, 3}, { 3, 7}, /* Row 23 */ - { 1, 24}, { 1, 6}, { 6, 0}, - { 6, 0}, { 1, 14}, { 1, 13}, { 1, 4}, { 1, 7}, { 4, 2}, { 1, 7}, { 1, 11}, /* Row 24 */ - { 1, 13}, { 1, 14}, { 7, 0}, -}; - -/******************************************************************************************** - * Public Bitmap Structure Defintions - ********************************************************************************************/ - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_startBitmap = -{ - 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_startLut, // Index 0: Unselected LUT - g_startLut, // Index 1: Selected LUT - }, - g_startRleEntries // data - Pointer to the beginning of the RLE data -}; diff --git a/NxWidgets/nxwm/src/glyph_start25x25.cxx b/NxWidgets/nxwm/src/glyph_start25x25.cxx new file mode 100644 index 000000000..8bb73e7aa --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_start25x25.cxx @@ -0,0 +1,216 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_start25x25.cxx + * + * Copyright (C) 2012 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 25 +#define BITMAP_NCOLUMNS 25 +#define BITMAP_NLUTCODES 34 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 + +static const uint32_t g_startLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x6db66d, 0x006d00, 0x246d00, 0x6d9249, 0xdbffb6, 0xb6b692, 0x246d24, 0x249224, /* Codes 1-8 */ + 0x49b649, 0x6db649, 0x499249, 0xdbffdb, 0x92b692, 0xb6dbb6, 0x6ddb6d, 0x92b66d, /* Codes 9-16 */ + 0x6d926d, 0x92db92, 0x49926d, 0x49b624, 0x92db6d, 0xb6ffb6, 0xffffff, 0x496d49, /* Codes 17-24 */ + 0x92ff92, 0x24b624, 0x496d24, 0xb6db92, 0x499224, 0x249200, 0x92dbb6, 0x004900, /* Codes 25-32 */ + 0x009200 /* Code 33 */ +}; + +/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ + +#elif CONFIG_NXWIDGETS_BPP == 16 + +static const uint16_t g_startLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x6dad, 0x0360, 0x2360, 0x6c89, 0xdff6, 0xb5b2, 0x2364, 0x2484, 0x4da9, 0x6da9, /* Codes 0-10 */ + 0x4c89, 0xdffb, 0x95b2, 0xb6d6, 0x6ecd, 0x95ad, 0x6c8d, 0x96d2, 0x4c8d, 0x4da4, /* Codes 11-20 */ + 0x96cd, 0xb7f6, 0xffff, 0x4b69, 0x97f2, 0x25a4, 0x4b64, 0xb6d2, 0x4c84, 0x2480, /* Codes 21-30 */ + 0x96d6, 0x0240, 0x0480 /* Codes 31-33 */ +}; + +/* 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 p;ointless 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 */ + +static const uint8_t g_startLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x97, 0x3f, 0x4a, 0x7e, 0xeb, 0xb1, 0x4e, 0x64, 0x88, 0x93, 0x73, 0xf0, 0xa7, /* Codes 1-13 */ + 0xcb, 0xad, 0xa2, 0x82, 0xbc, 0x77, 0x84, 0xb8, 0xe0, 0xff, 0x5e, 0xd1, 0x79, /* Codes 14-26 */ + 0x59, 0xc7, 0x6f, 0x60, 0xc0, 0x2a, 0x55 /* Codes 27-33 */ +}; + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +/* RGB8 (332) Colors */ + +static const nxgl_mxpixel_t g_startLut[BITMAP_NLUTCODES] = +{ + CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ + 0x75, 0x0c, 0x2c, 0x71, 0xde, 0xb6, 0x2c, 0x30, 0x55, 0x75, 0x51, 0xdf, 0x96, /* Codes 1-13 */ + 0xba, 0x79, 0x95, 0x71, 0x9a, 0x51, 0x54, 0x99, 0xbe, 0xff, 0x4d, 0x9e, 0x34, /* Codes 14-26 */ + 0x4c, 0xba, 0x50, 0x30, 0x9a, 0x08, 0x10 /* Codes 27-33 */ +}; + +# endif +#else +# error "Unsupport pixel format" +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_startRleEntries[] = +{ + { 7, 0}, { 1, 1}, { 3, 2}, { 1, 3}, { 4, 2}, { 1, 4}, { 1, 5}, { 7, 0}, /* Row 0 */ + { 5, 0}, { 1, 6}, { 2, 7}, { 1, 8}, { 1, 9}, { 2, 1}, { 1, 10}, { 2, 9}, /* Row 1 */ + { 1, 11}, { 2, 7}, { 1, 1}, { 1, 12}, { 5, 0}, + { 4, 0}, { 1, 13}, { 1, 7}, { 1, 3}, { 1, 9}, { 8, 1}, { 1, 9}, { 1, 3}, /* Row 2 */ + { 1, 7}, { 1, 11}, { 1, 14}, { 4, 0}, + { 3, 0}, { 1, 13}, { 1, 7}, { 1, 3}, { 1, 9}, { 1, 15}, { 4, 1}, { 1, 16}, /* Row 3 */ + { 3, 1}, { 1, 15}, { 1, 9}, { 1, 8}, { 1, 7}, { 1, 17}, { 4, 0}, + { 2, 0}, { 1, 14}, { 1, 11}, { 1, 3}, { 1, 9}, { 1, 15}, { 4, 1}, { 1, 18}, /* Row 4 */ + { 1, 14}, { 1, 13}, { 1, 1}, { 1, 15}, { 1, 10}, { 1, 1}, { 1, 10}, { 2, 7}, + { 1, 13}, { 3, 0}, + { 2, 0}, { 1, 19}, { 1, 7}, { 1, 20}, { 1, 10}, { 2, 1}, { 1, 21}, { 1, 1}, /* Row 5 */ + { 1, 18}, { 1, 22}, { 1, 23}, { 1, 14}, { 1, 1}, { 2, 15}, { 1, 1}, { 1, 10}, + { 1, 9}, { 1, 2}, { 1, 11}, { 1, 14}, { 2, 0}, + { 1, 0}, { 1, 14}, { 1, 7}, { 1, 8}, { 1, 9}, { 1, 10}, { 1, 1}, { 1, 18}, /* Row 6 */ + { 1, 23}, { 1, 1}, { 1, 15}, { 1, 14}, { 1, 23}, { 1, 14}, { 1, 1}, { 2, 23}, + { 1, 1}, { 2, 9}, { 1, 8}, { 1, 2}, { 1, 4}, { 2, 0}, + { 1, 0}, { 1, 24}, { 1, 2}, { 1, 8}, { 1, 9}, { 1, 1}, { 1, 13}, { 2, 23}, /* Row 7 */ + { 1, 1}, { 1, 21}, { 1, 22}, { 1, 23}, { 1, 14}, { 1, 1}, { 1, 25}, { 1, 23}, + { 1, 14}, { 1, 1}, { 1, 9}, { 1, 26}, { 1, 2}, { 1, 7}, { 1, 14}, { 1, 0}, + { 1, 22}, { 1, 7}, { 1, 8}, { 2, 9}, { 1, 1}, { 1, 5}, { 1, 23}, { 1, 18}, /* Row 8 */ + { 1, 9}, { 1, 1}, { 1, 14}, { 1, 23}, { 1, 14}, { 1, 11}, { 1, 1}, { 1, 22}, + { 1, 23}, { 1, 21}, { 1, 9}, { 1, 26}, { 1, 8}, { 1, 7}, { 1, 1}, { 1, 0}, + { 1, 13}, { 1, 7}, { 2, 8}, { 1, 9}, { 1, 18}, { 1, 23}, { 1, 14}, { 2, 9}, /* Row 9 */ + { 1, 1}, { 1, 14}, { 1, 23}, { 1, 14}, { 1, 11}, { 1, 9}, { 1, 1}, { 1, 23}, + { 1, 14}, { 1, 10}, { 2, 8}, { 1, 2}, { 1, 24}, { 1, 0}, + { 1, 1}, { 1, 7}, { 2, 8}, { 1, 9}, { 1, 14}, { 1, 23}, { 1, 1}, { 2, 9}, /* Row 10 */ + { 1, 1}, { 1, 14}, { 1, 23}, { 1, 18}, { 1, 11}, { 2, 9}, { 1, 22}, { 1, 23}, + { 1, 1}, { 2, 8}, { 1, 3}, { 1, 27}, { 1, 14}, + { 1, 11}, { 1, 2}, { 2, 8}, { 1, 10}, { 2, 23}, { 1, 9}, { 2, 20}, { 1, 1}, /* Row 11 */ + { 1, 14}, { 1, 23}, { 1, 18}, { 1, 11}, { 2, 9}, { 1, 18}, { 1, 23}, { 1, 1}, + { 2, 8}, { 2, 7}, { 1, 14}, + { 1, 11}, { 1, 2}, { 2, 8}, { 1, 10}, { 1, 23}, { 1, 22}, { 1, 9}, { 2, 26}, /* Row 12 */ + { 1, 1}, { 1, 14}, { 1, 23}, { 1, 18}, { 1, 11}, { 2, 9}, { 1, 18}, { 1, 23}, + { 1, 1}, { 2, 8}, { 2, 7}, { 1, 13}, + { 1, 1}, { 1, 3}, { 2, 8}, { 1, 9}, { 1, 23}, { 1, 22}, { 1, 9}, { 2, 8}, /* Row 13 */ + { 1, 1}, { 1, 22}, { 1, 23}, { 1, 18}, { 2, 8}, { 1, 11}, { 1, 18}, { 1, 23}, + { 1, 1}, { 2, 8}, { 2, 7}, { 1, 14}, + { 1, 13}, { 1, 7}, { 2, 8}, { 1, 11}, { 1, 18}, { 1, 23}, { 1, 1}, { 2, 8}, /* Row 14 */ + { 1, 10}, { 1, 28}, { 1, 22}, { 1, 21}, { 2, 8}, { 1, 11}, { 1, 22}, { 1, 23}, + { 1, 9}, { 2, 8}, { 1, 7}, { 1, 24}, { 1, 0}, + { 1, 14}, { 1, 7}, { 3, 8}, { 1, 1}, { 1, 23}, { 1, 14}, { 1, 11}, { 1, 8}, /* Row 15 */ + { 1, 11}, { 1, 10}, { 1, 1}, { 1, 9}, { 1, 8}, { 1, 29}, { 1, 1}, { 1, 12}, + { 1, 23}, { 1, 11}, { 2, 8}, { 1, 7}, { 1, 11}, { 1, 0}, + { 1, 0}, { 1, 7}, { 1, 3}, { 2, 8}, { 1, 9}, { 1, 28}, { 1, 23}, { 1, 18}, /* Row 16 */ + { 1, 11}, { 5, 8}, { 1, 9}, { 1, 22}, { 1, 23}, { 1, 10}, { 2, 8}, { 1, 30}, + { 1, 7}, { 1, 13}, { 1, 0}, + { 1, 0}, { 1, 17}, { 1, 7}, { 3, 8}, { 1, 1}, { 2, 23}, { 1, 31}, { 1, 15}, /* Row 17 */ + { 2, 26}, { 1, 9}, { 1, 21}, { 1, 22}, { 1, 23}, { 1, 13}, { 1, 29}, { 2, 8}, + { 1, 2}, { 1, 8}, { 2, 0}, + { 2, 0}, { 1, 24}, { 1, 2}, { 3, 8}, { 1, 9}, { 1, 22}, { 4, 23}, { 1, 14}, /* Row 18 */ + { 2, 23}, { 1, 1}, { 1, 29}, { 2, 8}, { 2, 7}, { 1, 13}, { 2, 0}, + { 2, 0}, { 1, 13}, { 1, 7}, { 1, 3}, { 3, 8}, { 1, 9}, { 1, 1}, { 1, 18}, /* Row 19 */ + { 1, 14}, { 2, 23}, { 1, 18}, { 1, 10}, { 4, 8}, { 1, 2}, { 1, 17}, { 3, 0}, + { 3, 0}, { 1, 17}, { 1, 2}, { 1, 7}, { 3, 8}, { 1, 29}, { 1, 11}, { 1, 10}, /* Row 20 */ + { 1, 1}, { 1, 9}, { 1, 11}, { 4, 8}, { 1, 2}, { 1, 27}, { 1, 14}, { 3, 0}, + { 3, 0}, { 1, 14}, { 1, 11}, { 2, 3}, { 10, 8}, { 1, 30}, { 1, 32}, { 1, 7}, /* Row 21 */ + { 1, 13}, { 4, 0}, + { 4, 0}, { 1, 14}, { 1, 24}, { 1, 7}, { 1, 3}, { 8, 8}, { 1, 7}, { 1, 32}, /* Row 22 */ + { 1, 27}, { 1, 13}, { 5, 0}, + { 5, 0}, { 1, 14}, { 1, 17}, { 2, 7}, { 2, 2}, { 2, 33}, { 1, 3}, { 3, 7}, /* Row 23 */ + { 1, 24}, { 1, 6}, { 6, 0}, + { 6, 0}, { 1, 14}, { 1, 13}, { 1, 4}, { 1, 7}, { 4, 2}, { 1, 7}, { 1, 11}, /* Row 24 */ + { 1, 13}, { 1, 14}, { 7, 0}, +}; + +/******************************************************************************************** + * Public Bitmap Structure Defintions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_startBitmap = +{ + 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_startLut, // Index 0: Unselected LUT + g_startLut, // Index 1: Selected LUT + }, + g_startRleEntries // data - Pointer to the beginning of the RLE data +}; diff --git a/NxWidgets/nxwm/src/glyph_stop.cxx b/NxWidgets/nxwm/src/glyph_stop.cxx deleted file mode 100644 index d9436b5d8..000000000 --- a/NxWidgets/nxwm/src/glyph_stop.cxx +++ /dev/null @@ -1,194 +0,0 @@ -/******************************************************************************************** - * NxWidgets/nxwm/src/glyph_stop.cxx - * - * Copyright (C) 2012 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 21 -#define BITMAP_NCOLUMNS 21 -#define BITMAP_NLUTCODES 11 - -/******************************************************************************************** - * Private Bitmap Data - ********************************************************************************************/ - -using namespace NxWM; - -/* RGB24 (8-8-8) Colors */ - -#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 - -static const uint32_t g_stopNormalLut[BITMAP_NLUTCODES] = -{ - 0xd8d8d8, 0xfc6c6c, 0xfcb4b4, 0xd80000, 0xfc0000, 0x902424, 0xfcfcfc, 0xd8fcfc, /* Codes 0-7 */ - 0xb40000, 0xb40024, 0xfcd8d8 /* Codes 8-10 */ -}; - -static const uint32_t g_stopBrightLut[BITMAP_NLUTCODES] = -{ - 0xe1e1e1, 0xfc9090, 0xfcc6c6, 0xe13f3f, 0xfc3f3f, 0xab5a5a, 0xfcfcfc, 0xe1fcfc, /* Codes 0-7 */ - 0xc63f3f, 0xc63f5a, 0xfce1e1 /* Codes 8-10 */ -}; - -/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ - -#elif CONFIG_NXWIDGETS_BPP == 16 - -static const uint16_t g_stopNormalLut[BITMAP_NLUTCODES] = -{ - 0xdedb, 0xfb6d, 0xfdb6, 0xd800, 0xf800, 0x9124, 0xffff, 0xdfff, 0xb000, 0xb004, /* Codes 0-9 */ - 0xfedb /* Codes 10-10 */ -}; - -static const uint16_t g_stopBrightLut[BITMAP_NLUTCODES] = -{ - 0xe71c, 0xfc92, 0xfe38, 0xe1e7, 0xf9e7, 0xaacb, 0xffff, 0xe7ff, 0xc1e7, 0xc1eb, /* Codes 0-9 */ - 0xff1c /* Codes 10-10 */ -}; - -/* 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 p;ointless 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 */ - -static const uint8_t g_stopNormalLut[BITMAP_NLUTCODES] = -{ - 0xd8, 0x97, 0xc9, 0x40, 0x4b, 0x44, 0xfc, 0xf1, 0x35, 0x39, 0xe2 /* Codes 0-10 */ -}; - -static const uint8_t g_stopBrightLut[BITMAP_NLUTCODES] = -{ - 0xe1, 0xb0, 0xd6, 0x6f, 0x77, 0x72, 0xfc, 0xf3, 0x67, 0x6a, 0xe9 /* Codes 0-10 */ -}; - -# else /* CONFIG_NXWIDGETS_GREYSCALE */ - -/* RGB8 (332) Colors */ - -static const nxgl_mxpixel_t g_stopNormalLut[BITMAP_NLUTCODES] = -{ - 0xdb, 0xed, 0xf6, 0xc0, 0xe0, 0x84, 0xff, 0xdf, 0xa0, 0xa0, 0xfb /* Codes 0-10 */ -}; - -static const uint8_t g_stopBrightLut[BITMAP_NLUTCODES] = -{ - 0xff, 0xf2, 0xfb, 0xe4, 0xe4, 0xa9, 0xff, 0xff, 0xc4, 0xc5, 0xff /* Codes 0-10 */ -}; - -# endif -#else -# error "Unsupport pixel format" -#endif - -static const struct NXWidgets::SRlePaletteBitmapEntry g_stopRleEntries[] = -{ - { 1, 0}, { 1, 1}, { 17, 2}, { 1, 1}, { 1, 2}, /* Row 0 */ - { 1, 1}, { 4, 3}, { 6, 4}, { 9, 3}, { 1, 1}, /* Row 1 */ - { 1, 2}, { 2, 3}, { 9, 4}, { 8, 3}, { 1, 5}, /* Row 2 */ - { 1, 2}, { 1, 3}, { 1, 4}, { 2, 6}, { 1, 7}, { 7, 4}, { 2, 3}, { 2, 6}, /* Row 3 */ - { 1, 7}, { 2, 3}, { 1, 5}, - { 1, 2}, { 1, 3}, { 1, 4}, { 3, 6}, { 1, 7}, { 5, 4}, { 2, 3}, { 3, 6}, /* Row 4 */ - { 1, 7}, { 2, 3}, { 1, 5}, - { 1, 2}, { 3, 4}, { 3, 6}, { 1, 7}, { 4, 4}, { 1, 3}, { 3, 6}, { 1, 7}, /* Row 5 */ - { 3, 3}, { 1, 5}, - { 1, 2}, { 4, 4}, { 3, 6}, { 1, 7}, { 2, 4}, { 1, 3}, { 3, 6}, { 1, 7}, /* Row 6 */ - { 4, 3}, { 1, 5}, - { 1, 2}, { 5, 4}, { 3, 6}, { 1, 7}, { 1, 3}, { 3, 6}, { 1, 7}, { 4, 3}, /* Row 7 */ - { 1, 8}, { 1, 5}, - { 1, 2}, { 6, 4}, { 6, 6}, { 1, 7}, { 5, 3}, { 1, 8}, { 1, 5}, /* Row 8 */ - { 1, 2}, { 1, 3}, { 4, 4}, { 2, 3}, { 2, 6}, { 3, 7}, { 6, 3}, { 1, 8}, /* Row 9 */ - { 1, 5}, - { 1, 2}, { 2, 3}, { 1, 4}, { 4, 3}, { 2, 6}, { 3, 7}, { 5, 3}, { 2, 8}, /* Row 10 */ - { 1, 5}, - { 1, 2}, { 7, 3}, { 4, 6}, { 1, 7}, { 5, 3}, { 2, 8}, { 1, 5}, /* Row 11 */ - { 1, 2}, { 6, 3}, { 6, 6}, { 1, 7}, { 3, 3}, { 3, 8}, { 1, 5}, /* Row 12 */ - { 1, 2}, { 5, 3}, { 2, 6}, { 2, 7}, { 1, 3}, { 2, 6}, { 2, 7}, { 1, 3}, /* Row 13 */ - { 4, 8}, { 1, 5}, - { 1, 2}, { 4, 3}, { 3, 6}, { 1, 7}, { 3, 3}, { 3, 6}, { 1, 7}, { 4, 8}, /* Row 14 */ - { 1, 5}, - { 1, 2}, { 3, 3}, { 3, 6}, { 1, 7}, { 5, 3}, { 3, 6}, { 1, 7}, { 3, 8}, /* Row 15 */ - { 1, 5}, - { 1, 2}, { 2, 3}, { 3, 6}, { 1, 7}, { 4, 3}, { 3, 8}, { 3, 6}, { 1, 7}, /* Row 16 */ - { 2, 8}, { 1, 5}, - { 1, 2}, { 2, 3}, { 3, 7}, { 3, 3}, { 6, 8}, { 3, 7}, { 2, 8}, { 1, 5}, /* Row 17 */ - { 1, 2}, { 6, 3}, { 2, 8}, { 1, 9}, { 10, 8}, { 1, 5}, /* Row 18 */ - { 1, 1}, { 1, 3}, { 10, 8}, { 1, 9}, { 8, 8}, /* Row 19 */ - { 1, 10}, { 1, 1}, { 17, 5}, { 1, 8}, { 1, 1}, /* Row 20 */ -}; - -/******************************************************************************************** - * Public Bitmap Structure Defintions - ********************************************************************************************/ - -const struct NXWidgets::SRlePaletteBitmap NxWM::g_stopBitmap = -{ - 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_stopNormalLut, // Index 0: Unselected LUT - g_stopBrightLut, // Index 1: Selected LUT - }, - g_stopRleEntries // data - Pointer to the beginning of the RLE data -}; diff --git a/NxWidgets/nxwm/src/glyph_stop21x21.cxx b/NxWidgets/nxwm/src/glyph_stop21x21.cxx new file mode 100644 index 000000000..e4142d736 --- /dev/null +++ b/NxWidgets/nxwm/src/glyph_stop21x21.cxx @@ -0,0 +1,194 @@ +/******************************************************************************************** + * NxWidgets/nxwm/src/glyph_stop21x21.cxx + * + * Copyright (C) 2012 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 21 +#define BITMAP_NCOLUMNS 21 +#define BITMAP_NLUTCODES 11 + +/******************************************************************************************** + * Private Bitmap Data + ********************************************************************************************/ + +using namespace NxWM; + +/* RGB24 (8-8-8) Colors */ + +#if CONFIG_NXWIDGETS_BPP == 24 || CONFIG_NXWIDGETS_BPP == 32 + +static const uint32_t g_stopNormalLut[BITMAP_NLUTCODES] = +{ + 0xd8d8d8, 0xfc6c6c, 0xfcb4b4, 0xd80000, 0xfc0000, 0x902424, 0xfcfcfc, 0xd8fcfc, /* Codes 0-7 */ + 0xb40000, 0xb40024, 0xfcd8d8 /* Codes 8-10 */ +}; + +static const uint32_t g_stopBrightLut[BITMAP_NLUTCODES] = +{ + 0xe1e1e1, 0xfc9090, 0xfcc6c6, 0xe13f3f, 0xfc3f3f, 0xab5a5a, 0xfcfcfc, 0xe1fcfc, /* Codes 0-7 */ + 0xc63f3f, 0xc63f5a, 0xfce1e1 /* Codes 8-10 */ +}; + +/* RGB16 (565) Colors (four of the colors in this map are duplicates) */ + +#elif CONFIG_NXWIDGETS_BPP == 16 + +static const uint16_t g_stopNormalLut[BITMAP_NLUTCODES] = +{ + 0xdedb, 0xfb6d, 0xfdb6, 0xd800, 0xf800, 0x9124, 0xffff, 0xdfff, 0xb000, 0xb004, /* Codes 0-9 */ + 0xfedb /* Codes 10-10 */ +}; + +static const uint16_t g_stopBrightLut[BITMAP_NLUTCODES] = +{ + 0xe71c, 0xfc92, 0xfe38, 0xe1e7, 0xf9e7, 0xaacb, 0xffff, 0xe7ff, 0xc1e7, 0xc1eb, /* Codes 0-9 */ + 0xff1c /* Codes 10-10 */ +}; + +/* 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 p;ointless 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 */ + +static const uint8_t g_stopNormalLut[BITMAP_NLUTCODES] = +{ + 0xd8, 0x97, 0xc9, 0x40, 0x4b, 0x44, 0xfc, 0xf1, 0x35, 0x39, 0xe2 /* Codes 0-10 */ +}; + +static const uint8_t g_stopBrightLut[BITMAP_NLUTCODES] = +{ + 0xe1, 0xb0, 0xd6, 0x6f, 0x77, 0x72, 0xfc, 0xf3, 0x67, 0x6a, 0xe9 /* Codes 0-10 */ +}; + +# else /* CONFIG_NXWIDGETS_GREYSCALE */ + +/* RGB8 (332) Colors */ + +static const nxgl_mxpixel_t g_stopNormalLut[BITMAP_NLUTCODES] = +{ + 0xdb, 0xed, 0xf6, 0xc0, 0xe0, 0x84, 0xff, 0xdf, 0xa0, 0xa0, 0xfb /* Codes 0-10 */ +}; + +static const uint8_t g_stopBrightLut[BITMAP_NLUTCODES] = +{ + 0xff, 0xf2, 0xfb, 0xe4, 0xe4, 0xa9, 0xff, 0xff, 0xc4, 0xc5, 0xff /* Codes 0-10 */ +}; + +# endif +#else +# error "Unsupport pixel format" +#endif + +static const struct NXWidgets::SRlePaletteBitmapEntry g_stopRleEntries[] = +{ + { 1, 0}, { 1, 1}, { 17, 2}, { 1, 1}, { 1, 2}, /* Row 0 */ + { 1, 1}, { 4, 3}, { 6, 4}, { 9, 3}, { 1, 1}, /* Row 1 */ + { 1, 2}, { 2, 3}, { 9, 4}, { 8, 3}, { 1, 5}, /* Row 2 */ + { 1, 2}, { 1, 3}, { 1, 4}, { 2, 6}, { 1, 7}, { 7, 4}, { 2, 3}, { 2, 6}, /* Row 3 */ + { 1, 7}, { 2, 3}, { 1, 5}, + { 1, 2}, { 1, 3}, { 1, 4}, { 3, 6}, { 1, 7}, { 5, 4}, { 2, 3}, { 3, 6}, /* Row 4 */ + { 1, 7}, { 2, 3}, { 1, 5}, + { 1, 2}, { 3, 4}, { 3, 6}, { 1, 7}, { 4, 4}, { 1, 3}, { 3, 6}, { 1, 7}, /* Row 5 */ + { 3, 3}, { 1, 5}, + { 1, 2}, { 4, 4}, { 3, 6}, { 1, 7}, { 2, 4}, { 1, 3}, { 3, 6}, { 1, 7}, /* Row 6 */ + { 4, 3}, { 1, 5}, + { 1, 2}, { 5, 4}, { 3, 6}, { 1, 7}, { 1, 3}, { 3, 6}, { 1, 7}, { 4, 3}, /* Row 7 */ + { 1, 8}, { 1, 5}, + { 1, 2}, { 6, 4}, { 6, 6}, { 1, 7}, { 5, 3}, { 1, 8}, { 1, 5}, /* Row 8 */ + { 1, 2}, { 1, 3}, { 4, 4}, { 2, 3}, { 2, 6}, { 3, 7}, { 6, 3}, { 1, 8}, /* Row 9 */ + { 1, 5}, + { 1, 2}, { 2, 3}, { 1, 4}, { 4, 3}, { 2, 6}, { 3, 7}, { 5, 3}, { 2, 8}, /* Row 10 */ + { 1, 5}, + { 1, 2}, { 7, 3}, { 4, 6}, { 1, 7}, { 5, 3}, { 2, 8}, { 1, 5}, /* Row 11 */ + { 1, 2}, { 6, 3}, { 6, 6}, { 1, 7}, { 3, 3}, { 3, 8}, { 1, 5}, /* Row 12 */ + { 1, 2}, { 5, 3}, { 2, 6}, { 2, 7}, { 1, 3}, { 2, 6}, { 2, 7}, { 1, 3}, /* Row 13 */ + { 4, 8}, { 1, 5}, + { 1, 2}, { 4, 3}, { 3, 6}, { 1, 7}, { 3, 3}, { 3, 6}, { 1, 7}, { 4, 8}, /* Row 14 */ + { 1, 5}, + { 1, 2}, { 3, 3}, { 3, 6}, { 1, 7}, { 5, 3}, { 3, 6}, { 1, 7}, { 3, 8}, /* Row 15 */ + { 1, 5}, + { 1, 2}, { 2, 3}, { 3, 6}, { 1, 7}, { 4, 3}, { 3, 8}, { 3, 6}, { 1, 7}, /* Row 16 */ + { 2, 8}, { 1, 5}, + { 1, 2}, { 2, 3}, { 3, 7}, { 3, 3}, { 6, 8}, { 3, 7}, { 2, 8}, { 1, 5}, /* Row 17 */ + { 1, 2}, { 6, 3}, { 2, 8}, { 1, 9}, { 10, 8}, { 1, 5}, /* Row 18 */ + { 1, 1}, { 1, 3}, { 10, 8}, { 1, 9}, { 8, 8}, /* Row 19 */ + { 1, 10}, { 1, 1}, { 17, 5}, { 1, 8}, { 1, 1}, /* Row 20 */ +}; + +/******************************************************************************************** + * Public Bitmap Structure Defintions + ********************************************************************************************/ + +const struct NXWidgets::SRlePaletteBitmap NxWM::g_stopBitmap = +{ + 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_stopNormalLut, // Index 0: Unselected LUT + g_stopBrightLut, // Index 1: Selected LUT + }, + g_stopRleEntries // data - Pointer to the beginning of the RLE data +}; -- cgit v1.2.3