summaryrefslogtreecommitdiff
path: root/nuttx/graphics
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-16 16:31:31 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-16 16:31:31 -0600
commit72754295cabf0096cbc6f2ec693f1e5e362d8c56 (patch)
treed541af4e4c2a1ba416aa775623d658d926b282b8 /nuttx/graphics
parent80ea5737ca7bbdb33ba3ccf37a7c919338876222 (diff)
downloadnuttx-72754295cabf0096cbc6f2ec693f1e5e362d8c56.tar.gz
nuttx-72754295cabf0096cbc6f2ec693f1e5e362d8c56.tar.bz2
nuttx-72754295cabf0096cbc6f2ec693f1e5e362d8c56.zip
Rename CONFIG_NX_MOUSE to CONFIG_NX_INPUT, then add CONFIG_NX_XYINPUT_MOUSE and CONFIG_XYINPUT_TOUCHSCREEN
Diffstat (limited to 'nuttx/graphics')
-rw-r--r--nuttx/graphics/Kconfig37
-rw-r--r--nuttx/graphics/README.txt5
-rw-r--r--nuttx/graphics/nxconsole/nxcon_internal.h2
-rw-r--r--nuttx/graphics/nxmu/nxfe.h6
-rw-r--r--nuttx/graphics/nxmu/nxmu_mouse.c4
-rw-r--r--nuttx/graphics/nxmu/nxmu_openwindow.c2
-rw-r--r--nuttx/graphics/nxmu/nxmu_requestbkgd.c2
-rw-r--r--nuttx/graphics/nxmu/nxmu_server.c4
-rw-r--r--nuttx/graphics/nxsu/nx_constructwindow.c2
-rw-r--r--nuttx/graphics/nxsu/nx_mousein.c4
-rw-r--r--nuttx/graphics/nxsu/nx_open.c4
-rw-r--r--nuttx/graphics/nxsu/nx_requestbkgd.c2
-rw-r--r--nuttx/graphics/nxsu/nxfe.h4
13 files changed, 55 insertions, 23 deletions
diff --git a/nuttx/graphics/Kconfig b/nuttx/graphics/Kconfig
index 85e2164a8..187089b54 100644
--- a/nuttx/graphics/Kconfig
+++ b/nuttx/graphics/Kconfig
@@ -118,11 +118,42 @@ config NX_PACKEDMSFIRST
menu "Input Devices"
-config NX_MOUSE
- bool "Mouse/Touchscreen Support"
+config NX_XYINPUT
+ bool
default n
+
+choice
+ prompt "Mouse/Touchscreen Support"
+ default NX_XYINPUT_NONE
+
+config NX_XYINPUT_NONE
+ bool "No X/Y input device"
+ ---help---
+ There is no X/Y positional input device connected
+
+config NX_XYINPUT_MOUSE
+ bool "Mouse device support"
+ select NX_XYINPUT
---help---
- Build in support for mouse or touchscreeninput.
+ X/Y positional input is provided by a mouse. The only difference
+ between the mouse and touchscreen selection is in the presence or
+ absence of the mouse buttons. This difference is not used within
+ NuttX itself, however, graphics applications may need this
+ information, for example, to handle the different ways that graphic
+ elements are selected and dragged.
+
+config NX_XYINPUT_TOUCHSCREEN
+ bool "Touchscreen device support"
+ select NX_XYINPUT
+ ---help---
+ X/Y positional input is provided by a touchscreen. The only difference
+ between the mouse and touchscreen selection is in the presence or
+ absence of the mouse buttons. This difference is not used within
+ NuttX itself, however, graphics applications may need this
+ information, for example, to handle the different ways that graphic
+ elements are selected and dragged.
+
+endchoice # Mouse/Touchscreen Support
config NX_KBD
bool "Keyboard Support"
diff --git a/nuttx/graphics/README.txt b/nuttx/graphics/README.txt
index 1532c66b5..a0902546a 100644
--- a/nuttx/graphics/README.txt
+++ b/nuttx/graphics/README.txt
@@ -275,8 +275,9 @@ CONFIG_NX_DISABLE_32BPP
CONFIG_NX_PACKEDMSFIRST
If a pixel depth of less than 8-bits is used, then NX needs to know if the
pixels pack from the MS to LS or from LS to MS
-CONFIG_NX_MOUSE
- Build in support for mouse input.
+CONFIG_NX_XYINPUT
+ Build in support for a X/Y positional input device such as a mouse or a
+ touchscreen.
CONFIG_NX_KBD
Build in support of keypad/keyboard input.
CONFIG_NXTK_BORDERWIDTH
diff --git a/nuttx/graphics/nxconsole/nxcon_internal.h b/nuttx/graphics/nxconsole/nxcon_internal.h
index dc976a662..37bb73aec 100644
--- a/nuttx/graphics/nxconsole/nxcon_internal.h
+++ b/nuttx/graphics/nxconsole/nxcon_internal.h
@@ -188,7 +188,7 @@ struct nxcon_state_s
*/
#ifndef CONFIG_DISABLE_POLL
- struct pollfd *fds[CONFIG_RAMLOG_NPOLLWAITERS];
+ struct pollfd *fds[CONFIG_NXCONSOLE_NPOLLWAITERS];
#endif
#endif /* CONFIG_NXCONSOLE_NXKBDIN */
};
diff --git a/nuttx/graphics/nxmu/nxfe.h b/nuttx/graphics/nxmu/nxfe.h
index 42e768267..00db9bb58 100644
--- a/nuttx/graphics/nxmu/nxfe.h
+++ b/nuttx/graphics/nxmu/nxfe.h
@@ -220,7 +220,7 @@ void nxfe_redrawreq(FAR struct nxbe_window_s *wnd,
*
****************************************************************************/
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
void nxmu_mouseinit(int x, int y);
#endif
@@ -238,7 +238,7 @@ void nxmu_mouseinit(int x, int y);
*
****************************************************************************/
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
int nxmu_mousereport(struct nxbe_window_s *wnd);
#endif
@@ -252,7 +252,7 @@ int nxmu_mousereport(struct nxbe_window_s *wnd);
*
****************************************************************************/
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
int nxmu_mousein(FAR struct nxfe_state_s *fe,
FAR const struct nxgl_point_s *pos, int button);
#endif
diff --git a/nuttx/graphics/nxmu/nxmu_mouse.c b/nuttx/graphics/nxmu/nxmu_mouse.c
index 1b8f4a592..90378a02d 100644
--- a/nuttx/graphics/nxmu/nxmu_mouse.c
+++ b/nuttx/graphics/nxmu/nxmu_mouse.c
@@ -47,7 +47,7 @@
#include <nuttx/nx/nx.h>
#include "nxfe.h"
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
/****************************************************************************
* Pre-Processor Definitions
@@ -232,4 +232,4 @@ int nxmu_mousein(FAR struct nxfe_state_s *fe,
return OK;
}
-#endif /* CONFIG_NX_MOUSE */
+#endif /* CONFIG_NX_XYINPUT */
diff --git a/nuttx/graphics/nxmu/nxmu_openwindow.c b/nuttx/graphics/nxmu/nxmu_openwindow.c
index 395f0a770..c159045b7 100644
--- a/nuttx/graphics/nxmu/nxmu_openwindow.c
+++ b/nuttx/graphics/nxmu/nxmu_openwindow.c
@@ -107,7 +107,7 @@ void nxmu_openwindow(FAR struct nxbe_state_s *be, FAR struct nxbe_window_s *wnd)
/* Provide the initial mouse settings to the client */
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
nxmu_mousereport(wnd);
#endif
}
diff --git a/nuttx/graphics/nxmu/nxmu_requestbkgd.c b/nuttx/graphics/nxmu/nxmu_requestbkgd.c
index 47b1ad13f..ef7c9f1c0 100644
--- a/nuttx/graphics/nxmu/nxmu_requestbkgd.c
+++ b/nuttx/graphics/nxmu/nxmu_requestbkgd.c
@@ -117,7 +117,7 @@ void nxmu_requestbkgd(FAR struct nxfe_conn_s *conn,
/* Provide the mouse settings */
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
nxmu_mousereport(&be->bkgd);
#endif
}
diff --git a/nuttx/graphics/nxmu/nxmu_server.c b/nuttx/graphics/nxmu/nxmu_server.c
index 4cb1246b5..b96b4f8b8 100644
--- a/nuttx/graphics/nxmu/nxmu_server.c
+++ b/nuttx/graphics/nxmu/nxmu_server.c
@@ -259,7 +259,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
/* Initialize the mouse position */
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
nxmu_mouseinit(fe->be.vinfo.xres, fe->be.vinfo.yres);
#endif
return OK;
@@ -501,7 +501,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev)
}
break;
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
case NX_SVRMSG_MOUSEIN: /* New mouse report from mouse client */
{
FAR struct nxsvrmsg_mousein_s *mousemsg = (FAR struct nxsvrmsg_mousein_s *)buffer;
diff --git a/nuttx/graphics/nxsu/nx_constructwindow.c b/nuttx/graphics/nxsu/nx_constructwindow.c
index d4e90dbfb..f5f5720a9 100644
--- a/nuttx/graphics/nxsu/nx_constructwindow.c
+++ b/nuttx/graphics/nxsu/nx_constructwindow.c
@@ -144,7 +144,7 @@ int nx_constructwindow(NXHANDLE handle, NXWINDOW hwnd,
/* Provide the initial mouse settings */
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
nxsu_mousereport(wnd);
#endif
diff --git a/nuttx/graphics/nxsu/nx_mousein.c b/nuttx/graphics/nxsu/nx_mousein.c
index 5b268358b..551737779 100644
--- a/nuttx/graphics/nxsu/nx_mousein.c
+++ b/nuttx/graphics/nxsu/nx_mousein.c
@@ -48,7 +48,7 @@
#include "nxfe.h"
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
/****************************************************************************
* Pre-Processor Definitions
@@ -215,4 +215,4 @@ int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons)
return OK;
}
-#endif /* CONFIG_NX_MOUSE */
+#endif /* CONFIG_NX_XYINPUT */
diff --git a/nuttx/graphics/nxsu/nx_open.c b/nuttx/graphics/nxsu/nx_open.c
index a8956d8af..0de1159ae 100644
--- a/nuttx/graphics/nxsu/nx_open.c
+++ b/nuttx/graphics/nxsu/nx_open.c
@@ -78,7 +78,7 @@ const struct nx_callback_s g_bkgdcb =
{
nxsu_bkgdredraw, /* redraw */
NULL /* position */
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
, NULL /* mousein */
#endif
#ifdef CONFIG_NX_KBD
@@ -153,7 +153,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev,
/* Initialize the mouse position */
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
nxsu_mouseinit(fe->be.vinfo.xres, fe->be.vinfo.yres);
#endif
return OK;
diff --git a/nuttx/graphics/nxsu/nx_requestbkgd.c b/nuttx/graphics/nxsu/nx_requestbkgd.c
index 7f0ab12f2..a62b37cec 100644
--- a/nuttx/graphics/nxsu/nx_requestbkgd.c
+++ b/nuttx/graphics/nxsu/nx_requestbkgd.c
@@ -138,7 +138,7 @@ int nx_requestbkgd(NXHANDLE handle, FAR const struct nx_callback_s *cb,
/* Provide the mouse settings to the client */
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
nxsu_mousereport(&be->bkgd);
#endif
diff --git a/nuttx/graphics/nxsu/nxfe.h b/nuttx/graphics/nxsu/nxfe.h
index 82c1d832b..e3f9ac357 100644
--- a/nuttx/graphics/nxsu/nxfe.h
+++ b/nuttx/graphics/nxsu/nxfe.h
@@ -122,7 +122,7 @@ void nxfe_reportposition(FAR struct nxbe_window_s *wnd);
*
****************************************************************************/
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
void nxsu_mouseinit(int x, int y);
#endif
@@ -140,7 +140,7 @@ void nxsu_mouseinit(int x, int y);
*
****************************************************************************/
-#ifdef CONFIG_NX_MOUSE
+#ifdef CONFIG_NX_XYINPUT
int nxsu_mousereport(struct nxbe_window_s *wnd);
#endif