summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-17 22:16:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-17 22:16:02 +0000
commitd53035bc78b3fbbd640a6a7535b9cdf7ca0d9667 (patch)
tree166f99f4788c23b3649826405468b34f475d4726 /NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
parentb1bbea743d6eef38eebf9975a3b19bbfb7e71233 (diff)
downloadnuttx-d53035bc78b3fbbd640a6a7535b9cdf7ca0d9667.tar.gz
nuttx-d53035bc78b3fbbd640a6a7535b9cdf7ca0d9667.tar.bz2
nuttx-d53035bc78b3fbbd640a6a7535b9cdf7ca0d9667.zip
Implement an NX interface to block flush message queues in multi-user mode. This is necessary to prevent stale window handles when a window is closed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4745 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx')
-rw-r--r--NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx b/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
index 757dc1c5b..453cc1115 100644
--- a/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
+++ b/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
@@ -597,6 +597,31 @@ namespace NXWidgets
#endif
/**
+ * This event is the response from nx_block (or nxtk_block). Those
+ * blocking interfaces are used to assure that no further messages are
+ * directed to the window. Receipt of the blocked callback signifies
+ * that (1) there are no further pending events and (2) that the
+ * window is now 'defunct' and will receive no further events.
+ *
+ * This event supports coordinated destruction of a window in multi-
+ * user mode. In multi-use mode, the client window logic must stay
+ * intact until all of the queued callbacks are processed. Then the
+ * window may be safely closed. Closing the window prior with pending
+ * callbacks can lead to bad behavior when the callback is executed.
+ *
+ * @param hwnd. Window handle of the blocked window
+ * @param arg. User provided argument (see nx_openwindow, nx_requestbkgd,
+ * nxtk_openwindow, or nxtk_opentoolbar)
+ */
+
+#ifdef CONFIG_NX_MULTIUSER
+ inline void windowBlocked(void)
+ {
+ m_eventHandlers.raiseBlockedEvent();
+ }
+#endif
+
+ /**
* This event means that cursor control data is available for the window.
*
* @param cursorControl The cursor control code received.