summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-19 01:01:00 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-19 01:01:00 +0000
commitab09896759b037d2466d1fda706016d618c50ef8 (patch)
treeb60235b0a038088298aa0f5497411fcb453c424d
parent3f31a6667c712f2bde22eb0ca6e05c7b96964124 (diff)
NxWM: Add a missing part of the message blocking logic
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4748 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rw-r--r--NxWidgets/libnxwidgets/include/ccallback.hxx5
-rw-r--r--NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx8
-rw-r--r--NxWidgets/libnxwidgets/include/cwindoweventhandler.hxx4
-rw-r--r--NxWidgets/libnxwidgets/include/cwindoweventhandlerlist.hxx6
-rw-r--r--NxWidgets/libnxwidgets/src/ccallback.cxx13
-rw-r--r--NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx6
-rw-r--r--NxWidgets/nxwm/include/capplicationwindow.hxx4
-rw-r--r--NxWidgets/nxwm/include/cfullscreenwindow.hxx4
-rw-r--r--NxWidgets/nxwm/include/cwindowmessenger.hxx18
-rw-r--r--NxWidgets/nxwm/include/iapplication.hxx8
-rw-r--r--NxWidgets/nxwm/include/iapplicationwindow.hxx12
-rw-r--r--NxWidgets/nxwm/src/capplicationwindow.cxx6
-rw-r--r--NxWidgets/nxwm/src/ccalibration.cxx8
-rw-r--r--NxWidgets/nxwm/src/cfullscreenwindow.cxx8
-rw-r--r--NxWidgets/nxwm/src/cnxconsole.cxx2
-rw-r--r--NxWidgets/nxwm/src/cstartwindow.cxx2
-rw-r--r--NxWidgets/nxwm/src/cwindowmessenger.cxx57
-rw-r--r--nuttx/graphics/nxmu/nx_block.c5
-rw-r--r--nuttx/graphics/nxmu/nx_eventhandler.c2
-rw-r--r--nuttx/graphics/nxmu/nxfe.h2
-rw-r--r--nuttx/graphics/nxmu/nxmu_server.c5
-rw-r--r--nuttx/include/nuttx/nx/nx.h9
-rw-r--r--nuttx/include/nuttx/nx/nxtk.h4
23 files changed, 121 insertions, 77 deletions
diff --git a/NxWidgets/libnxwidgets/include/ccallback.hxx b/NxWidgets/libnxwidgets/include/ccallback.hxx
index ca3313a9b8..09cb83a8a3 100644
--- a/NxWidgets/libnxwidgets/include/ccallback.hxx
+++ b/NxWidgets/libnxwidgets/include/ccallback.hxx
@@ -195,12 +195,13 @@ namespace NXWidgets
* 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,
+ * @param arg1. User provided argument (see nx_openwindow, nx_requestbkgd,
* nxtk_openwindow, or nxtk_opentoolbar)
+ * @param arg2 - User provided argument (see nx_block or nxtk_block)
*/
#ifdef CONFIG_NX_MULTIUSER
- static void windowBlocked(NXWINDOW hwnd, FAR void *arg);
+ static void windowBlocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2);
#endif
public:
diff --git a/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx b/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
index 453cc11157..e709271a08 100644
--- a/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
+++ b/NxWidgets/libnxwidgets/include/cwidgetcontrol.hxx
@@ -609,15 +609,13 @@ namespace NXWidgets
* 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)
+ * @param arg - User provided argument (see nx_block or nxtk_block)
*/
#ifdef CONFIG_NX_MULTIUSER
- inline void windowBlocked(void)
+ inline void windowBlocked(FAR void *arg)
{
- m_eventHandlers.raiseBlockedEvent();
+ m_eventHandlers.raiseBlockedEvent(arg);
}
#endif
diff --git a/NxWidgets/libnxwidgets/include/cwindoweventhandler.hxx b/NxWidgets/libnxwidgets/include/cwindoweventhandler.hxx
index c414abadb7..574c24b551 100644
--- a/NxWidgets/libnxwidgets/include/cwindoweventhandler.hxx
+++ b/NxWidgets/libnxwidgets/include/cwindoweventhandler.hxx
@@ -108,9 +108,11 @@ namespace NXWidgets
/**
* Handle a NX window blocked event
+ *
+ * @param arg - User provided argument (see nx_block or nxtk_block)
*/
- virtual void handleBlockedEvent(void) { }
+ virtual void handleBlockedEvent(FAR void *arg) { }
};
}
diff --git a/NxWidgets/libnxwidgets/include/cwindoweventhandlerlist.hxx b/NxWidgets/libnxwidgets/include/cwindoweventhandlerlist.hxx
index d9e17de091..035e6a7b94 100644
--- a/NxWidgets/libnxwidgets/include/cwindoweventhandlerlist.hxx
+++ b/NxWidgets/libnxwidgets/include/cwindoweventhandlerlist.hxx
@@ -39,7 +39,7 @@
/****************************************************************************
* Included Files
****************************************************************************/
-
+
#include <nuttx/config.h>
#include <stdint.h>
@@ -163,9 +163,11 @@ namespace NXWidgets
/**
* Raise an NX window blocked event.
+ *
+ * @param arg - User provided argument (see nx_block or nxtk_block)
*/
- void raiseBlockedEvent(void);
+ void raiseBlockedEvent(FAR void *arg);
};
}
diff --git a/NxWidgets/libnxwidgets/src/ccallback.cxx b/NxWidgets/libnxwidgets/src/ccallback.cxx
index 32c5b7d642..b2256c6bb4 100644
--- a/NxWidgets/libnxwidgets/src/ccallback.cxx
+++ b/NxWidgets/libnxwidgets/src/ccallback.cxx
@@ -211,22 +211,23 @@ void CCallback::newKeyboardEvent(NXHANDLE hwnd, uint8_t nCh,
* 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,
+ * @param arg1. User provided argument (see nx_openwindow, nx_requestbkgd,
* nxtk_openwindow, or nxtk_opentoolbar)
+ * @param arg2 - User provided argument (see nx_block or nxtk_block)
*/
#ifdef CONFIG_NX_MULTIUSER
-void CCallback::windowBlocked(NXWINDOW hwnd, FAR void *arg)
+void CCallback::windowBlocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2)
{
- gvdbg("hwnd=%p arg=%p\n", hwnd, arg);
+ gvdbg("hwnd=%p arg1=%p arg2=%p\n", hwnd, arg1, arg2);
- // The argument must be the CWidgetControl instance
+ // The first argument must be the CWidgetControl instance
- CWidgetControl *This = (CWidgetControl *)arg;
+ CWidgetControl *This = (CWidgetControl *)arg1;
// Just forward the callback to the CWidgetControl::windowBlocked method
- This->windowBlocked();
+ This->windowBlocked(arg2);
}
#endif
diff --git a/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx b/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx
index 15b2c65ff4..dfdabcf089 100644
--- a/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx
+++ b/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx
@@ -162,12 +162,14 @@ void CWindowEventHandlerList::raiseKeyboardEvent(void)
/**
* Raise an NX window blocked event.
+ *
+ * @param arg - User provided argument (see nx_block or nxtk_block)
*/
-void CWindowEventHandlerList::raiseBlockedEvent(void)
+void CWindowEventHandlerList::raiseBlockedEvent(FAR void *arg)
{
for (int i = 0; i < m_eventHandlers.size(); ++i)
{
- m_eventHandlers.at(i)->handleBlockedEvent();
+ m_eventHandlers.at(i)->handleBlockedEvent(arg);
}
}
diff --git a/NxWidgets/nxwm/include/capplicationwindow.hxx b/NxWidgets/nxwm/include/capplicationwindow.hxx
index 686150d144..46e4e90d29 100644
--- a/NxWidgets/nxwm/include/capplicationwindow.hxx
+++ b/NxWidgets/nxwm/include/capplicationwindow.hxx
@@ -162,9 +162,11 @@ namespace NxWM
/**
* Block further activity on this window in preparation for window
* shutdown.
+ *
+ * @param app. The application to be blocked
*/
- void block(void);
+ void block(IApplication *app);
/**
* Set the window label
diff --git a/NxWidgets/nxwm/include/cfullscreenwindow.hxx b/NxWidgets/nxwm/include/cfullscreenwindow.hxx
index 1bab37543f..70da9fee5e 100644
--- a/NxWidgets/nxwm/include/cfullscreenwindow.hxx
+++ b/NxWidgets/nxwm/include/cfullscreenwindow.hxx
@@ -126,9 +126,11 @@ namespace NxWM
/**
* Block further activity on this window in preparation for window
* shutdown.
+ *
+ * @param app. The application to be blocked
*/
- void block(void);
+ void block(IApplication *app);
/**
* Set the window label
diff --git a/NxWidgets/nxwm/include/cwindowmessenger.hxx b/NxWidgets/nxwm/include/cwindowmessenger.hxx
index 645e750cb1..0aa8961bb8 100644
--- a/NxWidgets/nxwm/include/cwindowmessenger.hxx
+++ b/NxWidgets/nxwm/include/cwindowmessenger.hxx
@@ -98,6 +98,14 @@ namespace NxWM
void handleKeyboardEvent(void);
#endif
+ /**
+ * Handle a NX window blocked event
+ *
+ * @param arg - User provided argument (see nx_block or nxtk_block)
+ */
+
+ void handleBlockedEvent(FAR void *arg);
+
public:
/**
@@ -111,16 +119,6 @@ namespace NxWM
*/
~CWindowMessenger(void);
-
- /**
- * Destroy the application window and everything in it. This is
- * handled by CWindowMessenger (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
diff --git a/NxWidgets/nxwm/include/iapplication.hxx b/NxWidgets/nxwm/include/iapplication.hxx
index 28e50e0136..456202c6d4 100644
--- a/NxWidgets/nxwm/include/iapplication.hxx
+++ b/NxWidgets/nxwm/include/iapplication.hxx
@@ -45,8 +45,6 @@
#include "cnxstring.hxx"
#include "ibitmap.hxx"
-#include "iapplicationwindow.hxx"
-
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
@@ -60,6 +58,12 @@
namespace NxWM
{
/**
+ * Foward references
+ */
+
+ class IApplicationWindow;
+
+ /**
* IApplication provides the abstract base class for each NxWM application.
*/
diff --git a/NxWidgets/nxwm/include/iapplicationwindow.hxx b/NxWidgets/nxwm/include/iapplicationwindow.hxx
index ed221797d4..60f1b332c6 100644
--- a/NxWidgets/nxwm/include/iapplicationwindow.hxx
+++ b/NxWidgets/nxwm/include/iapplicationwindow.hxx
@@ -46,6 +46,8 @@
#include "cnxstring.hxx"
#include "cwidgetcontrol.hxx"
+#include "iapplication.hxx"
+
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
@@ -59,6 +61,12 @@
namespace NxWM
{
/**
+ * Foward references
+ */
+
+ class IApplication;
+
+ /**
* This callback class is used by the application to get notification of toolbar
* related events.
*/
@@ -137,9 +145,11 @@ namespace NxWM
/**
* Block further activity on this window in preparation for window
* shutdown.
+ *
+ * @param app. The application to be blocked
*/
- virtual void block(void) = 0;
+ virtual void block(IApplication *app) = 0;
/**
* Set the window label
diff --git a/NxWidgets/nxwm/src/capplicationwindow.cxx b/NxWidgets/nxwm/src/capplicationwindow.cxx
index c0bc9ed62c..5cf172ea62 100644
--- a/NxWidgets/nxwm/src/capplicationwindow.cxx
+++ b/NxWidgets/nxwm/src/capplicationwindow.cxx
@@ -426,9 +426,11 @@ NXWidgets::CWidgetControl *CApplicationWindow::getWidgetControl(void) const
/**
* Block further activity on this window in preparation for window
* shutdown.
+ *
+ * @param app. The application to be blocked
*/
-void CApplicationWindow::block(void)
+void CApplicationWindow::block(IApplication *app)
{
// Get the widget control from the NXWidgets::CNxWindow instance
@@ -437,7 +439,7 @@ void CApplicationWindow::block(void)
// And then block further reporting activity on the underlying
// NX framed window
- nxtk_block(control->getWindowHandle());
+ nxtk_block(control->getWindowHandle(), (FAR void *)app);
}
/**
diff --git a/NxWidgets/nxwm/src/ccalibration.cxx b/NxWidgets/nxwm/src/ccalibration.cxx
index d93f56a47a..6f5976100b 100644
--- a/NxWidgets/nxwm/src/ccalibration.cxx
+++ b/NxWidgets/nxwm/src/ccalibration.cxx
@@ -220,13 +220,13 @@ void CCalibration::stop(void)
void CCalibration::destroy(void)
{
- // Block any further window messages
+ // Make sure that the application is stopped (should already be stopped)
- m_window->block();
+ stop();
- // Make sure that the application is stopped
+ // Block any further window messages
- stop();
+ m_window->block(this);
}
/**
diff --git a/NxWidgets/nxwm/src/cfullscreenwindow.cxx b/NxWidgets/nxwm/src/cfullscreenwindow.cxx
index 0c34166c06..6ec5bf802d 100644
--- a/NxWidgets/nxwm/src/cfullscreenwindow.cxx
+++ b/NxWidgets/nxwm/src/cfullscreenwindow.cxx
@@ -36,7 +36,7 @@
/********************************************************************************************
* Included Files
********************************************************************************************/
-
+
#include <nuttx/config.h>
#include <nuttx/nx/nxglib.h>
@@ -141,9 +141,11 @@ NXWidgets::CWidgetControl *CFullScreenWindow::getWidgetControl(void) const
/**
* Block further activity on this window in preparation for window
* shutdown.
+ *
+ * @param app. The application to be blocked
*/
-void CFullScreenWindow::block(void)
+void CFullScreenWindow::block(IApplication *app)
{
// Get the widget control from the NXWidgets::CNxWindow instance
@@ -152,7 +154,7 @@ void CFullScreenWindow::block(void)
// And then block further reporting activity on the underlying
// NX raw window
- nx_block(control->getWindowHandle());
+ nx_block(control->getWindowHandle(), (FAR void *)app);
}
/**
diff --git a/NxWidgets/nxwm/src/cnxconsole.cxx b/NxWidgets/nxwm/src/cnxconsole.cxx
index 64321ddfbf..6a64afc1be 100644
--- a/NxWidgets/nxwm/src/cnxconsole.cxx
+++ b/NxWidgets/nxwm/src/cnxconsole.cxx
@@ -341,7 +341,7 @@ void CNxConsole::destroy(void)
{
// Block any further window messages
- m_window->block();
+ m_window->block(this);
// Make sure that the application is stopped
diff --git a/NxWidgets/nxwm/src/cstartwindow.cxx b/NxWidgets/nxwm/src/cstartwindow.cxx
index 3dfab50975..af46e7b826 100644
--- a/NxWidgets/nxwm/src/cstartwindow.cxx
+++ b/NxWidgets/nxwm/src/cstartwindow.cxx
@@ -234,7 +234,7 @@ void CStartWindow::destroy(void)
// Block any further window messages
- m_window->block();
+ m_window->block(this);
// Make sure that the application is stopped
diff --git a/NxWidgets/nxwm/src/cwindowmessenger.cxx b/NxWidgets/nxwm/src/cwindowmessenger.cxx
index 4e458566d3..b467f533cf 100644
--- a/NxWidgets/nxwm/src/cwindowmessenger.cxx
+++ b/NxWidgets/nxwm/src/cwindowmessenger.cxx
@@ -91,31 +91,6 @@ CWindowMessenger::~CWindowMessenger(void)
}
/**
- * Destroy the application window and everything in it. This is
- * handled by CWindowMessenger (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 CWindowMessenger::destroy(IApplication *app)
-{
- // Send a message to destroy the window isntance at a later time
-
- struct SStartWindowMessage outmsg;
- outmsg.msgId = MSGID_DESTROY_APP;
- outmsg.instance = (FAR void *)app;
-
- gdbg("Sending MSGID_DESTROY_APP with instance=%p\n", app);
- int ret = mq_send(m_mqd, &outmsg, sizeof(struct SStartWindowMessage),
- CONFIG_NXWM_STARTWINDOW_MXMPRIO);
- if (ret < 0)
- {
- gdbg("ERROR: mq_send failed: %d\n", errno);
- }
-}
-
-/**
* Handle an NX window mouse input event.
*
* @param e The event data.
@@ -208,3 +183,35 @@ void CWindowMessenger::handleKeyboardEvent(void)
}
}
#endif
+
+/**
+ * Handle a NX window blocked event. This handler is called when we
+ * receive the BLOCKED message meaning that there are no further pending
+ * actions on the window. It is now safe to delete the window.
+ *
+ * This is handled by sending a message to the start window thread (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.
+ *
+ * @param arg - User provided argument (see nx_block or nxtk_block)
+ */
+
+void CWindowMessenger::handleBlockedEvent(FAR void *arg)
+{
+ // Send a message to destroy the window isntance at a later time
+
+ struct SStartWindowMessage outmsg;
+ outmsg.msgId = MSGID_DESTROY_APP;
+ outmsg.instance = arg;
+
+ gdbg("Sending MSGID_DESTROY_APP with instance=%p\n", arg);
+ int ret = mq_send(m_mqd, &outmsg, sizeof(struct SStartWindowMessage),
+ CONFIG_NXWM_STARTWINDOW_MXMPRIO);
+ if (ret < 0)
+ {
+ gdbg("ERROR: mq_send failed: %d\n", errno);
+ }
+}
+
diff --git a/nuttx/graphics/nxmu/nx_block.c b/nuttx/graphics/nxmu/nx_block.c
index 10dad8b94a..2f069f0962 100644
--- a/nuttx/graphics/nxmu/nx_block.c
+++ b/nuttx/graphics/nxmu/nx_block.c
@@ -94,13 +94,15 @@
*
* Input Parameters:
* wnd - The window to be blocked
+ * arg - An argument that will accompany the block messages (This is arg2
+ * in the blocked callback).
*
* Return:
* OK on success; ERROR on failure with errno set appropriately
*
****************************************************************************/
-int nx_block(NXWINDOW hwnd)
+int nx_block(NXWINDOW hwnd, FAR void *arg)
{
FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
struct nxsvrmsg_blocked_s outmsg;
@@ -132,6 +134,7 @@ int nx_block(NXWINDOW hwnd)
outmsg.msgid = NX_SVRMSG_BLOCKED;
outmsg.wnd = wnd;
+ outmsg.arg = arg;
/* Send the window message via nxmu_sendserver (vs. nxmu_sendwindow) so
* that it will not be blocked.
diff --git a/nuttx/graphics/nxmu/nx_eventhandler.c b/nuttx/graphics/nxmu/nx_eventhandler.c
index 75300b2481..944bb12d11 100644
--- a/nuttx/graphics/nxmu/nx_eventhandler.c
+++ b/nuttx/graphics/nxmu/nx_eventhandler.c
@@ -245,7 +245,7 @@ int nx_eventhandler(NXHANDLE handle)
DEBUGASSERT(wnd);
if (wnd->cb->blocked)
{
- wnd->cb->blocked((NXWINDOW)wnd, wnd->arg);
+ wnd->cb->blocked((NXWINDOW)wnd, wnd->arg, blocked->arg);
}
}
break;
diff --git a/nuttx/graphics/nxmu/nxfe.h b/nuttx/graphics/nxmu/nxfe.h
index a70e635f58..8b6a21ef48 100644
--- a/nuttx/graphics/nxmu/nxfe.h
+++ b/nuttx/graphics/nxmu/nxfe.h
@@ -258,6 +258,7 @@ struct nxclimsg_blocked_s
{
uint32_t msgid; /* NX_CLIMSG_BLOCKED */
FAR struct nxbe_window_s *wnd; /* The window that is blocked */
+ FAR void *arg; /* User argument */
};
/* Client-to-Server Message Structures **************************************/
@@ -299,6 +300,7 @@ struct nxsvrmsg_blocked_s
{
uint32_t msgid; /* NX_SVRMSG_BLOCKED */
FAR struct nxbe_window_s *wnd; /* The window that is blocked */
+ FAR void *arg; /* User argument */
};
/* This message requests the server to create a new window */
diff --git a/nuttx/graphics/nxmu/nxmu_server.c b/nuttx/graphics/nxmu/nxmu_server.c
index c412b14924..2730e0ea28 100644
--- a/nuttx/graphics/nxmu/nxmu_server.c
+++ b/nuttx/graphics/nxmu/nxmu_server.c
@@ -154,13 +154,14 @@ static inline void nxmu_shutdown(FAR struct nxfe_state_s *fe)
* Name: nxmu_blocked
****************************************************************************/
-static inline void nxmu_blocked(FAR struct nxbe_window_s *wnd)
+static inline void nxmu_blocked(FAR struct nxbe_window_s *wnd, FAR void *arg)
{
struct nxclimsg_blocked_s outmsg;
int ret;
outmsg.msgid = NX_CLIMSG_BLOCKED;
outmsg.wnd = wnd;
+ outmsg.arg = arg;
ret = nxmu_sendclient(wnd->conn, &outmsg, sizeof(struct nxclimsg_blocked_s));
if (ret < 0)
@@ -380,7 +381,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev)
case NX_SVRMSG_BLOCKED: /* Block messsages to a window */
{
FAR struct nxsvrmsg_blocked_s *blocked = (FAR struct nxsvrmsg_blocked_s *)buffer;
- nxmu_blocked(blocked->wnd);
+ nxmu_blocked(blocked->wnd, blocked->arg);
}
break;
diff --git a/nuttx/include/nuttx/nx/nx.h b/nuttx/include/nuttx/nx/nx.h
index 4a228de253..153c34a3e5 100644
--- a/nuttx/include/nuttx/nx/nx.h
+++ b/nuttx/include/nuttx/nx/nx.h
@@ -209,8 +209,9 @@ struct nx_callback_s
*
* Input Parameters:
* hwnd - Window handle of the blocked window
- * arg - User provided argument (see nx_openwindow, nx_requestbkgd,
+ * arg1 - User provided argument (see nx_openwindow, nx_requestbkgd,
* nxtk_openwindow, or nxtk_opentoolbar)
+ * arg2 - User provided argument (see nx_block or nxtk_block)
*
* Returned Value:
* None
@@ -218,7 +219,7 @@ struct nx_callback_s
**************************************************************************/
#ifdef CONFIG_NX_MULTIUSER
- void (*blocked)(NXWINDOW hwnd, FAR void *arg);
+ void (*blocked)(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2);
#endif
};
@@ -487,6 +488,8 @@ EXTERN int nx_closewindow(NXWINDOW hwnd);
*
* Input Parameters:
* wnd - The window to be blocked
+ * arg - An argument that will accompany the block messages (This is arg2
+ * in the blocked callback).
*
* Return:
* OK on success; ERROR on failure with errno set appropriately
@@ -494,7 +497,7 @@ EXTERN int nx_closewindow(NXWINDOW hwnd);
****************************************************************************/
#ifdef CONFIG_NX_MULTIUSER
-EXTERN int nx_block(NXWINDOW hwnd);
+EXTERN int nx_block(NXWINDOW hwnd, FAR void *arg);
#endif
/****************************************************************************
diff --git a/nuttx/include/nuttx/nx/nxtk.h b/nuttx/include/nuttx/nx/nxtk.h
index a69d177759..60080e47fc 100644
--- a/nuttx/include/nuttx/nx/nxtk.h
+++ b/nuttx/include/nuttx/nx/nxtk.h
@@ -173,6 +173,8 @@ EXTERN int nxtk_closewindow(NXTKWINDOW hfwnd);
*
* Input Parameters:
* hfwnd - The window to be blocked
+ * arg - An argument that will accompany the block messages (This is arg2
+ * in the blocked callback).
*
* Return:
* OK on success; ERROR on failure with errno set appropriately
@@ -180,7 +182,7 @@ EXTERN int nxtk_closewindow(NXTKWINDOW hfwnd);
****************************************************************************/
#ifdef CONFIG_NX_MULTIUSER
-EXTERN int nxtk_block(NXTKWINDOW hfwnd);
+EXTERN int nxtk_block(NXTKWINDOW hfwnd, FAR void *arg);
#endif
/****************************************************************************