NXWidgets  1.19
glyph_mediaplayer24x24.cxx
Go to the documentation of this file.
1 /********************************************************************************************
2  * NxWidgets/nxwm/src/glyph_mediaplayer24x24.cxx
3  *
4  * Copyright (C) 2013 Ken Pettit. All rights reserved.
5  * Author: Ken Pettit <pettitkd@gmail.com>
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  * 3. Neither the name NuttX, NxWidgets, nor the names of its contributors
18  * me be used to endorse or promote products derived from this software
19  * without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *
34  ********************************************************************************************/
35 
36 /********************************************************************************************
37  * Included Files
38  ********************************************************************************************/
39 
40 #include <nuttx/config.h>
41 
42 #include <sys/types.h>
43 #include <stdint.h>
44 #include <stdbool.h>
45 
46 #include <nuttx/nx/nxglib.h>
47 #include <nuttx/video/fb.h>
48 #include <nuttx/video/rgbcolors.h>
49 
50 #include "crlepalettebitmap.hxx"
51 
52 #include "nxwmconfig.hxx"
53 #include "nxwmglyphs.hxx"
54 
55 /********************************************************************************************
56  * Pre-Processor Definitions
57  ********************************************************************************************/
58 
59 #define BITMAP_WIDTH 24
60 #define BITMAP_HEIGHT 24
61 #define BITMAP_PALETTESIZE 9
62 
63 /********************************************************************************************
64  * Private Bitmap Data
65  ********************************************************************************************/
66 
67 using namespace NxWM;
68 
69 /* RGB24 (8-8-8) Colors */
70 
72 {
73  MKRGB(248,252,251), MKRGB(120,198,241), MKRGB( 97,177,228), MKRGB( 31,104,177),
74  MKRGB( 73,153,213), MKRGB( 46,122,193), MKRGB(140,196,230), MKRGB( 9, 77,154),
75  CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
76 };
77 
79 {
80  MKRGB(255,255,255), MKRGB(170,248,255), MKRGB(147,227,255), MKRGB( 81,154,227),
81  MKRGB(123,203,255), MKRGB( 96,172,243), MKRGB(190,246,255), MKRGB( 59,127,204),
82  CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
83 };
84 
86 {
87  { 8, 8}, { 8, 7}, { 8, 8}, /* Row 0 */
88  { 6, 8}, { 1, 7}, { 1, 3}, { 1, 5}, { 2, 2}, { 2, 1},
89  { 2, 2}, { 1, 5}, { 1, 3}, { 1, 7}, { 6, 8}, /* Row 1 */
90  { 4, 8}, { 2, 7}, { 1, 4}, { 1, 2}, { 1, 6}, { 6, 1},
91  { 1, 6}, { 1, 2}, { 1, 4}, { 2, 7}, { 4, 8}, /* Row 2 */
92  { 3, 8}, { 1, 7}, { 1, 3}, { 1, 2}, { 1, 6}, { 2, 1},
93  { 4, 6}, { 2, 1}, { 2, 6}, { 2, 2}, { 1, 3}, { 1, 7},
94  { 3, 8}, /* Row 3 */
95  { 2, 8}, { 1, 7}, { 1, 3}, { 1, 1}, { 2, 6}, { 3, 1},
96  { 2, 2}, { 1, 4}, { 1, 3}, { 5, 5}, { 1, 1}, { 1, 3},
97  { 1, 7}, { 2, 8}, /* Row 4 */
98  { 2, 8}, { 1, 7}, { 1, 2}, { 1, 6}, { 4, 1}, { 1, 4},
99  { 3, 5}, { 2, 6}, { 3, 0}, { 1, 3}, { 2, 2}, { 1, 7},
100  { 2, 8}, /* Row 5 */
101  { 1, 8}, { 1, 7}, { 1, 4}, { 1, 6}, { 4, 1}, { 1, 2},
102  { 1, 5}, { 1, 6}, { 7, 0}, { 1, 3}, { 1, 2}, { 1, 6},
103  { 1, 4}, { 1, 7}, { 1, 8}, /* Row 6 */
104  { 1, 8}, { 1, 3}, { 1, 6}, { 4, 1}, { 1, 2}, { 1, 5},
105  { 4, 0}, { 2, 6}, { 1, 3}, { 1, 5}, { 1, 0}, { 1, 3},
106  { 1, 2}, { 1, 1}, { 1, 6}, { 1, 3}, { 1, 8}, /* Row 7 */
107  { 1, 3}, { 1, 4}, { 1, 6}, { 4, 1}, { 1, 2}, { 1, 5},
108  { 2, 0}, { 1, 6}, { 3, 3}, { 1, 4}, { 1, 5}, { 1, 0},
109  { 1, 3}, { 1, 2}, { 1, 1}, { 1, 6}, { 1, 4}, { 1, 3}, /* Row 8 */
110  { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 4},
111  { 1, 3}, { 1, 4}, { 3, 2}, { 1, 5}, { 1, 0}, { 1, 3},
112  { 1, 2}, { 3, 1}, { 1, 3}, /* Row 9 */
113  { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3},
114  { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 3}, { 1, 2},
115  { 3, 1}, { 1, 3}, /* Row 10 */
116  { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3},
117  { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 7}, { 1, 2},
118  { 3, 1}, { 1, 3}, /* Row 11 */
119  { 1, 3}, { 6, 1}, { 1, 2}, { 1, 5}, { 1, 0}, { 1, 3},
120  { 1, 4}, { 4, 2}, { 1, 7}, { 1, 0}, { 1, 7}, { 1, 2},
121  { 3, 1}, { 1, 5}, /* Row 12 */
122  { 1, 3}, { 1, 6}, { 4, 1}, { 2, 2}, { 1, 5}, { 1, 0},
123  { 1, 3}, { 1, 4}, { 2, 2}, { 1, 5}, { 1, 7}, { 1, 6},
124  { 1, 0}, { 1, 7}, { 1, 2}, { 2, 1}, { 1, 6}, { 1, 3}, /* Row 13 */
125  { 1, 3}, { 5, 1}, { 1, 2}, { 2, 3}, { 1, 0}, { 1, 3},
126  { 1, 4}, { 1, 2}, { 1, 7}, { 1, 6}, { 3, 0}, { 1, 7},
127  { 1, 2}, { 2, 1}, { 1, 2}, { 1, 3}, /* Row 14 */
128  { 1, 5}, { 1, 4}, { 3, 1}, { 1, 2}, { 1, 3}, { 1, 2},
129  { 1, 6}, { 1, 0}, { 1, 3}, { 1, 2}, { 1, 5}, { 1, 6},
130  { 4, 0}, { 1, 7}, { 1, 2}, { 2, 1}, { 1, 4}, { 1, 5}, /* Row 15 */
131  { 1, 8}, { 1, 4}, { 2, 1}, { 1, 2}, { 1, 3}, { 4, 0},
132  { 1, 3}, { 1, 2}, { 1, 3}, { 1, 6}, { 3, 0}, { 1, 6},
133  { 1, 7}, { 1, 2}, { 2, 1}, { 1, 4}, { 1, 8}, /* Row 16 */
134  { 1, 8}, { 1, 5}, { 1, 2}, { 1, 1}, { 1, 5}, { 1, 6},
135  { 4, 0}, { 1, 3}, { 2, 2}, { 1, 3}, { 1, 6}, { 1, 0},
136  { 1, 6}, { 1, 7}, { 1, 4}, { 2, 1}, { 1, 2}, { 1, 5},
137  { 1, 8}, /* Row 17 */
138  { 2, 8}, { 1, 5}, { 1, 1}, { 1, 5}, { 1, 1}, { 4, 0},
139  { 1, 3}, { 1, 2}, { 1, 1}, { 1, 4}, { 1, 3}, { 1, 7},
140  { 1, 3}, { 1, 2}, { 3, 1}, { 1, 5}, { 2, 8}, /* Row 18 */
141  { 2, 8}, { 1, 5}, { 1, 4}, { 1, 1}, { 1, 3}, { 1, 6},
142  { 1, 0}, { 1, 6}, { 1, 3}, { 1, 2}, { 9, 1}, { 1, 4},
143  { 1, 5}, { 2, 8}, /* Row 19 */
144  { 3, 8}, { 1, 5}, { 1, 4}, { 1, 1}, { 1, 3}, { 1, 5},
145  { 1, 3}, {10, 1}, { 1, 4}, { 1, 5}, { 3, 8}, /* Row 20 */
146  { 4, 8}, { 2, 4}, {12, 1}, { 2, 4}, { 4, 8}, /* Row 21 */
147  { 6, 8}, { 2, 4}, { 8, 1}, { 2, 4}, { 6, 8}, /* Row 22 */
148  { 8, 8}, { 8, 4}, { 8, 8}, /* Row 23 */
149 };
150 
151 /********************************************************************************************
152  * Public Bitmap Structure Definitions
153  ********************************************************************************************/
154 
156 {
160  BITMAP_WIDTH,
163  bitmap
164 };
const struct NXWidgets::SRlePaletteBitmap g_mediaplayerBitmap
Definition: nxwmglyphs.hxx:64
uint8_t nxwidget_pixel_t
Definition: nxconfig.hxx:442
static const NXWidgets::nxwidget_pixel_t hilight_palette[BITMAP_PALETTESIZE]
static const NXWidgets::SRlePaletteBitmapEntry bitmap[]
static const NXWidgets::nxwidget_pixel_t palette[BITMAP_PALETTESIZE]