summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/include/cwindowcontrol.hxx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-16 22:43:40 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-16 22:43:40 +0000
commit20958add7b2acc205e71569a3f318196baf7b7cf (patch)
tree5f479cc7c9a1bc538630ddaeae8c57b65b40e780 /NxWidgets/nxwm/include/cwindowcontrol.hxx
parent6d8337323f1d60e7845a83508d4bbd1e0318ec3b (diff)
downloadpx4-nuttx-20958add7b2acc205e71569a3f318196baf7b7cf.tar.gz
px4-nuttx-20958add7b2acc205e71569a3f318196baf7b7cf.tar.bz2
px4-nuttx-20958add7b2acc205e71569a3f318196baf7b7cf.zip
NxWM: Add IApplicationFactory so that we can create multiple instances of applications; And, as a result of that, re-vamp entire threading model. this is now buggier than it was before
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4742 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include/cwindowcontrol.hxx')
-rw-r--r--NxWidgets/nxwm/include/cwindowcontrol.hxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/NxWidgets/nxwm/include/cwindowcontrol.hxx b/NxWidgets/nxwm/include/cwindowcontrol.hxx
index acec12727..91e430c5c 100644
--- a/NxWidgets/nxwm/include/cwindowcontrol.hxx
+++ b/NxWidgets/nxwm/include/cwindowcontrol.hxx
@@ -43,6 +43,8 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <mqueue.h>
+
#include <nuttx/nx/nxtk.h>
#include <nuttx/nx/nxconsole.h>
@@ -62,6 +64,12 @@
namespace NxWM
{
/**
+ * Forward references.
+ */
+
+ class IApplication;
+
+ /**
* The class CWindowControl integrates the widget control with some special
* handling of mouse and keyboard inputs neesed by NxWM
*/
@@ -70,6 +78,9 @@ namespace NxWM
private NXWidgets::CWindowEventHandler
{
private:
+ mqd_t m_mqd; /**< Message queue descriptor used to commincate with the
+ ** start window thread. */
+
/**
* Handle an NX window mouse input event.
*
@@ -105,6 +116,16 @@ namespace NxWM
*/
~CWindowControl(void);
+
+ /**
+ * Destroy the application window and everything in it. This is
+ * handled by CWindowControl (vs just calling the destructors) because
+ * in the case where an application destroys itself (because of pressing
+ * the stop button), then we need to unwind and get out of the application
+ * logic before destroying all of its objects.
+ */
+
+ void destroy(IApplication *app);
};
}
#endif // __cplusplus