2008-11-29 16:17:47 +01:00
|
|
|
README
|
|
|
|
^^^^^^
|
|
|
|
|
2008-11-30 21:05:47 +01:00
|
|
|
This directory contains tiny graphics support for NuttX. The contents of this directory
|
2008-12-05 15:04:37 +01:00
|
|
|
are only build if CONFIG_NX is defined in the NuttX configuration file.
|
2008-11-30 21:05:47 +01:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
Contents
|
|
|
|
^^^^^^^^
|
|
|
|
Roadmap
|
|
|
|
Related Header Files
|
|
|
|
Directories
|
|
|
|
Installing New Fonts
|
|
|
|
Configuration Settings
|
|
|
|
|
2008-11-29 16:17:47 +01:00
|
|
|
Roadmap
|
|
|
|
^^^^^^^
|
|
|
|
|
|
|
|
This directory holds NuttX graphic packages. Not all of these packages are implemented
|
|
|
|
at the present, but here is the longer term roadmap:
|
|
|
|
|
2012-03-27 00:10:21 +02:00
|
|
|
NxWidgets - NxWidgets is a higher level, C++, object-oriented library for object-
|
|
|
|
oriented access to graphics "widgets." NxWidgets is provided as a separate
|
|
|
|
package. NxWidgets is built on top of the core NuttX graphics subsystem,
|
2019-09-05 16:10:42 +02:00
|
|
|
but is not a part of the core graphics subsystems.
|
2008-11-29 16:17:47 +01:00
|
|
|
NXTOOLKIT - A set of C graphics tools that provide higher-level window drawing
|
|
|
|
operations. The toolkit can be used for window-oriented graphics
|
2012-03-27 00:10:21 +02:00
|
|
|
without NxWidgets and is built on top of NX.
|
2017-11-18 17:19:34 +01:00
|
|
|
NXFONTS - A set of C graphics tools for presenting (bitmap) font images.
|
2018-08-13 15:39:38 +02:00
|
|
|
NX - The tiny NuttX windowing system. This includes the small-footprint
|
2020-02-23 09:50:23 +01:00
|
|
|
multi-user implementation (NXMU as described below). NX can be used
|
2017-10-15 17:34:08 +02:00
|
|
|
without NxWidgets and without NXTOOLKIT for raw access to window memory.
|
2008-11-29 16:17:47 +01:00
|
|
|
NXGLIB - Low level graphics utilities and direct framebuffer rendering logic.
|
2008-12-05 23:57:27 +01:00
|
|
|
NX is built on top of NXGLIB.
|
2019-09-05 16:10:42 +02:00
|
|
|
NxTerm - NxTerm is a write-only character device that is built on top of
|
2012-03-27 21:40:49 +02:00
|
|
|
an NX window. This character device can be used to provide stdout
|
|
|
|
and stderr and, hence, can provide the output side of NuttX console.
|
2012-03-30 00:20:47 +02:00
|
|
|
|
2008-11-29 16:17:47 +01:00
|
|
|
|
2008-11-30 21:05:47 +01:00
|
|
|
Related Header Files
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2011-07-24 22:49:01 +02:00
|
|
|
include/nuttx/nx/nxglib.h -- Describes the NXGLIB C interfaces
|
|
|
|
include/nuttx/nx/nx.h -- Describes the NX C interfaces
|
|
|
|
include/nuttx/nx/nxtk.h -- Describe the NXTOOLKIT C interfaces
|
|
|
|
include/nuttx/nx/nxfont.h -- Describe sthe NXFONT C interfaces
|
2008-11-30 21:05:47 +01:00
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
Directories
|
|
|
|
^^^^^^^^^^^
|
2008-11-29 16:17:47 +01:00
|
|
|
|
2013-12-28 15:40:03 +01:00
|
|
|
The graphics capability consist both of components internal to the RTOS
|
|
|
|
and of user-callable interfaces. In the NuttX kernel mode build there are
|
|
|
|
some components of the graphics subsystem are callable in user mode and other
|
|
|
|
components that are internal to the RTOS. This directory, nuttx/graphics,
|
|
|
|
contains only those components that are internal to the RTOS.
|
|
|
|
|
|
|
|
User callable functions must, instead, be part of a library that can be
|
|
|
|
linked against user applications. This user callable interfaces are
|
|
|
|
provided in sub-directories under nuttx/libnx.
|
|
|
|
|
|
|
|
libnx/nx
|
2017-10-15 17:34:08 +02:00
|
|
|
Client application callable interfaces.
|
2013-12-28 15:40:03 +01:00
|
|
|
|
2008-11-29 16:17:47 +01:00
|
|
|
graphics/nxglib
|
2013-12-28 15:40:03 +01:00
|
|
|
libnx/nxglib
|
2008-11-29 16:17:47 +01:00
|
|
|
The NuttX tiny graphics library. The directory contains generic utilities
|
|
|
|
support operations on primitive graphics objects and logic to rasterize directly
|
|
|
|
into a framebuffer. It has no concept of windows (other than the one, framebuffer
|
|
|
|
window).
|
|
|
|
|
|
|
|
graphics/nxbe
|
2017-10-15 17:34:08 +02:00
|
|
|
This is the "back-end" of a tiny windowing system. It contains most
|
|
|
|
of the important window management logic: clipping, window controls,
|
|
|
|
window drawing, etc. Currently, the NXserver is the only "front-end"
|
2019-04-05 16:24:46 +02:00
|
|
|
(Historically, there was a single user front-end, NXSU, but that front-
|
|
|
|
end no longer exists).
|
2013-12-28 15:40:03 +01:00
|
|
|
|
2009-11-05 15:07:41 +01:00
|
|
|
graphics/nxmu
|
2013-12-28 15:40:03 +01:00
|
|
|
libnx/nxmu
|
2017-10-15 17:34:08 +02:00
|
|
|
This is the NX multi user "front end". When combined with the generic
|
|
|
|
"back-end" (nxbe), it implements a multi-threaded, multi-user windowing
|
|
|
|
system. The files in this directory present the window APIs described in
|
2019-04-05 16:24:46 +02:00
|
|
|
include/nuttx/nx/nx.h. The multi-user front-end includes the NX graphics
|
2017-10-15 17:34:08 +02:00
|
|
|
server that executes on its own thread; multiple graphics clients then
|
|
|
|
communicate with the server via a POSIX message queue to serialize window
|
|
|
|
operations from many threads. The multi-user front-end is selected
|
|
|
|
automatically.
|
2008-11-25 01:08:01 +01:00
|
|
|
|
2013-12-28 18:33:21 +01:00
|
|
|
libnx/nxfonts
|
2008-12-05 01:42:37 +01:00
|
|
|
This is where the NXFONTS implementation resides. This is a relatively low-
|
2011-07-24 22:49:01 +02:00
|
|
|
level set of charset set/glyph management APIs. See include/nuttx/nx/nxfonts.h
|
2008-12-05 01:42:37 +01:00
|
|
|
|
2013-12-28 18:33:21 +01:00
|
|
|
libnx/nxtk
|
2008-12-01 19:50:15 +01:00
|
|
|
This is where the NXTOOLKIT implementation resides. This toolkit is built on
|
|
|
|
top of NX and works with either the single-user or multi-user NX version. See
|
2011-07-24 22:49:01 +02:00
|
|
|
include/nuttx/nx/nxtk.h
|
2008-11-30 21:05:47 +01:00
|
|
|
|
2012-03-27 00:10:21 +02:00
|
|
|
nuttx/../NxWidgets
|
|
|
|
The NxWidgets code is provided as a separate package located outside of the
|
|
|
|
NuttX source tree (probably at this location).
|
2008-11-30 21:05:47 +01:00
|
|
|
|
2016-04-13 23:42:56 +02:00
|
|
|
graphics/vnc
|
|
|
|
The future home of the VNC Remote Frame Buffer (RFB) server and client
|
|
|
|
implementations.
|
|
|
|
|
2011-07-23 15:53:59 +02:00
|
|
|
Installing New Fonts
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2017-11-18 18:09:54 +01:00
|
|
|
[Refer to nuttx/libnx/nxfonts/README.txt]
|
2011-07-23 15:53:59 +02:00
|
|
|
|
2008-12-05 15:04:37 +01:00
|
|
|
Configuration Settings
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2012-05-20 18:05:15 +02:00
|
|
|
General NX Settings
|
|
|
|
-------------------
|
|
|
|
|
2008-12-05 15:04:37 +01:00
|
|
|
CONFIG_NX
|
|
|
|
Enables overall support for graphics library and NX
|
|
|
|
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.
|
2012-05-07 23:25:24 +02:00
|
|
|
CONFIG_NX_WRITEONLY
|
|
|
|
Define if the underlying graphics device does not support read operations.
|
|
|
|
Automatically defined if CONFIG_NX_LCDDRIVER and CONFIG_LCD_NOGETRUN are
|
|
|
|
defined.
|
2008-12-05 15:04:37 +01:00
|
|
|
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
|
2014-07-17 00:31:31 +02:00
|
|
|
CONFIG_NX_XYINPUT
|
|
|
|
Build in support for a X/Y positional input device such as a mouse or a
|
|
|
|
touchscreen.
|
2008-12-05 15:04:37 +01:00
|
|
|
CONFIG_NX_KBD
|
|
|
|
Build in support of keypad/keyboard input.
|
|
|
|
CONFIG_NXTK_BORDERWIDTH
|
2020-01-27 05:55:23 +01:00
|
|
|
Specifies the width of the border (in pixels) used with framed windows.
|
2008-12-05 15:04:37 +01:00
|
|
|
The default is 4.
|
2012-05-04 22:48:52 +02:00
|
|
|
CONFIG_NXTK_BORDERCOLOR1, CONFIG_NXTK_BORDERCOLOR2, CONFIG_NXTK_BORDERCOLOR3
|
2008-12-05 15:04:37 +01:00
|
|
|
Specify the colors of the border used with framed windows.
|
|
|
|
CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
|
2012-05-04 22:48:52 +02:00
|
|
|
CONFIG_NXTK_BORDERCOLOR3 is the shiny side color and so is normally brighter.
|
|
|
|
The default is mediumdark grey, and light grey, respectively
|
2008-12-05 15:04:37 +01:00
|
|
|
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.
|
2016-04-13 23:42:56 +02:00
|
|
|
CONFIG_VNCSERVER and CONFIG_VNCCLIENT
|
|
|
|
Enable the VNC RFB server and client, respecitively.
|
2011-07-29 07:28:06 +02:00
|
|
|
|
2012-05-20 18:05:15 +02:00
|
|
|
Font Selections
|
|
|
|
---------------
|
|
|
|
|
2017-11-18 18:09:54 +01:00
|
|
|
[Refer to nuttx/libnx/nxfonts/README.txt]
|
2008-12-05 15:04:37 +01:00
|
|
|
|
2014-09-20 23:01:50 +02:00
|
|
|
NxTerm Configuration Settings
|
2012-05-20 18:05:15 +02:00
|
|
|
--------------------------------
|
2012-03-27 21:40:49 +02:00
|
|
|
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM
|
2014-09-20 23:01:50 +02:00
|
|
|
Enables building of the NxTerm driver.
|
2012-05-20 18:05:15 +02:00
|
|
|
|
2014-09-20 23:01:50 +02:00
|
|
|
NxTerm output text/graphics options:
|
2012-05-20 18:05:15 +02:00
|
|
|
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_BPP
|
2014-09-20 23:01:50 +02:00
|
|
|
Currently, NxTerm supports only a single pixel depth. This
|
2012-03-27 21:40:49 +02:00
|
|
|
configuration setting must be provided to support that single pixel depth.
|
|
|
|
Default: The smallest enabled pixel depth. (see CONFIG_NX_DISABLE_*BPP)
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_CURSORCHAR
|
2012-03-31 18:26:32 +02:00
|
|
|
The bitmap code to use as the cursor. Default '_'
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_MXCHARS
|
2014-09-20 23:01:50 +02:00
|
|
|
NxTerm needs to remember every character written to the console so
|
2012-03-27 21:40:49 +02:00
|
|
|
that it can redraw the window. This setting determines the size of some
|
|
|
|
internal memory allocations used to hold the character data. Default: 128.
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_CACHESIZE
|
2014-09-20 23:01:50 +02:00
|
|
|
NxTerm supports caching of rendered fonts. This font caching is required
|
2012-03-31 00:49:08 +02:00
|
|
|
for two reasons: (1) First, it improves text performance, but more
|
|
|
|
importantly (2) it preserves the font memory. Since the NX server runs on
|
|
|
|
a separate server thread, it requires that the rendered font memory persist
|
|
|
|
until the server has a chance to render the font. Unfortunately, the font
|
2014-09-20 22:18:08 +02:00
|
|
|
cache would be quite large if all fonts were saved. The CONFIG_NXTERM_CACHESIZE
|
2012-03-31 00:49:08 +02:00
|
|
|
setting will control the size of the font cache (in number of glyphs). Only that
|
|
|
|
number of the most recently used glyphs will be retained. Default: 16.
|
2014-09-20 23:01:50 +02:00
|
|
|
NOTE: There can still be a race condition between the NxTerm driver and the
|
2012-03-31 00:49:08 +02:00
|
|
|
NX task. If you every see character corruption (especially when printing
|
2014-09-20 22:18:08 +02:00
|
|
|
a lot of data or scrolling), then increasing the value of CONFIG_NXTERM_CACHESIZE
|
2012-03-31 00:49:08 +02:00
|
|
|
is something that you should try. Alternatively, you can reduce the size of
|
2014-09-20 23:01:50 +02:00
|
|
|
CONFIG_MQ_MAXMSGSIZE which will force NxTerm task to pace the server task.
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_CACHESIZE should be larger than CONFIG_MQ_MAXMSGSIZE in any event.
|
|
|
|
CONFIG_NXTERM_LINESEPARATION
|
2012-03-30 20:42:40 +02:00
|
|
|
This the space (in rows) between each row of test. Default: 0
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_NOWRAP
|
2012-03-27 21:40:49 +02:00
|
|
|
By default, lines will wrap when the test reaches the right hand side
|
|
|
|
of the window. This setting can be defining to change this behavior so
|
|
|
|
that the text is simply truncated until a new line is encountered.
|
|
|
|
|
2014-09-20 23:01:50 +02:00
|
|
|
NxTerm Input options
|
2012-05-20 18:05:15 +02:00
|
|
|
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_NXKBDIN
|
2012-05-20 18:05:15 +02:00
|
|
|
Take input from the NX keyboard input callback. By default, keyboard
|
|
|
|
input is taken from stdin (/dev/console). If this option is set, then
|
2014-09-20 23:53:28 +02:00
|
|
|
the interface nxterm_kdbin() is enabled. That interface may be driven
|
2012-05-20 18:05:15 +02:00
|
|
|
by window callback functions so that keyboard input *only* goes to the
|
|
|
|
top window.
|
2015-05-24 01:08:35 +02:00
|
|
|
CONFIG_NXTERM_KBDBUFSIZE
|
2014-09-20 22:18:08 +02:00
|
|
|
If CONFIG_NXTERM_NXKBDIN is enabled, then this value may be used to
|
2012-05-20 18:05:15 +02:00
|
|
|
define the size of the per-window keyboard input buffer. Default: 16
|
2014-09-20 22:18:08 +02:00
|
|
|
CONFIG_NXTERM_NPOLLWAITERS
|
2012-05-20 18:05:15 +02:00
|
|
|
The number of threads that can be waiting for read data available.
|
|
|
|
Default: 4
|
|
|
|
|
2017-11-18 17:19:34 +01:00
|
|
|
NX Multi-user options
|
|
|
|
---------------------
|
2008-12-05 15:04:37 +01:00
|
|
|
|
|
|
|
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).
|