NxWM: Can now disable the NxConsole window. STM3240G-EVAL knxwm: Disabled the NxConsole for now because there are issues with the kernel build.
This commit is contained in:
parent
bd7cb3d58a
commit
39f42b1cf8
14
Kconfig
14
Kconfig
@ -640,7 +640,14 @@ config NXWM_STARTWINDOW_STACKSIZE
|
||||
|
||||
endmenu # Start Window Configuration
|
||||
|
||||
menu "NxConsole Window Configuration"
|
||||
menuconfig NXWM_NXCONSOLE
|
||||
bool "NxConsole Window"
|
||||
default y
|
||||
---help---
|
||||
Enable support for the NxConsole window which provides a text window
|
||||
in which you can interact with NSH.
|
||||
|
||||
if NXWM_NXCONSOLE
|
||||
|
||||
config NXWM_NXCONSOLE_PRIO
|
||||
int "NxConsole Task Priority"
|
||||
@ -716,8 +723,7 @@ config NXWM_NXCONSOLE_ICON
|
||||
The glyph to use as the NxConsole icon. Default: NxWM::g_cmdBitmap
|
||||
|
||||
endif # NXWM_NXCONSOLE_ICON
|
||||
|
||||
endmenu # NxConsole Window Configuration
|
||||
endif # NXWM_NXCONSOLE
|
||||
|
||||
menu "NxWM Touchscreen Configuration"
|
||||
|
||||
@ -1049,7 +1055,7 @@ endif # NXWM_HEXCALCULATOR_FONTID
|
||||
endmenu # NxWM Hex Calculator display settings
|
||||
|
||||
config NXWM_MEDIAPLAYER
|
||||
bool "Enable NxWM Media Player"
|
||||
bool "NxWM Media Player"
|
||||
default n
|
||||
---help---
|
||||
Enable support for the MP3 Media Player. This features requires
|
||||
|
@ -50,7 +50,11 @@
|
||||
|
||||
#include "ctaskbar.hxx"
|
||||
#include "cstartwindow.hxx"
|
||||
#include "cnxconsole.hxx"
|
||||
|
||||
#ifdef CONFIG_NXWM_NXCONSOLE
|
||||
# include "cnxconsole.hxx"
|
||||
#endif
|
||||
|
||||
#include "chexcalculator.hxx"
|
||||
|
||||
#ifdef CONFIG_NXWM_MEDIAPLAYER
|
||||
@ -544,6 +548,7 @@ static bool createCalibration(void)
|
||||
// Name: createNxConsole
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef CONFIG_NXWM_NXCONSOLE
|
||||
static bool createNxConsole(void)
|
||||
{
|
||||
// Add the NxConsole application to the start window
|
||||
@ -568,6 +573,7 @@ static bool createNxConsole(void)
|
||||
showTestCaseMemory("createNxConsole: After adding the NxConsole application");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: createHexCalculator
|
||||
@ -589,7 +595,7 @@ static bool createHexCalculator(void)
|
||||
printf("createHexCalculator: Adding the hex calculator application to the start window\n");
|
||||
if (!g_nxwmtest.startwindow->addApplication(calculator))
|
||||
{
|
||||
printf("createHexCalculator: ERROR: Failed to add CNxConsoleFactory to the start window\n");
|
||||
printf("createHexCalculator: ERROR: Failed to add CHexCalculatorFactory to the start window\n");
|
||||
delete calculator;
|
||||
return false;
|
||||
}
|
||||
@ -619,7 +625,7 @@ static bool createMediaPlayer(void)
|
||||
printf("createMediaPlayer: Adding the hex calculator application to the start window\n");
|
||||
if (!g_nxwmtest.startwindow->addApplication(mediaplayer))
|
||||
{
|
||||
printf("createMediaPlayer: ERROR: Failed to add CNxConsoleFactory to the start window\n");
|
||||
printf("createMediaPlayer: ERROR: Failed to add CMediaPlayerFactory to the start window\n");
|
||||
delete mediaplayer;
|
||||
return false;
|
||||
}
|
||||
@ -672,6 +678,7 @@ int nxwm_main(int argc, char *argv[])
|
||||
|
||||
// Initialize the NSH library
|
||||
|
||||
#ifdef CONFIG_NXWM_NXCONSOLE
|
||||
printf("nxwm_main: Initialize the NSH library\n");
|
||||
if (!NxWM::nshlibInitialize())
|
||||
{
|
||||
@ -679,6 +686,7 @@ int nxwm_main(int argc, char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
showTestCaseMemory("nxwm_main: After initializing the NSH library");
|
||||
#endif
|
||||
|
||||
// Create the task bar.
|
||||
|
||||
@ -728,11 +736,13 @@ int nxwm_main(int argc, char *argv[])
|
||||
|
||||
// Create the NxConsole application and add it to the start window
|
||||
|
||||
#ifdef CONFIG_NXWM_NXCONSOLE
|
||||
if (!createNxConsole())
|
||||
{
|
||||
printf("nxwm_main: ERROR: Failed to create the NxConsole application\n");
|
||||
testCleanUpAndExit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Create the hex calculator application and add it to the start window
|
||||
|
||||
@ -822,7 +832,8 @@ int nxwm_main(int argc, char *argv[])
|
||||
showTestCaseMemory("nxwm_main: After clicking the start window icon");
|
||||
|
||||
// Wait bit to see the result of the button press. Then press the first icon
|
||||
// in the start menu. That should be the NxConsole icon.
|
||||
// in the start menu. That should be the NxConsole icon (if the NXCONSOLE
|
||||
// is not disabled).
|
||||
|
||||
sleep(2);
|
||||
g_nxwmtest.startwindow->clickIcon(0, true);
|
||||
|
@ -58,11 +58,11 @@
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Implementation Classes
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
namespace NXWidgets
|
||||
@ -98,7 +98,7 @@ namespace NXWidgets
|
||||
#endif
|
||||
|
||||
// Methods in the callback vtable
|
||||
|
||||
|
||||
/**
|
||||
* Re-Draw Callback. The redraw event is handled by CWidgetControl::redrawEvent.
|
||||
*
|
||||
@ -113,7 +113,7 @@ namespace NXWidgets
|
||||
* @param arg User provided argument (see nx_openwindow, nx_requestbg,
|
||||
* nxtk_openwindow, or nxtk_opentoolbar).
|
||||
*/
|
||||
|
||||
|
||||
static void redraw(NXHANDLE hwnd, FAR const struct nxgl_rect_s *rect,
|
||||
bool bMore, FAR void *arg);
|
||||
|
||||
@ -157,7 +157,7 @@ namespace NXWidgets
|
||||
* @param arg User provided argument (see nx_openwindow, nx_requestbg,
|
||||
* nxtk_openwindow, or nxtk_opentoolbar).
|
||||
*/
|
||||
|
||||
|
||||
#ifdef CONFIG_NX_MOUSE
|
||||
static void newMouseEvent(NXHANDLE hwnd,
|
||||
FAR const struct nxgl_point_s *pos,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* NxWidgets/libnxwidgets/src/ccallback.cxx
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -102,7 +102,7 @@ CCallback::CCallback(CWidgetControl *widgetControl)
|
||||
* @param arg User provided argument (see nx_openwindow, nx_requestbg,
|
||||
* nxtk_openwindow, or nxtk_opentoolbar).
|
||||
*/
|
||||
|
||||
|
||||
void CCallback::redraw(NXHANDLE hwnd,
|
||||
FAR const struct nxgl_rect_s *rect,
|
||||
bool bMore, FAR void *arg)
|
||||
@ -171,7 +171,7 @@ void CCallback::newMouseEvent(NXHANDLE hwnd,
|
||||
FAR const struct nxgl_point_s *pos,
|
||||
uint8_t buttons, FAR void *arg)
|
||||
{
|
||||
gvdbg("hwnd=%p pos=(%d,%d) buttons=%02x arg=%p\n",
|
||||
gvdbg("hwnd=%p pos=(%d,%d) buttons=%02x arg=%p\n",
|
||||
hwnd, pos->x, pos->y, buttons, arg);
|
||||
|
||||
// The argument must be the CCallback instance
|
||||
|
@ -64,12 +64,16 @@ endif
|
||||
|
||||
# Applications
|
||||
|
||||
CXXSRCS += cstartwindow.cxx cnxconsole.cxx chexcalculator.cxx
|
||||
CXXSRCS += cstartwindow.cxx chexcalculator.cxx
|
||||
|
||||
ifeq ($(CONFIG_NXWM_TOUCHSCREEN),y)
|
||||
CXXSRCS += ccalibration.cxx
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NXWM_NXCONSOLE),y)
|
||||
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
|
||||
|
@ -85,10 +85,11 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* NxConsole support is (probably) required
|
||||
* NxConsole support is (probably) required if CONFIG_NXWM_NXCONSOLE is
|
||||
* selected
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NXCONSOLE
|
||||
#if defined(CONFIG_NXWM_NXCONSOLE) && !defined(CONFIG_NXCONSOLE)
|
||||
# warning "NxConsole support may be needed (CONFIG_NXCONSOLE)"
|
||||
#endif
|
||||
|
||||
@ -122,7 +123,7 @@
|
||||
* Default: MKRGB(255,255,255)
|
||||
* CONFIG_NXWM_DEFAULT_SHADOWEDGECOLOR - Color of the shadowed edge of a border.
|
||||
* Default: MKRGB(0,0,0)
|
||||
* CONFIG_NXWM_DEFAULT_FONTCOLOR - Default fong color. Default:
|
||||
* CONFIG_NXWM_DEFAULT_FONTCOLOR - Default font color. Default:
|
||||
* MKRGB(0,0,0)
|
||||
* CONFIG_NXWM_TRANSPARENT_COLOR - The "transparent" color. Default:
|
||||
* MKRGB(0,0,0)
|
||||
@ -172,7 +173,7 @@
|
||||
# define CONFIG_NXWM_TRANSPARENT_COLOR MKRGB(0,0,0)
|
||||
#endif
|
||||
|
||||
/* Task Bar Configuation ***************************************************/
|
||||
/* Task Bar Configuration **************************************************/
|
||||
/**
|
||||
* Horizontal and vertical spacing of icons in the task bar.
|
||||
*
|
||||
@ -288,7 +289,7 @@
|
||||
* Used to communicated from CWindowMessenger to the start window thread.
|
||||
* Default: "/dev/nxwm"
|
||||
* CONFIG_NXWM_STARTWINDOW_MXMSGS - The maximum number of messages to queue
|
||||
* before blocking. Defualt 32
|
||||
* before blocking. Default 32
|
||||
* CONFIG_NXWM_STARTWINDOW_MXMPRIO - The message priority. Default: 42.
|
||||
* CONFIG_NXWM_STARTWINDOW_PRIO - Priority of the StartWindoW task. Default:
|
||||
* SCHED_PRIORITY_DEFAULT. NOTE: This priority should be less than
|
||||
@ -368,37 +369,39 @@
|
||||
* CONFIG_NXWM_NXCONSOLE_ICON - The glyph to use as the NxConsole icon
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NXWM_NXCONSOLE_PRIO
|
||||
# define CONFIG_NXWM_NXCONSOLE_PRIO SCHED_PRIORITY_DEFAULT
|
||||
#endif
|
||||
#ifdef CONFIG_NXWM_NXCONSOLE
|
||||
# ifndef CONFIG_NXWM_NXCONSOLE_PRIO
|
||||
# define CONFIG_NXWM_NXCONSOLE_PRIO SCHED_PRIORITY_DEFAULT
|
||||
# endif
|
||||
|
||||
#if CONFIG_NXWIDGETS_SERVERPRIO <= CONFIG_NXWM_NXCONSOLE_PRIO
|
||||
# warning "CONFIG_NXWIDGETS_SERVERPRIO <= CONFIG_NXWM_NXCONSOLE_PRIO"
|
||||
# warning" -- This can result in data overrun errors"
|
||||
#endif
|
||||
# if CONFIG_NXWIDGETS_SERVERPRIO <= CONFIG_NXWM_NXCONSOLE_PRIO
|
||||
# warning "CONFIG_NXWIDGETS_SERVERPRIO <= CONFIG_NXWM_NXCONSOLE_PRIO"
|
||||
# warning" -- This can result in data overrun errors"
|
||||
# endif
|
||||
|
||||
#ifndef CONFIG_NXWM_NXCONSOLE_STACKSIZE
|
||||
# define CONFIG_NXWM_NXCONSOLE_STACKSIZE 2048
|
||||
#endif
|
||||
# ifndef CONFIG_NXWM_NXCONSOLE_STACKSIZE
|
||||
# define CONFIG_NXWM_NXCONSOLE_STACKSIZE 2048
|
||||
# endif
|
||||
|
||||
#ifndef CONFIG_NXWM_NXCONSOLE_WCOLOR
|
||||
# define CONFIG_NXWM_NXCONSOLE_WCOLOR CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
|
||||
#endif
|
||||
# ifndef CONFIG_NXWM_NXCONSOLE_WCOLOR
|
||||
# define CONFIG_NXWM_NXCONSOLE_WCOLOR CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR
|
||||
# endif
|
||||
|
||||
#ifndef CONFIG_NXWM_NXCONSOLE_FONTCOLOR
|
||||
# define CONFIG_NXWM_NXCONSOLE_FONTCOLOR CONFIG_NXWM_DEFAULT_FONTCOLOR
|
||||
#endif
|
||||
# ifndef CONFIG_NXWM_NXCONSOLE_FONTCOLOR
|
||||
# define CONFIG_NXWM_NXCONSOLE_FONTCOLOR CONFIG_NXWM_DEFAULT_FONTCOLOR
|
||||
# endif
|
||||
|
||||
#ifndef CONFIG_NXWM_NXCONSOLE_FONTID
|
||||
# define CONFIG_NXWM_NXCONSOLE_FONTID CONFIG_NXWM_DEFAULT_FONTID
|
||||
#endif
|
||||
# ifndef CONFIG_NXWM_NXCONSOLE_FONTID
|
||||
# define CONFIG_NXWM_NXCONSOLE_FONTID CONFIG_NXWM_DEFAULT_FONTID
|
||||
# endif
|
||||
|
||||
/**
|
||||
* The NxConsole window glyph
|
||||
*/
|
||||
/**
|
||||
* The NxConsole window glyph
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NXWM_NXCONSOLE_ICON
|
||||
# define CONFIG_NXWM_NXCONSOLE_ICON NxWM::g_cmdBitmap
|
||||
# ifndef CONFIG_NXWM_NXCONSOLE_ICON
|
||||
# define CONFIG_NXWM_NXCONSOLE_ICON NxWM::g_cmdBitmap
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Touchscreen device *******************************************************/
|
||||
@ -500,7 +503,7 @@
|
||||
* CONFIG_NXWM_CALIBRATION_MARGIN
|
||||
* The Calbration display consists of a target press offset from the edges
|
||||
* of the display by this number of pixels (in the horizontal direction)
|
||||
* or rows (in the vertical). The closer that you can comfortabley
|
||||
* or rows (in the vertical). The closer that you can comfortably
|
||||
* position the press positions to the edge, the more accurate will be the
|
||||
* linear interpolation (provide that the hardware provides equally good
|
||||
* measurements near the edges).
|
||||
|
Loading…
Reference in New Issue
Block a user