summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-15 20:10:32 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-15 20:10:32 +0000
commit3e886927b5b4c5751626c26c4c0b2d693a72a355 (patch)
tree51e09899dc63fadd94c36505db44c511e5483f4f
parentff243fbb128267bece372efa0960e3b523fdddab (diff)
NXWidgets::CNxTkWindow must subtract the height of the toolbar (if any) when reporting the size of the window
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4741 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rwxr-xr-xNxWidgets/ChangeLog.txt5
-rwxr-xr-xNxWidgets/TODO.txt38
-rw-r--r--NxWidgets/libnxwidgets/include/cnxtkwindow.hxx20
-rw-r--r--NxWidgets/libnxwidgets/src/cnxtkwindow.cxx47
-rw-r--r--NxWidgets/nxwm/src/cnxconsole.cxx1
-rw-r--r--nuttx/TODO2
-rw-r--r--nuttx/drivers/input/stmpe11_tsc.c8
7 files changed, 90 insertions, 31 deletions
diff --git a/NxWidgets/ChangeLog.txt b/NxWidgets/ChangeLog.txt
index 7339242487..0e93187c14 100755
--- a/NxWidgets/ChangeLog.txt
+++ b/NxWidgets/ChangeLog.txt
@@ -87,3 +87,8 @@
* NxWM::CNxConsole: Add a on_exit() exit handler that will close the
NxConsole window when the NSH thread exits. A correct build now depends
on having CONFIG_SCHED_ONEXIT defined.
+* NXWidgets::CNxWidget: Add a new onPreRelease() method.
+* NXWidgets::CButton, CButtonArry, CImage now post action event at pre-release time.
+* NxWM: ICON touches are now drive by action events instead of click events.
+* NXWidgets::CNxTkWindow: Reported size of a framed window must exlude the
+ height of the tool bar (if present)
diff --git a/NxWidgets/TODO.txt b/NxWidgets/TODO.txt
new file mode 100755
index 0000000000..2a55c81975
--- /dev/null
+++ b/NxWidgets/TODO.txt
@@ -0,0 +1,38 @@
+NxWidgets
+---------
+
+NxWM
+----
+
+ Title: DRAGGING ACROSS WINDOWS
+ Description: Need some indication if the touch/mouse drags from one window to
+ another then is release. Release event is lost in this case.
+ Status: Open
+ Priority: Low. ICON just stays selected and must be touched again.
+
+ Title: AUTO-RAISE DISABLED
+ Description: Auto-raise is currently disabled in nuttx for NX multi-server
+ mode. The
+ reason is complex:
+ - Most touchscreen controls send touch data a high rates
+ - In multi-server mode, touch events get queued in a message
+ queue.
+ - The logic that receives the messages performs the auto-raise.
+ But it can do stupid things after the first auto-raise as
+ it opperates on the stale data in the message queue.
+ I am thinking that auto-raise ought to be removed from NuttX
+ and moved out into a graphics layer (like NxWM) that knows
+ more about the appropriate context to do the autoraise.
+ Status: Open
+ Priority: Medium low
+
+ Title: MULTIPLE COPIES OF AN APPLICATION
+ Description: There is a limitation now in that one instance of an application
+ an be started at a time. This limitation is because the
+ application container class is created at start-up time; in
+ order to have multiple instances of tasks, you would have to
+ be able to create multiple container classes from the start
+ window.
+ Status: Open
+ Priority: High
+ \ No newline at end of file
diff --git a/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx b/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx
index 4c379754a2..8fda121a97 100644
--- a/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx
+++ b/NxWidgets/libnxwidgets/include/cnxtkwindow.hxx
@@ -88,6 +88,7 @@ namespace NXWidgets
NXTKWINDOW m_hNxTkWindow; /**< Handle to the NX raw window */
CWidgetControl *m_widgetControl; /**< Controlling widget for the window */
CNxToolbar *m_toolbar; /**< Child toolbar */
+ nxgl_coord_t m_toolbarHeight; /**< The height of the toolbar */
public:
@@ -161,7 +162,8 @@ namespace NXWidgets
inline void detachToolbar(void)
{
- m_toolbar = (CNxToolbar *)NULL;
+ m_toolbar = (CNxToolbar *)NULL;
+ m_toolbarHeight = 0;
}
/**
@@ -181,7 +183,7 @@ namespace NXWidgets
* @return True on success, false on any failure.
*/
- bool getPosition(FAR struct nxgl_point_s *pPos);
+ bool getPosition(FAR struct nxgl_point_s *pos);
/**
* Get the size of the window (as reported by the NX callback).
@@ -189,25 +191,25 @@ namespace NXWidgets
* @return The size.
*/
- bool getSize(FAR struct nxgl_size_s *pSize);
+ bool getSize(FAR struct nxgl_size_s *size);
/**
* Set the position and size of the window.
*
- * @param pPos The new position of the window.
+ * @param pos The new position of the window.
* @return True on success, false on any failure.
*/
- bool setPosition(FAR const struct nxgl_point_s *pPos);
+ bool setPosition(FAR const struct nxgl_point_s *pos);
/**
* Set the size of the selected window.
*
- * @param pSize The new size of the window.
+ * @param size The new size of the window.
* @return True on success, false on any failure.
*/
- bool setSize(FAR const struct nxgl_size_s *pSize);
+ bool setSize(FAR const struct nxgl_size_s *size);
/**
* Bring the window to the top of the display.
@@ -228,13 +230,13 @@ namespace NXWidgets
/**
* Set an individual pixel in the window with the specified color.
*
- * @param pPos The location of the pixel to be filled.
+ * @param pos The location of the pixel to be filled.
* @param color The color to use in the fill.
*
* @return True on success; false on failure.
*/
- bool setPixel(FAR const struct nxgl_point_s *pPos,
+ bool setPixel(FAR const struct nxgl_point_s *pos,
nxgl_mxpixel_t color);
/**
diff --git a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
index 16eaad2c7c..f1ea58692f 100644
--- a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
+++ b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx
@@ -74,10 +74,11 @@ CNxTkWindow::CNxTkWindow(NXHANDLE hNxServer, CWidgetControl *widgetControl)
m_hNxServer = hNxServer;
m_widgetControl = widgetControl;
- // Nullify uninitilized pointers
+ // Nullify uninitilized pointers and values
m_hNxTkWindow = (NXTKWINDOW )0;
m_toolbar = (CNxToolbar *)0;
+ m_toolbarHeight = 0;
// Create the CGraphicsPort instance for this window
@@ -209,6 +210,11 @@ CNxToolbar *CNxTkWindow::openToolbar(nxgl_coord_t height, CWidgetControl *widget
return (CNxToolbar *)0;
}
+ // Save the height of the toolbar. We will need this because it will change
+ // how we report the size of drawable part of the window.
+
+ m_toolbarHeight = height;
+
// Provide parent widget control information to new widget control instance.
// This information is reported by an NX callback for "normal" windows. But
// the toolbar widget control does not get NX callbacks and has to get the
@@ -277,48 +283,57 @@ bool CNxTkWindow::requestPosition(void)
* @return The position.
*/
-bool CNxTkWindow::getPosition(FAR struct nxgl_point_s *pPos)
+bool CNxTkWindow::getPosition(FAR struct nxgl_point_s *pos)
{
- return m_widgetControl->getWindowPosition(pPos);
+ return m_widgetControl->getWindowPosition(pos);
}
/**
- * Get the size of the window (as reported by the NX callback).
+ * Get the size of the window drawable region.
*
* @return The size.
*/
-bool CNxTkWindow::getSize(FAR struct nxgl_size_s *pSize)
+bool CNxTkWindow::getSize(FAR struct nxgl_size_s *size)
{
- return m_widgetControl->getWindowSize(pSize);
+ // Get the size of the NXTK window (this will exclude the thickness of
+ // the frame).
+
+ bool ret = m_widgetControl->getWindowSize(size);
+
+ // Subtract the height of the toolbar (if any) to get the size of the
+ // drawable region in the window.
+
+ size->h -= m_toolbarHeight;
+ return ret;
}
/**
* Set the position and size of the window.
*
- * @param pPos The new position of the window.
+ * @param pos The new position of the window.
* @return True on success, false on any failure.
*/
-bool CNxTkWindow::setPosition(FAR const struct nxgl_point_s *pPos)
+bool CNxTkWindow::setPosition(FAR const struct nxgl_point_s *pos)
{
// Set the window size and position
- return nxtk_setposition(m_hNxTkWindow, pPos) == OK;
+ return nxtk_setposition(m_hNxTkWindow, pos) == OK;
}
/**
* Set the size of the selected window.
*
- * @param pSize The new size of the window.
+ * @param size The new size of the window.
* @return True on success, false on any failure.
*/
-bool CNxTkWindow::setSize(FAR const struct nxgl_size_s *pSize)
+bool CNxTkWindow::setSize(FAR const struct nxgl_size_s *size)
{
// Set the window size
- return nxtk_setsize(m_hNxTkWindow, pSize) == OK;
+ return nxtk_setsize(m_hNxTkWindow, size) == OK;
}
/**
@@ -350,21 +365,21 @@ bool CNxTkWindow::lower(void)
/**
* Set an individual pixel in the window with the specified color.
*
- * @param pPos The location of the pixel to be filled.
+ * @param pos The location of the pixel to be filled.
* @param color The color to use in the fill.
*
* @return True on success; false on failure.
*/
-bool CNxTkWindow::setPixel(FAR const struct nxgl_point_s *pPos,
+bool CNxTkWindow::setPixel(FAR const struct nxgl_point_s *pos,
nxgl_mxpixel_t color)
{
#if 0
// Set an individual pixel to the specified color
- return nxtk_setpixel(m_hNxTkWindow, pPos, &color) == OK;
+ return nxtk_setpixel(m_hNxTkWindow, pos, &color) == OK;
#else
-# warning "Revisit"
+ // REVISIT
return false;
#endif
}
diff --git a/NxWidgets/nxwm/src/cnxconsole.cxx b/NxWidgets/nxwm/src/cnxconsole.cxx
index 855bd3d0b7..ec43c56569 100644
--- a/NxWidgets/nxwm/src/cnxconsole.cxx
+++ b/NxWidgets/nxwm/src/cnxconsole.cxx
@@ -323,7 +323,6 @@ void CNxConsole::stop(void)
void CNxConsole::hide(void)
{
// Disable drawing and events
-#warning "Missing logic"
}
/**
diff --git a/nuttx/TODO b/nuttx/TODO
index d1d9df3fa2..33f29d2dc7 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -793,7 +793,7 @@ o Graphics subystem (graphics/)
and moved out into a graphics layer (like NxWM) that knows
more about the appropriate context to do the autoraise.
Status: Open
- Proiority: Medium low
+ Priority: Medium low
o Pascal Add-On (pcode/)
^^^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/drivers/input/stmpe11_tsc.c b/nuttx/drivers/input/stmpe11_tsc.c
index afe27ac899..ca6d92ce03 100644
--- a/nuttx/drivers/input/stmpe11_tsc.c
+++ b/nuttx/drivers/input/stmpe11_tsc.c
@@ -929,7 +929,7 @@ void stmpe11_tscworker(FAR struct stmpe11_dev_s *priv, uint8_t intsta)
if (!pendown)
{
/* The pen is up.. reset thresholding variables. FIFOs will read zero if
- * there is no data available (hence the choice of (0,0)
+ * there is no data available (hence the choice of (0,0))
*/
priv->threshx = 0;
@@ -1050,11 +1050,11 @@ void stmpe11_tscworker(FAR struct stmpe11_dev_s *priv, uint8_t intsta)
stmpe11_notify(priv);
- /* Clear the interrupt pending bit and enable the FIFO again */
+ /* Reset and clear all data in the FIFO */
ignored:
- stmpe11_putreg8(priv, STMPE11_FIFO_STA, 0x01);
- stmpe11_putreg8(priv, STMPE11_FIFO_STA, 0x00);
+ stmpe11_putreg8(priv, STMPE11_FIFO_STA, FIFO_STA_FIFO_RESET);
+ stmpe11_putreg8(priv, STMPE11_FIFO_STA, 0);
}
#endif /* CONFIG_INPUT && CONFIG_INPUT_STMPE11 && !CONFIG_STMPE11_TSC_DISABLE */