diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-16 22:43:40 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-16 22:43:40 +0000 |
commit | 20958add7b2acc205e71569a3f318196baf7b7cf (patch) | |
tree | 5f479cc7c9a1bc538630ddaeae8c57b65b40e780 /NxWidgets/libnxwidgets/src | |
parent | 6d8337323f1d60e7845a83508d4bbd1e0318ec3b (diff) | |
download | px4-nuttx-20958add7b2acc205e71569a3f318196baf7b7cf.tar.gz px4-nuttx-20958add7b2acc205e71569a3f318196baf7b7cf.tar.bz2 px4-nuttx-20958add7b2acc205e71569a3f318196baf7b7cf.zip |
NxWM: Add IApplicationFactory so that we can create multiple instances of applications; And, as a result of that, re-vamp entire threading model. this is now buggier than it was before
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4742 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/src')
-rw-r--r-- | NxWidgets/libnxwidgets/src/cnxtkwindow.cxx | 6 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cnxtoolbar.cxx | 2 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx | 3 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cwidgeteventhandlerlist.cxx | 46 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx | 1 |
5 files changed, 30 insertions, 28 deletions
diff --git a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx index f1ea58692..6a9c115e1 100644 --- a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx +++ b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx @@ -36,7 +36,7 @@ /**************************************************************************** * Included Files ****************************************************************************/ - + #include <nuttx/config.h> #include <stdint.h> @@ -152,7 +152,7 @@ CNxToolbar *CNxTkWindow::openToolbar(nxgl_coord_t height, CWidgetControl *widget { // Create a new widget control if none was provided - CWidgetControl *allocControl = (CWidgetControl *)0; + CWidgetControl *allocControl = (CWidgetControl *)0; if (!widgetControl) { // NOTE: This constructor would accept the toolbar "style" as a argument. @@ -226,7 +226,7 @@ CNxToolbar *CNxTkWindow::openToolbar(nxgl_coord_t height, CWidgetControl *widget sched_lock(); // Get the physical bounding box of the window in display coordinates - + struct nxgl_rect_s windowBounds; m_widgetControl->getWindowBoundingBox(&windowBounds); diff --git a/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx b/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx index b14a0b611..12b6bea4c 100644 --- a/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx +++ b/NxWidgets/libnxwidgets/src/cnxtoolbar.cxx @@ -36,7 +36,7 @@ /**************************************************************************** * Included Files ****************************************************************************/ - + #include <nuttx/config.h> #include <stdint.h> diff --git a/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx b/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx index 286c9c46a..9d2c5c7e9 100644 --- a/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx +++ b/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx @@ -143,7 +143,7 @@ CWidgetControl::CWidgetControl(FAR const CWidgetStyle *style) CWidgetControl::~CWidgetControl(void) { - // Notify any external waiters... this should not happen becaue it + // Notify any external waiters... this should not happen because it // it is probably already too late #ifdef CONFIG_NXWIDGET_EVENTWAIT @@ -432,6 +432,7 @@ void CWidgetControl::geometryEvent(NXHANDLE hWindow, void CWidgetControl::redrawEvent(FAR const struct nxgl_rect_s *nxRect, bool more) { + // REVISIT. This is not not yet used and not fully implemented. CRect rect; rect.setNxRect(nxRect); m_eventHandlers.raiseRedrawEvent(); diff --git a/NxWidgets/libnxwidgets/src/cwidgeteventhandlerlist.cxx b/NxWidgets/libnxwidgets/src/cwidgeteventhandlerlist.cxx index 91722725a..bebab89aa 100644 --- a/NxWidgets/libnxwidgets/src/cwidgeteventhandlerlist.cxx +++ b/NxWidgets/libnxwidgets/src/cwidgeteventhandlerlist.cxx @@ -100,7 +100,7 @@ using namespace NXWidgets; CWidgetEventHandlerList::CWidgetEventHandlerList(CNxWidget *widget) { - m_widget = widget; + m_widget = widget; m_isEnabled = true; } @@ -125,7 +125,7 @@ void CWidgetEventHandlerList::addWidgetEventHandler(CWidgetEventHandler *eventHa { // Prevent insertion if the handler already exists - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { if (m_widgetEventHandlers.at(i) == eventHandler) { @@ -146,7 +146,7 @@ void CWidgetEventHandlerList::addWidgetEventHandler(CWidgetEventHandler *eventHa void CWidgetEventHandlerList::removeWidgetEventHandler(CWidgetEventHandler *eventHandler) { - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { if (m_widgetEventHandlers.at(i) == eventHandler) { @@ -169,7 +169,7 @@ void CWidgetEventHandlerList::raiseClickEvent(nxgl_coord_t x, nxgl_coord_t y) { CWidgetEventArgs e(m_widget, x, y, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleClickEvent(e); } @@ -189,7 +189,7 @@ void CWidgetEventHandlerList::raiseDoubleClickEvent(nxgl_coord_t x, nxgl_coord_t { CWidgetEventArgs e(m_widget, x, y, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleDoubleClickEvent(e); } @@ -209,7 +209,7 @@ void CWidgetEventHandlerList::raiseReleaseEvent(nxgl_coord_t x, nxgl_coord_t y) { CWidgetEventArgs e(m_widget, x, y, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleReleaseEvent(e); } @@ -229,7 +229,7 @@ void CWidgetEventHandlerList::raiseReleaseOutsideEvent(nxgl_coord_t x, nxgl_coor { CWidgetEventArgs e(m_widget, x, y, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleReleaseOutsideEvent(e); } @@ -252,7 +252,7 @@ void CWidgetEventHandlerList::raiseDragEvent(nxgl_coord_t x, nxgl_coord_t y, { CWidgetEventArgs e(m_widget, x, y, vX, vY, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleDragEvent(e); } @@ -272,7 +272,7 @@ void CWidgetEventHandlerList::raiseDropEvent(nxgl_coord_t x, nxgl_coord_t y) { CWidgetEventArgs e(m_widget, x, y, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleDropEvent(e); } @@ -291,7 +291,7 @@ void CWidgetEventHandlerList::raiseKeyPressEvent(nxwidget_char_t key) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, key); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleKeyPressEvent(e); } @@ -310,7 +310,7 @@ void CWidgetEventHandlerList::raiseCursorControlEvent(ECursorControl cursorContr { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, (nxwidget_char_t)cursorControl); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleCursorControlEvent(e); } @@ -327,7 +327,7 @@ void CWidgetEventHandlerList::raiseFocusEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleFocusEvent(e); } @@ -344,7 +344,7 @@ void CWidgetEventHandlerList::raiseBlurEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleBlurEvent(e); } @@ -361,7 +361,7 @@ void CWidgetEventHandlerList::raiseCloseEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleCloseEvent(e); } @@ -378,7 +378,7 @@ void CWidgetEventHandlerList::raiseHideEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleHideEvent(e); } @@ -395,7 +395,7 @@ void CWidgetEventHandlerList::raiseShowEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleShowEvent(e); } @@ -412,7 +412,7 @@ void CWidgetEventHandlerList::raiseEnableEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleEnableEvent(e); } @@ -429,7 +429,7 @@ void CWidgetEventHandlerList::raiseDisableEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleDisableEvent(e); } @@ -446,7 +446,7 @@ void CWidgetEventHandlerList::raiseValueChangeEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleValueChangeEvent(e); } @@ -466,7 +466,7 @@ void CWidgetEventHandlerList::raiseResizeEvent(nxgl_coord_t width, nxgl_coord_t { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleResizeEvent(e); } @@ -489,7 +489,7 @@ void CWidgetEventHandlerList::raiseMoveEvent(nxgl_coord_t x, nxgl_coord_t y, { CWidgetEventArgs e(m_widget, x, y, vX, vY, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleMoveEvent(e); } @@ -510,7 +510,7 @@ void CWidgetEventHandlerList::raiseActionEvent(void) { CWidgetEventArgs e(m_widget, 0, 0, 0, 0, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleActionEvent(e); } @@ -530,7 +530,7 @@ void CWidgetEventHandlerList::raiseScrollEvent(nxgl_coord_t vX, nxgl_coord_t vY) { CWidgetEventArgs e(m_widget, 0, 0, vX, vY, KEY_CODE_NONE); - for (int i = 0; i < m_widgetEventHandlers.size(); ++i) + for (int i = 0; i < m_widgetEventHandlers.size(); i++) { m_widgetEventHandlers.at(i)->handleScrollEvent(e); } diff --git a/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx b/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx index 1c95264d1..5f3048b63 100644 --- a/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx +++ b/NxWidgets/libnxwidgets/src/cwindoweventhandlerlist.cxx @@ -159,3 +159,4 @@ void CWindowEventHandlerList::raiseKeyboardEvent(void) } #endif } + |