summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/include
diff options
context:
space:
mode:
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