summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/include/ccallback.hxx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-20 18:56:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-20 18:56:14 +0000
commit01bce341a9d065e8250f655c246c07a525779bc0 (patch)
tree8420c219c8f334bb6ec77acb5e51a3872bb2461e /NxWidgets/libnxwidgets/include/ccallback.hxx
parentc5ff7843f26438947da8fa0b0fc9b255aeb1d638 (diff)
downloadnuttx-01bce341a9d065e8250f655c246c07a525779bc0.tar.gz
nuttx-01bce341a9d065e8250f655c246c07a525779bc0.tar.bz2
nuttx-01bce341a9d065e8250f655c246c07a525779bc0.zip
NxWM::CNxConsole and NXWidgets::CCallback can now redirect keyboard input to the NxConsole driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4754 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/include/ccallback.hxx')
-rw-r--r--NxWidgets/libnxwidgets/include/ccallback.hxx32
1 files changed, 30 insertions, 2 deletions
diff --git a/NxWidgets/libnxwidgets/include/ccallback.hxx b/NxWidgets/libnxwidgets/include/ccallback.hxx
index 09cb83a8a..8d3c13cd2 100644
--- a/NxWidgets/libnxwidgets/include/ccallback.hxx
+++ b/NxWidgets/libnxwidgets/include/ccallback.hxx
@@ -48,7 +48,10 @@
#include <nuttx/nx/nxglib.h>
#include <nuttx/nx/nx.h>
-#include <nuttx/nx/nxtk.h>
+
+#ifdef CONFIG_NXCONSOLE_NXKBDIN
+# include <nuttx/nx/nxconsole.h>
+#endif
#include "crect.hxx"
@@ -88,7 +91,11 @@ namespace NXWidgets
class CCallback
{
private:
- struct nx_callback_s m_callbacks; /**< C-callable vtable of callback function pointers */
+ CWidgetControl *m_widgetControl; /**< The widget control instance for this window */
+ struct nx_callback_s m_callbacks; /**< C-callable vtable of callback function pointers */
+#ifdef CONFIG_NXCONSOLE_NXKBDIN
+ NXCONSOLE m_nxconsole; /**< The NxConsole handle for redirection of keyboard input */
+#endif
// Methods in the callback vtable
@@ -235,6 +242,27 @@ namespace NXWidgets
{
return &m_callbacks;
}
+
+ /**
+ * By default, NX keyboard input is given to the various widgets
+ * residing in the window. But NxConsole is a different usage model;
+ * In this case, keyboard input needs to be directed to the NxConsole
+ * character driver. This method can be used to enable (or disable)
+ * redirection of NX keyboard input from the window widgets to the
+ * NxConsole
+ *
+ * @param handle. The NXCONSOLE handle. If non-NULL, NX keyboard
+ * input will be directed to the NxConsole driver using this
+ * handle; If NULL (the default), NX keyboard input will be
+ * directed to the widgets within the window.
+ */
+
+#ifdef CONFIG_NXCONSOLE_NXKBDIN
+ inline void setNxConsole(NXCONSOLE handle)
+ {
+ m_nxconsole = handle;
+ }
+#endif
};
}