summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/include
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-10-14 14:52:17 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-10-14 14:52:17 -0600
commit360abde7b0f21861292648de869ab0d1ba655444 (patch)
tree0a6742d3c1fcabf62c07992fa8e9dff53cad3583 /NxWidgets/nxwm/include
parentb33449923aee0b4320bed6b3f4880fcc75da32ab (diff)
downloadnuttx-360abde7b0f21861292648de869ab0d1ba655444.tar.gz
nuttx-360abde7b0f21861292648de869ab0d1ba655444.tar.bz2
nuttx-360abde7b0f21861292648de869ab0d1ba655444.zip
NxWM::CCalibration: Add an option to provide some instructions in the center of the calibration screen
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r--NxWidgets/nxwm/include/ccalibration.hxx8
-rw-r--r--NxWidgets/nxwm/include/nxwmconfig.hxx25
2 files changed, 28 insertions, 5 deletions
diff --git a/NxWidgets/nxwm/include/ccalibration.hxx b/NxWidgets/nxwm/include/ccalibration.hxx
index f114a19a2..376462ca8 100644
--- a/NxWidgets/nxwm/include/ccalibration.hxx
+++ b/NxWidgets/nxwm/include/ccalibration.hxx
@@ -32,7 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
-
+
#ifndef __INCLUDE_CCALIBRATION_HXX
#define __INCLUDE_CCALIBRATION_HXX
@@ -48,6 +48,8 @@
#include "cnxstring.hxx"
#include "cwidgeteventhandler.hxx"
#include "cwidgetcontrol.hxx"
+#include "clabel.hxx"
+#include "cnxfont.hxx"
#include "ctaskbar.hxx"
#include "iapplication.hxx"
@@ -146,6 +148,10 @@ namespace NxWM
CTaskbar *m_taskbar; /**< The taskbar (used to terminate calibration) */
CFullScreenWindow *m_window; /**< The window for the calibration display */
CTouchscreen *m_touchscreen; /**< The touchscreen device */
+#ifdef CONFIG_NXWM_CALIBRATION_MESSAGES
+ NXWidgets::CLabel *m_text; /**< Calibration message */
+ NXWidgets::CNxFont *m_font; /**< The font used in the message */
+#endif
pthread_t m_thread; /**< The calibration thread ID */
struct SCalibScreenInfo m_screenInfo; /**< Describes the current calibration display */
struct nxgl_point_s m_touchPos; /**< This is the last touch position */
diff --git a/NxWidgets/nxwm/include/nxwmconfig.hxx b/NxWidgets/nxwm/include/nxwmconfig.hxx
index ad8e0e97d..65384341b 100644
--- a/NxWidgets/nxwm/include/nxwmconfig.hxx
+++ b/NxWidgets/nxwm/include/nxwmconfig.hxx
@@ -39,7 +39,7 @@
/****************************************************************************
* Included Files
****************************************************************************/
-
+
#include <nuttx/config.h>
#include <nuttx/input/touchscreen.h>
@@ -116,7 +116,7 @@
*
* CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR - Normal background color. Default:
* MKRGB(148,189,215)
- * CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR - Select background color.
+ * CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR - Select background color.
* Default: MKRGB(206,227,241)
* CONFIG_NXWM_DEFAULT_SHINEEDGECOLOR - Color of the bright edge of a border.
* Default: MKRGB(255,255,255)
@@ -265,7 +265,7 @@
* CONFIG_NXWM_STARTWINDOW_HSPACING - Horizontal spacing. Default: 4 rows
* CONFIG_NXWM_STARTWINDOW_ICON - The glyph to use as the start window icon
* CONFIG_NXWM_STARTWINDOW_MQNAME - The well known name of the message queue
- * Used to communicated from CWindowMessenger to the start window thread.
+ * Used to communicated from CWindowMessenger to the start window thread.
* Default: "/dev/nxwm"
* CONFIG_NXWM_STARTWINDOW_MXMSGS - The maximum number of messages to queue
* before blocking. Defualt 32
@@ -465,8 +465,10 @@
* CONFIG_NXWM_CALIBRATION_CIRCLECOLOR - The color of the circle in the
* touchscreen calibration display. Default: MKRGB(255, 255, 255) (white)
* CONFIG_NXWM_CALIBRATION_TOUCHEDCOLOR - The color of the circle in the
- * touchscreen calibration display after the touch is recorder. Default:
+ * touchscreen calibration display after the touch is recorder. Default:
* MKRGB(255, 255, 96) (very light yellow)
+ * CONFIG_NXWM_CALIBRATION_FONTID - Use this default NxWidgets font ID
+ * instead of the system font ID (NXFONT_DEFAULT).
* CONFIG_NXWM_CALIBRATION_ICON - The ICON to use for the touchscreen
* calibration application. Default: NxWM::g_calibrationBitmap
* CONFIG_NXWM_CALIBRATION_SIGNO - The realtime signal used to wake up the
@@ -475,6 +477,13 @@
* thread. Default: SCHED_PRIORITY_DEFAULT
* CONFIG_NXWM_CALIBRATION_LISTENERSTACK - Calibration listener thread stack
* size. Default 2048
+ * CONFIG_NXWM_CALIBRATION_MARGIN
+ * The Calbration display consists of a target press offset from the edges
+ * of the display by this number of pixels (in the horizontal direction)
+ * or rows (in the vertical). The closer that you can comfortabley
+ * position the press positions to the edge, the more accurate will be the
+ * linear interpolation (provide that the hardware provides equally good
+ * measurements near the edges).
*/
#ifndef CONFIG_NXWM_CALIBRATION_BACKGROUNDCOLOR
@@ -493,6 +502,10 @@
# define CONFIG_NXWM_CALIBRATION_TOUCHEDCOLOR MKRGB(255, 255, 96)
#endif
+#ifndef CONFIG_NXWM_CALIBRATION_FONTID
+# define CONFIG_NXWM_CALIBRATION_FONTID NXFONT_DEFAULT
+#endif
+
#ifndef CONFIG_NXWM_CALIBRATION_ICON
# define CONFIG_NXWM_CALIBRATION_ICON NxWM::g_calibrationBitmap
#endif
@@ -509,6 +522,10 @@
# define CONFIG_NXWM_CALIBRATION_LISTENERSTACK 2048
#endif
+#ifndef CONFIG_NXWM_CALIBRATION_MARGIN
+# define CONFIG_NXWM_CALIBRATION_MARGIN 40
+#endif
+
/* Hexcalculator applications ***********************************************/
/**
* Calibration display settings: