aboutsummaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxsu
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/graphics/nxsu')
-rw-r--r--nuttx/graphics/nxsu/Make.defs44
-rw-r--r--nuttx/graphics/nxsu/nx_bitmap.c110
-rw-r--r--nuttx/graphics/nxsu/nx_close.c91
-rw-r--r--nuttx/graphics/nxsu/nx_closewindow.c100
-rw-r--r--nuttx/graphics/nxsu/nx_drawcircle.c145
-rw-r--r--nuttx/graphics/nxsu/nx_drawline.c136
-rw-r--r--nuttx/graphics/nxsu/nx_fill.c103
-rw-r--r--nuttx/graphics/nxsu/nx_fillcircle.c114
-rw-r--r--nuttx/graphics/nxsu/nx_filltrapezoid.c105
-rw-r--r--nuttx/graphics/nxsu/nx_getposition.c106
-rw-r--r--nuttx/graphics/nxsu/nx_getrectangle.c110
-rw-r--r--nuttx/graphics/nxsu/nx_kbdchin.c101
-rw-r--r--nuttx/graphics/nxsu/nx_kbdin.c100
-rw-r--r--nuttx/graphics/nxsu/nx_lower.c99
-rw-r--r--nuttx/graphics/nxsu/nx_mousein.c218
-rw-r--r--nuttx/graphics/nxsu/nx_move.c101
-rw-r--r--nuttx/graphics/nxsu/nx_open.c218
-rw-r--r--nuttx/graphics/nxsu/nx_openwindow.c127
-rw-r--r--nuttx/graphics/nxsu/nx_raise.c99
-rw-r--r--nuttx/graphics/nxsu/nx_releasebkgd.c109
-rw-r--r--nuttx/graphics/nxsu/nx_requestbkgd.c155
-rw-r--r--nuttx/graphics/nxsu/nx_setbgcolor.c103
-rw-r--r--nuttx/graphics/nxsu/nx_setpixel.c104
-rw-r--r--nuttx/graphics/nxsu/nx_setposition.c99
-rw-r--r--nuttx/graphics/nxsu/nx_setsize.c99
-rw-r--r--nuttx/graphics/nxsu/nxfe.h185
-rw-r--r--nuttx/graphics/nxsu/nxsu_constructwindow.c150
-rw-r--r--nuttx/graphics/nxsu/nxsu_redrawreq.c104
-rw-r--r--nuttx/graphics/nxsu/nxsu_reportposition.c107
29 files changed, 0 insertions, 3442 deletions
diff --git a/nuttx/graphics/nxsu/Make.defs b/nuttx/graphics/nxsu/Make.defs
deleted file mode 100644
index d16fe549c..000000000
--- a/nuttx/graphics/nxsu/Make.defs
+++ /dev/null
@@ -1,44 +0,0 @@
-############################################################################
-# graphics/nxsu/Make.defs
-#
-# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <gnutt@nuttx.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-NX_ASRCS =
-NXAPI_CSRCS = nx_bitmap.c nx_close.c nx_closewindow.c nx_fill.c \
- nx_filltrapezoid.c nx_getposition.c nx_getrectangle.c nx_kbdchin.c \
- nx_kbdin.c nx_lower.c nx_mousein.c nx_move.c nx_open.c \
- nx_openwindow.c nx_raise.c nx_releasebkgd.c nx_requestbkgd.c \
- nx_setpixel.c nx_setsize.c nx_setbgcolor.c nx_setposition.c \
- nx_drawcircle.c nx_drawline.c nx_fillcircle.c
-NXSU_CSRCS = nxsu_constructwindow.c nxsu_redrawreq.c nxsu_reportposition.c
-NX_CSRCS = $(NXAPI_CSRCS) $(NXSU_CSRCS)
diff --git a/nuttx/graphics/nxsu/nx_bitmap.c b/nuttx/graphics/nxsu/nx_bitmap.c
deleted file mode 100644
index 99fcbbb70..000000000
--- a/nuttx/graphics/nxsu/nx_bitmap.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_bitmap.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-
-#include "nxbe.h"
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_bitmap
- *
- * Description:
- * Copy a rectangular region of a larger image into the rectangle in the
- * specified window.
- *
- * Input Parameters:
- * hwnd - The window that will receive the bitmap image
- * dest - Describes the rectangular region on the display that will receive the
- * the bit map.
- * src - The start of the source image.
- * origin - The origin of the upper, left-most corner of the full bitmap.
- * Both dest and origin are in window coordinates, however, origin
- * may lie outside of the display.
- * stride - The width of the full source image in pixels.
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest,
- FAR const void *src[CONFIG_NX_NPLANES],
- FAR const struct nxgl_point_s *origin, unsigned int stride)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd || !dest || !src || !origin)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_bitmap((FAR struct nxbe_window_s *)hwnd, dest, src, origin, stride);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_close.c b/nuttx/graphics/nxsu/nx_close.c
deleted file mode 100644
index b48a2fca2..000000000
--- a/nuttx/graphics/nxsu/nx_close.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_close.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdlib.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_close
- *
- * Description:
- * Close the single user NX interface. nx_close is single-user equivalent
- * of nx_disconnect.
- *
- * Input Parameters:
- * handle - the handle returned by nx_open
- *
- * Return:
- * None
- *
- ****************************************************************************/
-
-void nx_close(NXHANDLE handle)
-{
- free(handle);
-}
-
diff --git a/nuttx/graphics/nxsu/nx_closewindow.c b/nuttx/graphics/nxsu/nx_closewindow.c
deleted file mode 100644
index 879d049d4..000000000
--- a/nuttx/graphics/nxsu/nx_closewindow.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_closewindow.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_closewindow
- *
- * Description:
- * Destroy a window created by nx_openwindow.
- *
- * Input Parameters:
- * wnd - The window to be destroyed
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_closewindow(NXWINDOW hwnd)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_closewindow((FAR struct nxbe_window_s *)hwnd);
- return OK;
-}
-
diff --git a/nuttx/graphics/nxsu/nx_drawcircle.c b/nuttx/graphics/nxsu/nx_drawcircle.c
deleted file mode 100644
index 30b307219..000000000
--- a/nuttx/graphics/nxsu/nx_drawcircle.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_drawcircle.c
- *
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <debug.h>
-#include <errno.h>
-
-#include <nuttx/nx/nxglib.h>
-#include <nuttx/nx/nx.h>
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-/* Named indices into the 16 circle points generated by nxgl_circlepts */
-
-#define POINT_0p0 0
-#define POINT_22p5 1
-#define POINT_45p0 2
-#define POINT_67p5 3
-#define POINT_90p0 4
-#define POINT_112p5 5
-#define POINT_135p0 6
-#define POINT_157p5 7
-#define POINT_180p0 8
-#define POINT_202p5 9
-#define POINT_225p0 10
-#define POINT_247p5 11
-#define POINT_270p0 12
-#define POINT_292p5 13
-#define POINT_315p0 14
-#define POINT_337p5 15
-#define NCIRCLE_POINTS 16
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_drawcircle
- *
- * Description:
- * Draw a circular outline using the specified line thickness and color.
- *
- * Input Parameters:
- * hwnd - The window handle
- * center - A pointer to the point that is the center of the circle
- * radius - The radius of the circle in pixels.
- * width - The width of the line
- * color - The color to use to fill the line
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_drawcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center,
- nxgl_coord_t radius, nxgl_coord_t width,
- nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
-{
- struct nxgl_point_s pts[NCIRCLE_POINTS];
- FAR struct nxgl_vector_s vector;
- int i;
- int ret;
-
- /* Convert the circle to a set of 16 points */
-
- nxgl_circlepts(center, radius, pts);
-
- /* Draw each pair of points as a vector */
-
- for (i = POINT_0p0; i < POINT_337p5; i++)
- {
- vector.pt1.x = pts[i].x;
- vector.pt1.y = pts[i].y;
- vector.pt2.x = pts[i+1].x;
- vector.pt2.y = pts[i+1].y;
- ret = nx_drawline(hwnd, &vector, width, color);
- if (ret != OK)
- {
- return ret;
- }
- }
-
- /* The final, closing vector is a special case */
-
- vector.pt1.x = pts[POINT_337p5].x;
- vector.pt1.y = pts[POINT_337p5].y;
- vector.pt2.x = pts[POINT_0p0].x;
- vector.pt2.y = pts[POINT_0p0].y;
- return nx_drawline(hwnd, &vector, width, color);
-}
diff --git a/nuttx/graphics/nxsu/nx_drawline.c b/nuttx/graphics/nxsu/nx_drawline.c
deleted file mode 100644
index 99e3494b9..000000000
--- a/nuttx/graphics/nxsu/nx_drawline.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_drawline.c
- *
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <debug.h>
-#include <errno.h>
-
-#include <nuttx/nx/nxglib.h>
-#include <nuttx/nx/nx.h>
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_drawline
- *
- * Description:
- * Fill the specified line in the window with the specified color. This
- * is simply a wrapper that uses nxgl_splitline() to break the line into
- * trapezoids and then calls nx_filltrapezoid() to render the line.
- *
- * Input Parameters:
- * hwnd - The window handle
- * vector - Describes the line to be drawn
- * width - The width of the line
- * color - The color to use to fill the line
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_drawline(NXWINDOW hwnd, FAR struct nxgl_vector_s *vector,
- nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
-{
- struct nxgl_trapezoid_s trap[3];
- struct nxgl_rect_s rect;
- int ret;
-
-#ifdef CONFIG_DEBUG
- if (!hwnd || !vector || width < 1 || !color)
- {
- set_errno(EINVAL);
- return ERROR;
- }
-#endif
-
- ret = nxgl_splitline(vector, trap, &rect, width);
- switch (ret)
- {
- case 0:
- ret = nx_filltrapezoid(hwnd, NULL, &trap[0], color);
- if (ret == OK)
- {
- ret = nx_filltrapezoid(hwnd, NULL, &trap[1], color);
- if (ret == OK)
- {
- ret = nx_filltrapezoid(hwnd, NULL, &trap[2], color);
- }
- }
- break;
-
- case 1:
- ret = nx_filltrapezoid(hwnd, NULL, &trap[1], color);
- break;
-
- case 2:
- ret = nx_fill(hwnd, &rect, color);
- break;
-
- default:
- set_errno(-ret);
- return ERROR;
- }
-
- return ret;
-}
diff --git a/nuttx/graphics/nxsu/nx_fill.c b/nuttx/graphics/nxsu/nx_fill.c
deleted file mode 100644
index 037cb5e13..000000000
--- a/nuttx/graphics/nxsu/nx_fill.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_fill.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <mqueue.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_fill
- *
- * Description:
- * Fill the specified rectangle in the window with the specified color
- *
- * Input Parameters:
- * hwnd - The window handle
- * rect - The location to be filled
- * color - The color to use in the fill
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_fill(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
- nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd || !rect || !color)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_fill((FAR struct nxbe_window_s *)hwnd, rect, color);
- return 0;
-}
diff --git a/nuttx/graphics/nxsu/nx_fillcircle.c b/nuttx/graphics/nxsu/nx_fillcircle.c
deleted file mode 100644
index f3876057a..000000000
--- a/nuttx/graphics/nxsu/nx_fillcircle.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
- * graphics/nxmu/nx_fillcircle.c
- *
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <debug.h>
-#include <errno.h>
-
-#include <nuttx/nx/nxglib.h>
-#include <nuttx/nx/nx.h>
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-#define NCIRCLE_TRAPS 8
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_fillcircle
- *
- * Description:
- * Fill a circular region using the specified color.
- *
- * Input Parameters:
- * hwnd - The window handle
- * center - A pointer to the point that is the center of the circle
- * radius - The radius of the circle in pixels.
- * color - The color to use to fill the circle.
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_fillcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center,
- nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
-{
- FAR struct nxgl_trapezoid_s traps[NCIRCLE_TRAPS];
- int i;
- int ret;
-
- /* Describe the circular region as a sequence of 8 trapezoids */
-
- nxgl_circletraps(center, radius, traps);
-
- /* Then rend those trapezoids */
-
- for (i = 0; i < NCIRCLE_TRAPS; i++)
- {
- ret = nx_filltrapezoid(hwnd, NULL, &traps[i], color);
- if (ret != OK)
- {
- return ret;
- }
- }
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_filltrapezoid.c b/nuttx/graphics/nxsu/nx_filltrapezoid.c
deleted file mode 100644
index 353b91f6e..000000000
--- a/nuttx/graphics/nxsu/nx_filltrapezoid.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_filltrapezoid.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <mqueue.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_filltrapezoid
- *
- * Description:
- * Fill the specified trapezoidal region in the window with the specified color
- *
- * Input Parameters:
- * hwnd - The window handle
- * clip - Clipping region (may be null)
- * trap - The trapezoidal region to be filled
- * color - The color to use in the fill
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_filltrapezoid(NXWINDOW hwnd, FAR const struct nxgl_rect_s *clip,
- FAR const struct nxgl_trapezoid_s *trap,
- nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd || !trap || !color)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_filltrapezoid((FAR struct nxbe_window_s *)hwnd, clip, trap, color);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_getposition.c b/nuttx/graphics/nxsu/nx_getposition.c
deleted file mode 100644
index acc633087..000000000
--- a/nuttx/graphics/nxsu/nx_getposition.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_getposition.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_getposition
- *
- * Description:
- * Request the position and size information for the selected window. The
- * values will be return asynchronously through the client callback function
- * pointer.
- *
- * Input Parameters:
- * hwnd - The window handle
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_getposition(NXWINDOW hwnd)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- /* This is very awkward since the requested values are available
- * immediately in the window structure. However, this round about way of
- * doing things makes the single user interface bug-for-bug compatible with
- * the multi-user interface.
- */
-
- nxfe_reportposition((FAR struct nxbe_window_s *)hwnd);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_getrectangle.c b/nuttx/graphics/nxsu/nx_getrectangle.c
deleted file mode 100644
index 472ff4c6c..000000000
--- a/nuttx/graphics/nxsu/nx_getrectangle.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_getrectangle.c
- *
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <mqueue.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_getrectangle
- *
- * Description:
- * Get the raw contents of graphic memory within a rectangular region. NOTE:
- * Since raw graphic memory is returned, the returned memory content may be
- * the memory of windows above this one and may not necessarily belong to
- * this window unless you assure that this is the top window.
- *
- * Input Parameters:
- * wnd - The window structure reference
- * rect - The location to be copied
- * plane - Specifies the color plane to get from.
- * dest - The location to copy the memory region
- * deststride - The width, in bytes, the the dest memory
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
- unsigned int plane, FAR uint8_t *dest,
- unsigned int deststride)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd || !rect || !dest)
- {
- set_errno(EINVAL);
- return ERROR;
- }
-#endif
-
- nxbe_getrectangle((FAR struct nxbe_window_s *)hwnd, rect, plane,
- dest, deststride);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_kbdchin.c b/nuttx/graphics/nxsu/nx_kbdchin.c
deleted file mode 100644
index f07462f22..000000000
--- a/nuttx/graphics/nxsu/nx_kbdchin.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_kbdchin.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-#ifdef CONFIG_NX_KBD
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_kbdchin
- *
- * Description:
- * Used by a thread or interrupt handler that manages some kind of keypad
- * hardware to report text information to the NX server. That text
- * data will be routed by the NX server to the appropriate window client.
- *
- ****************************************************************************/
-
-int nx_kbdchin(NXHANDLE handle, uint8_t ch)
-{
- FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle;
- FAR struct nxbe_window_s *wnd = fe->be.topwnd;
-
- /* Give the keypad event only to the top window (unless the top window
- * is the background window).
- */
-
- if (wnd->cb->kbdin)
- {
- wnd->cb->kbdin(wnd, 1, &ch, wnd->arg);
- }
- return OK;
-}
-
-#endif /* CONFIG_NX_KBD */
diff --git a/nuttx/graphics/nxsu/nx_kbdin.c b/nuttx/graphics/nxsu/nx_kbdin.c
deleted file mode 100644
index 6acd96a72..000000000
--- a/nuttx/graphics/nxsu/nx_kbdin.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_kbdin.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-#ifdef CONFIG_NX_KBD
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_kbdin
- *
- * Description:
- * Used by a thread or interrupt handler that manages some kind of keypad
- * hardware to report text information to the NX server.
- *
- ****************************************************************************/
-
-int nx_kbdin(NXHANDLE handle, uint8_t nch, FAR const uint8_t *ch)
-{
- FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle;
- FAR struct nxbe_window_s *wnd = fe->be.topwnd;
-
- /* Give the keypad event only to the top window (unless the top child
- * is the background window).
- */
-
- if (wnd->cb->kbdin)
- {
- wnd->cb->kbdin(wnd, nch, ch, wnd->arg);
- }
- return OK;
-}
-
-#endif /* CONFIG_NX_KBD */
diff --git a/nuttx/graphics/nxsu/nx_lower.c b/nuttx/graphics/nxsu/nx_lower.c
deleted file mode 100644
index 5c47185f8..000000000
--- a/nuttx/graphics/nxsu/nx_lower.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_lower.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_raise
- *
- * Description:
- * Lower the specified window to the bottom of the display.
- *
- * Input parameters:
- * hwnd - the window to be lowered
- *
- * Returned value:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_lower(NXWINDOW hwnd)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_lower((FAR struct nxbe_window_s *)hwnd);
- return OK;
-}
-
diff --git a/nuttx/graphics/nxsu/nx_mousein.c b/nuttx/graphics/nxsu/nx_mousein.c
deleted file mode 100644
index 5b268358b..000000000
--- a/nuttx/graphics/nxsu/nx_mousein.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_mousein.c
- *
- * Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nxglib.h>
-#include <nuttx/nx/nx.h>
-
-#include "nxfe.h"
-
-#ifdef CONFIG_NX_MOUSE
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static struct nxgl_point_s g_mpos;
-static struct nxgl_point_s g_mrange;
-static uint8_t g_mbutton;
-static struct nxbe_window_s *g_mwnd;
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nxsu_mouseinit
- *
- * Description:
- * Initialize with the mouse in the center of the display
- *
- ****************************************************************************/
-
-void nxsu_mouseinit(int x, int y)
-{
- g_mrange.x = x;
- g_mrange.y = y;
- g_mpos.x = x / 2;
- g_mpos.y = y / 2;
- g_mbutton = 0;
-}
-
-/****************************************************************************
- * Name: nxsu_mousereport
- *
- * Description:
- * Report mouse position info to the specified window
- *
- * Input Parameters:
- * wnd - The window to receive the mouse report
- *
- * Returned Value:
- * 0: Mouse report sent; >0: Mouse report not sent; <0: An error occurred
- *
- ****************************************************************************/
-
-int nxsu_mousereport(struct nxbe_window_s *wnd)
-{
- struct nxgl_point_s relpos;
-
- /* Does this window support mouse callbacks? */
-
- if (wnd->cb->mousein)
- {
- /* Yes.. Is the mouse position visible in this window? */
-
- if (nxbe_visible(wnd, &g_mpos))
- {
- /* Yes... Convert the mouse position to window relative coordinates */
-
- nxgl_vectsubtract(&relpos, &g_mpos, &wnd->bounds.pt1);
- wnd->cb->mousein((NXWINDOW)wnd, &relpos, g_mbutton, wnd->arg);
- return OK;
- }
- }
-
- /* No error occurred, but the mouse report was not sent */
-
- return 1;
-}
-
-/****************************************************************************
- * Name: nx_mousein
- *
- * Description:
- * Used by a thread or interrupt handler that manages some kind of pointing
- * hardware to report new positional data to the NX server. That positional
- * data will be routed by the NX server to the appropriate window client.
- *
- ****************************************************************************/
-
-int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons)
-{
- FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle;
- struct nxbe_window_s *wnd;
- uint8_t oldbuttons;
- int ret;
-
- /* Clip x and y to within the bounding rectangle */
-
- if (x < 0)
- {
- x = 0;
- }
- else if (x >= g_mrange.x)
- {
- x = g_mrange.x - 1;
- }
-
- if (y < 0)
- {
- y = 0;
- }
- else if (y >= g_mrange.y)
- {
- y = g_mrange.y - 1;
- }
-
- /* Look any change in values */
-
- if (x != g_mpos.x || y != g_mpos.y || buttons != g_mbutton)
- {
- /* Update the mouse value */
-
- oldbuttons = g_mbutton;
- g_mpos.x = x;
- g_mpos.y = y;
- g_mbutton = buttons;
-
- /* If a button is already down, regard this as part of a mouse drag
- * event. Pass all the following events to the window where the drag
- * started in.
- */
-
- if (oldbuttons && g_mwnd && g_mwnd->cb->mousein)
- {
- struct nxgl_point_s relpos;
- nxgl_vectsubtract(&relpos, &g_mpos, &g_mwnd->bounds.pt1);
- g_mwnd->cb->mousein((NXWINDOW)g_mwnd, &relpos, g_mbutton, g_mwnd->arg);
- return OK;
- }
-
- /* Pick the window to receive the mouse event. Start with the top
- * window and go down. Step with the first window that gets the mouse
- * report
- */
-
- for (wnd = fe->be.topwnd; wnd; wnd = wnd->below)
- {
- ret = nxsu_mousereport(wnd);
- if (ret == 0)
- {
- break;
- }
- }
-
- g_mwnd = wnd;
- }
- return OK;
-}
-
-#endif /* CONFIG_NX_MOUSE */
diff --git a/nuttx/graphics/nxsu/nx_move.c b/nuttx/graphics/nxsu/nx_move.c
deleted file mode 100644
index 9fb303147..000000000
--- a/nuttx/graphics/nxsu/nx_move.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_move.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_move
- *
- * Description:
- * Move a rectangular region within the window
- *
- * Input Parameters:
- * hwnd - The window within which the move is to be done
- * rect - Describes the rectangular region to move
- * offset - The offset to move the region
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_move(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
- FAR const struct nxgl_point_s *offset)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_move((FAR struct nxbe_window_s *)hwnd, rect, offset);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_open.c b/nuttx/graphics/nxsu/nx_open.c
deleted file mode 100644
index 72a2db058..000000000
--- a/nuttx/graphics/nxsu/nx_open.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_open.c
- *
- * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Function Prototypes
- ****************************************************************************/
-
-static void nxsu_bkgdredraw(NXWINDOW hwnd,
- FAR const struct nxgl_rect_s *rect,
- bool more, FAR void *arg);
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-const struct nx_callback_s g_bkgdcb =
-{
- nxsu_bkgdredraw, /* redraw */
- NULL /* position */
-#ifdef CONFIG_NX_MOUSE
- , NULL /* mousein */
-#endif
-#ifdef CONFIG_NX_KBD
- , NULL /* my kbdin */
-#endif
-};
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nxsu_bkgdredraw
- ****************************************************************************/
-
-static void nxsu_bkgdredraw(NXWINDOW hwnd,
- FAR const struct nxgl_rect_s *rect,
- bool more, FAR void *arg)
-{
- FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
- FAR struct nxbe_state_s *be = wnd->be;
-
- gvdbg("BG redraw rect={(%d,%d),(%d,%d)}\n",
- rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y);
- nxbe_fill(wnd, &wnd->bounds, be->bgcolor);
-}
-
-/****************************************************************************
- * Name: nxsu_setup
- ****************************************************************************/
-
-static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev,
- FAR struct nxfe_state_s *fe)
-{
- int ret;
-
- /* Configure the framebuffer device */
-
- ret = nxbe_configure(dev, &fe->be);
- if (ret < 0)
- {
- gdbg("nxbe_configure failed: %d\n", -ret);
- errno = -ret;
- return ERROR;
- }
-
-#if CONFIG_FB_CMAP
- ret = nxbe_colormap(dev);
- if (ret < 0)
- {
- gdbg("nxbe_colormap failed: %d\n", -ret);
- errno = -ret;
- return ERROR;
- }
-#endif
-
- /* Initialize the non-NULL elements of the back-end structure window */
- /* Initialize the background window */
-
- fe->be.bkgd.be = &fe->be;
- fe->be.bkgd.cb = &g_bkgdcb;
-
- fe->be.bkgd.bounds.pt2.x = fe->be.vinfo.xres - 1;
- fe->be.bkgd.bounds.pt2.y = fe->be.vinfo.yres - 1;
-
- /* Complete initialization of the server state structure. The
- * window list contains only one element: The background window
- * with nothing else above or below it
- */
-
- fe->be.topwnd = &fe->be.bkgd;
-
- /* Initialize the mouse position */
-
-#ifdef CONFIG_NX_MOUSE
- nxsu_mouseinit(fe->be.vinfo.xres, fe->be.vinfo.yres);
-#endif
- return OK;
-}
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_open
- *
- * Description:
- * Create, initialize and return an NX handle for use in subsequent
- * NX API calls. nx_open is the single user equivalent of nx_connect
- * plus nx_run.
- *
- * Input Parameters:
- * dev - Vtable "object" of the framebuffer/LCD "driver" to use
- *
- * Return:
- * Success: A non-NULL handle used with subsequent NX accesses
- * Failure: NULL is returned and errno is set appropriately
- *
- ****************************************************************************/
-
-NXHANDLE nx_open(FAR NX_DRIVERTYPE *dev)
-{
- FAR struct nxfe_state_s *fe;
- int ret;
-
- /* Sanity checking */
-
-#ifdef CONFIG_DEBUG
- if (!dev)
- {
- errno = EINVAL;
- return NULL;
- }
-#endif
-
- /* Allocate the NX state structure */
-
- fe = (FAR struct nxfe_state_s *)zalloc(sizeof(struct nxfe_state_s));
- if (!fe)
- {
- errno = ENOMEM;
- return NULL;
- }
-
- /* Initialize and configure the server */
-
- ret = nxsu_setup(dev, fe);
- if (ret < 0)
- {
- return NULL; /* nxsu_setup sets errno */
- }
-
- /* Fill the initial background window */
-
- nxbe_fill(&fe->be.bkgd, &fe->be.bkgd.bounds, fe->be.bgcolor);
- return (NXHANDLE)fe;
-}
-
diff --git a/nuttx/graphics/nxsu/nx_openwindow.c b/nuttx/graphics/nxsu/nx_openwindow.c
deleted file mode 100644
index 64f4ed76d..000000000
--- a/nuttx/graphics/nxsu/nx_openwindow.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_openwindow.c
- *
- * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_openwindow
- *
- * Description:
- * Create a new window.
- *
- * Input Parameters:
- * handle - The handle returned by nx_connect
- * cb - Callbacks used to process windo events
- * arg - User provided value that will be returned with NX callbacks.
- *
- * Return:
- * Success: A non-NULL handle used with subsequent NX accesses
- * Failure: NULL is returned and errno is set appropriately
- *
- ****************************************************************************/
-
-NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb,
- FAR void *arg)
-{
- FAR struct nxbe_window_s *wnd;
- int ret;
-
-#ifdef CONFIG_DEBUG
- if (!handle || !cb)
- {
- errno = EINVAL;
- return NULL;
- }
-#endif
-
- /* Pre-allocate the window structure */
-
- wnd = (FAR struct nxbe_window_s *)zalloc(sizeof(struct nxbe_window_s));
- if (!wnd)
- {
- errno = ENOMEM;
- return NULL;
- }
-
- /* Then let nxfe_constructwindow do the rest */
-
- ret = nxfe_constructwindow(handle, wnd, cb, arg);
- if (ret < 0)
- {
- /* An error occurred, the window has been freed */
-
- return NULL;
- }
-
- /* Return the initialized window reference */
-
- return (NXWINDOW)wnd;
-}
-
diff --git a/nuttx/graphics/nxsu/nx_raise.c b/nuttx/graphics/nxsu/nx_raise.c
deleted file mode 100644
index e0ede5400..000000000
--- a/nuttx/graphics/nxsu/nx_raise.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_raise.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_raise
- *
- * Description:
- * Bring the specified window to the top of the display.
- *
- * Input parameters:
- * hwnd - the window to be raised
- *
- * Returned value:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_raise(NXWINDOW hwnd)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_raise((FAR struct nxbe_window_s *)hwnd);
- return OK;
-}
-
diff --git a/nuttx/graphics/nxsu/nx_releasebkgd.c b/nuttx/graphics/nxsu/nx_releasebkgd.c
deleted file mode 100644
index b0cbbf5c1..000000000
--- a/nuttx/graphics/nxsu/nx_releasebkgd.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_releasebkgd.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_releasebkgd
- *
- * Description:
- * Release the background window previously acquired using nx_openbgwindow
- * and return control of the background to NX.
- *
- * Input Parameters:
- * hwnd - The handle returned (indirectly) by nx_requestbkgd
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_releasebkgd(NXWINDOW hwnd)
-{
- FAR struct nxbe_window_s *bkgd = (FAR struct nxbe_window_s *)hwnd;
-
-#ifdef CONFIG_DEBUG
- if (!bkgd)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- /* Restore the NX background window callbacks */
-
- bkgd->cb = &g_bkgdcb;
- bkgd->arg = NULL;
-
- /* Redraw the background window */
-
- nxfe_redrawreq(bkgd, &bkgd->bounds);
- return OK;
-}
-
diff --git a/nuttx/graphics/nxsu/nx_requestbkgd.c b/nuttx/graphics/nxsu/nx_requestbkgd.c
deleted file mode 100644
index 7f0ab12f2..000000000
--- a/nuttx/graphics/nxsu/nx_requestbkgd.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_requestbkgd.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_requestbkgd
- *
- * Description:
- * NX normally controls a separate window called the background window.
- * It repaints the window as necessary using only a solid color fill. The
- * background window always represents the entire screen and is always
- * below other windows. It is useful for an application to control the
- * background window in the following conditions:
- *
- * - If you want to implement a windowless solution. The single screen
- * can be used to creat a truly simple graphic environment. In this
- * case, you should probably also de-select CONFIG_NX_MULTIUSER as well.
- * - When you want more on the background than a solid color. For
- * example, if you want an image in the background, or animations in the
- * background, or live video, etc.
- *
- * This API only requests the handle of the background window. That
- * handle will be returned asynchronously in a subsequent position and
- * redraw callbacks.
- *
- * Cautions:
- * - The following should never be called using the background window.
- * They are guaranteed to cause severe crashes:
- *
- * nx_setposition, nx_setsize, nx_raise, nx_lower.
- *
- * - Neither nx_opengbwindow or nx_closebgwindow should be called more than
- * once. Multiple instances of the background window are not supported.
- *
- * Input Parameters:
- * handle - The handle returned by nx_connect
- * cb - Callbacks to use for processing background window events
- * arg - User provided argument (see nx_openwindow, nx_constructwindow)
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_requestbkgd(NXHANDLE handle, FAR const struct nx_callback_s *cb,
- FAR void *arg)
-{
- FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle;
- FAR struct nxbe_state_s *be = &fe->be;
-
-#ifdef CONFIG_DEBUG
- if (!fe || !cb)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- /* Replace the NX background windo callbacks with the client's callbacks */
-
- be->bkgd.cb = cb;
- be->bkgd.arg = arg;
-
- /* Report the size/position of the background window to the client */
-
- nxfe_reportposition((NXWINDOW)&be->bkgd);
-
- /* Redraw the background window */
-
- nxfe_redrawreq(&be->bkgd, &be->bkgd.bounds);
-
- /* Provide the mouse settings to the client */
-
-#ifdef CONFIG_NX_MOUSE
- nxsu_mousereport(&be->bkgd);
-#endif
-
- /* In this single-user mode, we could return the background window
- * handle here. However, we cannot do that in the multi-user case
- * because that handle is known only to the server. Instead, the
- * background window handle is returned to the client via a redraw
- * callback. So we will do the same in the single-user case for
- * compatibility.
- */
-
- return OK;
-}
-
diff --git a/nuttx/graphics/nxsu/nx_setbgcolor.c b/nuttx/graphics/nxsu/nx_setbgcolor.c
deleted file mode 100644
index 5f9818855..000000000
--- a/nuttx/graphics/nxsu/nx_setbgcolor.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_setbgcolor.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_setbgcolor
- *
- * Description:
- * Set the color of the background
- *
- * Input Parameters:
- * handle - The connection handle
- * color - The color to use in the background
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_setbgcolor(NXHANDLE handle,
- nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
-{
- FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle;
-
-#ifdef CONFIG_DEBUG
- if (!fe)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxgl_colorcopy(fe->be.bgcolor, color);
- nxbe_fill(&fe->be.bkgd, &fe->be.bkgd.bounds, color);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_setpixel.c b/nuttx/graphics/nxsu/nx_setpixel.c
deleted file mode 100644
index 533e3b623..000000000
--- a/nuttx/graphics/nxsu/nx_setpixel.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_setpixel.c
- *
- * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <mqueue.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_setpixel
- *
- * Description:
- * Set a single pixel in the window to the specified color. This is simply
- * a degenerate case of nx_fill(), but may be optimized in some architectures.
- *
- * Input Parameters:
- * wnd - The window structure reference
- * pos - The pixel location to be set
- * col - The color to use in the set
- *
- * Return:
- * None
- *
- ****************************************************************************/
-
-int nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
- nxgl_mxpixel_t color[CONFIG_NX_NPLANES])
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd || !pos || !color)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_setpixel((FAR struct nxbe_window_s *)hwnd, pos, color);
- return 0;
-}
diff --git a/nuttx/graphics/nxsu/nx_setposition.c b/nuttx/graphics/nxsu/nx_setposition.c
deleted file mode 100644
index ed0e5e3f4..000000000
--- a/nuttx/graphics/nxsu/nx_setposition.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_setposition.c
- *
- * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_setposition
- *
- * Description:
- * Set the position and size for the selected window
- *
- * Input Parameters:
- * hwnd - The window handle
- * pos - The new position of the window
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_setposition(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd || !pos)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_setposition((FAR struct nxbe_window_s *)hwnd, pos);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nx_setsize.c b/nuttx/graphics/nxsu/nx_setsize.c
deleted file mode 100644
index 4872abf03..000000000
--- a/nuttx/graphics/nxsu/nx_setsize.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_setsize.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nx_setsize
- *
- * Description:
- * Set the size of the selected window
- *
- * Input Parameters:
- * hwnd - The window handle
- * size - The new size of the window.
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately
- *
- ****************************************************************************/
-
-int nx_setsize(NXWINDOW hwnd, FAR const struct nxgl_size_s *size)
-{
-#ifdef CONFIG_DEBUG
- if (!hwnd || !size)
- {
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- nxbe_setsize((FAR struct nxbe_window_s *)hwnd, size);
- return OK;
-}
diff --git a/nuttx/graphics/nxsu/nxfe.h b/nuttx/graphics/nxsu/nxfe.h
deleted file mode 100644
index 528224fc1..000000000
--- a/nuttx/graphics/nxsu/nxfe.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nxfe.h
- *
- * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-#ifndef __GRAPHICS_NXSU_NXFE_H
-#define __GRAPHICS_NXSU_NXFE_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <mqueue.h>
-#include <semaphore.h>
-
-#include <nuttx/nx/nx.h>
-
-#include "nxbe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Types
- ****************************************************************************/
-
-/* Server state structure ***************************************************/
-
-/* This the server 'front-end' state structure. It is really the same
- * as the back-end state, but we wrap the back-end state so that we can add
- * things to the structure in the future
- */
-
-struct nxfe_state_s
-{
- /* The 'back-end' window status. Must be first so that instances of
- * struct nxbe_state_s can be simply cast to an instance of struct
- * nxfe_state_s
- */
-
- struct nxbe_state_s be;
-};
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-#undef EXTERN
-#if defined(__cplusplus)
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
-#endif
-
-EXTERN const struct nx_callback_s g_bkgdcb;
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nxfe_constructwindow
- *
- * Description:
- * This function is the same a nx_openwindow EXCEPT that the client provides
- * the window structure instance. nx_constructwindow will initialize the
- * the pre-allocated window structure for use by NX. This function is
- * provided in addition to nx_open window in order to support a kind of
- * inheritance: The caller's window structure may include extensions that
- * are not visible to NX.
- *
- * NOTE: wnd must have been allocated using malloc() (or related allocators)
- * Once provided to nxfe_constructwindow() that memory is owned and managed
- * by NX. On certain error conditions or when the window is closed, NX will
- * free() the window.
- *
- * Input Parameters:
- * handle - The handle returned by nx_connect
- * wnd - The pre-allocated window structure.
- * cb - Callbacks used to process window events
- * arg - User provided value that will be returned with NX callbacks.
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately. In the
- * case of ERROR, NX will have dealloated the pre-allocated window.
- *
- ****************************************************************************/
-
-EXTERN int nxfe_constructwindow(NXHANDLE handle,
- FAR struct nxbe_window_s *wnd,
- FAR const struct nx_callback_s *cb,
- FAR void *arg);
-
-/****************************************************************************
- * Name: nxfe_redrawreq
- *
- * Descripton:
- * Request the client that has this window to redraw the rectangular region.
- *
- ****************************************************************************/
-
-EXTERN void nxfe_redrawreq(FAR struct nxbe_window_s *wnd,
- FAR const struct nxgl_rect_s *rect);
-
-/****************************************************************************
- * Name: nxfe_reportposition
- *
- * Descripton:
- * Report the new size/position of the window.
- *
- ****************************************************************************/
-
-EXTERN void nxfe_reportposition(FAR struct nxbe_window_s *wnd);
-
-/****************************************************************************
- * Name: nxmu_mouseinit
- *
- * Description:
- * Initialize with the mouse in the center of the display
- *
- ****************************************************************************/
-
-#ifdef CONFIG_NX_MOUSE
-EXTERN void nxsu_mouseinit(int x, int y);
-#endif
-
-/****************************************************************************
- * Name: nxmu_mousereport
- *
- * Description:
- * Report mouse position info to the specified window
- *
- * Input Parameters:
- * wnd - The window to receive the mouse report
- *
- * Returned Value:
- * 0: Mouse report sent; >0: Mouse report not sent; <0: An error occurred
- *
- ****************************************************************************/
-
-#ifdef CONFIG_NX_MOUSE
-EXTERN int nxsu_mousereport(struct nxbe_window_s *wnd);
-#endif
-
-#undef EXTERN
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __GRAPHICS_NXSU_NXFE_H */
-
diff --git a/nuttx/graphics/nxsu/nxsu_constructwindow.c b/nuttx/graphics/nxsu/nxsu_constructwindow.c
deleted file mode 100644
index f812b3f83..000000000
--- a/nuttx/graphics/nxsu/nxsu_constructwindow.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nx_openwindow.c
- *
- * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nxfe_constructwindow
- *
- * Description:
- * This function is the same a nx_openwindow EXCEPT that the client provides
- * the window structure instance. nx_constructwindow will initialize the
- * the pre-allocated window structure for use by NX. This function is
- * provided in addition to nx_open window in order to support a kind of
- * inheritance: The caller's window structure may include extensions that
- * are not visible to NX.
- *
- * NOTE: wnd must have been allocated using malloc() (or related allocators)
- * Once provided to nxfe_constructwindow() that memory is owned and managed
- * by NX. On certain error conditions or when the window is closed, NX will
- * free() the window.
- *
- * Input Parameters:
- * handle - The handle returned by nx_connect
- * wnd - The pre-allocated window structure.
- * cb - Callbacks used to process window events
- * arg - User provided value that will be returned with NX callbacks.
- *
- * Return:
- * OK on success; ERROR on failure with errno set appropriately. In the
- * case of ERROR, NX will have dealloated the pre-allocated window.
- *
- ****************************************************************************/
-
-int nxfe_constructwindow(NXHANDLE handle, FAR struct nxbe_window_s *wnd,
- FAR const struct nx_callback_s *cb, FAR void *arg)
-{
- FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle;
- FAR struct nxbe_state_s *be = &fe->be;
-
-#ifdef CONFIG_DEBUG
- if (!wnd)
- {
- errno = EINVAL;
- return ERROR;
- }
-
- if (!fe || !cb)
- {
- free(wnd);
- errno = EINVAL;
- return ERROR;
- }
-#endif
-
- /* Initialize the window structure */
-
- wnd->be = be;
- wnd->cb = cb;
- wnd->arg = arg;
-
- /* Insert the new window at the top on the display. topwnd is
- * never NULL (it may point only at the background window, however)
- */
-
- wnd->above = NULL;
- wnd->below = be->topwnd;
-
- be->topwnd->above = wnd;
- be->topwnd = wnd;
-
- /* Report the initialize size/position of the window */
-
- nxfe_reportposition((NXWINDOW)wnd);
-
- /* Provide the initial mouse settings */
-
-#ifdef CONFIG_NX_MOUSE
- nxsu_mousereport(wnd);
-#endif
-
- return OK;
-}
-
diff --git a/nuttx/graphics/nxsu/nxsu_redrawreq.c b/nuttx/graphics/nxsu/nxsu_redrawreq.c
deleted file mode 100644
index 21845f16f..000000000
--- a/nuttx/graphics/nxsu/nxsu_redrawreq.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nxsu_redrawreq.c
- *
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nxfe_redrawreq
- *
- * Descripton:
- * Request the client that has this window to redraw the rectangular region.
- *
- ****************************************************************************/
-
-void nxfe_redrawreq(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *rect)
-{
- struct nxgl_rect_s relrect;
-
-#ifdef CONFIG_DEBUG
- if (!wnd)
- {
- return;
- }
-#endif
-
- if (wnd->cb->redraw)
- {
- /* Convert the frame rectangle to a window-relative rectangle */
-
- nxgl_rectoffset(&relrect, rect, -wnd->bounds.pt1.x, -wnd->bounds.pt1.y);
-
- /* And request the redraw */
-
- wnd->cb->redraw((NXWINDOW)wnd, &relrect, false, wnd->arg);
- }
-}
-
-
diff --git a/nuttx/graphics/nxsu/nxsu_reportposition.c b/nuttx/graphics/nxsu/nxsu_reportposition.c
deleted file mode 100644
index b795a81e6..000000000
--- a/nuttx/graphics/nxsu/nxsu_reportposition.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
- * graphics/nxsu/nxsu_reportposition.c
- *
- * Copyright (C) 2008-2009,2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <debug.h>
-
-#include <nuttx/nx/nx.h>
-#include "nxfe.h"
-
-/****************************************************************************
- * Pre-Processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nxfe_reportposition
- *
- * Descripton:
- * Report the new size/position of the window.
- *
- ****************************************************************************/
-
-void nxfe_reportposition(FAR struct nxbe_window_s *wnd)
-{
- FAR struct nxbe_state_s *be;
- struct nxgl_size_s size;
-
-#ifdef CONFIG_DEBUG
- if (!wnd)
- {
- return;
- }
-#endif
- be = wnd->be;
-
- /* This is very awkward in single user mode, but at least it is compatible.
- * with the way things are done in multiple user mode.
- */
-
- if (wnd->cb->position)
- {
- /* Get the size of the bounding rectangle */
-
- nxgl_rectsize(&size, &wnd->bounds);
-
- /* And provide this to the client */
-
- wnd->cb->position(wnd, &size, &wnd->bounds.pt1, &be->bkgd.bounds, wnd->arg);
- }
-}