summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-07 21:25:24 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-07 21:25:24 +0000
commit9bc51533db436502b50aaa0014aa272576968df2 (patch)
tree69130cca051fdf38817fd4c99502b30f804981e8 /NxWidgets/libnxwidgets/include
parent1d7b4d2140b3d4dec9554a333e0e442103e3708f (diff)
downloadnuttx-9bc51533db436502b50aaa0014aa272576968df2.tar.gz
nuttx-9bc51533db436502b50aaa0014aa272576968df2.tar.bz2
nuttx-9bc51533db436502b50aaa0014aa272576968df2.zip
Various fixes for running the NxWM unit test on the STM3240G-EVAL
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4711 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/include')
-rw-r--r--NxWidgets/libnxwidgets/include/cgraphicsport.hxx15
-rw-r--r--NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx8
2 files changed, 16 insertions, 7 deletions
diff --git a/NxWidgets/libnxwidgets/include/cgraphicsport.hxx b/NxWidgets/libnxwidgets/include/cgraphicsport.hxx
index 404fb1d51..8eea3d689 100644
--- a/NxWidgets/libnxwidgets/include/cgraphicsport.hxx
+++ b/NxWidgets/libnxwidgets/include/cgraphicsport.hxx
@@ -79,6 +79,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "nxconfig.hxx"
#include "inxwindow.hxx"
/****************************************************************************
@@ -105,16 +106,26 @@ namespace NXWidgets
class CGraphicsPort
{
private:
- INxWindow *m_pNxWnd; /**< NX window interface. */
+ INxWindow *m_pNxWnd; /**< NX window interface. */
+#ifdef CONFIG_NX_WRITEONLY
+ nxgl_mxpixel_t m_backColor; /**< The background color to use */
+#endif
public:
/**
* Constructor.
*
- * @param pNxWnd An instance of the underlying window type.
+ * @param pNxWnd. An instance of the underlying window type.
+ * @param backColor. The background color is only needed if we
+ * cannot read from the graphics device.
*/
+#ifdef CONFIG_NX_WRITEONLY
+ CGraphicsPort(INxWindow *pNxWnd,
+ nxgl_mxpixel_t backColor = CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR);
+#else
CGraphicsPort(INxWindow *pNxWnd);
+#endif
/**
* Destructor.
diff --git a/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx b/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
index 72713f2c4..db7cb06b6 100644
--- a/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
+++ b/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
@@ -166,6 +166,8 @@ namespace NXWidgets
TNxArray<CNxWidget*> m_widgets; /**< List of controlled
widgets. */
bool m_modal; /**< True: in modal loop */
+ bool m_haveGeometry; /**< True: indicates that we
+ have valid geometry data. */
sem_t m_modalSem; /**< Modal loops waits for
events on this semaphore */
/**
@@ -669,11 +671,7 @@ namespace NXWidgets
* CGraphicsPort instance
*/
- inline bool createGraphicsPort(INxWindow *window)
- {
- m_port = new CGraphicsPort(window);
- return m_port != (CGraphicsPort *)NULL;
- }
+ bool createGraphicsPort(INxWindow *window);
/**
* Get the CGraphicsPort instance for drawing on this window