summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/Documentation/NuttX.html2
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html60
-rw-r--r--nuttx/Makefile4
-rw-r--r--nuttx/TODO2
-rw-r--r--nuttx/configs/README.txt37
-rw-r--r--nuttx/configs/sim/README.txt2
-rw-r--r--nuttx/configs/sim/nx/defconfig57
-rw-r--r--nuttx/configs/sim/nx/defconfig-x1157
-rw-r--r--nuttx/examples/nx/nx_internal.h6
-rw-r--r--nuttx/examples/nx/nx_server.c4
-rw-r--r--nuttx/graphics/README.txt56
-rw-r--r--nuttx/graphics/nxbe/nxbe_fbconfigure.c14
-rw-r--r--nuttx/graphics/nxfonts/nxfonts_convert.c6
-rw-r--r--nuttx/graphics/nxglib/nxglib_copyrectangle.c2
-rw-r--r--nuttx/graphics/nxglib/nxglib_fillrectangle.c2
-rw-r--r--nuttx/graphics/nxglib/nxglib_filltrapezoid.c4
-rw-r--r--nuttx/graphics/nxglib/nxglib_moverectangle.c2
-rw-r--r--nuttx/include/nuttx/nxglib.h4
18 files changed, 235 insertions, 86 deletions
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index f73f1008e..e333675e9 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -547,7 +547,7 @@
<b>Look at all those files and features... How can it be a tiny OS?</b>.
The NuttX feature list (above) is fairly long and if you look at the NuttX
source tree, you will see that there are hundreds of source files comprising
- NuttX. How can NuttX be a tiny OS will all of that?
+ NuttX. How can NuttX be a tiny OS with all of that?
</p>
<center><table width="90%">
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 01ef85086..e40a8d4e2 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -16,7 +16,7 @@
</b></big></h1>
<p><small>by</small></p>
<p>Gregory Nutt</p>
- <p><small>Last Update: November 28, 2008</small></p>
+ <p><small>Last Update: December 5, 2008</small></p>
</center>
<center><h1>Table of Contents</h1></center>
@@ -1857,7 +1857,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
<h2>Graphics related configuration settings</h3>
<ul>
<li>
- <code>CONFIG_NXGRAPHICS</code>
+ <code>CONFIG_NX</code>
Enables overall support for graphics library and NX
</li>
</ul>
@@ -1865,35 +1865,63 @@ The system can be re-made subsequently by just typing <code>make</code>.
<h3>NX configuration setting</h3>
<ul>
<li>
- <code>CONFIG_NX_MULTIUSER</code>
- Configures NX in multi-user mode
+ <code>CONFIG_NX_MULTIUSER</code>:
+ Configures NX in multi-user mode.
</li>
<li>
- <code>CONFIG_NX_NPLANES</code>
+ <code>CONFIG_NX_NPLANES</code>:
Some YUV color formats requires support for multiple planes,
one for each color component. Unless you have such special
- hardware, this value should be undefined or set to 1
+ hardware, this value should be undefined or set to 1.
</li>
<li>
- <code>CONFIG_NXGLIB_DISABLE_1BPP</code>, <code>CONFIG_NXGLIB_DISABLE_2BPP</code>,
- <code>CONFIG_NXGLIB_DISABLE_4BPP</code>, <code>CONFIG_NXGLIB_DISABLE_8BPP</code>
- <code>CONFIG_NXGLIB_DISABLE_16BPP</code>, <code>CONFIG_NXGLIB_DISABLE_24BPP</code>, and
- <code>CONFIG_NXGLIB_DISABLE_32BPP
+ <code>CONFIG_NX_DISABLE_1BPP</code>, <code>CONFIG_NX_DISABLE_2BPP</code>,
+ <code>CONFIG_NX_DISABLE_4BPP</code>, <code>CONFIG_NX_DISABLE_8BPP</code>
+ <code>CONFIG_NX_DISABLE_16BPP</code>, <code>CONFIG_NX_DISABLE_24BPP</code>, and
+ <code>CONFIG_NX_DISABLE_32BPP</code>:
NX supports a variety of pixel depths. You can save some
memory by disabling support for unused color depths.
</li>
<li>
- <code>CONFIG_NXGL_PACKEDMSFIRST</code>
+ <code>CONFIG_NX_PACKEDMSFIRST</code>:
If a pixel depth of less than 8-bits is used, then NX needs
to know if the pixels pack from the MS to LS or from LS to MS
</li>
<li>
- <code>CONFIG_NX_MOUSE</code>
- Build in support for mouse input
+ <code>CONFIG_NX_MOUSE</code>:
+ Build in support for mouse input.
</li>
<li>
- <code>CONFIG_NX_KBD</code>
- Build in support of keypad/keyboard input
+ <code>CONFIG_NX_KBD</code>:
+ Build in support of keypad/keyboard input.
+ </li>
+ <li>
+ <code>CONFIG_NXTK_BORDERWIDTH</code>:
+ Specifies with with of the border (in pixels) used with
+ framed windows. The default is 4.
+ </li>
+ <li>
+ <code>CONFIG_NXTK_BORDERCOLOR1</code> and <code>CONFIG_NXTK_BORDERCOLOR2</code>:
+ Specify the colors of the border used with framed windows.
+ <code>CONFIG_NXTK_BORDERCOLOR2</code> is the shadow side color and so
+ is normally darker. The default is medium and dark grey,
+ respectively
+ </li>
+ <li>
+ <code>CONFIG_NXTK_AUTORAISE</code>:
+ If set, a window will be raised to the top if the mouse position
+ is over a visible portion of the window. Default: A mouse
+ button must be clicked over a visible portion of the window.
+ </li>
+ <li>
+ <code>CONFIG_NXFONTS_CHARBITS</code>:
+ The number of bits in the character set. Current options are
+ only 7 and 8. The default is 7.
+ </li>
+ <li>
+ <code>CONFIG_NXFONT_SANS</code>:
+ At present, there is only one font. But if there were were more,
+ then this option would select the sans serif font.
</li>
</ul>
@@ -1902,7 +1930,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
<li>
<code>CONFIG_NX_BLOCKING</code>
Open the client message queues in blocking mode. In this case,
- <code>nx_eventhandler()</code> will never return.
+ <code>nx_eventhandler()</code> will not return until a message is received and processed.
</li>
<li>
<code>CONFIG_NX_MXSERVERMSGS</code> and <code>CONFIG_NX_MXCLIENTMSGS</code>
diff --git a/nuttx/Makefile b/nuttx/Makefile
index c24f8f6e6..ac39d8ed5 100644
--- a/nuttx/Makefile
+++ b/nuttx/Makefile
@@ -68,7 +68,7 @@ ifeq ($(CONFIG_NET),y)
NONFSDIRS += net netutils
endif
-ifeq ($(CONFIG_NXGRAPHICS),y)
+ifeq ($(CONFIG_NX),y)
NONFSDIRS += graphics
endif
@@ -121,7 +121,7 @@ ifneq ($(NX_DIR),)
LINKLIBS += $(NX_DIR)/libnx$(LIBEXT)
endif
-ifeq ($(CONFIG_NXGRAPHICS),y)
+ifeq ($(CONFIG_NX),y)
LINKLIBS += graphics/libgraphics$(LIBEXT)
endif
diff --git a/nuttx/TODO b/nuttx/TODO
index 5a2a00fad..94bdfe5d6 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -350,7 +350,7 @@ o Build system
Status: Open
Priority: Medium-low
- Description: If CONFIG_NXGRAPHICS is enabled, the build fails the first time
+ Description: If CONFIG_NX is enabled, the build fails the first time
saying that there is "No rule to make target..." for one of the
auto-generated graphics files. This is a nuisance, but if you
simply build again (with the source files already auto-generated)
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index 354245339..669152d39 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -370,27 +370,45 @@ defconfig -- This is a configuration file similar to the Linux
Graphics related configuration settings
- CONFIG_NXGRAPHICS
+ CONFIG_NX
Enables overall support for graphics library and NX
CONFIG_NX_MULTIUSER
Configures NX in multi-user mode
CONFIG_NX_NPLANES
Some YUV color formats requires support for multiple planes,
one for each color component. Unless you have such special
- hardware, this value should be undefined or set to 1
- CONFIG_NXGLIB_DISABLE_1BPP, CONFIG_NXGLIB_DISABLE_2BPP,
- CONFIG_NXGLIB_DISABLE_4BPP, CONFIG_NXGLIB_DISABLE_8BPP,
- CONFIG_NXGLIB_DISABLE_16BPP, CONFIG_NXGLIB_DISABLE_24BPP, and
- CONFIG_NXGLIB_DISABLE_32BPP
+ hardware, this value should be undefined or set to 1.
+ CONFIG_NX_DISABLE_1BPP, CONFIG_NX_DISABLE_2BPP,
+ CONFIG_NX_DISABLE_4BPP, CONFIG_NX_DISABLE_8BPP,
+ CONFIG_NX_DISABLE_16BPP, CONFIG_NX_DISABLE_24BPP, and
+ CONFIG_NX_DISABLE_32BPP
NX supports a variety of pixel depths. You can save some
memory by disabling support for unused color depths.
- CONFIG_NXGL_PACKEDMSFIRST
+ CONFIG_NX_PACKEDMSFIRST
If a pixel depth of less than 8-bits is used, then NX needs
to know if the pixels pack from the MS to LS or from LS to MS
CONFIG_NX_MOUSE
- Build in support for mouse input
+ Build in support for mouse input.
CONFIG_NX_KBD
- Build in support of keypad/keyboard input
+ Build in support of keypad/keyboard input.
+ CONFIG_NXTK_BORDERWIDTH
+ Specifies with with of the border (in pixels) used with
+ framed windows. The default is 4.
+ CONFIG_NXTK_BORDERCOLOR1 and CONFIG_NXTK_BORDERCOLOR2
+ Specify the colors of the border used with framed windows.
+ CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so
+ is normally darker. The default is medium and dark grey,
+ respectively
+ CONFIG_NXTK_AUTORAISE
+ If set, a window will be raised to the top if the mouse position
+ is over a visible portion of the window. Default: A mouse
+ button must be clicked over a visible portion of the window.
+ CONFIG_NXFONTS_CHARBITS
+ The number of bits in the character set. Current options are
+ only 7 and 8. The default is 7.
+ CONFIG_NXFONT_SANS
+ At present, there is only one font. But if there were were more,
+ then this option would select the sans serif font.
NX Multi-user only options:
@@ -404,7 +422,6 @@ defconfig -- This is a configuration file similar to the Linux
too many messages (CONFIG_PREALLOC_MQ_MSGS controls how many
messages are pre-allocated).
-
Stack and heap information
CONFIG_BOOT_FROM_FLASH - Some configurations support XIP
diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt
index 39f6d7a63..54485872b 100644
--- a/nuttx/configs/sim/README.txt
+++ b/nuttx/configs/sim/README.txt
@@ -51,7 +51,7 @@ nx
My system has 24-bit color, but packed into 32-bit words so
the correct seeting of CONFIG_SIM_FBBPP is 32.
- For whatever value of CONFIG_SIM_FBBPP is selected, then
- the corresponidng CONFIG_NXGLIB_DISABLE_*BPP setting must
+ the corresponidng CONFIG_NX_DISABLE_*BPP setting must
not be disabled.
- The default in defconfig is to use a generic memory buffer
for the framebuffer. defconfig-x11 is an example with X11
diff --git a/nuttx/configs/sim/nx/defconfig b/nuttx/configs/sim/nx/defconfig
index 4717caac9..8e1ec8810 100644
--- a/nuttx/configs/sim/nx/defconfig
+++ b/nuttx/configs/sim/nx/defconfig
@@ -297,7 +297,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
#
# Graphics related configuration settings
#
-# CONFIG_NXGRAPHICS
+# CONFIG_NX
# Enables overall support for graphics library and NX
# CONFIG_NX_MULTIUSER
# Configures NX in multi-user mode
@@ -305,44 +305,69 @@ CONFIG_NET_RESOLV_ENTRIES=4
# Some YUV color formats requires support for multiple planes,
# one for each color component. Unless you have such special
# hardware, this value should be undefined or set to 1
-# CONFIG_NXGLIB_DISABLE_1BPP, CONFIG_NXGLIB_DISABLE_2BPP,
-# CONFIG_NXGLIB_DISABLE_4BPP, CONFIG_NXGLIB_DISABLE_8BPP,
-# CONFIG_NXGLIB_DISABLE_16BPP, CONFIG_NXGLIB_DISABLE_24BPP, and
-# CONFIG_NXGLIB_DISABLE_32BPP
+# CONFIG_NX_DISABLE_1BPP, CONFIG_NX_DISABLE_2BPP,
+# CONFIG_NX_DISABLE_4BPP, CONFIG_NX_DISABLE_8BPP,
+# CONFIG_NX_DISABLE_16BPP, CONFIG_NX_DISABLE_24BPP, and
+# CONFIG_NX_DISABLE_32BPP
# NX supports a variety of pixel depths. You can save some
# memory by disabling support for unused color depths.
-# CONFIG_NXGL_PACKEDMSFIRST
+# CONFIG_NX_PACKEDMSFIRST
# If a pixel depth of less than 8-bits is used, then NX needs
# to know if the pixels pack from the MS to LS or from LS to MS
# CONFIG_NX_MOUSE
# Build in support for mouse input
# CONFIG_NX_KBD
# Build in support of keypad/keyboard input
+# CONFIG_NXTK_BORDERWIDTH
+# Specifies with with of the border (in pixels) used with
+# framed windows. The default is 4.
+# CONFIG_NXTK_BORDERCOLOR1 and CONFIG_NXTK_BORDERCOLOR2
+# Specify the colors of the border used with framed windows.
+# CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so
+# is normally darker. The default is medium and dark grey,
+# respectively
+# CONFIG_NXTK_AUTORAISE
+# If set, a window will be raised to the top if the mouse position
+# is over a visible portion of the window. Default: A mouse
+# button must be clicked over a visible portion of the window.
+# CONFIG_NXFONTS_CHARBITS
+# The number of bits in the character set. Current options are
+# only 7 and 8. The default is 7.
+# CONFIG_NXFONT_SANS
+# At present, there is only one font. But if there were were more,
+# then this option would select the sans serif font.
#
# NX Multi-user only options:
#
# CONFIG_NX_BLOCKING
# Open the client message queues in blocking mode. In this case,
-# nx_eventhandler() will never return.
+# nx_eventhandler() will not return until a message is received and processed.
# CONFIG_NX_MXSERVERMSGS and CONFIG_NX_MXCLIENTMSGS
# Specifies the maximum number of messages that can fit in
# the message queues. No additional resources are allocated, but
# this can be set to prevent flooding of the client or server with
# too many messages (CONFIG_PREALLOC_MQ_MSGS controls how many
# messages are pre-allocated).
-CONFIG_NXGRAPHICS=y
+#
+CONFIG_NX=y
CONFIG_NX_MULTIUSER=n
CONFIG_NX_NPLANES=1
-CONFIG_NXGLIB_DISABLE_1BPP=y
-CONFIG_NXGLIB_DISABLE_2BPP=y
-CONFIG_NXGLIB_DISABLE_4BPP=y
-CONFIG_NXGLIB_DISABLE_8BPP=n
-CONFIG_NXGLIB_DISABLE_16BPP=y
-CONFIG_NXGLIB_DISABLE_24BPP=y
-CONFIG_NXGLIB_DISABLE_32BPP=y
-CONFIG_NXGL_PACKEDMSFIRST=n
+CONFIG_NX_DISABLE_1BPP=y
+CONFIG_NX_DISABLE_2BPP=y
+CONFIG_NX_DISABLE_4BPP=y
+CONFIG_NX_DISABLE_8BPP=n
+CONFIG_NX_DISABLE_16BPP=y
+CONFIG_NX_DISABLE_24BPP=y
+CONFIG_NX_DISABLE_32BPP=y
+CONFIG_NX_PACKEDMSFIRST=n
CONFIG_NX_MOUSE=y
CONFIG_NX_KBD=y
+#CONFIG_NXTK_BORDERWIDTH=4
+#CONFIG_NXTK_BORDERCOLOR1
+#CONFIG_NXTK_BORDERCOLOR2
+CONFIG_NXTK_AUTORAISE=n
+CONFIG_NXFONT_SANS=y
+CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
diff --git a/nuttx/configs/sim/nx/defconfig-x11 b/nuttx/configs/sim/nx/defconfig-x11
index 88097ab66..e82f32aa9 100644
--- a/nuttx/configs/sim/nx/defconfig-x11
+++ b/nuttx/configs/sim/nx/defconfig-x11
@@ -297,7 +297,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
#
# Graphics related configuration settings
#
-# CONFIG_NXGRAPHICS
+# CONFIG_NX
# Enables overall support for graphics library and NX
# CONFIG_NX_MULTIUSER
# Configures NX in multi-user mode
@@ -305,44 +305,69 @@ CONFIG_NET_RESOLV_ENTRIES=4
# Some YUV color formats requires support for multiple planes,
# one for each color component. Unless you have such special
# hardware, this value should be undefined or set to 1
-# CONFIG_NXGLIB_DISABLE_1BPP, CONFIG_NXGLIB_DISABLE_2BPP,
-# CONFIG_NXGLIB_DISABLE_4BPP, CONFIG_NXGLIB_DISABLE_8BPP,
-# CONFIG_NXGLIB_DISABLE_16BPP, CONFIG_NXGLIB_DISABLE_24BPP, and
-# CONFIG_NXGLIB_DISABLE_32BPP
+# CONFIG_NX_DISABLE_1BPP, CONFIG_NX_DISABLE_2BPP,
+# CONFIG_NX_DISABLE_4BPP, CONFIG_NX_DISABLE_8BPP,
+# CONFIG_NX_DISABLE_16BPP, CONFIG_NX_DISABLE_24BPP, and
+# CONFIG_NX_DISABLE_32BPP
# NX supports a variety of pixel depths. You can save some
# memory by disabling support for unused color depths.
-# CONFIG_NXGL_PACKEDMSFIRST
+# CONFIG_NX_PACKEDMSFIRST
# If a pixel depth of less than 8-bits is used, then NX needs
# to know if the pixels pack from the MS to LS or from LS to MS
# CONFIG_NX_MOUSE
# Build in support for mouse input
# CONFIG_NX_KBD
# Build in support of keypad/keyboard input
+# CONFIG_NXTK_BORDERWIDTH
+# Specifies with with of the border (in pixels) used with
+# framed windows. The default is 4.
+# CONFIG_NXTK_BORDERCOLOR1 and CONFIG_NXTK_BORDERCOLOR2
+# Specify the colors of the border used with framed windows.
+# CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so
+# is normally darker. The default is medium and dark grey,
+# respectively
+# CONFIG_NXTK_AUTORAISE
+# If set, a window will be raised to the top if the mouse position
+# is over a visible portion of the window. Default: A mouse
+# button must be clicked over a visible portion of the window.
+# CONFIG_NXFONTS_CHARBITS
+# The number of bits in the character set. Current options are
+# only 7 and 8. The default is 7.
+# CONFIG_NXFONT_SANS
+# At present, there is only one font. But if there were were more,
+# then this option would select the sans serif font.
#
# NX Multi-user only options:
#
# CONFIG_NX_BLOCKING
# Open the client message queues in blocking mode. In this case,
-# nx_eventhandler() will never return.
+# nx_eventhandler() will not return until a message is received and processed.
# CONFIG_NX_MXSERVERMSGS and CONFIG_NX_MXCLIENTMSGS
# Specifies the maximum number of messages that can fit in
# the message queues. No additional resources are allocated, but
# this can be set to prevent flooding of the client or server with
# too many messages (CONFIG_PREALLOC_MQ_MSGS controls how many
# messages are pre-allocated).
-CONFIG_NXGRAPHICS=y
+#
+CONFIG_NX=y
CONFIG_NX_MULTIUSER=n
CONFIG_NX_NPLANES=1
-CONFIG_NXGLIB_DISABLE_1BPP=y
-CONFIG_NXGLIB_DISABLE_2BPP=y
-CONFIG_NXGLIB_DISABLE_4BPP=y
-CONFIG_NXGLIB_DISABLE_8BPP=y
-CONFIG_NXGLIB_DISABLE_16BPP=y
-CONFIG_NXGLIB_DISABLE_24BPP=y
-CONFIG_NXGLIB_DISABLE_32BPP=n
-CONFIG_NXGL_PACKEDMSFIRST=n
+CONFIG_NX_DISABLE_1BPP=y
+CONFIG_NX_DISABLE_2BPP=y
+CONFIG_NX_DISABLE_4BPP=y
+CONFIG_NX_DISABLE_8BPP=y
+CONFIG_NX_DISABLE_16BPP=y
+CONFIG_NX_DISABLE_24BPP=y
+CONFIG_NX_DISABLE_32BPP=n
+CONFIG_NX_PACKEDMSFIRST=n
CONFIG_NX_MOUSE=y
CONFIG_NX_KBD=y
+#CONFIG_NXTK_BORDERWIDTH=4
+#CONFIG_NXTK_BORDERCOLOR1
+#CONFIG_NXTK_BORDERCOLOR2
+CONFIG_NXTK_AUTORAISE=n
+CONFIG_NXFONT_SANS=y
+CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
diff --git a/nuttx/examples/nx/nx_internal.h b/nuttx/examples/nx/nx_internal.h
index af3f34ba3..7e1594d68 100644
--- a/nuttx/examples/nx/nx_internal.h
+++ b/nuttx/examples/nx/nx_internal.h
@@ -52,8 +52,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_NXGRAPHICS
-# error "NX is not enabled (CONFIG_NXGRAPHICS)"
+#ifndef CONFIG_NX
+# error "NX is not enabled (CONFIG_NX)"
#endif
#ifndef CONFIG_EXAMPLES_NX_VPLANE
@@ -278,7 +278,7 @@ extern nxgl_mxpixel_t g_tbcolor[CONFIG_NX_NPLANES];
* Public Function Prototypes
****************************************************************************/
-#if defined(CONFIG_NXGRAPHICS) && defined(CONFIG_NX_MULTIUSER)
+#if defined(CONFIG_NX) && defined(CONFIG_NX_MULTIUSER)
extern int nx_servertask(int argc, char *argv[]);
extern FAR void *nx_listenerthread(FAR void *arg);
#endif
diff --git a/nuttx/examples/nx/nx_server.c b/nuttx/examples/nx/nx_server.c
index f983fa2bf..1ac3258aa 100644
--- a/nuttx/examples/nx/nx_server.c
+++ b/nuttx/examples/nx/nx_server.c
@@ -51,7 +51,7 @@
#include <nuttx/nx.h>
#include "nx_internal.h"
-#if defined(CONFIG_NXGRAPHICS) && defined(CONFIG_NX_MULTIUSER)
+#ifdef CONFIG_NX_MULTIUSER
/****************************************************************************
* Definitions
@@ -106,4 +106,4 @@ int nx_servertask(int argc, char *argv[])
return 3;
}
-#endif \ No newline at end of file
+#endif /* CONFIG_NX_MULTIUSER */ \ No newline at end of file
diff --git a/nuttx/graphics/README.txt b/nuttx/graphics/README.txt
index 07efa722d..ded6f531c 100644
--- a/nuttx/graphics/README.txt
+++ b/nuttx/graphics/README.txt
@@ -2,7 +2,7 @@ README
^^^^^^
This directory contains tiny graphics support for NuttX. The contents of this directory
-are only build if CONFIG_NXGRAPHICS is defined in the NuttX configuration file.
+are only build if CONFIG_NX is defined in the NuttX configuration file.
Roadmap
^^^^^^^
@@ -80,3 +80,57 @@ graphics/nxtk
graphics/nxwidgets
At one time, I planned to put NXWIDGETS implementation here, but not anymore.
+Configuration Settings
+^^^^^^^^^^^^^^^^^^^^^^
+
+CONFIG_NX
+ Enables overall support for graphics library and NX
+CONFIG_NX_MULTIUSER
+ Configures NX in multi-user mode
+CONFIG_NX_NPLANES
+ Some YUV color formats requires support for multiple planes, one for each
+ color component. Unless you have such special hardware, this value should be
+ undefined or set to 1.
+CONFIG_NX_DISABLE_1BPP, CONFIG_NX_DISABLE_2BPP,
+CONFIG_NX_DISABLE_4BPP, CONFIG_NX_DISABLE_8BPP,
+CONFIG_NX_DISABLE_16BPP, CONFIG_NX_DISABLE_24BPP, and
+CONFIG_NX_DISABLE_32BPP
+ NX supports a variety of pixel depths. You can save some memory by disabling
+ support for unused color depths.
+CONFIG_NX_PACKEDMSFIRST
+ If a pixel depth of less than 8-bits is used, then NX needs to know if the
+ pixels pack from the MS to LS or from LS to MS
+CONFIG_NX_MOUSE
+ Build in support for mouse input.
+CONFIG_NX_KBD
+ Build in support of keypad/keyboard input.
+CONFIG_NXTK_BORDERWIDTH
+ Specifies with with of the border (in pixels) used with framed windows.
+ The default is 4.
+CONFIG_NXTK_BORDERCOLOR1 and CONFIG_NXTK_BORDERCOLOR2
+ Specify the colors of the border used with framed windows.
+ CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
+ The default is medium and dark grey, respectively
+CONFIG_NXTK_AUTORAISE
+ If set, a window will be raised to the top if the mouse position is over a
+ visible portion of the window. Default: A mouse button must be clicked over
+ a visible portion of the window.
+CONFIG_NXFONTS_CHARBITS
+ The number of bits in the character set. Current options are only 7 and 8.
+ The default is 7.
+CONFIG_NXFONT_SANS
+ At present, there is only one font. But if there were were more, then this
+ option would select the sans serif font.
+
+NX Multi-user only options:
+
+CONFIG_NX_BLOCKING
+ Open the client message queues in blocking mode. In this case,
+ nx_eventhandler() will not return until a message is received and processed.
+CONFIG_NX_MXSERVERMSGS and CONFIG_NX_MXCLIENTMSGS
+ Specifies the maximum number of messages that can fit in the message queues.
+ No additional resources are allocated, but this can be set to prevent
+ flooding of the client or server with too many messages (CONFIG_PREALLOC_MQ_MSGS
+ controls how many messages are pre-allocated).
+
+
diff --git a/nuttx/graphics/nxbe/nxbe_fbconfigure.c b/nuttx/graphics/nxbe/nxbe_fbconfigure.c
index 0cf41cd27..3bf7f68c6 100644
--- a/nuttx/graphics/nxbe/nxbe_fbconfigure.c
+++ b/nuttx/graphics/nxbe/nxbe_fbconfigure.c
@@ -124,7 +124,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
* will signicantly increase the size
*/
-#ifndef CONFIG_NXGLIB_DISABLE_1BPP
+#ifndef CONFIG_NX_DISABLE_1BPP
if (be->plane[i].pinfo.bpp == 1)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_1bpp;
@@ -134,7 +134,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
-#ifndef CONFIG_NXGLIB_DISABLE_2BPP
+#ifndef CONFIG_NX_DISABLE_2BPP
if (be->plane[i].pinfo.bpp == 2)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_2bpp;
@@ -144,7 +144,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
-#ifndef CONFIG_NXGLIB_DISABLE_4BPP
+#ifndef CONFIG_NX_DISABLE_4BPP
if (be->plane[i].pinfo.bpp == 4)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_4bpp;
@@ -154,7 +154,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
-#ifndef CONFIG_NXGLIB_DISABLE_8BPP
+#ifndef CONFIG_NX_DISABLE_8BPP
if (be->plane[i].pinfo.bpp == 8)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_8bpp;
@@ -164,7 +164,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
-#ifndef CONFIG_NXGLIB_DISABLE_16BPP
+#ifndef CONFIG_NX_DISABLE_16BPP
if (be->plane[i].pinfo.bpp == 16)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_16bpp;
@@ -174,7 +174,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
-#ifndef CONFIG_NXGLIB_DISABLE_24BPP
+#ifndef CONFIG_NX_DISABLE_24BPP
if (be->plane[i].pinfo.bpp == 24)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_24bpp;
@@ -184,7 +184,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
-#ifndef CONFIG_NXGLIB_DISABLE_32BPP
+#ifndef CONFIG_NX_DISABLE_32BPP
if (be->plane[i].pinfo.bpp == 32)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_32bpp;
diff --git a/nuttx/graphics/nxfonts/nxfonts_convert.c b/nuttx/graphics/nxfonts/nxfonts_convert.c
index 852c9e5af..f58add4c6 100644
--- a/nuttx/graphics/nxfonts/nxfonts_convert.c
+++ b/nuttx/graphics/nxfonts/nxfonts_convert.c
@@ -191,7 +191,7 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
col = 0;
dptr = (FAR NXF_PIXEL_T*)line;
pixel = *dptr;
-#ifdef CONFIG_NXF_PACKEDMSFIRST
+#ifdef CONFIG_NX_PACKEDMSFIRST
mask = NXF_PIXELMASK << (8 - NXFONTS_BITSPERPIXEL);
#else
mask = NXF_PIXELMASK;
@@ -215,7 +215,7 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
pixel = ((pixel & ~mask) | (mpixel & mask));
}
-#ifdef CONFIG_NXF_PACKEDMSFIRST
+#ifdef CONFIG_NX_PACKEDMSFIRST
mask >>= NXFONTS_BITSPERPIXEL;
#else
mask <<= NXFONTS_BITSPERPIXEL;
@@ -277,4 +277,4 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
}
#endif
return bm->metric.width + bm->metric.xoffset;
-} \ No newline at end of file
+}
diff --git a/nuttx/graphics/nxglib/nxglib_copyrectangle.c b/nuttx/graphics/nxglib/nxglib_copyrectangle.c
index 500b92184..c7026152e 100644
--- a/nuttx/graphics/nxglib/nxglib_copyrectangle.c
+++ b/nuttx/graphics/nxglib/nxglib_copyrectangle.c
@@ -110,7 +110,7 @@ void NXGL_FUNCNAME(nxgl_copyrectangle,NXGLIB_SUFFIX)
rows = dest->pt2.y - dest->pt1.y + 1;
#if NXGLIB_BITSPERPIXEL < 8
-# ifdef CONFIG_NXGL_PACKEDMSFIRST
+# ifdef CONFIG_NX_PACKEDMSFIRST
/* Get the mask for pixels that are ordered so that they pack from the
* MS byte down.
diff --git a/nuttx/graphics/nxglib/nxglib_fillrectangle.c b/nuttx/graphics/nxglib/nxglib_fillrectangle.c
index ee8b6dd01..a83025b45 100644
--- a/nuttx/graphics/nxglib/nxglib_fillrectangle.c
+++ b/nuttx/graphics/nxglib/nxglib_fillrectangle.c
@@ -112,7 +112,7 @@ void NXGL_FUNCNAME(nxgl_fillrectangle,NXGLIB_SUFFIX)
line = pinfo->fbmem + rect->pt1.y * stride + NXGL_SCALEX(rect->pt1.x);
#if NXGLIB_BITSPERPIXEL < 8
-# ifdef CONFIG_NXGL_PACKEDMSFIRST
+# ifdef CONFIG_NX_PACKEDMSFIRST
/* Get the mask for pixels that are ordered so that they pack from the
* MS byte down.
diff --git a/nuttx/graphics/nxglib/nxglib_filltrapezoid.c b/nuttx/graphics/nxglib/nxglib_filltrapezoid.c
index 231671735..dde0a6036 100644
--- a/nuttx/graphics/nxglib/nxglib_filltrapezoid.c
+++ b/nuttx/graphics/nxglib/nxglib_filltrapezoid.c
@@ -195,7 +195,7 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX)(
#if NXGLIB_BITSPERPIXEL < 8
/* Handle masking of the fractional initial byte */
-#ifdef CONFIG_NXGL_PACKEDMSFIRST
+#ifdef CONFIG_NX_PACKEDMSFIRST
mask = (ubyte)(0xff >> (8 - NXGL_REMAINDERX(ix1));
#else
mask = (ubyte)(0xff << (8 - NXGL_REMAINDERX(ix1)));
@@ -213,7 +213,7 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX)(
/* Handle masking of the fractional final byte */
-#ifdef CONFIG_NXGL_PACKEDMSFIRST
+#ifdef CONFIG_NX_PACKEDMSFIRST
mask &= (ubyte)(0xff << (8 - NXGL_REMAINDERX(ix2)));
#else
mask &= (ubyte)(0xff >> (8 - NXGL_REMAINDERX(ix2)));
diff --git a/nuttx/graphics/nxglib/nxglib_moverectangle.c b/nuttx/graphics/nxglib/nxglib_moverectangle.c
index 20ec3d927..a13a32986 100644
--- a/nuttx/graphics/nxglib/nxglib_moverectangle.c
+++ b/nuttx/graphics/nxglib/nxglib_moverectangle.c
@@ -153,7 +153,7 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
rows = rect->pt2.y - rect->pt1.y + 1;
#if NXGLIB_BITSPERPIXEL < 8
-# ifdef CONFIG_NXGL_PACKEDMSFIRST
+# ifdef CONFIG_NX_PACKEDMSFIRST
/* Get the mask for pixels that are ordered so that they pack from the
* MS byte down.
diff --git a/nuttx/include/nuttx/nxglib.h b/nuttx/include/nuttx/nxglib.h
index 34bd0bd10..56739592e 100644
--- a/nuttx/include/nuttx/nxglib.h
+++ b/nuttx/include/nuttx/nxglib.h
@@ -76,9 +76,9 @@
* the smallest common pixel representation:
*/
-#if !defined(CONFIG_NXGLIB_DISABLE_32BPP) || !defined(CONFIG_NXGLIB_DISABLE_24BPP)
+#if !defined(CONFIG_NX_DISABLE_32BPP) || !defined(CONFIG_NX_DISABLE_24BPP)
typedef uint32 nxgl_mxpixel_t;
-#elif !defined(CONFIG_NXGLIB_DISABLE_16BPP)
+#elif !defined(CONFIG_NX_DISABLE_16BPP)
typedef uint16 nxgl_mxpixel_t;
#else
typedef ubyte nxgl_mxpixel_t;