NXWidgets: nxwmconfig.hxx Source File

NXWidgets 1.19

nxwmconfig.hxx
Go to the documentation of this file.
1 /****************************************************************************
2 * NxWidgets/nxwm/include/nxwmconfig.hxx
3 *
4 * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved.
5 * Author: Gregory Nutt <gnutt@nuttx.org>
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 #ifndef __INCLUDE_NXWMCONFIG_HXX
37 #define __INCLUDE_NXWMCONFIG_HXX
38
39 /****************************************************************************
40 * Included Files
41 ****************************************************************************/
42
43 #include <nuttx/config.h>
44
45 #include <nuttx/input/touchscreen.h>
46
47 #include "nxconfig.hxx"
48 #include "crlepalettebitmap.hxx"
49
50 /****************************************************************************
51 * Pre-Processor Definitions
52 ****************************************************************************/
53 /* General Configuration ****************************************************/
54 /**
55 * Required settings:
56 *
57 * CONFIG_HAVE_CXX : C++ support is required
58 * CONFIG_NX : NX must enabled
59 * CONFIG_NXTERM=y : For NxTerm support
60 * CONFIG_SCHED_ONEXIT : Support for on_exit()
61 *
62 * General settings:
63 *
64 * CONFIG_NXWM_DEFAULT_FONTID - the NxWM default font ID. Default:
65 * NXFONT_DEFAULT
66 * CONFIG_NXWM_TOUCHSCREEN - Define to build in touchscreen support.
67 * CONFIG_NXWM_KEYBOARD - Define to build in touchscreen support.
68 */
69
70 #ifndef CONFIG_HAVE_CXX
71 # error "C++ support is required (CONFIG_HAVE_CXX)"
72 #endif
73
74 /**
75 * NX Multi-user support is required
76 */
77
78 #ifndef CONFIG_NX
79 # error "NX support is required (CONFIG_NX)"
80 #endif
81
82 /**
83 * NxTerm support is (probably) required if CONFIG_NXWM_NXTERM is
84 * selected
85 */
86
87 #if defined(CONFIG_NXWM_NXTERM) && !defined(CONFIG_NXTERM)
88 # warning "NxTerm support may be needed (CONFIG_NXTERM)"
89 #endif
90
91 /**
92 * on_exit() support is (probably) required. on_exit() is the normal
93 * mechanism used by NxWM applications to clean-up on a application task
94 * exit.
95 */
96
97 #ifndef CONFIG_SCHED_ONEXIT
98 # warning "on_exit() support may be needed (CONFIG_SCHED_ONEXIT)"
99 #endif
100
101 /**
102 * Default font ID
103 */
104
105 #ifndef CONFIG_NXWM_DEFAULT_FONTID
106 # define CONFIG_NXWM_DEFAULT_FONTID NXFONT_DEFAULT
107 #endif
108
109 /* Colors *******************************************************************/
110 /**
111 * Color configuration
112 *
113 * CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR - Normal background color. Default:
114 * MKRGB(148,189,215)
115 * CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR - Select background color.
116 * Default: MKRGB(206,227,241)
117 * CONFIG_NXWM_DEFAULT_SHINEEDGECOLOR - Color of the bright edge of a border.
118 * Default: MKRGB(255,255,255)
119 * CONFIG_NXWM_DEFAULT_SHADOWEDGECOLOR - Color of the shadowed edge of a border.
120 * Default: MKRGB(0,0,0)
121 * CONFIG_NXWM_DEFAULT_FONTCOLOR - Default font color. Default:
122 * MKRGB(0,0,0)
123 * CONFIG_NXWM_TRANSPARENT_COLOR - The "transparent" color. Default:
124 * MKRGB(0,0,0)
125 */
126
127 /**
128 * Normal background color
129 */
130
131 #ifndef CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
132 # define CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR MKRGB(148,189,215)
133 #endif
134
135 /**
136 * Default selected background color
137 */
138
139 #ifndef CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR
140 # define CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR MKRGB(206,227,241)
141 #endif
142
143 /**
144 * Border colors
145 */
146
147 #ifndef CONFIG_NXWM_DEFAULT_SHINEEDGECOLOR
148 # define CONFIG_NXWM_DEFAULT_SHINEEDGECOLOR MKRGB(248,248,248)
149 #endif
150
151 #ifndef CONFIG_NXWM_DEFAULT_SHADOWEDGECOLOR
152 # define CONFIG_NXWM_DEFAULT_SHADOWEDGECOLOR MKRGB(35,58,73)
153 #endif
154
155 /**
156 * The default font color
157 */
158
159 #ifndef CONFIG_NXWM_DEFAULT_FONTCOLOR
160 # define CONFIG_NXWM_DEFAULT_FONTCOLOR MKRGB(255,255,255)
161 #endif
162
163 /**
164 * The transparent color
165 */
166
167 #ifndef CONFIG_NXWM_TRANSPARENT_COLOR
168 # define CONFIG_NXWM_TRANSPARENT_COLOR MKRGB(0,0,0)
169 #endif
170
171 /* Task Bar Configuration **************************************************/
172 /**
173 * Horizontal and vertical spacing of icons in the task bar.
174 *
175 * CONFIG_NXWM_TASKBAR_VSPACING - Vertical spacing. Default: 2 pixels
176 * CONFIG_NXWM_TASKBAR_HSPACING - Horizontal spacing. Default: 2 rows
177 *
178 * Task bar location. Default is CONFIG_NXWM_TASKBAR_TOP.
179 *
180 * CONFIG_NXWM_TASKBAR_TOP - Task bar is at the top of the display
181 * CONFIG_NXWM_TASKBAR_BOTTOM - Task bar is at the bottom of the display
182 * CONFIG_NXWM_TASKBAR_LEFT - Task bar is on the left side of the display
183 * CONFIG_NXWM_TASKBAR_RIGHT - Task bar is on the right side of the display
184 *
185 * CONFIG_NXWM_TASKBAR_WIDTH - Task bar thickness (either vertical or
186 * horizontal). Default: 25 + 2*spacing unless large icons are selected.
187 * Then the default is 50 + 2*spacing.
188 */
189
190 /**
191 * Horizontal and vertical spacing of icons in the task bar.
192 */
193
194 #ifndef CONFIG_NXWM_TASKBAR_VSPACING
195 # define CONFIG_NXWM_TASKBAR_VSPACING (2)
196 #endif
197
198 #ifndef CONFIG_NXWM_TASKBAR_HSPACING
199 # define CONFIG_NXWM_TASKBAR_HSPACING (2)
200 #endif
201
202 /**
203 * Check task bar location
204 */
205
206 #if defined(CONFIG_NXWM_TASKBAR_TOP)
207 # if defined(CONFIG_NXWM_TASKBAR_BOTTOM) || defined (CONFIG_NXWM_TASKBAR_LEFT) || defined (CONFIG_NXWM_TASKBAR_RIGHT)
208 # warning "Multiple task bar positions specified"
209 # endif
210 #elif defined(CONFIG_NXWM_TASKBAR_BOTTOM)
211 # if defined (CONFIG_NXWM_TASKBAR_LEFT) || defined (CONFIG_NXWM_TASKBAR_RIGHT)
212 # warning "Multiple task bar positions specified"
213 # endif
214 #elif defined(CONFIG_NXWM_TASKBAR_LEFT)
215 # if defined (CONFIG_NXWM_TASKBAR_RIGHT)
216 # warning "Multiple task bar positions specified"
217 # endif
218 #elif !defined(CONFIG_NXWM_TASKBAR_RIGHT)
219 # warning "No task bar position specified"
220 # define CONFIG_NXWM_TASKBAR_TOP 1
221 #endif
222
223 // Taskbar ICON scaling
224
225 #if defined(CONFIG_NXWM_TASKBAR_ICONSCALE)
226 # ifndef CONFIG_NXWM_TASKBAR_ICONWIDTH
227 # error Scaling requires CONFIG_NXWM_TASKBAR_ICONWIDTH
228 # define CONFIG_NXWM_TASKBAR_ICONWIDTH 50
229 # endif
230 # ifndef CONFIG_NXWM_TASKBAR_ICONHEIGHT
231 # error Scaling requires CONFIG_NXWM_TASKBAR_ICONHEIGHT
232 # define CONFIG_NXWM_TASKBAR_ICONHEIGHT 42
233 # endif
234 #elif defined(CONFIG_NXWM_LARGE_ICONS)
235 # undef CONFIG_NXWM_TASKBAR_ICONWIDTH
236 # define CONFIG_NXWM_TASKBAR_ICONWIDTH 50
237 # undef CONFIG_NXWM_TASKBAR_ICONHEIGHT
238 # define CONFIG_NXWM_TASKBAR_ICONHEIGHT 42
239 #else
240 # undef CONFIG_NXWM_TASKBAR_ICONWIDTH
241 # define CONFIG_NXWM_TASKBAR_ICONWIDTH 25
242 # undef CONFIG_NXWM_TASKBAR_ICONHEIGHT
243 # define CONFIG_NXWM_TASKBAR_ICONHEIGHT 21
244 #endif
245
246 /**
247 * At present, all icons are 25 pixels in "width" and, hence require a
248 * task bar of at least that size.
249 */
250
251 #ifndef CONFIG_NXWM_TASKBAR_WIDTH
252 # if defined(CONFIG_NXWM_TASKBAR_TOP) || defined(CONFIG_NXWM_TASKBAR_BOTTOM)
253 # define CONFIG_NXWM_TASKBAR_WIDTH \
254 (CONFIG_NXWM_TASKBAR_ICONWIDTH+2*CONFIG_NXWM_TASKBAR_HSPACING)
255 # else
256 # define CONFIG_NXWM_TASKBAR_WIDTH \
257 (CONFIG_NXWM_TASKBAR_ICONWIDTH+2*CONFIG_NXWM_TASKBAR_VSPACING)
258 # endif
259 #endif
260
261 /* Tool Bar Configuration ***************************************************/
262 /**
263 * CONFIG_NXWM_TOOLBAR_HEIGHT. The height of the tool bar in each
264 * application window. At present, all icons are 21 or 42 pixels in height
265 * (depending on the setting of CONFIG_NXWM_LARGE_ICONS) and, hence require
266 * a task bar of at least that size.
267 */
268
269 #ifndef CONFIG_NXWM_TOOLBAR_HEIGHT
270 # define CONFIG_NXWM_TOOLBAR_HEIGHT \
271 (CONFIG_NXWM_TASKBAR_ICONHEIGHT + 2*CONFIG_NXWM_TASKBAR_HSPACING)
272 #endif
273
274 /* CONFIG_NXWM_TOOLBAR_FONTID overrides the default NxWM font selection */
275
276 #ifndef CONFIG_NXWM_TOOLBAR_FONTID
277 # define CONFIG_NXWM_TOOLBAR_FONTID CONFIG_NXWM_DEFAULT_FONTID
278 #endif
279
280 /* Background Image **********************************************************/
281 /**
282 * CONFIG_NXWM_BACKGROUND_IMAGE - The name of the image to use in the
283 * background window. Default:NXWidgets::g_nuttxBitmap160x160
284 */
285
286 #ifndef CONFIG_NXWM_BACKGROUND_IMAGE
287 # define CONFIG_NXWM_BACKGROUND_IMAGE NXWidgets::g_nuttxBitmap160x160
288 #endif
289
290 /* Start Window Configuration ***********************************************/
291 /**
292 * Horizontal and vertical spacing of icons in the task bar.
293 *
294 * CONFIG_NXWM_STARTWINDOW_VSPACING - Vertical spacing. Default: 4 pixels
295 * CONFIG_NXWM_STARTWINDOW_HSPACING - Horizontal spacing. Default: 4 rows
296 * CONFIG_NXWM_STARTWINDOW_ICON - The glyph to use as the start window icon
297 * CONFIG_NXWM_STARTWINDOW_MQNAME - The well known name of the message queue
298 * Used to communicated from CWindowMessenger to the start window thread.
299 * Default: "nxwm"
300 * CONFIG_NXWM_STARTWINDOW_MXMSGS - The maximum number of messages to queue
301 * before blocking. Default 32
302 * CONFIG_NXWM_STARTWINDOW_MXMPRIO - The message priority. Default: 42.
303 * CONFIG_NXWM_STARTWINDOW_PRIO - Priority of the StartWindoW task. Default:
304 * SCHED_PRIORITY_DEFAULT. NOTE: This priority should be less than
305 * CONFIG_NXSTART_SERVERPRIO or else there may be data overrun errors.
306 * Such errors would most likely appear as duplicated rows of data on the
307 * display.
308 * CONFIG_NXWM_STARTWINDOW_STACKSIZE - The stack size to use when starting the
309 * StartWindow task. Default: 2048 bytes.
310 */
311
312 #ifndef CONFIG_NXWM_STARTWINDOW_VSPACING
313 # define CONFIG_NXWM_STARTWINDOW_VSPACING (4)
314 #endif
315
316 #ifndef CONFIG_NXWM_STARTWINDOW_HSPACING
317 # define CONFIG_NXWM_STARTWINDOW_HSPACING (4)
318 #endif
319
320 /**
321 * The start window glyph
322 */
323
324 #ifndef CONFIG_NXWM_STARTWINDOW_ICON
325 # define CONFIG_NXWM_STARTWINDOW_ICON NxWM::g_playBitmap
326 #endif
327
328 /**
329 * Start window task parameters
330 */
331
332 #ifndef CONFIG_NXWM_STARTWINDOW_MQNAME
333 # define CONFIG_NXWM_STARTWINDOW_MQNAME "nxwm"
334 #endif
335
336 #ifndef CONFIG_NXWM_STARTWINDOW_MXMSGS
337 # ifdef CONFIG_NX_MXCLIENTMSGS
338 # define CONFIG_NXWM_STARTWINDOW_MXMSGS CONFIG_NX_MXCLIENTMSGS
339 # else
340 # define CONFIG_NXWM_STARTWINDOW_MXMSGS 32
341 # endif
342 #endif
343
344 #ifndef CONFIG_NXWM_STARTWINDOW_MXMPRIO
345 # define CONFIG_NXWM_STARTWINDOW_MXMPRIO 42
346 #endif
347
348 #ifndef CONFIG_NXWM_STARTWINDOW_PRIO
349 # define CONFIG_NXWM_STARTWINDOW_PRIO SCHED_PRIORITY_DEFAULT
350 #endif
351
352 #if CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWM_STARTWINDOW_PRIO
353 # warning "CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWM_STARTWINDOW_PRIO"
354 # warning" -- This can result in data overrun errors"
355 #endif
356
357 #ifndef CONFIG_NXWM_STARTWINDOW_STACKSIZE
358 # define CONFIG_NXWM_STARTWINDOW_STACKSIZE 2048
359 #endif
360
361 /* NxTerm Window *********************************************************/
362 /**
363 * NxTerm Window Configuration
364 *
365 * CONFIG_NXWM_NXTERM_PRIO - Priority of the NxTerm task. Default:
366 * SCHED_PRIORITY_DEFAULT. NOTE: This priority should be less than
367 * CONFIG_NXSTART_SERVERPRIO or else there may be data overrun errors.
368 * Such errors would most likely appear as duplicated rows of data on the
369 * display.
370 * CONFIG_NXWM_NXTERM_STACKSIZE - The stack size to use when starting the
371 * NxTerm task. Default: 2048 bytes.
372 * CONFIG_NXWM_NXTERM_WCOLOR - The color of the NxTerm window background.
373 * Default: MKRGB(192,192,192)
374 * CONFIG_NXWM_NXTERM_FONTCOLOR - The color of the fonts to use in the
375 * NxTerm window. Default: MKRGB(0,0,0)
376 * CONFIG_NXWM_NXTERM_FONTID - The ID of the font to use in the NxTerm
377 * window. Default: CONFIG_NXWM_DEFAULT_FONTID
378 * CONFIG_NXWM_NXTERM_ICON - The glyph to use as the NxTerm icon
379 */
380
381 #ifdef CONFIG_NXWM_NXTERM
382 # ifndef CONFIG_NXWM_NXTERM_PRIO
383 # define CONFIG_NXWM_NXTERM_PRIO SCHED_PRIORITY_DEFAULT
384 # endif
385
386 # if CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWM_NXTERM_PRIO
387 # warning "CONFIG_NXSTART_SERVERPRIO <= CONFIG_NXWM_NXTERM_PRIO"
388 # warning" -- This can result in data overrun errors"
389 # endif
390
391 # ifndef CONFIG_NXWM_NXTERM_STACKSIZE
392 # define CONFIG_NXWM_NXTERM_STACKSIZE 2048
393 # endif
394
395 # ifndef CONFIG_NXWM_NXTERM_WCOLOR
396 # define CONFIG_NXWM_NXTERM_WCOLOR CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
397 # endif
398
399 # ifndef CONFIG_NXWM_NXTERM_FONTCOLOR
400 # define CONFIG_NXWM_NXTERM_FONTCOLOR CONFIG_NXWM_DEFAULT_FONTCOLOR
401 # endif
402
403 # ifndef CONFIG_NXWM_NXTERM_FONTID
404 # define CONFIG_NXWM_NXTERM_FONTID CONFIG_NXWM_DEFAULT_FONTID
405 # endif
406
407 /**
408 * The NxTerm window glyph
409 */
410
411 # ifndef CONFIG_NXWM_NXTERM_ICON
412 # define CONFIG_NXWM_NXTERM_ICON NxWM::g_cmdBitmap
413 # endif
414 #endif
415
416 /* Touchscreen device *******************************************************/
417 /**
418 * Touchscreen device settings
419 *
420 * CONFIG_NXWM_TOUCHSCREEN_DEVNO - Touchscreen device minor number, i.e., the
421 * N in /dev/inputN. Default: 0
422 * CONFIG_NXWM_TOUCHSCREEN_DEVPATH - The full path to the touchscreen device.
423 * Default: "/dev/input0"
424 * CONFIG_NXWM_TOUCHSCREEN_SIGNO - The realtime signal used to wake up the
425 * touchscreen listener thread. Default: 5
426 * CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO - Priority of the touchscreen listener
427 * thread. Default: (SCHED_PRIORITY_DEFAULT + 20)
428 * CONFIG_NXWM_TOUCHSCREEN_LISTENERSTACK - Touchscreen listener thread stack
429 * size. Default 1024
430 */
431
432 #ifndef CONFIG_NXWM_TOUCHSCREEN_DEVNO
433 # define CONFIG_NXWM_TOUCHSCREEN_DEVNO 0
434 #endif
435
436 #ifndef CONFIG_NXWM_TOUCHSCREEN_DEVPATH
437 # define CONFIG_NXWM_TOUCHSCREEN_DEVPATH "/dev/input0"
438 #endif
439
440 #ifndef CONFIG_NXWM_TOUCHSCREEN_SIGNO
441 # define CONFIG_NXWM_TOUCHSCREEN_SIGNO 5
442 #endif
443
444 #ifndef CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO
445 # define CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO (SCHED_PRIORITY_DEFAULT + 20)
446 #endif
447
448 #if CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO <= CONFIG_NXWM_CALIBRATION_LISTENERPRIO
449 # warning You should have CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO > CONFIG_NXWM_CALIBRATION_LISTENERPRIO
450 #endif
451
452 #ifndef CONFIG_NXWM_TOUCHSCREEN_LISTENERSTACK
453 # define CONFIG_NXWM_TOUCHSCREEN_LISTENERSTACK 1024
454 #endif
455
456 /* Keyboard device **********************************************************/
457 /**
458 * Keyboard device settings
459 *
460 * CONFIG_NXWM_KEYBOARD_DEVPATH - The full path to the keyboard device.
461 * Default: "/dev/console"
462 * CONFIG_NXWM_KEYBOARD_SIGNO - The realtime signal used to wake up the
463 * touchscreen listener thread. Default: 6
464 * CONFIG_NXWM_KEYBOARD_BUFSIZE - The size of the keyboard read data buffer.
465 * Default: 16
466 * CONFIG_NXWM_KEYBOARD_LISTENERPRIO - Priority of the touchscreen listener
467 * thread. Default: (SCHED_PRIORITY_DEFAULT + 20)
468 * CONFIG_NXWM_KEYBOARD_LISTENERSTACK - Keyboard listener thread stack
469 * size. Default 1024
470 */
471
472 #ifndef CONFIG_NXWM_KEYBOARD_DEVPATH
473 # define CONFIG_NXWM_KEYBOARD_DEVPATH "/dev/console"
474 #endif
475
476 #ifndef CONFIG_NXWM_KEYBOARD_SIGNO
477 # define CONFIG_NXWM_KEYBOARD_SIGNO 6
478 #endif
479
480 #ifndef CONFIG_NXWM_KEYBOARD_BUFSIZE
481 # define CONFIG_NXWM_KEYBOARD_BUFSIZE 6
482 #endif
483
484 #ifndef CONFIG_NXWM_KEYBOARD_LISTENERPRIO
485 # define CONFIG_NXWM_KEYBOARD_LISTENERPRIO (SCHED_PRIORITY_DEFAULT + 20)
486 #endif
487
488 #ifndef CONFIG_NXWM_KEYBOARD_LISTENERSTACK
489 # define CONFIG_NXWM_KEYBOARD_LISTENERSTACK 1024
490 #endif
491
492 /* Calibration display ******************************************************/
493 /**
494 * Calibration display settings:
495 *
496 * CONFIG_NXWM_CALIBRATION_BACKGROUNDCOLOR - The background color of the
497 * touchscreen calibration display. Default: Same as
498 * CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
499 * CONFIG_NXWM_CALIBRATION_LINECOLOR - The color of the lines used in the
500 * touchscreen calibration display. Default: MKRGB(0, 0, 128) (dark blue)
501 * CONFIG_NXWM_CALIBRATION_CIRCLECOLOR - The color of the circle in the
502 * touchscreen calibration display. Default: MKRGB(255, 255, 255) (white)
503 * CONFIG_NXWM_CALIBRATION_TOUCHEDCOLOR - The color of the circle in the
504 * touchscreen calibration display after the touch is recorder. Default:
505 * MKRGB(255, 255, 96) (very light yellow)
506 * CONFIG_NXWM_CALIBRATION_FONTID - Use this default NxWidgets font ID
507 * instead of the system font ID (NXFONT_DEFAULT).
508 * CONFIG_NXWM_CALIBRATION_ICON - The ICON to use for the touchscreen
509 * calibration application. Default: NxWM::g_calibrationBitmap
510 * CONFIG_NXWM_CALIBRATION_SIGNO - The realtime signal used to wake up the
511 * touchscreen calibration thread. Default: 5
512 * CONFIG_NXWM_CALIBRATION_LISTENERPRIO - Priority of the calibration listener
513 * thread. Default: SCHED_PRIORITY_DEFAULT
514 * CONFIG_NXWM_CALIBRATION_LISTENERSTACK - Calibration listener thread stack
515 * size. Default 2048
516 * CONFIG_NXWM_CALIBRATION_MARGIN
517 * The Calbration display consists of a target press offset from the edges
518 * of the display by this number of pixels (in the horizontal direction)
519 * or rows (in the vertical). The closer that you can comfortably
520 * position the press positions to the edge, the more accurate will be the
521 * linear interpolation (provide that the hardware provides equally good
522 * measurements near the edges).
523 */
524
525 #ifndef CONFIG_NXWM_CALIBRATION_BACKGROUNDCOLOR
526 # define CONFIG_NXWM_CALIBRATION_BACKGROUNDCOLOR CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
527 #endif
528
529 #ifndef CONFIG_NXWM_CALIBRATION_LINECOLOR
530 # define CONFIG_NXWM_CALIBRATION_LINECOLOR MKRGB(0, 0, 128)
531 #endif
532
533 #ifndef CONFIG_NXWM_CALIBRATION_CIRCLECOLOR
534 # define CONFIG_NXWM_CALIBRATION_CIRCLECOLOR MKRGB(255, 255, 255)
535 #endif
536
537 #ifndef CONFIG_NXWM_CALIBRATION_TOUCHEDCOLOR
538 # define CONFIG_NXWM_CALIBRATION_TOUCHEDCOLOR MKRGB(255, 255, 96)
539 #endif
540
541 #ifndef CONFIG_NXWM_CALIBRATION_FONTID
542 # define CONFIG_NXWM_CALIBRATION_FONTID NXFONT_DEFAULT
543 #endif
544
545 #ifndef CONFIG_NXWM_CALIBRATION_ICON
546 # define CONFIG_NXWM_CALIBRATION_ICON NxWM::g_calibrationBitmap
547 #endif
548
549 #ifndef CONFIG_NXWM_CALIBRATION_SIGNO
550 # define CONFIG_NXWM_CALIBRATION_SIGNO 5
551 #endif
552
553 #ifndef CONFIG_NXWM_CALIBRATION_LISTENERPRIO
554 # define CONFIG_NXWM_CALIBRATION_LISTENERPRIO SCHED_PRIORITY_DEFAULT
555 #endif
556
557 #ifndef CONFIG_NXWM_CALIBRATION_LISTENERSTACK
558 # define CONFIG_NXWM_CALIBRATION_LISTENERSTACK 2048
559 #endif
560
561 #ifndef CONFIG_NXWM_CALIBRATION_MARGIN
562 # define CONFIG_NXWM_CALIBRATION_MARGIN 40
563 #endif
564
565 // Calibration sample averaging
566
567 #ifndef CONFIG_NXWM_CALIBRATION_AVERAGE
568 # undef CONFIG_NXWM_CALIBRATION_AVERAGE
569 # undef CONFIG_NXWM_CALIBRATION_NSAMPLES
570 # define CONFIG_NXWM_CALIBRATION_NSAMPLES 1
571 # undef CONFIG_NXWM_CALIBRATION_DISCARD_MINMAX
572 #endif
573
574 #if !defined(CONFIG_NXWM_CALIBRATION_NSAMPLES) || CONFIG_NXWM_CALIBRATION_NSAMPLES < 2
575 # undef CONFIG_NXWM_CALIBRATION_AVERAGE
576 # undef CONFIG_NXWM_CALIBRATION_NSAMPLES
577 # define CONFIG_NXWM_CALIBRATION_NSAMPLES 1
578 # undef CONFIG_NXWM_CALIBRATION_DISCARD_MINMAX
579 #endif
580
581 #if CONFIG_NXWM_CALIBRATION_NSAMPLES < 3
582 # undef CONFIG_NXWM_CALIBRATION_DISCARD_MINMAX
583 #endif
584
585 #if CONFIG_NXWM_CALIBRATION_NSAMPLES > 255
586 # define CONFIG_NXWM_CALIBRATION_NSAMPLES 255
587 #endif
588
589 #ifdef CONFIG_NXWM_CALIBRATION_DISCARD_MINMAX
590 # define NXWM_CALIBRATION_NAVERAGE (CONFIG_NXWM_CALIBRATION_NSAMPLES - 2)
591 #else
592 # define NXWM_CALIBRATION_NAVERAGE CONFIG_NXWM_CALIBRATION_NSAMPLES
593 #endif
594
595 /* Hexcalculator applications ***********************************************/
596 /**
597 * Calibration display settings:
598 *
599 * CONFIG_NXWM_HEXCALCULATOR_BACKGROUNDCOLOR - The background color of the
600 * calculator display. Default: Same as CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
601 * CONFIG_NXWM_HEXCALCULATOR_ICON - The ICON to use for the hex calculator
602 * application. Default: NxWM::g_calculatorBitmap
603 * CONFIG_NXWM_HEXCALCULATOR_FONTID - The font used with the calculator.
604 * Default: CONFIG_NXWM_DEFAULT_FONTID
605 */
606
607 #ifndef CONFIG_NXWM_HEXCALCULATOR_BACKGROUNDCOLOR
608 # define CONFIG_NXWM_HEXCALCULATOR_BACKGROUNDCOLOR CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
609 #endif
610
611 #ifndef CONFIG_NXWM_HEXCALCULATOR_ICON
612 # define CONFIG_NXWM_HEXCALCULATOR_ICON NxWM::g_calculatorBitmap
613 #endif
614
615 #ifndef CONFIG_NXWM_HEXCALCULATOR_FONTID
616 # define CONFIG_NXWM_HEXCALCULATOR_FONTID CONFIG_NXWM_DEFAULT_FONTID
617 #endif
618
619 /* Media Player application ***********************************************/
620 /**
621 *
622 * CONFIG_NXWM_HEXCALCULATOR_BACKGROUNDCOLOR - The background color of the
623 * calculator display. Default: Same as CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
624 * CONFIG_NXWM_HEXCALCULATOR_ICON - The ICON to use for the hex calculator
625 * application. Default: NxWM::g_calculatorBitmap
626 * CONFIG_NXWM_HEXCALCULATOR_FONTID - The font used with the calculator.
627 * Default: CONFIG_NXWM_DEFAULT_FONTID
628 */
629
630 #ifndef CONFIG_NXWM_MEDIAPLAYER_PREFERRED_DEVICE
631 # define CONFIG_NXWM_MEDIAPLAYER_PREFERRED_DEVICE "pcm0"
632 #endif
633
634 #ifndef CONFIG_NXWM_MEDIAPLAYER_MEDIAPATH
635 # define CONFIG_NXWM_MEDIAPLAYER_MEDIAPATH "/mnt/sdcard"
636 #endif
637
638 #ifndef CONFIG_NXWM_MEDIAPLAYER_BACKGROUNDCOLOR
639 # define CONFIG_NXWM_MEDIAPLAYER_BACKGROUNDCOLOR CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
640 #endif
641
642 #ifndef CONFIG_NXWM_MEDIAPLAYER_XSPACING
643 # define CONFIG_NXWM_MEDIAPLAYER_XSPACING 12
644 #endif
645
646 #ifndef CONFIG_NXWM_MEDIAPLAYER_YSPACING
647 # define CONFIG_NXWM_MEDIAPLAYER_YSPACING 8
648 #endif
649
650 #ifndef CONFIG_NXWM_MEDIAPLAYER_VOLUMESTEP
651 # define CONFIG_NXWM_MEDIAPLAYER_VOLUMESTEP 5
652 #endif
653
654 #ifndef CONFIG_NXWM_MEDIAPLAYER_MINVOLUMEHEIGHT
655 # define CONFIG_NXWM_MEDIAPLAYER_MINVOLUMEHEIGHT 6
656 #endif
657
658 #ifndef CONFIG_NXWM_MEDIAPLAYER_VOLUMECOLOR
659 # define CONFIG_NXWM_MEDIAPLAYER_VOLUMECOLOR MKRGB(63,90,192)
660 #endif
661
662 #ifndef CONFIG_NXWM_MEDIAPLAYER_ICON
663 # define CONFIG_NXWM_MEDIAPLAYER_ICON NxWM::g_mediaplayerBitmap
664 #endif
665
666 #ifndef CONFIG_NXWM_MPLAYER_FWD_ICON
667 # define CONFIG_NXWM_MPLAYER_FWD_ICON NxWM::g_mplayerFwdBitmap
668 #endif
669
670 #ifndef CONFIG_NXWM_MPLAYER_PLAY_ICON
671 # define CONFIG_NXWM_MPLAYER_PLAY_ICON NxWM::g_mplayerPlayBitmap
672 #endif
673
674 #ifndef CONFIG_NXWM_MPLAYER_PAUSE_ICON
675 # define CONFIG_NXWM_MPLAYER_PAUSE_ICON NxWM::g_mplayerPauseBitmap
676 #endif
677
678 #ifndef CONFIG_NXWM_MPLAYER_REW_ICON
679 # define CONFIG_NXWM_MPLAYER_REW_ICON NxWM::g_mplayerRewBitmap
680 #endif
681
682 #ifndef CONFIG_NXWM_MPLAYER_VOL_ICON
683 # define CONFIG_NXWM_MPLAYER_VOL_ICON NxWM::g_mplayerVolBitmap
684 #endif
685
686 #ifndef CONFIG_NXWM_MEDIAPLAYER_FONTID
687 # define CONFIG_NXWM_MEDIAPLAYER_FONTID CONFIG_NXWM_DEFAULT_FONTID
688 #endif
689
690 /****************************************************************************
691 * Global Function Prototypes
692 ****************************************************************************/
693 /**
694 * Hook to support monitoring of memory usage by the NxWM unit test.
695 */
696
697 #ifdef CONFIG_NXWM_UNITTEST
698 # ifdef CONFIG_HAVE_FILENAME
699 void _showTestStepMemory(FAR const char *file, int line, FAR const char *msg);
700 # define showTestStepMemory(msg) \
701 _showTestStepMemory((FAR const char*)__FILE__, (int)__LINE__, msg)
702 # else
703 void showTestStepMemory(FAR const char *msg);
704 # endif
705 #else
706 # define showTestStepMemory(msg)
707 #endif
708
709 #endif // __INCLUDE_NXWMCONFIG_HXX
crlepalettebitmap.hxx
showTestStepMemory
void showTestStepMemory(FAR const char *msg)
_showTestStepMemory
void _showTestStepMemory(FAR const char *file, int line, FAR const char *msg)
nxconfig.hxx