summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-03 19:46:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-03 19:46:37 +0000
commitcb842a3b50a28145bb8be977f4e9a7069701c88d (patch)
treeceff943c049bd7cbe1d9f4ed7ab836f8039098e6 /NxWidgets/nxwm
parenta85f1d89916f8f0302c9f8cd77645a0c60fc93dc (diff)
downloadpx4-nuttx-cb842a3b50a28145bb8be977f4e9a7069701c88d.tar.gz
px4-nuttx-cb842a3b50a28145bb8be977f4e9a7069701c88d.tar.bz2
px4-nuttx-cb842a3b50a28145bb8be977f4e9a7069701c88d.zip
Upated NxWM comments
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4692 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm')
-rw-r--r--NxWidgets/nxwm/include/capplicationwindow.hxx4
-rw-r--r--NxWidgets/nxwm/include/cstartwindow.hxx2
-rw-r--r--NxWidgets/nxwm/include/ctaskbar.hxx2
-rw-r--r--NxWidgets/nxwm/include/nxwmconfig.hxx19
-rw-r--r--NxWidgets/nxwm/src/cnxconsole.cxx6
-rw-r--r--NxWidgets/nxwm/src/cstartwindow.cxx2
-rw-r--r--NxWidgets/nxwm/src/ctaskbar.cxx2
7 files changed, 32 insertions, 5 deletions
diff --git a/NxWidgets/nxwm/include/capplicationwindow.hxx b/NxWidgets/nxwm/include/capplicationwindow.hxx
index 167f51997..924389709 100644
--- a/NxWidgets/nxwm/include/capplicationwindow.hxx
+++ b/NxWidgets/nxwm/include/capplicationwindow.hxx
@@ -184,6 +184,7 @@ namespace NxWM
* used during automated testing of NxWM.
*/
+#ifdef CONFIG_NXWM_UNITTEST
inline void clickMinimizeIcon(int index)
{
// Get the size and position of the widget
@@ -198,12 +199,14 @@ namespace NxWM
m_minimizeImage->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1));
}
+#endif
/**
* Simulate a mouse click on the stop applicaiton icon. This inline method is only
* used during automated testing of NxWM.
*/
+#ifdef CONFIG_NXWM_UNITTEST
inline void clickStopIcon(int index)
{
// Get the size and position of the widget
@@ -218,6 +221,7 @@ namespace NxWM
m_stopImage->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1));
}
+#endif
};
}
diff --git a/NxWidgets/nxwm/include/cstartwindow.hxx b/NxWidgets/nxwm/include/cstartwindow.hxx
index 5eeb51781..924cc7d05 100644
--- a/NxWidgets/nxwm/include/cstartwindow.hxx
+++ b/NxWidgets/nxwm/include/cstartwindow.hxx
@@ -209,6 +209,7 @@ namespace NxWM
* used during automated testing of NxWM.
*/
+#ifdef CONFIG_NXWM_UNITTEST
inline void clickIcon(int index)
{
if (index < m_slots.size())
@@ -230,6 +231,7 @@ namespace NxWM
image->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1));
}
}
+#endif
};
}
diff --git a/NxWidgets/nxwm/include/ctaskbar.hxx b/NxWidgets/nxwm/include/ctaskbar.hxx
index c290cb8ae..4e12fdb2c 100644
--- a/NxWidgets/nxwm/include/ctaskbar.hxx
+++ b/NxWidgets/nxwm/include/ctaskbar.hxx
@@ -366,6 +366,7 @@ namespace NxWM
* used during automated testing of NxWM.
*/
+#ifdef CONFIG_NXWM_UNITTEST
inline void clickIcon(int index)
{
if (index < m_slots.size())
@@ -387,6 +388,7 @@ namespace NxWM
image->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1));
}
}
+#endif
};
}
diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx
index 59ae1e79d..99383fe02 100644
--- a/NxWidgets/nxwm/include/nxwmconfig.hxx
+++ b/NxWidgets/nxwm/include/nxwmconfig.hxx
@@ -301,4 +301,23 @@
# define CONFIG_NXWM_NXCONSOLE_FONTID CONFIG_NXWM_DEFAULT_FONTID
#endif
+/****************************************************************************
+ * Global Function Prototypes
+ ****************************************************************************/
+/**
+ * Hook to support monitoring of memory usage by the NxWM unit test.
+ */
+
+#ifdef CONFIG_NXWM_UNITTEST
+# ifdef CONFIG_HAVE_FILENAME
+void _showTestStepMemory(FAR const char *file, int line, FAR const char *msg);
+# define showTestStepMemory(msg) \
+ _showTestStepMemory((FAR const char*)__FILE__, (int)__LINE__, msg)
+# else
+void showTestStepMemory(FAR const char *msg);
+# endif
+#else
+# define showTestStepMemory(msg)
+#endif
+
#endif // __INCLUDE_NXWMCONFIG_HXX
diff --git a/NxWidgets/nxwm/src/cnxconsole.cxx b/NxWidgets/nxwm/src/cnxconsole.cxx
index 3cf5e13b9..fb6ca680a 100644
--- a/NxWidgets/nxwm/src/cnxconsole.cxx
+++ b/NxWidgets/nxwm/src/cnxconsole.cxx
@@ -357,7 +357,9 @@ int CNxConsole::nxconsole(int argc, char *argv[])
}
// Now re-direct stdout and stderr so that they use the NX console driver.
- // Note that stdin is retained (file descriptor 0, probably the the serial console).
+ // Notes: (1) stdin is retained (file descriptor 0, probably the the serial
+ // console). (2) Don't bother trying to put debug instrumentation in the
+ // following becaue it will end up in the NxConsole window.
(void)std::fflush(stdout);
(void)std::fflush(stderr);
@@ -372,7 +374,7 @@ int CNxConsole::nxconsole(int argc, char *argv[])
std::close(fd);
- // Inform the parent thread that we successfully initialize
+ // Inform the parent thread that we successfully initialized
g_nxconvars.result = true;
sem_post(&g_nxconvars.sem);
diff --git a/NxWidgets/nxwm/src/cstartwindow.cxx b/NxWidgets/nxwm/src/cstartwindow.cxx
index 3190f50d9..f25ed8d2b 100644
--- a/NxWidgets/nxwm/src/cstartwindow.cxx
+++ b/NxWidgets/nxwm/src/cstartwindow.cxx
@@ -457,5 +457,3 @@ void CStartWindow::handleClickEvent(const NXWidgets::CWidgetEventArgs &e)
}
}
-
-
diff --git a/NxWidgets/nxwm/src/ctaskbar.cxx b/NxWidgets/nxwm/src/ctaskbar.cxx
index 2ba0c4b08..2c6bf660b 100644
--- a/NxWidgets/nxwm/src/ctaskbar.cxx
+++ b/NxWidgets/nxwm/src/ctaskbar.cxx
@@ -706,7 +706,7 @@ bool CTaskbar::createTaskbarWindow(void)
* @param pPos The new position of the window.
* @return True on success, false on failure.
*/
-
+
m_taskbar->setPosition(&pos);
m_taskbar->setSize(&size);
return true;