From 530e4e8173cbbdc299b7244ef5ba839f17b49556 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 29 Apr 2012 14:34:56 +0000 Subject: Fix STM32 USART4/5 vs UART4/5 confusion git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4671 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/libnxwidgets/include/cbgwindow.hxx | 9 +++++++++ NxWidgets/libnxwidgets/include/cnxserver.hxx | 7 +++---- NxWidgets/libnxwidgets/include/cnxtkwindow.hxx | 11 ++++++++++- NxWidgets/libnxwidgets/include/cnxtoolbar.hxx | 9 +++++++++ NxWidgets/libnxwidgets/include/cnxwindow.hxx | 9 +++++++++ NxWidgets/libnxwidgets/include/inxwindow.hxx | 10 ++++++++++ NxWidgets/libnxwidgets/src/cbgwindow.cxx | 12 ++++++++++++ NxWidgets/libnxwidgets/src/cnxserver.cxx | 2 +- NxWidgets/libnxwidgets/src/cnxtkwindow.cxx | 12 ++++++++++++ NxWidgets/libnxwidgets/src/cnxtoolbar.cxx | 12 ++++++++++++ NxWidgets/libnxwidgets/src/cnxwindow.cxx | 12 ++++++++++++ 11 files changed, 99 insertions(+), 6 deletions(-) (limited to 'NxWidgets/libnxwidgets') diff --git a/NxWidgets/libnxwidgets/include/cbgwindow.hxx b/NxWidgets/libnxwidgets/include/cbgwindow.hxx index 1f8e417af..435fdffbf 100644 --- a/NxWidgets/libnxwidgets/include/cbgwindow.hxx +++ b/NxWidgets/libnxwidgets/include/cbgwindow.hxx @@ -130,6 +130,15 @@ namespace NXWidgets bool open(void); + /** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + + CWidgetControl *getWidgetControl(void) const; + /** * Request the position and size information of the window. The values * will be returned asynchronously through the client callback method. diff --git a/NxWidgets/libnxwidgets/include/cnxserver.hxx b/NxWidgets/libnxwidgets/include/cnxserver.hxx index 2c79558a0..3043fd9e0 100644 --- a/NxWidgets/libnxwidgets/include/cnxserver.hxx +++ b/NxWidgets/libnxwidgets/include/cnxserver.hxx @@ -48,6 +48,7 @@ #include #include "cnxwindow.hxx" +#include "cnxtkwindow.hxx" #include "cbgwindow.hxx" /**************************************************************************** @@ -176,12 +177,10 @@ namespace NXWidgets * Get an instance of the framed NX window. */ -#if 0 // Not ready for prime time - inline CFramedWindow *createFramedWindow(CWidgetControl *widgetControl) + inline CNxTkWindow *createFramedWindow(CWidgetControl *widgetControl) { - return new CFramedWindow(m_hNxServer, widgetControl); + return new CNxTkWindow(m_hNxServer, widgetControl); } -#endif /** * Get an instance of the background window. diff --git a/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx b/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx index ed2ecdbd2..b6915a6c1 100644 --- a/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx +++ b/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx @@ -102,7 +102,7 @@ namespace NXWidgets * 3) The window constructor call CWidgetControl methods to "smarten" * the CWidgetControl instance with window-specific knowledge. * 4) Call the open() method on the window to display the window. - * 5) After that, the fully smartend CWidgetControl instance can + * 5) After that, the fully smartened CWidgetControl instance can * be used to generate additional widgets. * 6) After that, the fully smartened CWidgetControl instance can * be used to generate additional widgets by passing it to the @@ -129,6 +129,15 @@ namespace NXWidgets bool open(void); + /** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + + CWidgetControl *getWidgetControl(void) const; + /** * Open a toolbar on the framed window. Toolbar creation is separate * from object instantion so that errors can be reported diff --git a/NxWidgets/libnxwidgets/include/cnxtoolbar.hxx b/NxWidgets/libnxwidgets/include/cnxtoolbar.hxx index ff65cf1a9..8e016c15e 100644 --- a/NxWidgets/libnxwidgets/include/cnxtoolbar.hxx +++ b/NxWidgets/libnxwidgets/include/cnxtoolbar.hxx @@ -120,6 +120,15 @@ namespace NXWidgets bool open(void); + /** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + + CWidgetControl *getWidgetControl(void) const; + /** * Request the position and size information of the toolbar. The values * will be returned asynchronously through the client callback method. diff --git a/NxWidgets/libnxwidgets/include/cnxwindow.hxx b/NxWidgets/libnxwidgets/include/cnxwindow.hxx index 4a371bb27..e39c3cc81 100644 --- a/NxWidgets/libnxwidgets/include/cnxwindow.hxx +++ b/NxWidgets/libnxwidgets/include/cnxwindow.hxx @@ -130,6 +130,15 @@ namespace NXWidgets bool open(void); + /** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + + CWidgetControl *getWidgetControl(void) const; + /** * Request the position and size information of the window. The values * will be returned asynchronously through the client callback method. diff --git a/NxWidgets/libnxwidgets/include/inxwindow.hxx b/NxWidgets/libnxwidgets/include/inxwindow.hxx index 0c372ee0d..c38052de0 100644 --- a/NxWidgets/libnxwidgets/include/inxwindow.hxx +++ b/NxWidgets/libnxwidgets/include/inxwindow.hxx @@ -60,6 +60,7 @@ namespace NXWidgets { struct SBitmap; + class CWidgetControl; /** * This class defines common operations on a any NX window. @@ -89,6 +90,15 @@ namespace NXWidgets virtual bool open(void) = 0; + /** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + + virtual CWidgetControl *getWidgetControl(void) const = 0; + /** * Request the position and size information of the window. The values * will be returned asynchronously through the client callback method. diff --git a/NxWidgets/libnxwidgets/src/cbgwindow.cxx b/NxWidgets/libnxwidgets/src/cbgwindow.cxx index 08ae584b8..58ecc1f51 100644 --- a/NxWidgets/libnxwidgets/src/cbgwindow.cxx +++ b/NxWidgets/libnxwidgets/src/cbgwindow.cxx @@ -113,6 +113,18 @@ bool CBgWindow::open(void) return true; } +/** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + +CWidgetControl *CBgWindow::getWidgetControl(void) const +{ + return m_widgetControl; +} + /** * Request the position and size information of the window. The values * will be returned asynchronously through the client callback method. diff --git a/NxWidgets/libnxwidgets/src/cnxserver.cxx b/NxWidgets/libnxwidgets/src/cnxserver.cxx index 2f36b0f2d..ef71deb44 100644 --- a/NxWidgets/libnxwidgets/src/cnxserver.cxx +++ b/NxWidgets/libnxwidgets/src/cnxserver.cxx @@ -120,7 +120,7 @@ CNxServer::~CNxServer(void) #ifndef CONFIG_NX_MULTIUSER bool CNxServer::connect(void) { -#if defined(SCREENS_EXTERNINIT) +#if defined(CONFIG_NXWIDGETS_EXTERNINIT) // Use external graphics driver initialization m_hDevice = up_nxdrvinit(CONFIG_NXWIDGETS_DEVNO); diff --git a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx index 36b07dce5..ba62ee435 100644 --- a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx +++ b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx @@ -111,6 +111,18 @@ bool CNxTkWindow::open(void) return m_hNxTkWindow != NULL; } +/** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + +CWidgetControl *CNxTkWindow::getWidgetControl(void) const +{ + return m_widgetControl; +} + /** * Open a toolbar on the framed window * diff --git a/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx b/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx index 5911c731d..1c560deb1 100644 --- a/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx +++ b/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx @@ -117,6 +117,18 @@ bool CNxToolbar::open(void) return ret == OK; } +/** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + +CWidgetControl *CNxToolbar::getWidgetControl(void) const +{ + return m_widgetControl; +} + /** * Request the position and size information of the toolbar. The values * will be returned asynchronously through the client callback method. diff --git a/NxWidgets/libnxwidgets/src/cnxwindow.cxx b/NxWidgets/libnxwidgets/src/cnxwindow.cxx index fd4cc6ef2..599335972 100644 --- a/NxWidgets/libnxwidgets/src/cnxwindow.cxx +++ b/NxWidgets/libnxwidgets/src/cnxwindow.cxx @@ -103,6 +103,18 @@ bool CNxWindow::open(void) return m_hNxWindow != NULL; } +/** + * Each implementation of INxWindow must provide a method to recover + * the contained CWidgetControl instance. + * + * @return The contained CWidgetControl instance + */ + +CWidgetControl *CNxWindow::getWidgetControl(void) const +{ + return m_widgetControl; +} + /** * Request the position and size information of the window. The values * will be returned asynchronously through the client callback method. -- cgit v1.2.3