diff options
Diffstat (limited to 'NxWidgets/libnxwidgets/include/ccallback.hxx')
-rw-r--r-- | NxWidgets/libnxwidgets/include/ccallback.hxx | 32 |
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 }; } |