36 #ifndef __INCLUDE_NXCONFIG_HXX 37 #define __INCLUDE_NXCONFIG_HXX 43 #include <nuttx/config.h> 48 #include <nuttx/video/rgbcolors.h> 49 #include <nuttx/nx/nxfonts.h> 137 #ifndef CONFIG_HAVE_CXX 138 # error "C++ support is required (CONFIG_HAVE_CXX)" 146 # error "NX graphics support is required (CONFIG_NX)" 153 #ifndef CONFIG_NX_XYINPUT 154 # warning "NX mouse/touchscreen support is required (CONFIG_NX_XYINPUT)" 161 #ifndef CONFIG_NX_KBD 162 # warning "NX keyboard support is required (CONFIG_NX_KBD)" 169 #ifndef CONFIG_NX_NPLANES 170 # define CONFIG_NX_NPLANES 1 173 #if CONFIG_NX_NPLANES != 1 174 # error "Only a single color plane is supported (CONFIG_NX_NPLANES)" 181 #if !defined(CONFIG_NX_KBD) || !defined(CONFIG_NXTERM) 182 # undef CONFIG_NXTERM_NXKBDIN 190 #ifndef CONFIG_NXWIDGETS_CLIENTPRIO 191 # define CONFIG_NXWIDGETS_CLIENTPRIO SCHED_PRIORITY_DEFAULT 194 #if CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWIDGETS_CLIENTPRIO 195 # warning "CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWIDGETS_CLIENTPRIO" 196 # warning" -- This can result in data overrun errors" 203 #ifndef CONFIG_NXWIDGETS_LISTENERPRIO 204 # define CONFIG_NXWIDGETS_LISTENERPRIO SCHED_PRIORITY_DEFAULT 207 #if CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWIDGETS_LISTENERPRIO 208 # warning "CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWIDGETS_LISTENERPRIO" 209 # warning" -- This can result in data overrun errors" 216 #ifndef CONFIG_NXWIDGETS_LISTENERSTACK 217 # define CONFIG_NXWIDGETS_LISTENERSTACK 2048 225 #ifndef CONFIG_NXWIDGETS_BPP 226 # if !defined(CONFIG_NX_DISABLE_8BPP) 227 # warning "Assuming 8-bits per pixel, RGB 3:3:2" 228 # define CONFIG_NXWIDGETS_BPP 8 229 # elif !defined(CONFIG_NX_DISABLE_16BPP) 230 # warning "Assuming 16-bits per pixel, RGB 5:6:5" 231 # define CONFIG_NXWIDGETS_BPP 16 232 # elif !defined(CONFIG_NX_DISABLE_24BPP) 233 # warning "Assuming 24-bits per pixel, RGB 8:8:8" 234 # define CONFIG_NXWIDGETS_BPP 24 235 # elif !defined(CONFIG_NX_DISABLE_32BPP) 236 # warning "Assuming 32-bits per pixel, RGB 8:8:8" 237 # define CONFIG_NXWIDGETS_BPP 32 239 # error "No supported pixel depth is enabled" 243 #if CONFIG_NXWIDGETS_BPP == 8 244 # ifdef CONFIG_NX_DISABLE_8BPP 245 # error "NX 8-bit support is disabled (CONFIG_NX_DISABLE_8BPP)" 247 # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB8_332 248 # define MKRGB RGBTO8 249 # define RGB2RED RGB8RED 250 # define RGB2GREEN RGB8GREEN 251 # define RGB2BLUE RGB8BLUE 252 # define FONT_RENDERER nxf_convert_8bpp 253 #elif CONFIG_NXWIDGETS_BPP == 16 254 # ifdef CONFIG_NX_DISABLE_16BPP 255 # error "NX 16-bit support is disabled (CONFIG_NX_DISABLE_16BPP)" 257 # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB16_565 258 # define MKRGB RGBTO16 259 # define RGB2RED RGB16RED 260 # define RGB2GREEN RGB16GREEN 261 # define RGB2BLUE RGB16BLUE 262 # define FONT_RENDERER nxf_convert_16bpp 263 #elif CONFIG_NXWIDGETS_BPP == 24 264 # ifdef CONFIG_NX_DISABLE_24BPP 265 # error "NX 24-bit support is disabled (CONFIG_NX_DISABLE_24BPP)" 267 # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB24 268 # define MKRGB RGBTO24 269 # define RGB2RED RGB24RED 270 # define RGB2GREEN RGB24GREEN 271 # define RGB2BLUE RGB24BLUE 272 # define FONT_RENDERER nxf_convert_24bpp 273 #elif CONFIG_NXWIDGETS_BPP == 32 274 # ifdef CONFIG_NX_DISABLE_32BPP 275 # error "NX 32-bit support is disabled (CONFIG_NX_DISABLE_32BPP)" 277 # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB32 278 # define MKRGB RGBTO24 279 # define RGB2RED RGB24RED 280 # define RGB2GREEN RGB24GREEN 281 # define RGB2BLUE RGB24BLUE 282 # define FONT_RENDERER nxf_convert_32bpp 284 # error "Pixel depth not supported (CONFIG_NXWIDGETS_BPP)" 289 #ifndef CONFIG_NXWIDGETS_SIZEOFCHAR 290 # if CONFIG_NXFONTS_CHARBITS <= 8 291 # define CONFIG_NXWIDGETS_SIZEOFCHAR 1 293 # define CONFIG_NXWIDGETS_SIZEOFCHAR 2 297 #if CONFIG_NXWIDGETS_SIZEOFCHAR != 1 && CONFIG_NXWIDGETS_SIZEOFCHAR != 2 298 # error "Unsupported character width (CONFIG_NXWIDGETS_SIZEOFCHAR)" 306 #ifndef CONFIG_NXWIDGETS_DEFAULT_FONTID 307 # define CONFIG_NXWIDGETS_DEFAULT_FONTID NXFONT_DEFAULT 314 #ifndef CONFIG_NXWIDGETS_TNXARRAY_INITIALSIZE 315 # define CONFIG_NXWIDGETS_TNXARRAY_INITIALSIZE 16 318 #ifndef CONFIG_NXWIDGETS_TNXARRAY_SIZEINCREMENT 319 # define CONFIG_NXWIDGETS_TNXARRAY_SIZEINCREMENT 8 326 #ifndef CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR 327 # define CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR MKRGB(148,189,215) 334 #ifndef CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR 335 # define CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR MKRGB(206,227,241) 342 #ifndef CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR 343 # define CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR MKRGB(248,248,248) 350 #ifndef CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR 351 # define CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR MKRGB(35,58,73) 358 #ifndef CONFIG_NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR 359 # define CONFIG_NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR MKRGB(192,192,192) 364 #ifndef CONFIG_NXWIDGETS_DEFAULT_DISABLEDTEXTCOLOR 365 # define CONFIG_NXWIDGETS_DEFAULT_DISABLEDTEXTCOLOR MKRGB(192,192,192) 368 #ifndef CONFIG_NXWIDGETS_DEFAULT_ENABLEDTEXTCOLOR 369 # define CONFIG_NXWIDGETS_DEFAULT_ENABLEDTEXTCOLOR MKRGB(248,248,248) 372 #ifndef CONFIG_NXWIDGETS_DEFAULT_SELECTEDTEXTCOLOR 373 # define CONFIG_NXWIDGETS_DEFAULT_SELECTEDTEXTCOLOR MKRGB(0,0,0) 380 #ifndef CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR 381 # define CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR MKRGB(255,255,255) 388 #ifndef CONFIG_NXWIDGETS_TRANSPARENT_COLOR 389 # define CONFIG_NXWIDGETS_TRANSPARENT_COLOR MKRGB(0,0,0) 397 #ifndef CONFIG_NXWIDGETS_FIRST_REPEAT_TIME 398 # define CONFIG_NXWIDGETS_FIRST_REPEAT_TIME 500 405 #ifndef CONFIG_NXWIDGETS_CONTINUE_REPEAT_TIME 406 # define CONFIG_NXWIDGETS_CONTINUE_REPEAT_TIME 200 413 #ifndef CONFIG_NXWIDGETS_DOUBLECLICK_TIME 414 # define CONFIG_NXWIDGETS_DOUBLECLICK_TIME 350 422 #ifndef CONFIG_NXWIDGETS_KBDBUFFER_SIZE 423 # define CONFIG_NXWIDGETS_KBDBUFFER_SIZE 8 431 #ifndef CONFIG_NXWIDGETS_CURSORCONTROL_SIZE 432 # define CONFIG_NXWIDGETS_CURSORCONTROL_SIZE 4 441 #if CONFIG_NXWIDGETS_BPP == 8 443 #elif CONFIG_NXWIDGETS_BPP == 16 445 #elif CONFIG_NXWIDGETS_BPP == 24 447 #elif CONFIG_NXWIDGETS_BPP == 32 450 # error "Pixel depth is unknown" 453 #if CONFIG_NXWIDGETS_SIZEOFCHAR == 2 455 #elif CONFIG_NXWIDGETS_SIZEOFCHAR == 1 458 # error "Character width is unknown" 466 #endif // __INCLUDE_NXCONFIG_HXX
uint16_t nxwidget_pixel_t
uint32_t nxwidget_pixel_t